* [PATCH net-next] net: atheros: remove conversion to bool in atl1c_start_mac()
@ 2020-05-05 7:45 Jason Yan
2020-05-05 18:40 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jason Yan @ 2020-05-05 7:45 UTC (permalink / raw)
To: jcliburn, chris.snook, davem, netdev, linux-kernel; +Cc: Jason Yan
No need to convert '==' expression to bool. This fixes the following
coccicheck warning:
drivers/net/ethernet/atheros/atl1c/atl1c_main.c:1189:63-68: WARNING:
conversion to bool not needed here
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index 00bd7bd55794..04bc53af12d9 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -1186,7 +1186,7 @@ static void atl1c_start_mac(struct atl1c_adapter *adapter)
struct atl1c_hw *hw = &adapter->hw;
u32 mac, txq, rxq;
- hw->mac_duplex = adapter->link_duplex == FULL_DUPLEX ? true : false;
+ hw->mac_duplex = adapter->link_duplex == FULL_DUPLEX;
hw->mac_speed = adapter->link_speed == SPEED_1000 ?
atl1c_mac_speed_1000 : atl1c_mac_speed_10_100;
--
2.21.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: atheros: remove conversion to bool in atl1c_start_mac()
2020-05-05 7:45 [PATCH net-next] net: atheros: remove conversion to bool in atl1c_start_mac() Jason Yan
@ 2020-05-05 18:40 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-05-05 18:40 UTC (permalink / raw)
To: yanaijie; +Cc: jcliburn, chris.snook, netdev, linux-kernel
From: Jason Yan <yanaijie@huawei.com>
Date: Tue, 5 May 2020 15:45:46 +0800
> No need to convert '==' expression to bool. This fixes the following
> coccicheck warning:
>
> drivers/net/ethernet/atheros/atl1c/atl1c_main.c:1189:63-68: WARNING:
> conversion to bool not needed here
>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-05 18:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 7:45 [PATCH net-next] net: atheros: remove conversion to bool in atl1c_start_mac() Jason Yan
2020-05-05 18:40 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.