* [PATCH net-next] ipv4: raw: remove useless input parameter in do_raw_set/getsockopt
@ 2024-02-28 7:25 Zhengchao Shao
2024-02-28 7:45 ` Jiri Pirko
2024-02-29 9:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Zhengchao Shao @ 2024-02-28 7:25 UTC (permalink / raw)
To: netdev, davem, dsahern, edumazet, kuba, pabeni
Cc: weiyongjun1, yuehaibing, shaozhengchao
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(-)
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)
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] ipv4: raw: remove useless input parameter in do_raw_set/getsockopt
2024-02-28 7:25 [PATCH net-next] ipv4: raw: remove useless input parameter in do_raw_set/getsockopt Zhengchao Shao
@ 2024-02-28 7:45 ` Jiri Pirko
2024-02-29 9:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2024-02-28 7:45 UTC (permalink / raw)
To: Zhengchao Shao
Cc: netdev, davem, dsahern, edumazet, kuba, pabeni, weiyongjun1,
yuehaibing
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] ipv4: raw: remove useless input parameter in do_raw_set/getsockopt
2024-02-28 7:25 [PATCH net-next] ipv4: raw: remove useless input parameter in do_raw_set/getsockopt Zhengchao Shao
2024-02-28 7:45 ` Jiri Pirko
@ 2024-02-29 9:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-02-29 9:40 UTC (permalink / raw)
To: Zhengchao Shao
Cc: netdev, davem, dsahern, edumazet, kuba, pabeni, weiyongjun1,
yuehaibing
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-29 9:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-28 7:25 [PATCH net-next] ipv4: raw: remove useless input parameter in do_raw_set/getsockopt Zhengchao Shao
2024-02-28 7:45 ` Jiri Pirko
2024-02-29 9:40 ` 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;
as well as URLs for NNTP newsgroup(s).