Commit 8b2b1e62 authored by Zhengchao Shao's avatar Zhengchao Shao Committed by Paolo Abeni

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: default avatarZhengchao Shao <shaozhengchao@huawei.com>
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20240228072505.640550-1-shaozhengchao@huawei.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent be9bd8d4
...@@ -815,7 +815,7 @@ static int raw_geticmpfilter(struct sock *sk, char __user *optval, int __user *o ...@@ -815,7 +815,7 @@ static int raw_geticmpfilter(struct sock *sk, char __user *optval, int __user *o
out: return ret; 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) sockptr_t optval, unsigned int optlen)
{ {
if (optname == ICMP_FILTER) { if (optname == ICMP_FILTER) {
...@@ -832,10 +832,10 @@ static int raw_setsockopt(struct sock *sk, int level, int optname, ...@@ -832,10 +832,10 @@ static int raw_setsockopt(struct sock *sk, int level, int optname,
{ {
if (level != SOL_RAW) if (level != SOL_RAW)
return ip_setsockopt(sk, level, optname, optval, optlen); 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, static int do_raw_getsockopt(struct sock *sk, int optname,
char __user *optval, int __user *optlen) char __user *optval, int __user *optlen)
{ {
if (optname == ICMP_FILTER) { if (optname == ICMP_FILTER) {
...@@ -852,7 +852,7 @@ static int raw_getsockopt(struct sock *sk, int level, int optname, ...@@ -852,7 +852,7 @@ static int raw_getsockopt(struct sock *sk, int level, int optname,
{ {
if (level != SOL_RAW) if (level != SOL_RAW)
return ip_getsockopt(sk, level, optname, optval, optlen); 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) static int raw_ioctl(struct sock *sk, int cmd, int *karg)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment