Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2174724lqb; Mon, 27 May 2024 10:07:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW8UhPs/HlnV0nd3eadJJXzSnwKwuzil6UmkcGfC/U7aozYSovsDezBJgIL40Hhmrv7URQcynh0m6HVmNCtkol7TaEd7MblF+vnhnxcdA== X-Google-Smtp-Source: AGHT+IEWRuzA152lWIvMpanNFmSlvvMzuF6anTRx6ZwXTlKPB0f8qk1YQ3kUo3P1w9JtzRo+aWj1 X-Received: by 2002:a05:6e02:1d1a:b0:36c:4f4f:ad62 with SMTP id e9e14a558f8ab-3737b2ffdc2mr125028375ab.13.1716829633178; Mon, 27 May 2024 10:07:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716829633; cv=pass; d=google.com; s=arc-20160816; b=DJiUnnKa7JW90Jz0Dd+enuJOQTP6zos7YR7JUEsdbBJpYiAURXoYpNhsj9SMUYZAzz BGURwRqagrIZIM/D/7d+7khAukL8+qpaw6xwnO5aPebwNXbGAaOsxe3i3KmB4RKyMPPT l6WPdLCE9se/wj2swqIKXBjkbuYPzgO5Au2xwlTXorUvI2+y3o1gTCnrykwu0+DXg0Dy YkFwnza3eqlvFoke/zYG4lIDTsKNDC8khcpeiIjbrr1BSXcBa+ybWjKAyFn20hAtLSXx 5uVTPSywQtRUCrkbG5g0q8PGt2W733X6yJK8HwMbpxGc0g6HyCY1cfjGUrgOJ4ytsFJr 3JyQ== 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=+deaMqGT8IxE0pa6zkX9CTLkApwnLnBKy4EMw9Kq9g8=; fh=YDg0oqa5hJ28OLR24+Z65EoTJ/ju8hSx1U8sxTUfo9w=; b=RBLW0UCk+J2/mMM3Op74IAmaNNuM54232kaQbH2fA2XU8r8f1AijFwklGdKN1d/Wd8 oHd6yKW/XwiL/A/kiRgaSebJ/dCUtORMw8OxqTbnOB6UmID2k7jWIF9LaJbBoMgyv3me Ek7K3DGyiyk314sLjv9sjlgiVApFmG46tZ2nvjH+d1CSFTHnvqL+1k3YE3sBzRAxxsRK TtB3g2+qQH9ZJtIPV4P/LosFDLlthxjHpAIzelxVWt+df8CT27+RoJPIv42ikuSz5vkz 8VaI3ZZnSA4oIxkO1nf+8avF3HiYB4AXCzZXM6BmaZ4q6Ej5Cj5KggjevKZMWmBx8hE8 QORg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=IqE+RzwB; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net dmarc=pass fromdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-191282-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191282-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=weissschuh.net Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794abd5ec97si904704385a.708.2024.05.27.10.07.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 10:07:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191282-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=IqE+RzwB; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net dmarc=pass fromdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-191282-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191282-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=weissschuh.net 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 D89191C22254 for ; Mon, 27 May 2024 17:07:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 633321667C3; Mon, 27 May 2024 17:04:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="IqE+RzwB" 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 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: linux-kernel@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: <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_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= 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; -- 2.45.1