All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: Const qualify {ucma,iwcm}_ctl_table
@ 2026-12-02 12:39 Joel Granados
  2026-12-02 12:43 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Joel Granados @ 2026-12-02 12:39 UTC (permalink / raw)
  To: Jason Gunthorpe, Leon Romanovsky; +Cc: linux-rdma, Joel Granados

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>



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: Const qualify {ucma,iwcm}_ctl_table
  2026-12-02 12:39 [PATCH] net: Const qualify {ucma,iwcm}_ctl_table Joel Granados
@ 2026-12-02 12:43 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-12-02 12:43 UTC (permalink / raw)
  To: Joel Granados; +Cc: linux-rdma

> 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>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261202-master-v1-1-2b721acc04fc@kernel.org?part=1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-02 12:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 12:39 [PATCH] net: Const qualify {ucma,iwcm}_ctl_table Joel Granados
2026-12-02 12:43 ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.