Received: by 2002:ab2:6486:0:b0:1ef:eae8:a797 with SMTP id de6csp28758lqb; Fri, 15 Mar 2024 14:01:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXTfYoxsABe9/Rte202IQ+Rg8kgrhRF1qi5U23jpEWig2YI1sP+nkaO/lkXQtmsCRkWOzV0RoNHxrV8Dsz3q7n6DsCAOy3KQuDIC0nyqA== X-Google-Smtp-Source: AGHT+IGSnhxGgwvkFIMpURzJ8rToVlF5sDsLGvs3mUuysBm3/VP8mcDuzh0cYT70iDgryzxKyFBD X-Received: by 2002:ac8:570f:0:b0:42f:5131:54a9 with SMTP id 15-20020ac8570f000000b0042f513154a9mr5598408qtw.63.1710536488639; Fri, 15 Mar 2024 14:01:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710536488; cv=pass; d=google.com; s=arc-20160816; b=oP3ERgB9FTa6g+kiZqwWkLKC48b37+swDMSpBwWbkxQZyUxNBPehEWNo6ze9BMB8bS lJsaxxyou4rGe9tR0ruPWa5QsVc/6O3iwH20Or7QTeBvmRf7On+cp2znhLQLmGq29j+d eJavMQH2Wj4F+AX9yJQaqCe4xV6kzzSTSvrCdgIyIjlxdyVwbaIq/Cs+Iq8dOMD3lZtw 72hPDuOZezDxXvjJ8lgKLuieyo6rGYbZvqdtPvuThIgiyOUSQ2eSJmuDN2iG8UdsaN8s lDMpd3b+NpfkOpFxxEOlKZN0ZQlWdjSBIb9vshDas93j4lKjbTqneSIhxrrsDuoGYCRm BLzA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=ANWB3THTVGUwkCzekT5wEk35tYYqEGjvGDQoY9noUUU=; fh=P5LopblOuM+wTyGvxUQN+d1jxiejuSAgMh+CJu1BpsA=; b=krjH+nJyq+ydR9vbaLaat10exzfzNOD4J/vS7dQv5HJuj3dYJ2Gf5C17O7/GZTCAf1 bMnd0zVoKFL76ZuVVetvNAbpIzECiMb5z+h5/Q6m8rgjeDw/J2Srh9SXAiQ53JH4iEk5 L74dVJuiQXYmhK98M1vXguJ7Kogg3f21/UznCacSB5dlREl5kR4rLtaM+6qXY/apyC1T SgPyJRJIXH689uAErwZ6i7vTKcGSt48eSRQXPZ8Ci5MoxeR7Tge1acTD4nnwlMD/y68+ Dkt2N4mMtUWHohMmeoQvUSF+zj/w9Dgq9GiVti/VYp2RyWhTz0AXIplzPgrzn4eaH0bC EDPQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b="nT/oNieE"; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-nfs+bounces-2344-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2344-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p15-20020a05622a048f00b00430b82a1124si1101880qtx.155.2024.03.15.14.01.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 14:01:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2344-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b="nT/oNieE"; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-nfs+bounces-2344-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2344-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A76541C234DC for ; Fri, 15 Mar 2024 20:55:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5CB4B5676F; Fri, 15 Mar 2024 20:49:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="nT/oNieE" X-Original-To: linux-nfs@vger.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 1B3AD481BA; Fri, 15 Mar 2024 20:49:27 +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=1710535772; cv=none; b=K5LJFi66paweLxa37F2iNUMANVXgTCJ/PzF1cCjycqz1MlwVxh0JG692u7YMRBP2+b9BbNGLXDNIhRhEJsnddYb1M7FbsHlRFKZSE5t6Ab+gohq9IC/S3jCFgLpoCcDE226y3dO4PIo2e7NJJT0ec3LptfYvnqfmQ6hvVKIaJ8Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710535772; c=relaxed/simple; bh=7M7T8qGemL/J5YUUwWJ0cC9nJ/50fjpcJlm81ezvXMY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=r1j/fkxD/kkeuSB8Hes97kmSb1CosQfon9pCHFZSFZUSZuFqUliE+AYeod7R73y2SAheWKwAdVbS4brty8Bl8ZtdFUUe79xI+NY5WVN4tkcQLu1Oqfchaxsw9OAOrPsbo584pyqf/A+m7495hOZeQ3IUOGVRQ+IHRZGo8/hQCWs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none 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=nT/oNieE; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1710535766; bh=7M7T8qGemL/J5YUUwWJ0cC9nJ/50fjpcJlm81ezvXMY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=nT/oNieE+l1Ak2BQAVz0YjBZZ28OhnII6J3mHQ/P4fjSuVwd6BFfbETo9aZ/TJntC J1FFe4rcB/MZob4cKSTzeiZCxq8CBnF32haIpUyb7ie8VrfmjGbz34Ljgp1qcb3g3Q lD9ToK9Fe4EXVjNvix4clw2X3PZbisFWZqUa1iLA= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 15 Mar 2024 21:48:05 +0100 Subject: [PATCH 07/11] ipv6/addrconf: constify ctl_table arguments of utility functions Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240315-sysctl-const-handler-v1-7-1322ac7cb03d@weissschuh.net> References: <20240315-sysctl-const-handler-v1-0-1322ac7cb03d@weissschuh.net> In-Reply-To: <20240315-sysctl-const-handler-v1-0-1322ac7cb03d@weissschuh.net> To: Greg Kroah-Hartman , Kees Cook , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Muchun Song , Andrew Morton , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , David Ahern , Simon Horman , Julian Anastasov , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , Luis Chamberlain , Joel Granados , Catalin Marinas , Will Deacon , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Gerald Schaefer , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Phillip Potter , Theodore Ts'o , "Jason A. Donenfeld" , Sudip Mukherjee , Mark Rutland , Atish Patra , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexander Viro , Christian Brauner , Jan Kara , Eric Biederman , Chandan Babu R , "Darrick J. Wong" , Steven Rostedt , Masami Hiramatsu , Peter Zijlstra , Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Ian Rogers , Adrian Hunter , Balbir Singh , "Naveen N. Rao" , Anil S Keshavamurthy , Petr Mladek , John Ogness , Sergey Senozhatsky , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Andy Lutomirski , Will Drewry , John Stultz , Stephen Boyd , Mathieu Desnoyers , "Matthew Wilcox (Oracle)" , Roopa Prabhu , Nikolay Aleksandrov , Remi Denis-Courmont , Allison Henderson , Marcelo Ricardo Leitner , Xin Long , Chuck Lever , Jeff Layton , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Trond Myklebust , Anna Schumaker , John Johansen , Paul Moore , James Morris , "Serge E. Hallyn" , Alexander Popov Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-fsdevel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-xfs@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, kexec@lists.infradead.org, bridge@lists.linux.dev, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, linux-sctp@vger.kernel.org, linux-nfs@vger.kernel.org, apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1710535695; l=1733; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=7M7T8qGemL/J5YUUwWJ0cC9nJ/50fjpcJlm81ezvXMY=; b=tDrRFBvycsbBg1b0VjT1utAvA72vW/Pfn/OG8rmdlBPllpN3zp995mmaLodLsZ9cR6UItDzEG 934FLotKWacC+9a11IwVotmGV7cUQDZTwgtBLcNNphSOBq2Q6lt1ZQr X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helpers. 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 247bd4d8ee45..c72f3b63e41d 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -862,7 +862,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; @@ -930,7 +930,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; @@ -6375,7 +6375,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; @@ -6666,7 +6666,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; -- 2.44.0