ethernet: Use bool function returns of true/false instead of 1/0
authorJoe Perches <joe@perches.com>
Mon, 30 Mar 2015 01:25:12 +0000 (18:25 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Mar 2015 18:09:49 +0000 (14:09 -0400)
Use bool constants as the return values instead of 1 and 0.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
drivers/net/ethernet/xilinx/xilinx_emaclite.c

index 768dfb16bc80d42117e978d34a82c6ded4658929..f0466a0281458f55a35abdd3c30b3ae29304410b 100644 (file)
@@ -11610,7 +11610,7 @@ static bool bnx2x_get_dropless_info(struct bnx2x *bp)
        u32 cfg;
 
        if (IS_VF(bp))
-               return 0;
+               return false;
 
        if (IS_MF(bp) && !CHIP_IS_E1x(bp)) {
                /* Take function: tmp = func */
index 02ffb3081b119c3102d7da3a1f46b30c900ae8c7..ccaecb1b86194823ae7f0b62212295adc7ce7cdb 100644 (file)
@@ -1351,7 +1351,7 @@ static bool reg_pattern_test(struct ixgbe_adapter *adapter, u64 *data, int reg,
 
        if (ixgbe_removed(adapter->hw.hw_addr)) {
                *data = 1;
-               return 1;
+               return true;
        }
        for (pat = 0; pat < ARRAY_SIZE(test_pattern); pat++) {
                before = ixgbe_read_reg(&adapter->hw, reg);
@@ -1376,7 +1376,7 @@ static bool reg_set_and_check(struct ixgbe_adapter *adapter, u64 *data, int reg,
 
        if (ixgbe_removed(adapter->hw.hw_addr)) {
                *data = 1;
-               return 1;
+               return true;
        }
        before = ixgbe_read_reg(&adapter->hw, reg);
        ixgbe_write_reg(&adapter->hw, reg, write & mask);
index 2111b91f5e4904f5a7b8ed2dea2d8214a7ec4708..6008eee01a33a7a9e62918627443874eae56813a 100644 (file)
@@ -1062,7 +1062,7 @@ static bool get_bool(struct platform_device *ofdev, const char *s)
        } else {
                dev_warn(&ofdev->dev, "Parameter %s not found,"
                        "defaulting to false\n", s);
-               return 0;
+               return false;
        }
 }