linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [v3] mptcp: Fix duplicated argument in protocol.h
@ 2021-09-01  3:19 Wan Jiabing
  2021-09-01  7:59 ` Paolo Abeni
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Wan Jiabing @ 2021-09-01  3:19 UTC (permalink / raw)
  To: Mat Martineau, Matthieu Baerts, David S. Miller, Jakub Kicinski,
	Paolo Abeni, netdev, mptcp, linux-kernel
  Cc: kael_w, Wan Jiabing

Fix the following coccicheck warning:
./net/mptcp/protocol.h:36:50-73: duplicated argument to & or |

The OPTION_MPTCP_MPJ_SYNACK here is duplicate.
Here should be OPTION_MPTCP_MPJ_ACK.

Fixes: 74c7dfbee3e18 ("mptcp: consolidate in_opt sub-options fields in a bitmask")
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
Changelog:
v2:
- Add a Fixes-tag.
v3:
- Make Fixes-tag to be a single line.
---
 net/mptcp/protocol.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index d7aba1c4dc48..64c9a30e0871 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -34,7 +34,7 @@
 #define OPTIONS_MPTCP_MPC	(OPTION_MPTCP_MPC_SYN | OPTION_MPTCP_MPC_SYNACK | \
 				 OPTION_MPTCP_MPC_ACK)
 #define OPTIONS_MPTCP_MPJ	(OPTION_MPTCP_MPJ_SYN | OPTION_MPTCP_MPJ_SYNACK | \
-				 OPTION_MPTCP_MPJ_SYNACK)
+				 OPTION_MPTCP_MPJ_ACK)
 
 /* MPTCP option subtypes */
 #define MPTCPOPT_MP_CAPABLE	0
-- 
2.25.1


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

* Re: [PATCH] [v3] mptcp: Fix duplicated argument in protocol.h
  2021-09-01  3:19 [PATCH] [v3] mptcp: Fix duplicated argument in protocol.h Wan Jiabing
@ 2021-09-01  7:59 ` Paolo Abeni
  2021-09-01  8:13 ` Paolo Abeni
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Paolo Abeni @ 2021-09-01  7:59 UTC (permalink / raw)
  To: Wan Jiabing, Mat Martineau, Matthieu Baerts, David S. Miller,
	Jakub Kicinski, netdev, mptcp, linux-kernel
  Cc: kael_w



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

* Re: [PATCH] [v3] mptcp: Fix duplicated argument in protocol.h
  2021-09-01  3:19 [PATCH] [v3] mptcp: Fix duplicated argument in protocol.h Wan Jiabing
  2021-09-01  7:59 ` Paolo Abeni
@ 2021-09-01  8:13 ` Paolo Abeni
  2021-09-01  8:27 ` Matthieu Baerts
  2021-09-01 12:00 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 5+ messages in thread
From: Paolo Abeni @ 2021-09-01  8:13 UTC (permalink / raw)
  To: Wan Jiabing, Mat Martineau, Matthieu Baerts, David S. Miller,
	Jakub Kicinski, netdev, mptcp, linux-kernel
  Cc: kael_w

Hello,

On Wed, 2021-09-01 at 11:19 +0800, Wan Jiabing wrote:
> Fix the following coccicheck warning:
> ./net/mptcp/protocol.h:36:50-73: duplicated argument to & or |
> 
> The OPTION_MPTCP_MPJ_SYNACK here is duplicate.
> Here should be OPTION_MPTCP_MPJ_ACK.
> 
> Fixes: 74c7dfbee3e18 ("mptcp: consolidate in_opt sub-options fields in a bitmask")
> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>

Not sure what happen to my previous reply, most probably PEBKAC, sorry.

WRT this patch, note that the dup is harmless, as in the input path we
always use the mask and not the individual bit - vice versa in the
output path. Still the cleanup is worthy and patch LGTM.
Acked-by: Paolo Abeni <pabeni@redhat.com>


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

* Re: [PATCH] [v3] mptcp: Fix duplicated argument in protocol.h
  2021-09-01  3:19 [PATCH] [v3] mptcp: Fix duplicated argument in protocol.h Wan Jiabing
  2021-09-01  7:59 ` Paolo Abeni
  2021-09-01  8:13 ` Paolo Abeni
@ 2021-09-01  8:27 ` Matthieu Baerts
  2021-09-01 12:00 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 5+ messages in thread
From: Matthieu Baerts @ 2021-09-01  8:27 UTC (permalink / raw)
  To: Wan Jiabing, Mat Martineau, David S. Miller, Jakub Kicinski,
	Paolo Abeni, netdev, mptcp, linux-kernel
  Cc: kael_w

Hi Wan,

On 01/09/2021 05:19, Wan Jiabing wrote:
> Fix the following coccicheck warning:
> ./net/mptcp/protocol.h:36:50-73: duplicated argument to & or |
> 
> The OPTION_MPTCP_MPJ_SYNACK here is duplicate.
> Here should be OPTION_MPTCP_MPJ_ACK.
> 
> Fixes: 74c7dfbee3e18 ("mptcp: consolidate in_opt sub-options fields in a bitmask")
> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>

Thank you for the patch!

It looks good to me too and MPTCP selftests are still happy with this patch.

Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>

Just one thing: please next time mention for which "net" tree this patch
is for. That's why you got one warning on Patchwork [1]. See [2] for
more details.

Here this patch is for -net: [PATCH net].

[1]
https://patchwork.kernel.org/project/netdevbpf/patch/20210901031932.7734-1-wanjiabing@vivo.com/
[2] https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

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

* Re: [PATCH] [v3] mptcp: Fix duplicated argument in protocol.h
  2021-09-01  3:19 [PATCH] [v3] mptcp: Fix duplicated argument in protocol.h Wan Jiabing
                   ` (2 preceding siblings ...)
  2021-09-01  8:27 ` Matthieu Baerts
@ 2021-09-01 12:00 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-09-01 12:00 UTC (permalink / raw)
  To: Wan Jiabing
  Cc: mathew.j.martineau, matthieu.baerts, davem, kuba, pabeni, netdev,
	mptcp, linux-kernel, kael_w

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Wed,  1 Sep 2021 11:19:32 +0800 you wrote:
> Fix the following coccicheck warning:
> ./net/mptcp/protocol.h:36:50-73: duplicated argument to & or |
> 
> The OPTION_MPTCP_MPJ_SYNACK here is duplicate.
> Here should be OPTION_MPTCP_MPJ_ACK.
> 
> Fixes: 74c7dfbee3e18 ("mptcp: consolidate in_opt sub-options fields in a bitmask")
> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
> 
> [...]

Here is the summary with links:
  - [v3] mptcp: Fix duplicated argument in protocol.h
    https://git.kernel.org/netdev/net/c/780aa1209f88

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] 5+ messages in thread

end of thread, other threads:[~2021-09-01 12:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-01  3:19 [PATCH] [v3] mptcp: Fix duplicated argument in protocol.h Wan Jiabing
2021-09-01  7:59 ` Paolo Abeni
2021-09-01  8:13 ` Paolo Abeni
2021-09-01  8:27 ` Matthieu Baerts
2021-09-01 12: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).