OSDN Git Service

net: agere: use true,false for bool variable
authorJason Yan <yanaijie@huawei.com>
Tue, 5 May 2020 07:45:56 +0000 (15:45 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 May 2020 18:39:42 +0000 (11:39 -0700)
Fix the following coccicheck warning:

drivers/net/ethernet/agere/et131x.c:717:3-22: WARNING: Assignment of
0/1 to bool variable
drivers/net/ethernet/agere/et131x.c:721:1-20: WARNING: Assignment of
0/1 to bool variable

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Acked-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/agere/et131x.c

index 1b19385..865892c 100644 (file)
@@ -714,11 +714,11 @@ static int et131x_init_eeprom(struct et131x_adapter *adapter)
                         * gather additional information that normally would
                         * come from the eeprom, like MAC Address
                         */
-                       adapter->has_eeprom = 0;
+                       adapter->has_eeprom = false;
                        return -EIO;
                }
        }
-       adapter->has_eeprom = 1;
+       adapter->has_eeprom = true;
 
        /* Read the EEPROM for information regarding LED behavior. Refer to
         * et131x_xcvr_init() for its use.