Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2547872rdb; Sun, 3 Dec 2023 23:53:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IHmzfAtDp+rv5E1KGl3f8tCVoSpIUhoN7ybJMazaMbANqagzYz0OAhkF1ya+8rWRSXD4APa X-Received: by 2002:a05:6a20:8e17:b0:18c:4d89:6e86 with SMTP id y23-20020a056a208e1700b0018c4d896e86mr1647434pzj.7.1701676391882; Sun, 03 Dec 2023 23:53:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701676391; cv=none; d=google.com; s=arc-20160816; b=xWOUnmNnFDcg9umP7uk/DxQLlnEOolAXaA+S+havSzpzFD0IGpNr8cVSOeHyGNa6eY jXtWe4oqqsl+MzaoZ/4mho84T/jLPr1xIzpHWRj+veyub6NpaeUHoh3qzMu2yTcicNvy lXa0rS7CzIy7p6Lg2swc4pm/+m4pdI42H2qtYGAHtAZpoVo5cannqafA3Xx1P/L0lxd/ H1OXgo/K2a/bEiwW25zvRuHrri5mCeOrN9TKpb17jvOgzgoXtBb+50ERNUgyh/mmnzRM RvURelSKc80EQKsNg5x/IdlOLdo0S9mPNkIvuwsEMpIyoiAJjm3AB45r/jLxonH4Wetm nxAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=bQw/Yb9G/OBUg2pSXhbuBdROOKgjwIMSf1n6/puAYUw=; fh=1v5zqbO9sIGUc9bsdyhYE0zxdK1knZz2xnJYWUWMFKo=; b=oPl6EKYg5LQZJ54Tnp4fpPm4+FjsehWUSTBn1seyd/q9RNWY/njQO92Xy1bUl4nPBk NJ7IiC9QxfKN6rHv/nAKAPrtZxaeGfzd2Tdk1+clu80lAf4Ul8WV5QIXdFFg6M4SGBng Z4hT88WzBD+KPxNa7W4YlwSVWK+3puCfdTt96c6KL+1w1W4dUU9jHT9pC8c9K5AjmX4o zGbrpENyKlU2l9Jhnlz+Y65Wbwl9AX05yUbMC0Ja1KKgvbNmU6BE+Hw29vcUT/iBZGCb ZVT8IxWLolM8Ab4SYmkw8QX8raKv7X63QEZ12EoDti2cdrPELrPStbM0kiTmRL894LbM ATqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=nz3O4Rpu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id x2-20020a1709029a4200b001d06b5f9af4si3941111plv.441.2023.12.03.23.53.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 23:53:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=nz3O4Rpu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C2CAD805ECF6; Sun, 3 Dec 2023 23:53:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343510AbjLDHw4 (ORCPT + 99 others); Mon, 4 Dec 2023 02:52:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234725AbjLDHwq (ORCPT ); Mon, 4 Dec 2023 02:52:46 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DC7F191; Sun, 3 Dec 2023 23:52:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1701676352; bh=5+HgEomGEcSfal8KEHbNRv5xkdMmu5uXZxrXCkIqu/g=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=nz3O4RpuvWkpltHlM3RYR9Jf3NvPF4MsnW3PyS389PBHs7UcASGhvDwUxa3ZFViyw SO0u+5I4bzKzYUIEqvVCZftRUMx6dQVMYYTdwPSyzAPN/xYB1m/vA6+4/+qnJy+csx UZK2VBQBwUMeh7KlXYFHy6bMh96GzxGmUhbGU/co= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Mon, 04 Dec 2023 08:52:19 +0100 Subject: [PATCH v2 06/18] hugetlb: constify ctl_table arguments of utility functions MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20231204-const-sysctl-v2-6-7a5060b11447@weissschuh.net> References: <20231204-const-sysctl-v2-0-7a5060b11447@weissschuh.net> In-Reply-To: <20231204-const-sysctl-v2-0-7a5060b11447@weissschuh.net> To: Kees Cook , "Gustavo A. R. Silva" , Luis Chamberlain , Iurii Zaikin , Greg Kroah-Hartman , Joel Granados Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1701676350; l=1138; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=5+HgEomGEcSfal8KEHbNRv5xkdMmu5uXZxrXCkIqu/g=; b=zd4HWDIvql9ethCYqcpULcNo0aOGOKcNIZoT6kq593C2oMwlIWM/2afb9K5I09ugAwV7Xi7Yb FGDJ8iOEM8EDN5I7kHXRLNOjXCxYDRa8gF/KebTpU/Di8j9dEg7L9e7 X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 03 Dec 2023 23:53:11 -0800 (PST) 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 1169ef2f2176..2df21a295359 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -4835,7 +4835,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) { @@ -4852,7 +4852,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.43.0