diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2006-12-10 05:19:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-10 12:55:40 -0500 |
commit | 0c8204b380f92a6a8533d228c50f0b681daf6121 (patch) | |
tree | 2cc04bf14b1eaaf8ab22ab48a2828ff6ea3b27e2 /drivers/char/ipmi | |
parent | 76465493eeadb1662d65aa96477d6fc093da9966 (diff) |
[PATCH] IPMI: remove zero inits
Remove all =0 and =NULL from static initializers. They are not needed and
removing them saves space in the object files.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/ipmi')
-rw-r--r-- | drivers/char/ipmi/ipmi_bt_sm.c | 4 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_devintf.c | 2 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 6 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_poweroff.c | 6 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 12 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_watchdog.c | 18 |
6 files changed, 25 insertions, 23 deletions
diff --git a/drivers/char/ipmi/ipmi_bt_sm.c b/drivers/char/ipmi/ipmi_bt_sm.c index 6c59baa887a8..e736119b6497 100644 --- a/drivers/char/ipmi/ipmi_bt_sm.c +++ b/drivers/char/ipmi/ipmi_bt_sm.c | |||
@@ -37,8 +37,10 @@ | |||
37 | #define BT_DEBUG_ENABLE 1 /* Generic messages */ | 37 | #define BT_DEBUG_ENABLE 1 /* Generic messages */ |
38 | #define BT_DEBUG_MSG 2 /* Prints all request/response buffers */ | 38 | #define BT_DEBUG_MSG 2 /* Prints all request/response buffers */ |
39 | #define BT_DEBUG_STATES 4 /* Verbose look at state changes */ | 39 | #define BT_DEBUG_STATES 4 /* Verbose look at state changes */ |
40 | /* BT_DEBUG_OFF must be zero to correspond to the default uninitialized | ||
41 | value */ | ||
40 | 42 | ||
41 | static int bt_debug = BT_DEBUG_OFF; | 43 | static int bt_debug; /* 0 == BT_DEBUG_OFF */ |
42 | 44 | ||
43 | module_param(bt_debug, int, 0644); | 45 | module_param(bt_debug, int, 0644); |
44 | MODULE_PARM_DESC(bt_debug, "debug bitmask, 1=enable, 2=messages, 4=states"); | 46 | MODULE_PARM_DESC(bt_debug, "debug bitmask, 1=enable, 2=messages, 4=states"); |
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c index e257835a9a73..ff2d052177cb 100644 --- a/drivers/char/ipmi/ipmi_devintf.c +++ b/drivers/char/ipmi/ipmi_devintf.c | |||
@@ -834,7 +834,7 @@ static const struct file_operations ipmi_fops = { | |||
834 | 834 | ||
835 | #define DEVICE_NAME "ipmidev" | 835 | #define DEVICE_NAME "ipmidev" |
836 | 836 | ||
837 | static int ipmi_major = 0; | 837 | static int ipmi_major; |
838 | module_param(ipmi_major, int, 0); | 838 | module_param(ipmi_major, int, 0); |
839 | MODULE_PARM_DESC(ipmi_major, "Sets the major number of the IPMI device. By" | 839 | MODULE_PARM_DESC(ipmi_major, "Sets the major number of the IPMI device. By" |
840 | " default, or if you set it to zero, it will choose the next" | 840 | " default, or if you set it to zero, it will choose the next" |
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 5703ee28e1cc..bfcc6a030a16 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -53,10 +53,10 @@ | |||
53 | static struct ipmi_recv_msg *ipmi_alloc_recv_msg(void); | 53 | static struct ipmi_recv_msg *ipmi_alloc_recv_msg(void); |
54 | static int ipmi_init_msghandler(void); | 54 | static int ipmi_init_msghandler(void); |
55 | 55 | ||
56 | static int initialized = 0; | 56 | static int initialized; |
57 | 57 | ||
58 | #ifdef CONFIG_PROC_FS | 58 | #ifdef CONFIG_PROC_FS |
59 | static struct proc_dir_entry *proc_ipmi_root = NULL; | 59 | static struct proc_dir_entry *proc_ipmi_root; |
60 | #endif /* CONFIG_PROC_FS */ | 60 | #endif /* CONFIG_PROC_FS */ |
61 | 61 | ||
62 | /* Remain in auto-maintenance mode for this amount of time (in ms). */ | 62 | /* Remain in auto-maintenance mode for this amount of time (in ms). */ |
@@ -4043,7 +4043,7 @@ static void send_panic_events(char *str) | |||
4043 | } | 4043 | } |
4044 | #endif /* CONFIG_IPMI_PANIC_EVENT */ | 4044 | #endif /* CONFIG_IPMI_PANIC_EVENT */ |
4045 | 4045 | ||
4046 | static int has_panicked = 0; | 4046 | static int has_panicked; |
4047 | 4047 | ||
4048 | static int panic_event(struct notifier_block *this, | 4048 | static int panic_event(struct notifier_block *this, |
4049 | unsigned long event, | 4049 | unsigned long event, |
diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c index 597eb4f88b84..9d23136e598a 100644 --- a/drivers/char/ipmi/ipmi_poweroff.c +++ b/drivers/char/ipmi/ipmi_poweroff.c | |||
@@ -58,10 +58,10 @@ static int poweroff_powercycle; | |||
58 | static int ifnum_to_use = -1; | 58 | static int ifnum_to_use = -1; |
59 | 59 | ||
60 | /* Our local state. */ | 60 | /* Our local state. */ |
61 | static int ready = 0; | 61 | static int ready; |
62 | static ipmi_user_t ipmi_user; | 62 | static ipmi_user_t ipmi_user; |
63 | static int ipmi_ifnum; | 63 | static int ipmi_ifnum; |
64 | static void (*specific_poweroff_func)(ipmi_user_t user) = NULL; | 64 | static void (*specific_poweroff_func)(ipmi_user_t user); |
65 | 65 | ||
66 | /* Holds the old poweroff function so we can restore it on removal. */ | 66 | /* Holds the old poweroff function so we can restore it on removal. */ |
67 | static void (*old_poweroff_func)(void); | 67 | static void (*old_poweroff_func)(void); |
@@ -182,7 +182,7 @@ static int ipmi_request_in_rc_mode(ipmi_user_t user, | |||
182 | #define IPMI_MOTOROLA_MANUFACTURER_ID 0x0000A1 | 182 | #define IPMI_MOTOROLA_MANUFACTURER_ID 0x0000A1 |
183 | #define IPMI_MOTOROLA_PPS_IPMC_PRODUCT_ID 0x0051 | 183 | #define IPMI_MOTOROLA_PPS_IPMC_PRODUCT_ID 0x0051 |
184 | 184 | ||
185 | static void (*atca_oem_poweroff_hook)(ipmi_user_t user) = NULL; | 185 | static void (*atca_oem_poweroff_hook)(ipmi_user_t user); |
186 | 186 | ||
187 | static void pps_poweroff_atca (ipmi_user_t user) | 187 | static void pps_poweroff_atca (ipmi_user_t user) |
188 | { | 188 | { |
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 81a0c89598e7..0baa094961a8 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -845,7 +845,7 @@ static void request_events(void *send_info) | |||
845 | atomic_set(&smi_info->req_events, 1); | 845 | atomic_set(&smi_info->req_events, 1); |
846 | } | 846 | } |
847 | 847 | ||
848 | static int initialized = 0; | 848 | static int initialized; |
849 | 849 | ||
850 | static void smi_timeout(unsigned long data) | 850 | static void smi_timeout(unsigned long data) |
851 | { | 851 | { |
@@ -1018,13 +1018,13 @@ static int num_ports; | |||
1018 | static int irqs[SI_MAX_PARMS]; | 1018 | static int irqs[SI_MAX_PARMS]; |
1019 | static int num_irqs; | 1019 | static int num_irqs; |
1020 | static int regspacings[SI_MAX_PARMS]; | 1020 | static int regspacings[SI_MAX_PARMS]; |
1021 | static int num_regspacings = 0; | 1021 | static int num_regspacings; |
1022 | static int regsizes[SI_MAX_PARMS]; | 1022 | static int regsizes[SI_MAX_PARMS]; |
1023 | static int num_regsizes = 0; | 1023 | static int num_regsizes; |
1024 | static int regshifts[SI_MAX_PARMS]; | 1024 | static int regshifts[SI_MAX_PARMS]; |
1025 | static int num_regshifts = 0; | 1025 | static int num_regshifts; |
1026 | static int slave_addrs[SI_MAX_PARMS]; | 1026 | static int slave_addrs[SI_MAX_PARMS]; |
1027 | static int num_slave_addrs = 0; | 1027 | static int num_slave_addrs; |
1028 | 1028 | ||
1029 | #define IPMI_IO_ADDR_SPACE 0 | 1029 | #define IPMI_IO_ADDR_SPACE 0 |
1030 | #define IPMI_MEM_ADDR_SPACE 1 | 1030 | #define IPMI_MEM_ADDR_SPACE 1 |
@@ -1668,7 +1668,7 @@ static __devinit void hardcode_find_bmc(void) | |||
1668 | /* Once we get an ACPI failure, we don't try any more, because we go | 1668 | /* Once we get an ACPI failure, we don't try any more, because we go |
1669 | through the tables sequentially. Once we don't find a table, there | 1669 | through the tables sequentially. Once we don't find a table, there |
1670 | are no more. */ | 1670 | are no more. */ |
1671 | static int acpi_failure = 0; | 1671 | static int acpi_failure; |
1672 | 1672 | ||
1673 | /* For GPE-type interrupts. */ | 1673 | /* For GPE-type interrupts. */ |
1674 | static u32 ipmi_acpi_gpe(void *context) | 1674 | static u32 ipmi_acpi_gpe(void *context) |
diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c index 90fb2a541916..78280380a905 100644 --- a/drivers/char/ipmi/ipmi_watchdog.c +++ b/drivers/char/ipmi/ipmi_watchdog.c | |||
@@ -134,14 +134,14 @@ | |||
134 | 134 | ||
135 | static int nowayout = WATCHDOG_NOWAYOUT; | 135 | static int nowayout = WATCHDOG_NOWAYOUT; |
136 | 136 | ||
137 | static ipmi_user_t watchdog_user = NULL; | 137 | static ipmi_user_t watchdog_user; |
138 | static int watchdog_ifnum; | 138 | static int watchdog_ifnum; |
139 | 139 | ||
140 | /* Default the timeout to 10 seconds. */ | 140 | /* Default the timeout to 10 seconds. */ |
141 | static int timeout = 10; | 141 | static int timeout = 10; |
142 | 142 | ||
143 | /* The pre-timeout is disabled by default. */ | 143 | /* The pre-timeout is disabled by default. */ |
144 | static int pretimeout = 0; | 144 | static int pretimeout; |
145 | 145 | ||
146 | /* Default action is to reset the board on a timeout. */ | 146 | /* Default action is to reset the board on a timeout. */ |
147 | static unsigned char action_val = WDOG_TIMEOUT_RESET; | 147 | static unsigned char action_val = WDOG_TIMEOUT_RESET; |
@@ -156,10 +156,10 @@ static unsigned char preop_val = WDOG_PREOP_NONE; | |||
156 | 156 | ||
157 | static char preop[16] = "preop_none"; | 157 | static char preop[16] = "preop_none"; |
158 | static DEFINE_SPINLOCK(ipmi_read_lock); | 158 | static DEFINE_SPINLOCK(ipmi_read_lock); |
159 | static char data_to_read = 0; | 159 | static char data_to_read; |
160 | static DECLARE_WAIT_QUEUE_HEAD(read_q); | 160 | static DECLARE_WAIT_QUEUE_HEAD(read_q); |
161 | static struct fasync_struct *fasync_q = NULL; | 161 | static struct fasync_struct *fasync_q; |
162 | static char pretimeout_since_last_heartbeat = 0; | 162 | static char pretimeout_since_last_heartbeat; |
163 | static char expect_close; | 163 | static char expect_close; |
164 | 164 | ||
165 | static int ifnum_to_use = -1; | 165 | static int ifnum_to_use = -1; |
@@ -177,7 +177,7 @@ static void ipmi_unregister_watchdog(int ipmi_intf); | |||
177 | 177 | ||
178 | /* If true, the driver will start running as soon as it is configured | 178 | /* If true, the driver will start running as soon as it is configured |
179 | and ready. */ | 179 | and ready. */ |
180 | static int start_now = 0; | 180 | static int start_now; |
181 | 181 | ||
182 | static int set_param_int(const char *val, struct kernel_param *kp) | 182 | static int set_param_int(const char *val, struct kernel_param *kp) |
183 | { | 183 | { |
@@ -300,16 +300,16 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started " | |||
300 | static unsigned char ipmi_watchdog_state = WDOG_TIMEOUT_NONE; | 300 | static unsigned char ipmi_watchdog_state = WDOG_TIMEOUT_NONE; |
301 | 301 | ||
302 | /* If shutting down via IPMI, we ignore the heartbeat. */ | 302 | /* If shutting down via IPMI, we ignore the heartbeat. */ |
303 | static int ipmi_ignore_heartbeat = 0; | 303 | static int ipmi_ignore_heartbeat; |
304 | 304 | ||
305 | /* Is someone using the watchdog? Only one user is allowed. */ | 305 | /* Is someone using the watchdog? Only one user is allowed. */ |
306 | static unsigned long ipmi_wdog_open = 0; | 306 | static unsigned long ipmi_wdog_open; |
307 | 307 | ||
308 | /* If set to 1, the heartbeat command will set the state to reset and | 308 | /* If set to 1, the heartbeat command will set the state to reset and |
309 | start the timer. The timer doesn't normally run when the driver is | 309 | start the timer. The timer doesn't normally run when the driver is |
310 | first opened until the heartbeat is set the first time, this | 310 | first opened until the heartbeat is set the first time, this |
311 | variable is used to accomplish this. */ | 311 | variable is used to accomplish this. */ |
312 | static int ipmi_start_timer_on_heartbeat = 0; | 312 | static int ipmi_start_timer_on_heartbeat; |
313 | 313 | ||
314 | /* IPMI version of the BMC. */ | 314 | /* IPMI version of the BMC. */ |
315 | static unsigned char ipmi_version_major; | 315 | static unsigned char ipmi_version_major; |