aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/boards.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-09-01 07:46:50 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-09-03 09:53:45 -0400
commitdc8cfa55da8c21e0b3290c29677a9d05c0a3e595 (patch)
treea4c8bedad12a15d1e7c9fcfc99f873280ca644b4 /drivers/net/sfc/boards.c
parentcc12dac2e512c2b6185ed91899e09e9910630315 (diff)
sfc: Use explicit bool for boolean variables, parameters and return values
Replace (cond ? 1 : 0) with cond or !!cond as appropriate, and (cond ? 0 : 1) with !cond. Remove some redundant boolean temporaries. Rename one field that looks like a flag but isn't. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc/boards.c')
-rw-r--r--drivers/net/sfc/boards.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/sfc/boards.c b/drivers/net/sfc/boards.c
index d3d3dd0a1170..99e602373269 100644
--- a/drivers/net/sfc/boards.c
+++ b/drivers/net/sfc/boards.c
@@ -31,23 +31,23 @@ static void blink_led_timer(unsigned long context)
31 mod_timer(&bl->timer, jiffies + BLINK_INTERVAL); 31 mod_timer(&bl->timer, jiffies + BLINK_INTERVAL);
32} 32}
33 33
34static void board_blink(struct efx_nic *efx, int blink) 34static void board_blink(struct efx_nic *efx, bool blink)
35{ 35{
36 struct efx_blinker *blinker = &efx->board_info.blinker; 36 struct efx_blinker *blinker = &efx->board_info.blinker;
37 37
38 /* The rtnl mutex serialises all ethtool ioctls, so 38 /* The rtnl mutex serialises all ethtool ioctls, so
39 * nothing special needs doing here. */ 39 * nothing special needs doing here. */
40 if (blink) { 40 if (blink) {
41 blinker->resubmit = 1; 41 blinker->resubmit = true;
42 blinker->state = 0; 42 blinker->state = false;
43 setup_timer(&blinker->timer, blink_led_timer, 43 setup_timer(&blinker->timer, blink_led_timer,
44 (unsigned long)efx); 44 (unsigned long)efx);
45 mod_timer(&blinker->timer, jiffies + BLINK_INTERVAL); 45 mod_timer(&blinker->timer, jiffies + BLINK_INTERVAL);
46 } else { 46 } else {
47 blinker->resubmit = 0; 47 blinker->resubmit = false;
48 if (blinker->timer.function) 48 if (blinker->timer.function)
49 del_timer_sync(&blinker->timer); 49 del_timer_sync(&blinker->timer);
50 efx->board_info.set_fault_led(efx, 0); 50 efx->board_info.set_fault_led(efx, false);
51 } 51 }
52} 52}
53 53
@@ -78,7 +78,7 @@ static int sfe4002_init_leds(struct efx_nic *efx)
78 return 0; 78 return 0;
79} 79}
80 80
81static void sfe4002_fault_led(struct efx_nic *efx, int state) 81static void sfe4002_fault_led(struct efx_nic *efx, bool state)
82{ 82{
83 xfp_set_led(efx, SFE4002_FAULT_LED, state ? QUAKE_LED_ON : 83 xfp_set_led(efx, SFE4002_FAULT_LED, state ? QUAKE_LED_ON :
84 QUAKE_LED_OFF); 84 QUAKE_LED_OFF);