Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2785531lqt; Tue, 23 Apr 2024 01:08:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVF615s4p0UU9WYJgiNlVHYEt4reQzWBAW2NbpNmgdI/dM6G3vjaZvpiiuPq1ViBoPvdfNOgjYxPe+1t7NI9IwpuxTic2MxqhtawJ5lqA== X-Google-Smtp-Source: AGHT+IHnYxsuIsPpeE4rOaS/v0Qq9PhLK9FKLb4mNofpU84PGOvYDKkneWfR4RAWlqUBa0gnxcrS X-Received: by 2002:a05:6a21:3e0d:b0:1a9:b207:d228 with SMTP id bk13-20020a056a213e0d00b001a9b207d228mr13438788pzc.38.1713859708535; Tue, 23 Apr 2024 01:08:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713859708; cv=pass; d=google.com; s=arc-20160816; b=uk8/ygE0U+F82lOvG5aowB9jwHhxhPeOYWTn4YCwm5fPWrN/R/1yiU9uv696iVHFR7 nI+nt3ALiiVrbDLg8Afh3cf7bfUzAFqTt086lV+OvGPm6nnkN0y0Gi7qChmAEQjmnRlW hsdHtEdDWuhBnKdzWybnSPMl9rEYlzBVTtwXjS0oXTRegVn1cdFyW2UEIZIgsYnE3i6K C+lFQd7bCMg5gu0RGq9N20eZPlbZy4L9lRvDZTI1Jr+EN5lnWkij3HwClpRCL8Um02uH FP5d3C6Puz0Ks8ikxc3rGpVfSO4fbtP6C1V8LAQC+1nYYh4eskKCmXkHXtzM6kwzXiVJ zh/w== 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=/qpxneV6QXXa3ldi9X8/PDcAcM2Z9Q+xYllYIWVWWP0=; fh=VMT1zhh5TdCzVW4WOkCTD64YoVs6fdICDULVwYjy/wU=; b=0ik/y/ciuj8/yAcN7A9afPcDiauehKNhOb/BFkTTb9ZOEk76Q3NI/6Lw7f290zTe+u uFs6kWvTDVSmyGQQmkQEqkUUbRtsIEbBgEM6EVNrWipviLiBeZ0O/NDUgERRQ7GVP9Fz vZWbfQclpTQunxQHyCkU5Xn78q2oYf2iXKCk40NJo/yW0cIPTTq71B2MKmDpV1WuRaBz a1g+FVBxqRHLX1JDD9eheeQtiLZMLlF8JgvLEw5ydSLQPp6yX1mucBUQXOqiO9pOn7jk 3pFmo24vJNi4TG1j1F1tNGT5q+AJRU6WdPEzxFlqhZe03Zoyq+Pp5knMmWddChnd5MGu JfTQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=dzsiMjXG; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-nfs+bounces-2939-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2939-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b20-20020a170902d89400b001e445b8108csi9008735plz.391.2024.04.23.01.08.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 01:08:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2939-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=dzsiMjXG; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-nfs+bounces-2939-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2939-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DF874286F34 for ; Tue, 23 Apr 2024 08:04:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 694AF56B7C; Tue, 23 Apr 2024 08:03:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="dzsiMjXG" 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 C4C23482EE; Tue, 23 Apr 2024 08:03:08 +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=1713859392; cv=none; b=B6mCaN4piQz6IytbVbgmdqxIfDcspCHZSGFr5UcrnJhPFJv2lfPjPhX9ZZ6WZyE8J4s/lyaxaYaAJUoUjDQjf8jWzK6iwr9EWb9or60AJZCf/fzgAlp0EKyM26/DUNZqsJSSxoDklVgV9AdtMz1iSdL116Y5kTkLNF4VYiwNv7Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713859392; c=relaxed/simple; bh=rorPfneHsH4rUwSDhKhni5qatzGJBaNeOV3jbM8lXHw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hTrk5uUzvVfnzgoJqLsOl1EFWQH7uUzYX8YilSMUplNHifJ6zt9Jvh6bOyrO/PIfVLqVh/ivGZ3AJKw4/jeznb7RcXNQbPrkhXvszwzZ6VQm0ipXO1cgnj24TPfrkCLnL34lp2rNxRC1HNsdAtkAqskCc0w5AJp/3RfS5yZlV5c= 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=dzsiMjXG; 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=1713858962; bh=rorPfneHsH4rUwSDhKhni5qatzGJBaNeOV3jbM8lXHw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=dzsiMjXGUMnBeinztfZVIlnYV1FybTv3PVNga/7GNRmjq0tvokzKVmAqMxqZ4TZfu 3Mm9Xa73ByvDCbl+zSGzluYBcTMsPar3kyGR78xthILGtEnmvJBhKWCBZI5pDCg6C/ UHsAfQ2uBimCPXwCv8/f91yRU/qBVoZCnvSEXqbk= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Tue, 23 Apr 2024 09:54:38 +0200 Subject: [PATCH v3 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: <20240423-sysctl-const-handler-v3-3-e0beccb836e2@weissschuh.net> References: <20240423-sysctl-const-handler-v3-0-e0beccb836e2@weissschuh.net> In-Reply-To: <20240423-sysctl-const-handler-v3-0-e0beccb836e2@weissschuh.net> To: Luis Chamberlain , Joel Granados , Kees Cook Cc: Eric Dumazet , Dave Chinner , linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-mm@kvack.org, linux-security-module@vger.kernel.org, bpf@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-xfs@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, kexec@lists.infradead.org, linux-hardening@vger.kernel.org, bridge@lists.linux.dev, lvs-devel@vger.kernel.org, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, linux-sctp@vger.kernel.org, linux-nfs@vger.kernel.org, apparmor@lists.ubuntu.com, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1713858961; l=1138; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=rorPfneHsH4rUwSDhKhni5qatzGJBaNeOV3jbM8lXHw=; b=uf+pHLZXXpo1yHHJ2Z13M1e5OT7jsu5lvkviloIZv10UAQiz7g1qEzlA2Tlm9z/kgvmk0wE7S t+OfiZGT2B0DcKcd55qz3Jc+6I9uA8iEvRoTSo4pFJmvocUaelGw1Ie 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 3b7d5ddc32ad..8d12ce63a439 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -4911,7 +4911,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) { @@ -4928,7 +4928,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