linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] dpaa2-eth: Simplify bool conversion
@ 2022-02-15  1:09 Yang Li
  2022-02-15 14:42 ` Ioana Ciornei
  2022-02-15 15:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Li @ 2022-02-15  1:09 UTC (permalink / raw)
  To: kuba; +Cc: davem, ioana.ciornei, netdev, linux-kernel, Yang Li, Abaci Robot

Fix the following coccicheck warnings:
./drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:1199:42-47: WARNING:
conversion to bool not needed here
./drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:1218:54-59: WARNING:
conversion to bool not needed here

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
index c4a48e6f1758..3e709c8fb961 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
@@ -1196,7 +1196,7 @@ static int dpaa2_eth_build_gso_fd(struct dpaa2_eth_priv *priv,
 		/* Setup the SG entry for the header */
 		dpaa2_sg_set_addr(sgt, tso_hdr_dma);
 		dpaa2_sg_set_len(sgt, hdr_len);
-		dpaa2_sg_set_final(sgt, data_left > 0 ? false : true);
+		dpaa2_sg_set_final(sgt, data_left <= 0);
 
 		/* Compose the SG entries for each fragment of data */
 		num_sge = 1;
@@ -1215,7 +1215,7 @@ static int dpaa2_eth_build_gso_fd(struct dpaa2_eth_priv *priv,
 			}
 			dpaa2_sg_set_addr(sgt, addr);
 			dpaa2_sg_set_len(sgt, size);
-			dpaa2_sg_set_final(sgt, size == data_left ? true : false);
+			dpaa2_sg_set_final(sgt, size == data_left);
 
 			num_sge++;
 
-- 
2.20.1.7.g153144c


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] dpaa2-eth: Simplify bool conversion
  2022-02-15  1:09 [PATCH -next] dpaa2-eth: Simplify bool conversion Yang Li
@ 2022-02-15 14:42 ` Ioana Ciornei
  2022-02-15 15:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Ioana Ciornei @ 2022-02-15 14:42 UTC (permalink / raw)
  To: Yang Li; +Cc: kuba, davem, netdev, linux-kernel, Abaci Robot

On Tue, Feb 15, 2022 at 09:09:13AM +0800, Yang Li wrote:
> Fix the following coccicheck warnings:
> ./drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:1199:42-47: WARNING:
> conversion to bool not needed here
> ./drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:1218:54-59: WARNING:
> conversion to bool not needed here
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>

Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] dpaa2-eth: Simplify bool conversion
  2022-02-15  1:09 [PATCH -next] dpaa2-eth: Simplify bool conversion Yang Li
  2022-02-15 14:42 ` Ioana Ciornei
@ 2022-02-15 15:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-02-15 15:00 UTC (permalink / raw)
  To: Yang Li; +Cc: kuba, davem, ioana.ciornei, netdev, linux-kernel, abaci

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Tue, 15 Feb 2022 09:09:13 +0800 you wrote:
> Fix the following coccicheck warnings:
> ./drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:1199:42-47: WARNING:
> conversion to bool not needed here
> ./drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:1218:54-59: WARNING:
> conversion to bool not needed here
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> 
> [...]

Here is the summary with links:
  - [-next] dpaa2-eth: Simplify bool conversion
    https://git.kernel.org/netdev/net-next/c/99cd6a64e128

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-15 15:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15  1:09 [PATCH -next] dpaa2-eth: Simplify bool conversion Yang Li
2022-02-15 14:42 ` Ioana Ciornei
2022-02-15 15:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).