From: Joel Granados <joel.granados@kernel.org>
To: Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>
Cc: linux-rdma@vger.kernel.org, Joel Granados <joel.granados@kernel.org>
Subject: [PATCH] net: Const qualify {ucma,iwcm}_ctl_table
Date: Wed, 02 Dec 2026 13:39:44 +0100 [thread overview]
Message-ID: <20261202-master-v1-1-2b721acc04fc@kernel.org> (raw)
Const qualify {ucma,iwcm}_ctl_table arrays. Commit ef6cb145e216 ("net:
enforce net sysctl registration") allows the ctl_table array to be
const. This is part of the bigger effort to const qualify the ctl_table
arrays that started with commit 1751f872cc97f ("treewide: const qualify
ctl_tables where applicable").
Const qualifying {ucma,iwcm}_ctl_tables avoids unwanted modification
of ctl_table entries as everything resides in .rodata.
Signed-off-by: Joel Granados <joel.granados@kernel.org>
---
drivers/infiniband/core/iwcm.c | 2 +-
drivers/infiniband/core/ucma.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c
index 4b05867dad895afcd70fcd7a63fe678c738906e8..6eaa84bd6c44247c37ee25c3cced67487cd6088c 100644
--- a/drivers/infiniband/core/iwcm.c
+++ b/drivers/infiniband/core/iwcm.c
@@ -102,7 +102,7 @@ struct iwcm_work {
static unsigned int default_backlog = 256;
static struct ctl_table_header *iwcm_ctl_table_hdr;
-static struct ctl_table iwcm_ctl_table[] = {
+static const struct ctl_table iwcm_ctl_table[] = {
{
.procname = "default_backlog",
.data = &default_backlog,
diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c
index a15182f7a7c5baec5e0738a229b1665c20433980..7dbee95f3bc201a64d29809e63e92de132a7db0f 100644
--- a/drivers/infiniband/core/ucma.c
+++ b/drivers/infiniband/core/ucma.c
@@ -63,7 +63,7 @@ MODULE_LICENSE("Dual BSD/GPL");
static unsigned int max_backlog = 1024;
static struct ctl_table_header *ucma_ctl_table_hdr;
-static struct ctl_table ucma_ctl_table[] = {
+static const struct ctl_table ucma_ctl_table[] = {
{
.procname = "max_backlog",
.data = &max_backlog,
---
base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
change-id: 20261202-master-4fed893a395a
Best regards,
--
Joel Granados <joel.granados@kernel.org>
next reply other threads:[~2026-12-02 12:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 12:39 Joel Granados [this message]
2026-12-02 12:43 ` [PATCH] net: Const qualify {ucma,iwcm}_ctl_table sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261202-master-v1-1-2b721acc04fc@kernel.org \
--to=joel.granados@kernel.org \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox