Skip to content

Commit 1dc8079

Browse files
JuliaLawallKalle Valo
authored andcommitted
iwlegacy: constify local structures
For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches <[email protected]>. Signed-off-by: Julia Lawall <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
1 parent 8136fd5 commit 1dc8079

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/wireless/intel/iwlegacy

1 file changed

+2
-2
lines changed

drivers/net/wireless/intel/iwlegacy/3945.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2671,7 +2671,7 @@ const struct il_ops il3945_ops = {
26712671
.send_led_cmd = il3945_send_led_cmd,
26722672
};
26732673

2674-
static struct il_cfg il3945_bg_cfg = {
2674+
static const struct il_cfg il3945_bg_cfg = {
26752675
.name = "3945BG",
26762676
.fw_name_pre = IL3945_FW_PRE,
26772677
.ucode_api_max = IL3945_UCODE_API_MAX,
@@ -2700,7 +2700,7 @@ static struct il_cfg il3945_bg_cfg = {
27002700
},
27012701
};
27022702

2703-
static struct il_cfg il3945_abg_cfg = {
2703+
static const struct il_cfg il3945_abg_cfg = {
27042704
.name = "3945ABG",
27052705
.fw_name_pre = IL3945_FW_PRE,
27062706
.ucode_api_max = IL3945_UCODE_API_MAX,

0 commit comments

Comments
 (0)