@@ -217,7 +217,7 @@ struct smi_info {
217217 unsigned char msg_flags ;
218218
219219 /* Does the BMC have an event buffer? */
220- char has_event_buffer ;
220+ bool has_event_buffer ;
221221
222222 /*
223223 * If set to true, this will request events the next time the
@@ -230,7 +230,7 @@ struct smi_info {
230230 * call. Generally used after a panic to make sure stuff goes
231231 * out.
232232 */
233- int run_to_completion ;
233+ bool run_to_completion ;
234234
235235 /* The I/O port of an SI interface. */
236236 int port ;
@@ -266,7 +266,7 @@ struct smi_info {
266266 * memory. Once that situation clears up, it will re-enable
267267 * interrupts.
268268 */
269- int interrupt_disabled ;
269+ bool interrupt_disabled ;
270270
271271 /* From the get device id response... */
272272 struct ipmi_device_id device_id ;
@@ -279,7 +279,7 @@ struct smi_info {
279279 * True if we allocated the device, false if it came from
280280 * someplace else (like PCI).
281281 */
282- int dev_registered ;
282+ bool dev_registered ;
283283
284284 /* Slave address, could be reported from DMI. */
285285 unsigned char slave_addr ;
@@ -303,19 +303,19 @@ struct smi_info {
303303static int force_kipmid [SI_MAX_PARMS ];
304304static int num_force_kipmid ;
305305#ifdef CONFIG_PCI
306- static int pci_registered ;
306+ static bool pci_registered ;
307307#endif
308308#ifdef CONFIG_ACPI
309- static int pnp_registered ;
309+ static bool pnp_registered ;
310310#endif
311311#ifdef CONFIG_PARISC
312- static int parisc_registered ;
312+ static bool parisc_registered ;
313313#endif
314314
315315static unsigned int kipmid_max_busy_us [SI_MAX_PARMS ];
316316static int num_max_busy_us ;
317317
318- static int unload_when_empty = 1 ;
318+ static bool unload_when_empty = true ;
319319
320320static int add_smi (struct smi_info * smi );
321321static int try_smi_init (struct smi_info * smi );
@@ -457,7 +457,7 @@ static inline void disable_si_irq(struct smi_info *smi_info)
457457{
458458 if ((smi_info -> irq ) && (!smi_info -> interrupt_disabled )) {
459459 start_disable_irq (smi_info );
460- smi_info -> interrupt_disabled = 1 ;
460+ smi_info -> interrupt_disabled = true ;
461461 if (!atomic_read (& smi_info -> stop_operation ))
462462 smi_mod_timer (smi_info , jiffies + SI_TIMEOUT_JIFFIES );
463463 }
@@ -467,7 +467,7 @@ static inline void enable_si_irq(struct smi_info *smi_info)
467467{
468468 if ((smi_info -> irq ) && (smi_info -> interrupt_disabled )) {
469469 start_enable_irq (smi_info );
470- smi_info -> interrupt_disabled = 0 ;
470+ smi_info -> interrupt_disabled = false ;
471471 }
472472}
473473
@@ -712,7 +712,7 @@ static void handle_transaction_done(struct smi_info *smi_info)
712712 dev_warn (smi_info -> dev ,
713713 "Maybe ok, but ipmi might run very slowly.\n" );
714714 } else
715- smi_info -> interrupt_disabled = 0 ;
715+ smi_info -> interrupt_disabled = false ;
716716 smi_info -> si_state = SI_NORMAL ;
717717 break ;
718718 }
@@ -935,7 +935,7 @@ static void sender(void *send_info,
935935 spin_unlock_irqrestore (& smi_info -> si_lock , flags );
936936}
937937
938- static void set_run_to_completion (void * send_info , int i_run_to_completion )
938+ static void set_run_to_completion (void * send_info , bool i_run_to_completion )
939939{
940940 struct smi_info * smi_info = send_info ;
941941 enum si_sm_result result ;
@@ -1050,7 +1050,7 @@ static void poll(void *send_info)
10501050{
10511051 struct smi_info * smi_info = send_info ;
10521052 unsigned long flags = 0 ;
1053- int run_to_completion = smi_info -> run_to_completion ;
1053+ bool run_to_completion = smi_info -> run_to_completion ;
10541054
10551055 /*
10561056 * Make sure there is some delay in the poll loop so we can
@@ -1075,7 +1075,7 @@ static void request_events(void *send_info)
10751075 atomic_set (& smi_info -> req_events , 1 );
10761076}
10771077
1078- static void set_need_watch (void * send_info , int enable )
1078+ static void set_need_watch (void * send_info , bool enable )
10791079{
10801080 struct smi_info * smi_info = send_info ;
10811081 unsigned long flags ;
@@ -1223,7 +1223,7 @@ static int get_smi_info(void *send_info, struct ipmi_smi_info *data)
12231223 return 0 ;
12241224}
12251225
1226- static void set_maintenance_mode (void * send_info , int enable )
1226+ static void set_maintenance_mode (void * send_info , bool enable )
12271227{
12281228 struct smi_info * smi_info = send_info ;
12291229
@@ -1364,7 +1364,7 @@ module_param_array(force_kipmid, int, &num_force_kipmid, 0);
13641364MODULE_PARM_DESC (force_kipmid , "Force the kipmi daemon to be enabled (1) or"
13651365 " disabled(0). Normally the IPMI driver auto-detects"
13661366 " this, but the value may be overridden by this parm." );
1367- module_param (unload_when_empty , int , 0 );
1367+ module_param (unload_when_empty , bool , 0 );
13681368MODULE_PARM_DESC (unload_when_empty , "Unload the module if no interfaces are"
13691369 " specified or found, default is 1. Setting to 0"
13701370 " is useful for hot add of devices using hotmod." );
@@ -3372,19 +3372,19 @@ static int try_smi_init(struct smi_info *new_smi)
33723372 INIT_LIST_HEAD (& (new_smi -> hp_xmit_msgs ));
33733373 new_smi -> curr_msg = NULL ;
33743374 atomic_set (& new_smi -> req_events , 0 );
3375- new_smi -> run_to_completion = 0 ;
3375+ new_smi -> run_to_completion = false ;
33763376 for (i = 0 ; i < SI_NUM_STATS ; i ++ )
33773377 atomic_set (& new_smi -> stats [i ], 0 );
33783378
3379- new_smi -> interrupt_disabled = 1 ;
3379+ new_smi -> interrupt_disabled = true ;
33803380 atomic_set (& new_smi -> stop_operation , 0 );
33813381 atomic_set (& new_smi -> need_watch , 0 );
33823382 new_smi -> intf_num = smi_num ;
33833383 smi_num ++ ;
33843384
33853385 rv = try_enable_event_buffer (new_smi );
33863386 if (rv == 0 )
3387- new_smi -> has_event_buffer = 1 ;
3387+ new_smi -> has_event_buffer = true ;
33883388
33893389 /*
33903390 * Start clearing the flags before we enable interrupts or the
@@ -3418,7 +3418,7 @@ static int try_smi_init(struct smi_info *new_smi)
34183418 rv );
34193419 goto out_err ;
34203420 }
3421- new_smi -> dev_registered = 1 ;
3421+ new_smi -> dev_registered = true ;
34223422 }
34233423
34243424 rv = ipmi_register_smi (& handlers ,
@@ -3467,7 +3467,7 @@ static int try_smi_init(struct smi_info *new_smi)
34673467 wait_for_timer_and_thread (new_smi );
34683468
34693469 out_err :
3470- new_smi -> interrupt_disabled = 1 ;
3470+ new_smi -> interrupt_disabled = true ;
34713471
34723472 if (new_smi -> intf ) {
34733473 ipmi_unregister_smi (new_smi -> intf );
@@ -3503,7 +3503,7 @@ static int try_smi_init(struct smi_info *new_smi)
35033503
35043504 if (new_smi -> dev_registered ) {
35053505 platform_device_unregister (new_smi -> pdev );
3506- new_smi -> dev_registered = 0 ;
3506+ new_smi -> dev_registered = false ;
35073507 }
35083508
35093509 return rv ;
@@ -3558,14 +3558,14 @@ static int init_ipmi_si(void)
35583558 printk (KERN_ERR PFX "Unable to register "
35593559 "PCI driver: %d\n" , rv );
35603560 else
3561- pci_registered = 1 ;
3561+ pci_registered = true ;
35623562 }
35633563#endif
35643564
35653565#ifdef CONFIG_ACPI
35663566 if (si_tryacpi ) {
35673567 pnp_register_driver (& ipmi_pnp_driver );
3568- pnp_registered = 1 ;
3568+ pnp_registered = true ;
35693569 }
35703570#endif
35713571
@@ -3581,7 +3581,7 @@ static int init_ipmi_si(void)
35813581
35823582#ifdef CONFIG_PARISC
35833583 register_parisc_driver (& ipmi_parisc_driver );
3584- parisc_registered = 1 ;
3584+ parisc_registered = true ;
35853585 /* poking PC IO addresses will crash machine, don't do it */
35863586 si_trydefaults = 0 ;
35873587#endif
0 commit comments