Skip to contentSkip to conversation

flow_offload: add const qualifiers to function arguments

PATCH Applied David Yang 2 participants 2 messages Feb 4 – Feb 5

Subsystems (2)
lore
Share & tools
lore

David Yang

author
#0 lore raw

PATCH 1/1 flow_offload: add const qualifiers to function arguments

Some functions do not modify the pointed-to data, but lack const qualifiers. Add const qualifiers to the arguments of flow_rule_match_has_control_flags() and flow_cls_offload_flow_rule().

---
 include/net/flow_offload.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/net/flow_offload.h +2 -2
index 596ab9791e4d..5637747019c1 100644
@@ -526,7 +526,7 @@ static inline bool flow_rule_has_enc_control_flags(const u32 enc_ctrl_flags,
  *
  * Return: true if control flags are set, false otherwise.
  */
-static inline bool flow_rule_match_has_control_flags(struct flow_rule *rule,
+static inline bool flow_rule_match_has_control_flags(const struct flow_rule *rule,
 						     struct netlink_ext_ack *extack)
 {
 	struct flow_match_control match;
@@ -718,7 +718,7 @@ struct flow_offload_action {
 struct flow_offload_action *offload_action_alloc(unsigned int num_actions);
 
 static inline struct flow_rule *
-flow_cls_offload_flow_rule(struct flow_cls_offload *flow_cmd)
+flow_cls_offload_flow_rule(const struct flow_cls_offload *flow_cmd)
 {
 	return flow_cmd->rule;
 }
Signature · 1 line
2.51.0
#1 lore raw
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Quoted 8 lines · On Wed, 4 Feb 2026 13:28:35 +0800 you wrote:

Some functions do not modify the pointed-to data, but lack const qualifiers. Add const qualifiers to the arguments of flow_rule_match_has_control_flags() and flow_cls_offload_flow_rule().

---
 include/net/flow_offload.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Here is the summary with links:
- [net-next] flow_offload: add const qualifiers to function arguments

    https://git.kernel.org/netdev/net-next/c/770e112634e7

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html