From patchwork Mon May 27 17:04:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13675656 X-Patchwork-Delegate: kuba@kernel.org Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 52BC115EFA8; Mon, 27 May 2024 17:04:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716829479; cv=none; b=cTA9CJdg9JPsSuMpzVbEYvtLAWf2txRy3QntXzQUpx0a1wrodQk+rJxeDilITtVpP8hnGT+22htOiXZf3Ioq1Bm/hDZMGGlCNlHpIf5ffmTnnxC8DHtp8Hp4tTbCPvFYYHCyHSdVGAKKNUr2kvRwSTcLlFiPcaeBeXOU8t+znFE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716829479; c=relaxed/simple; bh=d+939s1gUjKIZzgNkXzByiTSHTvsRrwL2Na7XW8r8Sc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uUhzXFNaLZqaMyVEJvVpcTX0ImBT/X9Q0Iw+U/kymNBK0QRhPQqiSnFsg7eyeAfqtDKg5jQw0fp/CUHOQ4m+sR54LyFvfu6C09i6MGQT3mKBDCB55I8ZnBYVUCQuDYheeOIB/u6JfgQbtG0XkUfLqFCV+523iDTCxl6bKe88QGg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=ioEWqtoE; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="ioEWqtoE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1716829474; bh=d+939s1gUjKIZzgNkXzByiTSHTvsRrwL2Na7XW8r8Sc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ioEWqtoEhJv/qUIz1kd217IaIRGNkKHPwk+yb35eevzAepek/I3Stgk0fbQblRO8L 37Zoq/PWR3btDrjIcHcFi2X91IzcnNAFe1MtJ6YoGN5GRf+yr+bf3dshq/2R3baCqR c/NgTdG3gMhRx8/+OSfQFSDgu7WZoOFSIDO5f22w= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Mon, 27 May 2024 19:04:19 +0200 Subject: [PATCH net-next 1/5] net/neighbour: constify ctl_table arguments of utility function Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240527-sysctl-const-handler-net-v1-1-16523767d0b2@weissschuh.net> References: <20240527-sysctl-const-handler-net-v1-0-16523767d0b2@weissschuh.net> In-Reply-To: <20240527-sysctl-const-handler-net-v1-0-16523767d0b2@weissschuh.net> To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , David Ahern , Simon Horman , Julian Anastasov , Pablo Neira Ayuso , Jozsef Kadlecsik Cc: Joel Granados , Luis Chamberlain , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, =?utf-8?q?Thomas_?= =?utf-8?q?Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716829474; l=1125; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=d+939s1gUjKIZzgNkXzByiTSHTvsRrwL2Na7XW8r8Sc=; b=I8PHk/EKKuje+OjEhgK0nJZr42eh/mh/MvKC2JH2tNPlQfzlr+QogobANgrxLs80EOlm2y+v7 QJ43JvYzsvzA+ht8rQF6fFl1rRCIVfzgcwPJQ/bE1Oc0F9lui18zlRW X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Patchwork-Delegate: kuba@kernel.org The sysctl core is preparing to only expose instances of struct ctl_table as "const". This will also affect the ctl_table argument of sysctl handlers. As the function prototype of all sysctl handlers throughout the tree needs to stay consistent that change will be done in one commit. To reduce the size of that final commit, switch utility functions which are not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Signed-off-by: Thomas Weißschuh --- net/core/neighbour.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 45fd88405b6b..277751375b0a 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -3578,7 +3578,7 @@ static void neigh_copy_dflt_parms(struct net *net, struct neigh_parms *p, rcu_read_unlock(); } -static void neigh_proc_update(struct ctl_table *ctl, int write) +static void neigh_proc_update(const struct ctl_table *ctl, int write) { struct net_device *dev = ctl->extra1; struct neigh_parms *p = ctl->extra2; From patchwork Mon May 27 17:04:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13675654 X-Patchwork-Delegate: kuba@kernel.org Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7AC5815EFC1; Mon, 27 May 2024 17:04:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716829479; cv=none; b=kPY02Wx8DHHD+w6X08Bln9IBxxWfqFl6S2XOmUTI8zx2FgTlAMCf/OLaaul1BWRNan6znRm+dyIdKq4jGN2eGbJBb5UzsqNt/WGp9poDv3asmusY2CsCQt6m+9vGRFIAxb6hRfw35M8v6P0OaAJkWBRkGqcK276+rXdht2dbnLs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716829479; c=relaxed/simple; bh=6bL6o2hxyBnXcYtE4OX3yQlXt4wHX1IZ6z1HXg4YTBk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=C/GZQawcANFXochF+QIAA+jH908UTDM2iiETOyPfZL8KZNVvJ64e9FegD1x22YH6/z00I+ggGnkttfobOhALEQ9PC4zfPFCWw0YE8S0SCcT+QQ1hKLuFmjyQAcs/FTnYUWMbCSzWx5Cu8StrEW+ZvVNZjYskjpNBDWLm9z7GVL4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=lqxWsCfl; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="lqxWsCfl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1716829474; bh=6bL6o2hxyBnXcYtE4OX3yQlXt4wHX1IZ6z1HXg4YTBk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=lqxWsCflEGwW19FrFUiFp4De6UxyScYLTSkduJW/fU5Qg7l5ex7td7Gy94VfWY+Zi jfPtQ+hLjKssploNEcrzQS4oizGn0MyazL355TZwPXJpDD22aFKye7Isg3+D8hTyKF exRKnWIEygkHl5GBvAhhsrmqhHBl2sTh+iE9rp8I= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Mon, 27 May 2024 19:04:20 +0200 Subject: [PATCH net-next 2/5] net/ipv4/sysctl: constify ctl_table arguments of utility functions Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240527-sysctl-const-handler-net-v1-2-16523767d0b2@weissschuh.net> References: <20240527-sysctl-const-handler-net-v1-0-16523767d0b2@weissschuh.net> In-Reply-To: <20240527-sysctl-const-handler-net-v1-0-16523767d0b2@weissschuh.net> To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , David Ahern , Simon Horman , Julian Anastasov , Pablo Neira Ayuso , Jozsef Kadlecsik Cc: Joel Granados , Luis Chamberlain , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, =?utf-8?q?Thomas_?= =?utf-8?q?Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716829474; l=1585; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=6bL6o2hxyBnXcYtE4OX3yQlXt4wHX1IZ6z1HXg4YTBk=; b=dLFQIDCQf5HQcl5crzjSnoc/K6V0T8suTQVBLbLK4maEZiLFn9DDVa6zHKrQ+E8V5TpmVXdYa 9X2NvZxdxjOB2GfaD1j2GxruOHgL0gqSvV3ykbTTaIgy6tI7OkODKNE X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Patchwork-Delegate: kuba@kernel.org The sysctl core is preparing to only expose instances of struct ctl_table as "const". This will also affect the ctl_table argument of sysctl handlers. As the function prototype of all sysctl handlers throughout the tree needs to stay consistent that change will be done in one commit. To reduce the size of that final commit, switch utility functions which are not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Signed-off-by: Thomas Weißschuh --- net/ipv4/sysctl_net_ipv4.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 162a0a3b6ba5..d7892f34a15b 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c @@ -130,7 +130,8 @@ static int ipv4_privileged_ports(struct ctl_table *table, int write, return ret; } -static void inet_get_ping_group_range_table(struct ctl_table *table, kgid_t *low, kgid_t *high) +static void inet_get_ping_group_range_table(const struct ctl_table *table, + kgid_t *low, kgid_t *high) { kgid_t *data = table->data; struct net *net = @@ -145,7 +146,8 @@ static void inet_get_ping_group_range_table(struct ctl_table *table, kgid_t *low } /* Update system visible IP port range */ -static void set_ping_group_range(struct ctl_table *table, kgid_t low, kgid_t high) +static void set_ping_group_range(const struct ctl_table *table, + kgid_t low, kgid_t high) { kgid_t *data = table->data; struct net *net = From patchwork Mon May 27 17:04:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13675655 X-Patchwork-Delegate: kuba@kernel.org Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7AC0E15EFC0; Mon, 27 May 2024 17:04:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716829479; cv=none; b=VrhHZbctsrOiLhxTY8/Abzn1R/t5zZ+pcUTDkjTrsaewdvoCF/J4PrXTJA7BbhE2CD0nbODaVmR+qVhrmLR4CEVg+j015eI3On3CS/PJ2ENwYbYREgMbWOR9KhiqbKOKoMi/ssjmaDxhA8wyGq/DNecMH8Vvm6pwDOuv+mFjfcM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716829479; c=relaxed/simple; bh=FFGTVRbTurxQo0JWz0lQLj1C10dd9/WiAX6I+AdPlYo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=f/NjKTD8h6Li6sCZsv0Y7fPOLMc5FyeuTYU645HUfMVhs8P1YcafQhj3DMM9+4Pg1xH/7q+lDMTVZpGBje8XFz9aYbp9LSNPkhm0gPS/EBcz6X1iWTfUZ6AfKvHWNvIMcGqd2eenqWPDXkn8nY0B0Ow9fqSJoR1NMx6FV1BTWQM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=FV+sRWEO; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="FV+sRWEO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1716829474; bh=FFGTVRbTurxQo0JWz0lQLj1C10dd9/WiAX6I+AdPlYo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=FV+sRWEOTy5EN7cytDdzZN3Cdk1S0GqDhR6xNXGxiUROtd0VqVHFfx50AplxEUIOM 88YFvMB2C94c7SdDyf2lWZW4E8aIPYqBIySfHmiryXBIN+L+cYsPDFw73c/mpYeU1o YJSqhjjr/dHrJky2PZd/rmIg3VHdpjNrLbfCmS5s= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Mon, 27 May 2024 19:04:21 +0200 Subject: [PATCH net-next 3/5] net/ipv6/addrconf: constify ctl_table arguments of utility functions Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240527-sysctl-const-handler-net-v1-3-16523767d0b2@weissschuh.net> References: <20240527-sysctl-const-handler-net-v1-0-16523767d0b2@weissschuh.net> In-Reply-To: <20240527-sysctl-const-handler-net-v1-0-16523767d0b2@weissschuh.net> To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , David Ahern , Simon Horman , Julian Anastasov , Pablo Neira Ayuso , Jozsef Kadlecsik Cc: Joel Granados , Luis Chamberlain , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, =?utf-8?q?Thomas_?= =?utf-8?q?Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716829474; l=2049; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=FFGTVRbTurxQo0JWz0lQLj1C10dd9/WiAX6I+AdPlYo=; b=sttcjn5SIR5SkxssfxV9+g8iPbz84T1kDPeBe+IPUdpZAZ2FupxWcbTvb8V+QnDtrL0kkBGnf VPQTQD2ee+ODDB0jiKhyfgITYKangBPiGvIZentC4dP3yoxkPOqMF/D X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Patchwork-Delegate: kuba@kernel.org The sysctl core is preparing to only expose instances of struct ctl_table as "const". This will also affect the ctl_table argument of sysctl handlers. As the function prototype of all sysctl handlers throughout the tree needs to stay consistent that change will be done in one commit. To reduce the size of that final commit, switch utility functions which are not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Signed-off-by: Thomas Weißschuh --- net/ipv6/addrconf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 5c424a0e7232..1e69756d53d9 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -863,7 +863,7 @@ static void addrconf_forward_change(struct net *net, __s32 newf) } } -static int addrconf_fixup_forwarding(struct ctl_table *table, int *p, int newf) +static int addrconf_fixup_forwarding(const struct ctl_table *table, int *p, int newf) { struct net *net; int old; @@ -931,7 +931,7 @@ static void addrconf_linkdown_change(struct net *net, __s32 newf) } } -static int addrconf_fixup_linkdown(struct ctl_table *table, int *p, int newf) +static int addrconf_fixup_linkdown(const struct ctl_table *table, int *p, int newf) { struct net *net; int old; @@ -6378,7 +6378,7 @@ static void addrconf_disable_change(struct net *net, __s32 newf) } } -static int addrconf_disable_ipv6(struct ctl_table *table, int *p, int newf) +static int addrconf_disable_ipv6(const struct ctl_table *table, int *p, int newf) { struct net *net = (struct net *)table->extra2; int old; @@ -6669,7 +6669,7 @@ void addrconf_disable_policy_idev(struct inet6_dev *idev, int val) } static -int addrconf_disable_policy(struct ctl_table *ctl, int *valp, int val) +int addrconf_disable_policy(const struct ctl_table *ctl, int *valp, int val) { struct net *net = (struct net *)ctl->extra2; struct inet6_dev *idev; From patchwork Mon May 27 17:04:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13675657 X-Patchwork-Delegate: kuba@kernel.org Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 817CC15EFC2; Mon, 27 May 2024 17:04:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716829479; cv=none; b=puPx8ylwREKFVNCQsC8G7d0Z6SN87p6LUh3kYjYKHbKgZt+Y9R997Hu9kHvydIRcnkELIk5SaGzK5LefumioHCM3FRl4ybqGJUiRSsfur+Ge9FXdQzkSbK3kHzKMi8HSI2uzjcP4NoWMkF8hogP2X5UaGpAmj/0J2kmtLAI7LCA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716829479; c=relaxed/simple; bh=IZAxBClgjR2JRRgfT5u1GNIr+agkxq1+agyYcocn9Rs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=s7BCaF916vJiCg+dBkEgPXIT/qeRxzpVK+Gyd+MdTRmDv9hL6TuV9bnTeeBRlRao1yz412EFhgWhHZplSkOVMwhhmwzd4lv9Rcp+ak504Es2gY+t3N7j4WYHpeAqvFmnAeiRtGYWFjuqQA5BGXBP5YDmHv1aOlGVdc0RUun3Z7Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=da/fhpWv; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="da/fhpWv" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1716829474; bh=IZAxBClgjR2JRRgfT5u1GNIr+agkxq1+agyYcocn9Rs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=da/fhpWvJelKxMWpgjF8T7sg0ljON57xbSnx/pR9isNqHBqFm5Lr/c8WMZs0ZP4bq b71Vzcrn3R9Q2+LG6r6EHTJFx4RoZJJRLRZ4C5VWv1j4LSuXhG2el/8I0+S5yK9Hsv iJUcNRq1H55iPWiGLsQeTSaojsBi0YAZXy00+vx8= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Mon, 27 May 2024 19:04:22 +0200 Subject: [PATCH net-next 4/5] net/ipv6/ndisc: constify ctl_table arguments of utility function Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240527-sysctl-const-handler-net-v1-4-16523767d0b2@weissschuh.net> References: <20240527-sysctl-const-handler-net-v1-0-16523767d0b2@weissschuh.net> In-Reply-To: <20240527-sysctl-const-handler-net-v1-0-16523767d0b2@weissschuh.net> To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , David Ahern , Simon Horman , Julian Anastasov , Pablo Neira Ayuso , Jozsef Kadlecsik Cc: Joel Granados , Luis Chamberlain , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, =?utf-8?q?Thomas_?= =?utf-8?q?Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716829474; l=1095; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=IZAxBClgjR2JRRgfT5u1GNIr+agkxq1+agyYcocn9Rs=; b=hw+Pgu/VKaC68kmI3/6DupMdnaPEiQWJV4ODKOTgA1hLEJwxHTRAfUo5GeMcva1eO0s8yKF9v 1wznNFvMJTOC66Nx627QVe8fLrKNrFbhksSFY1a6itTykcQ7gRtObEE X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Patchwork-Delegate: kuba@kernel.org The sysctl core is preparing to only expose instances of struct ctl_table as "const". This will also affect the ctl_table argument of sysctl handlers. As the function prototype of all sysctl handlers throughout the tree needs to stay consistent that change will be done in one commit. To reduce the size of that final commit, switch utility functions which are not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Signed-off-by: Thomas Weißschuh --- net/ipv6/ndisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index d914b23256ce..254b192c5705 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -1936,7 +1936,7 @@ static struct notifier_block ndisc_netdev_notifier = { }; #ifdef CONFIG_SYSCTL -static void ndisc_warn_deprecated_sysctl(struct ctl_table *ctl, +static void ndisc_warn_deprecated_sysctl(const struct ctl_table *ctl, const char *func, const char *dev_name) { static char warncomm[TASK_COMM_LEN]; From patchwork Mon May 27 17:04:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13675659 X-Patchwork-Delegate: kuba@kernel.org Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF177160787; Mon, 27 May 2024 17:04:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716829482; cv=none; b=Yn5Tfn/wKubTtFkyyGWyp8+iAgMkBfv6ZncYNuXxkDRVDT2tyjFjWCUxMNHN6t8MZKxh5K4lgperCML6SgNj+vzx8O5hf8OaU/6Vz+7XwcT2pUV92DygMVlwfkcd/CuZIjBnsHb+VsuajoUOI8CIcjSBtvQvHPcheto0ckcjAsw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716829482; c=relaxed/simple; bh=ailtByMMrVQJn27XJsDw/nbP0vGnYMWIFcr3PmJgg44=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UrV8bZcbWKtrPB4B7A5NBO7sFlbkZzuCc56Ioq3Egt6h4O7abZde1z/a3u9S2JNVGwc3EphtOA5OZMsK7o1vRI3RW4iIBpv7c3G9qp0SMsQ6BlSZyslayPdK/9TfWBNX8sjEpv/zvMjJ1cqYIQBAcsisVf8meHGuVD0GhZMpuX0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=IqE+RzwB; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="IqE+RzwB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1716829475; bh=ailtByMMrVQJn27XJsDw/nbP0vGnYMWIFcr3PmJgg44=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=IqE+RzwBivIpCk4R98n5wU8NbdtFNA+FjTy44Dg0QoHNpAZkUfkT06AVDH6iZpljW OqnVmISUXO7mrkDbigqPFtiBZ4xFpfvQUu54F6B4C413eo8GTozbD0/fHz9Zs9es3Q oPyeOuQ6tKb+jjN5c+wgRUvpbiTwi/LGmQ+dzq4E= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Mon, 27 May 2024 19:04:23 +0200 Subject: [PATCH net-next 5/5] ipvs: constify ctl_table arguments of utility functions Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240527-sysctl-const-handler-net-v1-5-16523767d0b2@weissschuh.net> References: <20240527-sysctl-const-handler-net-v1-0-16523767d0b2@weissschuh.net> In-Reply-To: <20240527-sysctl-const-handler-net-v1-0-16523767d0b2@weissschuh.net> To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , David Ahern , Simon Horman , Julian Anastasov , Pablo Neira Ayuso , Jozsef Kadlecsik Cc: Joel Granados , Luis Chamberlain , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, =?utf-8?q?Thomas_?= =?utf-8?q?Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716829474; l=1608; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=ailtByMMrVQJn27XJsDw/nbP0vGnYMWIFcr3PmJgg44=; b=Ru62T8Y5h2w0VlL5uxRe86TKAf0NyNrErX+coxsEOXiZxsk2X1m5Z125qR4GW1qsgvz6opeXk Ute+fsbkP1mCkvqzSYzyYHVbtm+V4CfChBn24ke9FiCqBONYI60ePzj X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Patchwork-Delegate: kuba@kernel.org The sysctl core is preparing to only expose instances of struct ctl_table as "const". This will also affect the ctl_table argument of sysctl handlers. As the function prototype of all sysctl handlers throughout the tree needs to stay consistent that change will be done in one commit. To reduce the size of that final commit, switch utility functions which are not bound by "typedef proc_handler" to "const struct ctl_table". No functional change. Signed-off-by: Thomas Weißschuh --- net/netfilter/ipvs/ip_vs_ctl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index b6d0dcf3a5c3..78a1cc72dc38 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c @@ -1924,7 +1924,8 @@ proc_do_sync_ports(struct ctl_table *table, int write, return rc; } -static int ipvs_proc_est_cpumask_set(struct ctl_table *table, void *buffer) +static int ipvs_proc_est_cpumask_set(const struct ctl_table *table, + void *buffer) { struct netns_ipvs *ipvs = table->extra2; cpumask_var_t *valp = table->data; @@ -1962,8 +1963,8 @@ static int ipvs_proc_est_cpumask_set(struct ctl_table *table, void *buffer) return ret; } -static int ipvs_proc_est_cpumask_get(struct ctl_table *table, void *buffer, - size_t size) +static int ipvs_proc_est_cpumask_get(const struct ctl_table *table, + void *buffer, size_t size) { struct netns_ipvs *ipvs = table->extra2; cpumask_var_t *valp = table->data;