Skip to content

Commit

Permalink
cxgb4: fix boolreturn.cocci warnings
Browse files Browse the repository at this point in the history
drivers/net/ethernet/chelsio/cxgb4/cxgb4_fcoe.c:49:9-10: WARNING: return of 0/1 in function 'cxgb_fcoe_sof_eof_supported' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

CC: Varun Prakash <varun@chelsio.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wu Fengguang authored and David S. Miller committed Mar 29, 2015
1 parent 85b9909 commit 1fb7cd4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/chelsio/cxgb4/cxgb4_fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ bool cxgb_fcoe_sof_eof_supported(struct adapter *adap, struct sk_buff *skb)

if ((sof != FC_SOF_I3) && (sof != FC_SOF_N3)) {
dev_err(adap->pdev_dev, "Unsupported SOF 0x%x\n", sof);
return 0;
return false;
}

skb_copy_bits(skb, skb->len - 4, &eof, 1);

if ((eof != FC_EOF_N) && (eof != FC_EOF_T)) {
dev_err(adap->pdev_dev, "Unsupported EOF 0x%x\n", eof);
return 0;
return false;
}

return 1;
return true;
}

/**
Expand Down

0 comments on commit 1fb7cd4

Please sign in to comment.