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>
This commit is contained in:

committed by
Jeff Garzik

parent
cc12dac2e5
commit
dc8cfa55da
@@ -40,7 +40,7 @@ void xfp_set_led(struct efx_nic *p, int led, int mode)
|
||||
}
|
||||
|
||||
struct xfp_phy_data {
|
||||
int tx_disabled;
|
||||
bool tx_disabled;
|
||||
};
|
||||
|
||||
#define XFP_MAX_RESET_TIME 500
|
||||
@@ -151,7 +151,7 @@ static void xfp_phy_reconfigure(struct efx_nic *efx)
|
||||
static void xfp_phy_fini(struct efx_nic *efx)
|
||||
{
|
||||
/* Clobber the LED if it was blinking */
|
||||
efx->board_info.blink(efx, 0);
|
||||
efx->board_info.blink(efx, false);
|
||||
|
||||
/* Free the context block */
|
||||
kfree(efx->phy_data);
|
||||
|
Reference in New Issue
Block a user