diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-12-19 08:56:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-19 22:27:29 -0500 |
commit | 3db1cd5c05f35fb43eb134df6f321de4e63141f2 (patch) | |
tree | 960039f3f4f0a524b37e94434624da154859bc64 /drivers/net/ethernet/brocade/bna | |
parent | a8e510f682fe6d7671c11887e07c55f86caaf3c1 (diff) |
net: fix assignment of 0/1 to bool variables.
DaveM said:
Please, this kind of stuff rots forever and not using bool properly
drives me crazy.
Joe Perches <joe@perches.com> gave me the spatch script:
@@
bool b;
@@
-b = 0
+b = false
@@
bool b;
@@
-b = 1
+b = true
I merely installed coccinelle, read the documentation and took credit.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/brocade/bna')
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bnad.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c index aac3a3b710a0..197af04ff1ab 100644 --- a/drivers/net/ethernet/brocade/bna/bnad.c +++ b/drivers/net/ethernet/brocade/bna/bnad.c | |||
@@ -723,7 +723,7 @@ void | |||
723 | bnad_cb_ethport_link_status(struct bnad *bnad, | 723 | bnad_cb_ethport_link_status(struct bnad *bnad, |
724 | enum bna_link_status link_status) | 724 | enum bna_link_status link_status) |
725 | { | 725 | { |
726 | bool link_up = 0; | 726 | bool link_up = false; |
727 | 727 | ||
728 | link_up = (link_status == BNA_LINK_UP) || (link_status == BNA_CEE_UP); | 728 | link_up = (link_status == BNA_LINK_UP) || (link_status == BNA_CEE_UP); |
729 | 729 | ||
@@ -3190,7 +3190,7 @@ bnad_pci_init(struct bnad *bnad, | |||
3190 | goto disable_device; | 3190 | goto disable_device; |
3191 | if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)) && | 3191 | if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)) && |
3192 | !dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64))) { | 3192 | !dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64))) { |
3193 | *using_dac = 1; | 3193 | *using_dac = true; |
3194 | } else { | 3194 | } else { |
3195 | err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); | 3195 | err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); |
3196 | if (err) { | 3196 | if (err) { |
@@ -3199,7 +3199,7 @@ bnad_pci_init(struct bnad *bnad, | |||
3199 | if (err) | 3199 | if (err) |
3200 | goto release_regions; | 3200 | goto release_regions; |
3201 | } | 3201 | } |
3202 | *using_dac = 0; | 3202 | *using_dac = false; |
3203 | } | 3203 | } |
3204 | pci_set_master(pdev); | 3204 | pci_set_master(pdev); |
3205 | return 0; | 3205 | return 0; |