diff mbox series

[net-next] ipv4: raw: remove useless input parameter in do_raw_set/getsockopt

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

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 942 this patch: 942
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 958 this patch: 958
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 959 this patch: 959
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 30 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-02-28--18-00 (tests: 882)

Commit Message

shaozhengchao Feb. 28, 2024, 7:25 a.m. UTC
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(-)

Comments

Jiri Pirko Feb. 28, 2024, 7:45 a.m. UTC | #1
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>
patchwork-bot+netdevbpf@kernel.org Feb. 29, 2024, 9:40 a.m. UTC | #2
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 mbox series

Patch

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)