* [PATCH] hwmon: (gsc-hwmon) constify read-only struct regmap_bus
@ 2024-07-05 18:27 Javier Carrasco
2024-07-05 21:37 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Javier Carrasco @ 2024-07-05 18:27 UTC (permalink / raw)
To: Tim Harvey, Jean Delvare, Guenter Roeck
Cc: linux-hwmon, linux-kernel, Javier Carrasco
`gsc_hwmon_regmap_bus` is not modified and can be declared as const to
move its data to a read-only section.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
I missed this one when converting regmap_config to const. After this
conversion, all read-only regmap_* structs in hwmon are declared as
const.
---
drivers/hwmon/gsc-hwmon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/gsc-hwmon.c b/drivers/hwmon/gsc-hwmon.c
index 0f2147699c91..cb2f01dc4326 100644
--- a/drivers/hwmon/gsc-hwmon.c
+++ b/drivers/hwmon/gsc-hwmon.c
@@ -39,7 +39,7 @@ struct gsc_hwmon_data {
struct hwmon_chip_info chip;
};
-static struct regmap_bus gsc_hwmon_regmap_bus = {
+static const struct regmap_bus gsc_hwmon_regmap_bus = {
.reg_read = gsc_read,
.reg_write = gsc_write,
};
---
base-commit: 0b58e108042b0ed28a71cd7edf5175999955b233
change-id: 20240705-hwmon-const-regmap-a1fef10fbd65
Best regards,
--
Javier Carrasco <javier.carrasco.cruz@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] hwmon: (gsc-hwmon) constify read-only struct regmap_bus
2024-07-05 18:27 [PATCH] hwmon: (gsc-hwmon) constify read-only struct regmap_bus Javier Carrasco
@ 2024-07-05 21:37 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2024-07-05 21:37 UTC (permalink / raw)
To: Javier Carrasco; +Cc: Tim Harvey, Jean Delvare, linux-hwmon, linux-kernel
On Fri, Jul 05, 2024 at 08:27:28PM +0200, Javier Carrasco wrote:
> `gsc_hwmon_regmap_bus` is not modified and can be declared as const to
> move its data to a read-only section.
>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Applied.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-05 21:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-05 18:27 [PATCH] hwmon: (gsc-hwmon) constify read-only struct regmap_bus Javier Carrasco
2024-07-05 21:37 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®