diff options
author | Zhengchao Shao <shaozhengchao@huawei.com> | 2024-02-28 15:25:05 +0800 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-02-29 10:35:07 +0100 |
commit | 8b2b1e62cdb9ce36886e77c90a9594e41f3a2112 (patch) | |
tree | e2fa3c09465cbf1e7b3b8bba94de77a00e5cc985 /net/ipv4/raw.c | |
parent | be9bd8d4e52a288a23d9c310462e4a3b25edf35c (diff) |
ipv4: raw: remove useless input parameter in do_raw_set/getsockopt
The input parameter 'level' in do_raw_set/getsockopt() is not used.
Therefore, remove it.
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20240228072505.640550-1-shaozhengchao@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r-- | net/ipv4/raw.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index aea89326c697..7d2bdfd7e7d7 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -815,7 +815,7 @@ static int raw_geticmpfilter(struct sock *sk, char __user *optval, int __user *o out: return ret; } -static int do_raw_setsockopt(struct sock *sk, int level, int optname, +static int do_raw_setsockopt(struct sock *sk, int optname, sockptr_t optval, unsigned int optlen) { if (optname == ICMP_FILTER) { @@ -832,11 +832,11 @@ static int raw_setsockopt(struct sock *sk, int level, int optname, { if (level != SOL_RAW) return ip_setsockopt(sk, level, optname, optval, optlen); - return do_raw_setsockopt(sk, level, optname, optval, optlen); + return do_raw_setsockopt(sk, optname, optval, optlen); } -static int do_raw_getsockopt(struct sock *sk, int level, int optname, - char __user *optval, int __user *optlen) +static int do_raw_getsockopt(struct sock *sk, int optname, + char __user *optval, int __user *optlen) { if (optname == ICMP_FILTER) { if (inet_sk(sk)->inet_num != IPPROTO_ICMP) @@ -852,7 +852,7 @@ static int raw_getsockopt(struct sock *sk, int level, int optname, { if (level != SOL_RAW) return ip_getsockopt(sk, level, optname, optval, optlen); - return do_raw_getsockopt(sk, level, optname, optval, optlen); + return do_raw_getsockopt(sk, optname, optval, optlen); } static int raw_ioctl(struct sock *sk, int cmd, int *karg) |