diff options
author | Joe Perches <joe@perches.com> | 2012-02-09 06:17:23 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-13 00:47:40 -0500 |
commit | 23677ce3172fcb93522a1df077d21019e73ee1e3 (patch) | |
tree | 9558b9c1f24d03d612f4bae999d453ae7ec637d6 /drivers/net/ethernet/brocade | |
parent | 1a0d6ae5795c376bae6d012fb25e8341e4c6d5f2 (diff) |
drivers/net: Remove boolean comparisons to true/false
Booleans should not be compared to true or false
but be directly tested or tested with !.
Done via cocci script:
@@
bool t;
@@
- t == true
+ t
@@
bool t;
@@
- t != true
+ !t
@@
bool t;
@@
- t == false
+ !t
@@
bool t;
@@
- t != false
+ t
Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/brocade')
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bfa_cee.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bfa_ioc.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bfa_cee.c b/drivers/net/ethernet/brocade/bna/bfa_cee.c index 29f284f79e02..689e5e19cc0b 100644 --- a/drivers/net/ethernet/brocade/bna/bfa_cee.c +++ b/drivers/net/ethernet/brocade/bna/bfa_cee.c | |||
@@ -203,7 +203,7 @@ bfa_nw_cee_get_attr(struct bfa_cee *cee, struct bfa_cee_attr *attr, | |||
203 | if (!bfa_nw_ioc_is_operational(cee->ioc)) | 203 | if (!bfa_nw_ioc_is_operational(cee->ioc)) |
204 | return BFA_STATUS_IOC_FAILURE; | 204 | return BFA_STATUS_IOC_FAILURE; |
205 | 205 | ||
206 | if (cee->get_attr_pending == true) | 206 | if (cee->get_attr_pending) |
207 | return BFA_STATUS_DEVBUSY; | 207 | return BFA_STATUS_DEVBUSY; |
208 | 208 | ||
209 | cee->get_attr_pending = true; | 209 | cee->get_attr_pending = true; |
@@ -272,7 +272,7 @@ bfa_cee_notify(void *arg, enum bfa_ioc_event event) | |||
272 | switch (event) { | 272 | switch (event) { |
273 | case BFA_IOC_E_DISABLED: | 273 | case BFA_IOC_E_DISABLED: |
274 | case BFA_IOC_E_FAILED: | 274 | case BFA_IOC_E_FAILED: |
275 | if (cee->get_attr_pending == true) { | 275 | if (cee->get_attr_pending) { |
276 | cee->get_attr_status = BFA_STATUS_FAILED; | 276 | cee->get_attr_status = BFA_STATUS_FAILED; |
277 | cee->get_attr_pending = false; | 277 | cee->get_attr_pending = false; |
278 | if (cee->cbfn.get_attr_cbfn) { | 278 | if (cee->cbfn.get_attr_cbfn) { |
@@ -281,7 +281,7 @@ bfa_cee_notify(void *arg, enum bfa_ioc_event event) | |||
281 | BFA_STATUS_FAILED); | 281 | BFA_STATUS_FAILED); |
282 | } | 282 | } |
283 | } | 283 | } |
284 | if (cee->get_stats_pending == true) { | 284 | if (cee->get_stats_pending) { |
285 | cee->get_stats_status = BFA_STATUS_FAILED; | 285 | cee->get_stats_status = BFA_STATUS_FAILED; |
286 | cee->get_stats_pending = false; | 286 | cee->get_stats_pending = false; |
287 | if (cee->cbfn.get_stats_cbfn) { | 287 | if (cee->cbfn.get_stats_cbfn) { |
@@ -290,7 +290,7 @@ bfa_cee_notify(void *arg, enum bfa_ioc_event event) | |||
290 | BFA_STATUS_FAILED); | 290 | BFA_STATUS_FAILED); |
291 | } | 291 | } |
292 | } | 292 | } |
293 | if (cee->reset_stats_pending == true) { | 293 | if (cee->reset_stats_pending) { |
294 | cee->reset_stats_status = BFA_STATUS_FAILED; | 294 | cee->reset_stats_status = BFA_STATUS_FAILED; |
295 | cee->reset_stats_pending = false; | 295 | cee->reset_stats_pending = false; |
296 | if (cee->cbfn.reset_stats_cbfn) { | 296 | if (cee->cbfn.reset_stats_cbfn) { |
diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.c b/drivers/net/ethernet/brocade/bna/bfa_ioc.c index abfad275b5f3..77977d735dd7 100644 --- a/drivers/net/ethernet/brocade/bna/bfa_ioc.c +++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.c | |||
@@ -692,7 +692,7 @@ static void | |||
692 | bfa_iocpf_sm_mismatch_entry(struct bfa_iocpf *iocpf) | 692 | bfa_iocpf_sm_mismatch_entry(struct bfa_iocpf *iocpf) |
693 | { | 693 | { |
694 | /* Call only the first time sm enters fwmismatch state. */ | 694 | /* Call only the first time sm enters fwmismatch state. */ |
695 | if (iocpf->fw_mismatch_notified == false) | 695 | if (!iocpf->fw_mismatch_notified) |
696 | bfa_ioc_pf_fwmismatch(iocpf->ioc); | 696 | bfa_ioc_pf_fwmismatch(iocpf->ioc); |
697 | 697 | ||
698 | iocpf->fw_mismatch_notified = true; | 698 | iocpf->fw_mismatch_notified = true; |