public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] flow_offload: add const qualifiers to function arguments
@ 2026-02-04  5:28 David Yang
  2026-02-05 15:30 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: David Yang @ 2026-02-04  5:28 UTC (permalink / raw)
  To: netdev
  Cc: David Yang, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Simon Horman, linux-kernel

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().

Signed-off-by: David Yang <mmyangfl@gmail.com>
---
 include/net/flow_offload.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h
index 596ab9791e4d..5637747019c1 100644
--- a/include/net/flow_offload.h
+++ b/include/net/flow_offload.h
@@ -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;
 }
-- 
2.51.0


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

end of thread, other threads:[~2026-02-05 15:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-04  5:28 [PATCH net-next] flow_offload: add const qualifiers to function arguments David Yang
2026-02-05 15:30 ` 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