[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4eefa8530a55ecde82b3ec9a445f93c01bda7ded.1720556038.git.christophe.jaillet@wanadoo.fr>
Date: Tue, 9 Jul 2024 22:37:45 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: linus.walleij@...aro.org,
lokeshvutla@...com,
nm@...com,
robh@...nel.org,
tony@...mide.com
Cc: linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: [PATCH 3/3] pinctrl: ti: ti-iodelay: Constify struct regmap_config
'struct regmap_config' is not modified in this driver.
Constifying this structure moves some data to a read-only section, so
increase overall security.
On a x86_64, with allmodconfig:
Before:
======
text data bss dec hex filename
17355 1692 16 19063 4a77 drivers/pinctrl/ti/pinctrl-ti-iodelay.o
After:
=====
text data bss dec hex filename
17729 1372 16 19117 4aad drivers/pinctrl/ti/pinctrl-ti-iodelay.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
Compile tested-only.
---
drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/ti/pinctrl-ti-iodelay.c b/drivers/pinctrl/ti/pinctrl-ti-iodelay.c
index 65f9439d0d5b..019b302db2b0 100644
--- a/drivers/pinctrl/ti/pinctrl-ti-iodelay.c
+++ b/drivers/pinctrl/ti/pinctrl-ti-iodelay.c
@@ -82,7 +82,7 @@ struct ti_iodelay_reg_data {
u32 reg_start_offset;
u32 reg_nr_per_pin;
- struct regmap_config *regmap_config;
+ const struct regmap_config *regmap_config;
};
/**
@@ -776,7 +776,7 @@ static int ti_iodelay_alloc_pins(struct device *dev,
return 0;
}
-static struct regmap_config dra7_iodelay_regmap_config = {
+static const struct regmap_config dra7_iodelay_regmap_config = {
.reg_bits = 32,
.reg_stride = 4,
.val_bits = 32,
--
2.45.2
Powered by blists - more mailing lists