Message ID | 20240228072505.640550-1-shaozhengchao@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 8b2b1e62cdb9ce36886e77c90a9594e41f3a2112 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] ipv4: raw: remove useless input parameter in do_raw_set/getsockopt | expand |
Wed, Feb 28, 2024 at 08:25:05AM CET, shaozhengchao@huawei.com wrote: >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>
Hello: This patch was applied to netdev/net-next.git (main) by Paolo Abeni <pabeni@redhat.com>: On Wed, 28 Feb 2024 15:25:05 +0800 you wrote: > The input parameter 'level' in do_raw_set/getsockopt() is not used. > Therefore, remove it. > > Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> > --- > net/ipv4/raw.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) Here is the summary with links: - [net-next] ipv4: raw: remove useless input parameter in do_raw_set/getsockopt https://git.kernel.org/netdev/net-next/c/8b2b1e62cdb9 You are awesome, thank you!
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)
The input parameter 'level' in do_raw_set/getsockopt() is not used. Therefore, remove it. Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> --- net/ipv4/raw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)