From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
To: Tim Harvey <tharvey@gateworks.com>,
Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
Javier Carrasco <javier.carrasco.cruz@gmail.com>
Subject: [PATCH] hwmon: (gsc-hwmon) constify read-only struct regmap_bus
Date: Fri, 05 Jul 2024 20:27:28 +0200 [thread overview]
Message-ID: <20240705-hwmon-const-regmap-v1-1-7cde543ba818@gmail.com> (raw)
`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>
next reply other threads:[~2024-07-05 18:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-05 18:27 Javier Carrasco [this message]
2024-07-05 21:37 ` Guenter Roeck
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=20240705-hwmon-const-regmap-v1-1-7cde543ba818@gmail.com \
--to=javier.carrasco.cruz@gmail.com \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=tharvey@gateworks.com \
/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
all inboxes | Powered by JetHome®