public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Guenter Roeck <linux@roeck-us.net>,
	Patrick Rudolph <patrick.rudolph@9elements.com>,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Jean Delvare <jdelvare@suse.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 2/3] hwmon: (pmbus/mp2975) Constify local pointers to pmbus_driver_info
Date: Mon, 25 Mar 2024 14:07:43 +0200	[thread overview]
Message-ID: <20240325120952.3019767-3-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20240325120952.3019767-1-andriy.shevchenko@linux.intel.com>

Constify the local variables pointing to "struct pmbus_driver_info" and
other encoding params to annotate the function is not modifying pointed
data.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/hwmon/pmbus/mp2975.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/pmbus/mp2975.c b/drivers/hwmon/pmbus/mp2975.c
index af118087c4ee..bc7558dc87ee 100644
--- a/drivers/hwmon/pmbus/mp2975.c
+++ b/drivers/hwmon/pmbus/mp2975.c
@@ -942,7 +942,7 @@ mp2975_vout_per_rail_config_get(struct i2c_client *client,
 	return 0;
 }
 
-static struct pmbus_driver_info mp2975_info = {
+static const struct pmbus_driver_info mp2975_info = {
 	.pages = 1,
 	.format[PSC_VOLTAGE_IN] = linear,
 	.format[PSC_VOLTAGE_OUT] = direct,
@@ -967,7 +967,7 @@ static struct pmbus_driver_info mp2975_info = {
 #endif
 };
 
-static struct pmbus_driver_info mp2973_info = {
+static const struct pmbus_driver_info mp2973_info = {
 	.pages = 1,
 	.format[PSC_VOLTAGE_IN] = linear,
 	.format[PSC_VOLTAGE_OUT] = direct,
-- 
2.43.0.rc1.1.gbec44491f096


  parent reply	other threads:[~2024-03-25 12:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 12:07 [PATCH v1 0/3] hwmon: (pmbus/mp2975) Refactor the driver Andy Shevchenko
2024-03-25 12:07 ` [PATCH v1 1/3] hwmon: (pmbus/mp2975) Replace home made version of __assign_bit() Andy Shevchenko
2024-03-25 16:29   ` Guenter Roeck
2024-03-25 16:34     ` Andy Shevchenko
2024-03-25 12:07 ` Andy Shevchenko [this message]
2024-03-25 16:29   ` [PATCH v1 2/3] hwmon: (pmbus/mp2975) Constify local pointers to pmbus_driver_info Guenter Roeck
2024-03-25 12:07 ` [PATCH v1 3/3] hwmon: (pmbus/mp2975) Use i2c_get_match_data() Andy Shevchenko
2024-03-25 16:31   ` Guenter Roeck
2024-03-25 16:36     ` Andy Shevchenko

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=20240325120952.3019767-3-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=patrick.rudolph@9elements.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