enic: fix boolreturn.cocci warnings
authorFengguang Wu <fengguang.wu@intel.com>
Tue, 6 Mar 2018 18:23:23 +0000 (02:23 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Mar 2018 18:34:41 +0000 (13:34 -0500)
drivers/net/ethernet/cisco/enic/vnic_dev.c:1294:9-10: WARNING: return of 0/1 in function 'vnic_dev_capable_udp_rss' 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

Fixes: 48398b6e7065 ("enic: set UDP rss flag")
CC: Govindarajulu Varadarajan <gvaradar@cisco.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cisco/enic/vnic_dev.c

index a2b376055b2d88b97c6b000c7d35c86be944d0d7..76cdd4c9d11f3e64c33102d3e1b145f45c57762a 100644 (file)
@@ -1291,7 +1291,7 @@ bool vnic_dev_capable_udp_rss(struct vnic_dev *vdev)
 
        err = vnic_dev_cmd(vdev, CMD_CAPABILITY, &a0, &a1, wait);
        if (err || !a0)
-               return 0;
+               return false;
 
        rss_hash_type = (a1 >> NIC_CFG_RSS_HASH_TYPE_SHIFT) &
                        NIC_CFG_RSS_HASH_TYPE_MASK_FIELD;