From: Guenter Roeck <linux@roeck-us.net>
To: linux-hwmon@vger.kernel.org
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH 5/8] hwmon: (pmbus/core) Declare regulator notification function as void
Date: Sat, 8 Feb 2025 17:26:14 -0800 [thread overview]
Message-ID: <20250209012617.944499-6-linux@roeck-us.net> (raw)
In-Reply-To: <20250209012617.944499-1-linux@roeck-us.net>
The regulator notification function never returns an error.
Declare it as void.
While at it, fix its indentation.
No functional change.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/hwmon/pmbus/pmbus_core.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
index 39cdcbb96215..3085afc9c1ed 100644
--- a/drivers/hwmon/pmbus/pmbus_core.c
+++ b/drivers/hwmon/pmbus/pmbus_core.c
@@ -3313,17 +3313,16 @@ static int pmbus_regulator_register(struct pmbus_data *data)
return 0;
}
-static int pmbus_regulator_notify(struct pmbus_data *data, int page, int event)
+static void pmbus_regulator_notify(struct pmbus_data *data, int page, int event)
{
- int j;
+ int j;
- for (j = 0; j < data->info->num_regulators; j++) {
- if (page == rdev_get_id(data->rdevs[j])) {
- regulator_notifier_call_chain(data->rdevs[j], event, NULL);
- break;
- }
+ for (j = 0; j < data->info->num_regulators; j++) {
+ if (page == rdev_get_id(data->rdevs[j])) {
+ regulator_notifier_call_chain(data->rdevs[j], event, NULL);
+ break;
}
- return 0;
+ }
}
#else
static int pmbus_regulator_register(struct pmbus_data *data)
@@ -3331,9 +3330,8 @@ static int pmbus_regulator_register(struct pmbus_data *data)
return 0;
}
-static int pmbus_regulator_notify(struct pmbus_data *data, int page, int event)
+static void pmbus_regulator_notify(struct pmbus_data *data, int page, int event)
{
- return 0;
}
#endif
--
2.45.2
next prev parent reply other threads:[~2025-02-09 1:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-09 1:26 [PATCH 0/8] hwmon: (pmbus/core) Various fixes and improvements Guenter Roeck
2025-02-09 1:26 ` [PATCH 1/8] hwmon: (pmbus/core) Fix various coding style issues Guenter Roeck
2025-02-10 2:21 ` Tzung-Bi Shih
2025-02-09 1:26 ` [PATCH 2/8] hwmon: (pmbus/core) Use local debugfs variable in debugfs initialization Guenter Roeck
2025-02-10 2:21 ` Tzung-Bi Shih
2025-02-09 1:26 ` [PATCH 3/8] hwmon: (pmbus/core) Use the new i2c_client debugfs directory Guenter Roeck
2025-02-10 2:21 ` Tzung-Bi Shih
2025-02-09 1:26 ` [PATCH 4/8] hwmon: (pmbus/core) Make debugfs code unconditional Guenter Roeck
2025-02-10 2:22 ` Tzung-Bi Shih
2025-02-09 1:26 ` Guenter Roeck [this message]
2025-02-10 2:22 ` [PATCH 5/8] hwmon: (pmbus/core) Declare regulator notification function as void Tzung-Bi Shih
2025-02-09 1:26 ` [PATCH 6/8] hwmon: (pmbus/core) Optimize debugfs block data attribute initialization Guenter Roeck
2025-02-10 2:22 ` Tzung-Bi Shih
2025-02-10 2:21 ` [PATCH 0/8] hwmon: (pmbus/core) Various fixes and improvements Tzung-Bi Shih
2025-02-10 4:00 ` 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=20250209012617.944499-6-linux@roeck-us.net \
--to=linux@roeck-us.net \
--cc=linux-hwmon@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.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 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.