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>,
Tzung-Bi Shih <tzungbi@kernel.org>
Subject: [PATCH v2 5/8] hwmon: (pmbus/core) Declare regulator notification function as void
Date: Tue, 11 Feb 2025 07:52:37 -0800 [thread overview]
Message-ID: <20250211155240.2077464-6-linux@roeck-us.net> (raw)
In-Reply-To: <20250211155240.2077464-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.
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
v2: Added Reviewed-by: tag
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-11 15:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-11 15:52 [PATCH v2 0/8] hwmon: (pmbus/core) Various fixes and improvements Guenter Roeck
2025-02-11 15:52 ` [PATCH v2 1/8] hwmon: (pmbus/core) Fix various coding style issues Guenter Roeck
2025-02-11 15:52 ` [PATCH v2 2/8] hwmon: (pmbus/core) Use local debugfs variable in debugfs initialization Guenter Roeck
2025-02-11 15:52 ` [PATCH v2 3/8] hwmon: (pmbus/core) Use the new i2c_client debugfs directory Guenter Roeck
2025-02-11 15:52 ` [PATCH v2 4/8] hwmon: (pmbus/core) Make debugfs code unconditional Guenter Roeck
2025-02-11 15:52 ` Guenter Roeck [this message]
2025-02-11 15:52 ` [PATCH v2 6/8] hwmon: (pmbus/core) Optimize debugfs block data attribute initialization Guenter Roeck
2025-02-12 3:53 ` Tzung-Bi Shih
2025-02-11 15:52 ` [PATCH v2 7/8] hwmon: (pmbus/core) Optimize debugfs status " Guenter Roeck
2025-02-12 3:54 ` Tzung-Bi Shih
2025-02-11 15:52 ` [PATCH v2 8/8] hwmon: (pmbus/core) Report content of CAPABILITY register in debugfs Guenter Roeck
2025-02-12 3:55 ` Tzung-Bi Shih
2025-02-12 3:59 ` 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=20250211155240.2077464-6-linux@roeck-us.net \
--to=linux@roeck-us.net \
--cc=linux-hwmon@vger.kernel.org \
--cc=tzungbi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox