Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2191947lqb; Mon, 27 May 2024 10:42:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXSbMcaLmDgsbzvHDIDJu8oRwBZjuXpao8+vax6I9Der8OFFHv883XhI8R60xgFh8dcL9BdInp2XvoDXCiejpTw18zlpjUU/v1OYigPCw== X-Google-Smtp-Source: AGHT+IEQM03RNHW+rdJ4qj31ZMyj4Txjelx5Or89A5k7jtaiV8fyO+eaVHfoGUrfTaM7KmE71Prs X-Received: by 2002:a17:902:d50b:b0:1f4:5911:198b with SMTP id d9443c01a7336-1f459111c52mr96299905ad.55.1716831755899; Mon, 27 May 2024 10:42:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716831755; cv=pass; d=google.com; s=arc-20160816; b=eLDs2ygfXyES1IteRalfJU2ThmYSM4FXBmJZwXoU9q/7muLku10GpNEEKHS/Kv9dsR UdAES8uHcqlaib8VtEINwL3SvJziGSeGDB8JVbiLl9kFSAj6xXo798+ZAAAOkIYM6E9R 1nyqGM+Bm1FEuEj+kabJSTx6g8gWQWWi3zbOxuI+UfIejmt2ktWz4Qy9kl5SwxChzStN gOLVuDxKBf2qNmFVQ4FmWAuCNJ7U6YkAX4Wy/qZ/H+Ib9YmI31w6nyeKrqR1mfPzKUg5 QxuperAosLrfh4krRiTvAjzuc6azWEJdxzTRQ+SI8hrv4sHhqCkQFh4fEi9SVigsCA5v EQ1w== 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=XbUBrwsKRE8NULY1B4S52efJ24sG0pFMtcayVPbBrpY=; fh=YDg0oqa5hJ28OLR24+Z65EoTJ/ju8hSx1U8sxTUfo9w=; b=vmGntUF9sAR8Rr5NrzpFZPwqg8/GWKlUElAzGJi5ObAlBkkeR8tj0FELrQFb5t6taM vHJUU9wmymda/mLGj1ZaUU0+/LRsPtYbF5jGN5gBjtZ2Mfen2qRo/ekWPpix4fM0g4zj RUF5HjCP6DTpsrzLPOemY7GvgLZK+/+vVJtpLzIYx7FzqdiAKEovYjZm2e9bC9yWbAXr BibrxN6L6G+pR5Wpx2F3RHWFQ0f4TBPuQIMiqWd2c5cmr8S4UisW89lYVmTpnRDdvMwk 6m8rCYQlvht+FsoAf60v2g2C/Zpw6YuC3lfjF2FhIpjHe0hilA5yet+LgGlJ4SO3l8Wf tJEQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=lqxWsCfl; 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-191277-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191277-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=weissschuh.net Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f48a31bae4si30095985ad.238.2024.05.27.10.42.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 10:42:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191277-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=lqxWsCfl; 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-191277-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191277-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 592B4B26380 for ; Mon, 27 May 2024 17:05:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E1E5815F419; Mon, 27 May 2024 17:04:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="lqxWsCfl" 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 7AC5815EFC1; Mon, 27 May 2024 17:04:37 +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=1716829479; cv=none; b=kPY02Wx8DHHD+w6X08Bln9IBxxWfqFl6S2XOmUTI8zx2FgTlAMCf/OLaaul1BWRNan6znRm+dyIdKq4jGN2eGbJBb5UzsqNt/WGp9poDv3asmusY2CsCQt6m+9vGRFIAxb6hRfw35M8v6P0OaAJkWBRkGqcK276+rXdht2dbnLs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716829479; c=relaxed/simple; bh=6bL6o2hxyBnXcYtE4OX3yQlXt4wHX1IZ6z1HXg4YTBk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=C/GZQawcANFXochF+QIAA+jH908UTDM2iiETOyPfZL8KZNVvJ64e9FegD1x22YH6/z00I+ggGnkttfobOhALEQ9PC4zfPFCWw0YE8S0SCcT+QQ1hKLuFmjyQAcs/FTnYUWMbCSzWx5Cu8StrEW+ZvVNZjYskjpNBDWLm9z7GVL4= 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=lqxWsCfl; 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=1716829474; bh=6bL6o2hxyBnXcYtE4OX3yQlXt4wHX1IZ6z1HXg4YTBk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=lqxWsCflEGwW19FrFUiFp4De6UxyScYLTSkduJW/fU5Qg7l5ex7td7Gy94VfWY+Zi jfPtQ+hLjKssploNEcrzQS4oizGn0MyazL355TZwPXJpDD22aFKye7Isg3+D8hTyKF exRKnWIEygkHl5GBvAhhsrmqhHBl2sTh+iE9rp8I= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Mon, 27 May 2024 19:04:20 +0200 Subject: [PATCH net-next 2/5] net/ipv4/sysctl: 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-2-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=1585; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=6bL6o2hxyBnXcYtE4OX3yQlXt4wHX1IZ6z1HXg4YTBk=; b=dLFQIDCQf5HQcl5crzjSnoc/K6V0T8suTQVBLbLK4maEZiLFn9DDVa6zHKrQ+E8V5TpmVXdYa 9X2NvZxdxjOB2GfaD1j2GxruOHgL0gqSvV3ykbTTaIgy6tI7OkODKNE 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/ipv4/sysctl_net_ipv4.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 162a0a3b6ba5..d7892f34a15b 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c @@ -130,7 +130,8 @@ static int ipv4_privileged_ports(struct ctl_table *table, int write, return ret; } -static void inet_get_ping_group_range_table(struct ctl_table *table, kgid_t *low, kgid_t *high) +static void inet_get_ping_group_range_table(const struct ctl_table *table, + kgid_t *low, kgid_t *high) { kgid_t *data = table->data; struct net *net = @@ -145,7 +146,8 @@ static void inet_get_ping_group_range_table(struct ctl_table *table, kgid_t *low } /* Update system visible IP port range */ -static void set_ping_group_range(struct ctl_table *table, kgid_t low, kgid_t high) +static void set_ping_group_range(const struct ctl_table *table, + kgid_t low, kgid_t high) { kgid_t *data = table->data; struct net *net = -- 2.45.1