Skip to contentSkip to conversation

mptcp: Fix duplicated argument in protocol.h

PATCH Applied Wan Jiabing 4 participants 5 messages Sep 1, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 mptcp: Fix duplicated argument in protocol.h

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")

---
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(-)
net/mptcp/protocol.h +1 -1
index d7aba1c4dc48..64c9a30e0871 100644
@@ -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
Signature · 1 line
2.25.1
maintainer Acked-by on v3 1/1
#2 lore raw
In reply to Wan Jiabing

Hello,

Quoted 8 lines · 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")

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.

Reviewed-by on v3 1/1
#3 lore raw
In reply to Wan Jiabing

Hi Wan,

Quoted 8 lines · 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")

Thank you for the patch!

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

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/[email protected]/
[2] https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html

Cheers,
Matt

Signature · 2 lines
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
#4 lore raw
In reply to Wan Jiabing
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

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

Quoted 10 lines · 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")

[...]

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