summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorZhengchao Shao <shaozhengchao@huawei.com>2024-01-02 08:15:19 +0100
committerJakub Kicinski <kuba@kernel.org>2024-01-04 01:42:48 +0100
commitb4c1d4d9734cda4394da5b59ebf7d9ca3579561a (patch)
tree8400d14df4d65965f5dd3bb1e647a102d48c0041 /net/core
parentnet: mvpp2: initialize port fwnode pointer (diff)
downloadlinux-b4c1d4d9734cda4394da5b59ebf7d9ca3579561a.tar.xz
linux-b4c1d4d9734cda4394da5b59ebf7d9ca3579561a.zip
fib: remove unnecessary input parameters in fib_default_rule_add
When fib_default_rule_add is invoked, the value of the input parameter 'flags' is always 0. Rules uses kzalloc to allocate memory, so 'flags' has been initialized to 0. Therefore, remove the input parameter 'flags' in fib_default_rule_add. Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://lore.kernel.org/r/20240102071519.3781384-1-shaozhengchao@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/fib_rules.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 75282222e0b4..96622bfb838a 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -53,7 +53,7 @@ bool fib_rule_matchall(const struct fib_rule *rule)
EXPORT_SYMBOL_GPL(fib_rule_matchall);
int fib_default_rule_add(struct fib_rules_ops *ops,
- u32 pref, u32 table, u32 flags)
+ u32 pref, u32 table)
{
struct fib_rule *r;
@@ -65,7 +65,6 @@ int fib_default_rule_add(struct fib_rules_ops *ops,
r->action = FR_ACT_TO_TBL;
r->pref = pref;
r->table = table;
- r->flags = flags;
r->proto = RTPROT_KERNEL;
r->fr_net = ops->fro_net;
r->uid_range = fib_kuid_range_unset;