2023-07-13 12:47:20

by Wang Ming

[permalink] [raw]
Subject: [PATCH net v1] net: ethernet: Remove repeating expression

Identify issues that arise by using the tests/doublebitand.cocci
semantic patch. Need to remove duplicate expression in if statement.

Signed-off-by: Wang Ming <[email protected]>
---
drivers/net/ethernet/wangxun/libwx/wx_hw.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/wangxun/libwx/wx_hw.c b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
index 39a9aeee7aab..6321178fc814 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_hw.c
+++ b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
@@ -1511,7 +1511,6 @@ static void wx_configure_rx(struct wx *wx)
psrtype = WX_RDB_PL_CFG_L4HDR |
WX_RDB_PL_CFG_L3HDR |
WX_RDB_PL_CFG_L2HDR |
- WX_RDB_PL_CFG_TUN_TUNHDR |
WX_RDB_PL_CFG_TUN_TUNHDR;
wr32(wx, WX_RDB_PL_CFG(0), psrtype);

--
2.25.1



2023-07-14 02:09:24

by Jiawen Wu

[permalink] [raw]
Subject: RE: [PATCH net v1] net: ethernet: Remove repeating expression

On Thursday, July 13, 2023 8:16 PM, Wang Ming wrote:
> Identify issues that arise by using the tests/doublebitand.cocci
> semantic patch. Need to remove duplicate expression in if statement.
>
> Signed-off-by: Wang Ming <[email protected]>
> ---
> drivers/net/ethernet/wangxun/libwx/wx_hw.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/wangxun/libwx/wx_hw.c b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
> index 39a9aeee7aab..6321178fc814 100644
> --- a/drivers/net/ethernet/wangxun/libwx/wx_hw.c
> +++ b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
> @@ -1511,7 +1511,6 @@ static void wx_configure_rx(struct wx *wx)
> psrtype = WX_RDB_PL_CFG_L4HDR |
> WX_RDB_PL_CFG_L3HDR |
> WX_RDB_PL_CFG_L2HDR |
> - WX_RDB_PL_CFG_TUN_TUNHDR |
> WX_RDB_PL_CFG_TUN_TUNHDR;
> wr32(wx, WX_RDB_PL_CFG(0), psrtype);

Reviewed-by: Jiawen Wu <[email protected]>


2023-07-14 08:34:45

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH net v1] net: ethernet: Remove repeating expression

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:

On Thu, 13 Jul 2023 20:16:03 +0800 you wrote:
> Identify issues that arise by using the tests/doublebitand.cocci
> semantic patch. Need to remove duplicate expression in if statement.
>
> Signed-off-by: Wang Ming <[email protected]>
> ---
> drivers/net/ethernet/wangxun/libwx/wx_hw.c | 1 -
> 1 file changed, 1 deletion(-)

Here is the summary with links:
- [net,v1] net: ethernet: Remove repeating expression
https://git.kernel.org/netdev/net/c/a822551c51f0

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