Received: by 2002:ab2:6486:0:b0:1ef:eae8:a797 with SMTP id de6csp24430lqb; Fri, 15 Mar 2024 13:49:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUq2paTj3Z+krUDvAe03q5ROz4uT0h+o/K8+0IltqR8eVdYS7Tb6rnc8076yypWj6dWuK7MTMRO1Y7F3tcybpK1rY5Mmf5fYbbS/eC3Jw== X-Google-Smtp-Source: AGHT+IG9JjQuTbRq6hmyZnRVE2yVbVxT6ITO2JOrZRI2S72fbvNW3vtha2qmopRMmolcJGuEbQMz X-Received: by 2002:a19:2d5a:0:b0:513:d8b4:bfd1 with SMTP id t26-20020a192d5a000000b00513d8b4bfd1mr2480525lft.18.1710535782571; Fri, 15 Mar 2024 13:49:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710535782; cv=pass; d=google.com; s=arc-20160816; b=Nvqt2oWQWFYzFF9q9kCdcwvB9e7b/LvB6mZlgeBYQjDn+QwW7FghVGlVsQ8FM2N17k Z+clEZJSMZgziD06N/g7yDav+x4PJOG3ayKYxVclznqeYx3yTxl5c2h+Hh4LELn1vv7U t9KADn0pT2x3x6IfJdLqtsMBhjg0/cbk3UkPf5iNQaxLl9EbtEla7vixqkGCLGYe3g0i bDQjfaWwSUXuyxbEYPzV2LVWHokbg9Q52QqsQkK8Ct8T41wLHG6TJRHlzjJwGQEVjMko 9HJhhj6oxRdHpwskD0InsXtwgqEYg3hJnt6Om29sPoEJJ6WgVC4V0tHESRnUiacFy6Tc Gq1Q== 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=MD+qyRmOeEgyLbnBaZ/vRyIwcKlEn85ZJhhe2RuB9sU=; fh=P5LopblOuM+wTyGvxUQN+d1jxiejuSAgMh+CJu1BpsA=; b=vWmemM2k9Y6R8w+fqrcoaBBRykeK4oJ78QOzd/byhdv1S5E53srGCmpqLbejR2in2d ArMFxGaCunsI7/3Up3xg0ZWL/v25G/6HRKWFs+fojIddn1z6JLPD7NsVvy0EvWo0XF7T jOBiWSU8iVMTrKTInWKrB8DVJzyKNk0g37x+EbjAD/lWLeK5i9TpKvggibK16mtg/xJy kaMFI1AM+yxMYWThXTHK8ZoKhIPz4igw+SeHBFKuXVdsO3c7XnHHlnlfbtWdwa5qFeJ7 XlzcFkqd5TTXHNIn8tUBY9uKVDFYS1mlhinWGqLzF2VoFIekI/C1+k9mi13wGSnPvdHk kcuw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=Sq8LvcBI; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-nfs+bounces-2338-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2338-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a23-20020a1709064a5700b00a466230977bsi1935987ejv.658.2024.03.15.13.49.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 13:49:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2338-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=Sq8LvcBI; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-nfs+bounces-2338-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2338-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 12D0F1F220F0 for ; Fri, 15 Mar 2024 20:49:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 364DE58100; Fri, 15 Mar 2024 20:48:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="Sq8LvcBI" 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 AB9DF1EB48; Fri, 15 Mar 2024 20:48:26 +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=1710535710; cv=none; b=Haap+C0hpaRg/BFhIZ25vw8TW+L6IFOAHfvtLXnYn3sE5zKhO7SVanzxS5mstI+9PdqkClVSZAsinq5rvPAWA9B76/QzkF+DWAn1NmhJXAgTgvirkLPgfhhVKijQis6NyMddez0+30mbJqL8+4FBA6fk+ZOpoPrbElL6ycfkc6E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710535710; c=relaxed/simple; bh=ZA8n2/koLk8T5EEGrZrQe3HTqPjD2IuDJPJOoTgLjZQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=P29bstIaCi4WdbFLgd/wg5uZsfCS0PPzxJply/TteRzE7nOvG+D7eWNzbkpIRbEuXLFfUnzU1KjziHgUJeEN0JSWAkg0EusZm4CBRnU0KawC8M2JXzjwF+p1JLJeOj56IHTZfEvjil4FeaR/CPd7ioLIqN0Bx6AJ0hsHf1mz4Co= 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=Sq8LvcBI; 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=1710535697; bh=ZA8n2/koLk8T5EEGrZrQe3HTqPjD2IuDJPJOoTgLjZQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Sq8LvcBI7p1gv8YF+Fl6E9SHh6cG4uM9FEK2x/Wqq1z2lsOrhhz5yQNS/tUAIK6jL zaTESlVFyFVTGgnfO0nn5yRM2Yc0itbSdfIy/O/NbQJVPCSWx7t53jzls8LBlYOeHK IrYN0Ex/0XRwb/4piozxul/b2C8P/gHg2Vl5ibj4= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 15 Mar 2024 21:48:01 +0100 Subject: [PATCH 03/11] hugetlb: 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-3-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=1138; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=ZA8n2/koLk8T5EEGrZrQe3HTqPjD2IuDJPJOoTgLjZQ=; b=boZ4t6eOPk3Dljh4IP0PKWoLOxGtOLAXof5Zxa1r9XXXItitoJuOMZutWnuJAn75hjXtWjz0B 7PQefNn5iOMATogPVExj5hPohFmPOE42B/+MU7bt9FL5JEbL5sxkIfe 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 --- mm/hugetlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 23ef240ba48a..b0d89ab98eaa 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -4929,7 +4929,7 @@ static unsigned int allowed_mems_nr(struct hstate *h) } #ifdef CONFIG_SYSCTL -static int proc_hugetlb_doulongvec_minmax(struct ctl_table *table, int write, +static int proc_hugetlb_doulongvec_minmax(const struct ctl_table *table, int write, void *buffer, size_t *length, loff_t *ppos, unsigned long *out) { @@ -4946,7 +4946,7 @@ static int proc_hugetlb_doulongvec_minmax(struct ctl_table *table, int write, } static int hugetlb_sysctl_handler_common(bool obey_mempolicy, - struct ctl_table *table, int write, + const struct ctl_table *table, int write, void *buffer, size_t *length, loff_t *ppos) { struct hstate *h = &default_hstate; -- 2.44.0