* [PATCH v1 0/2] hwmon: (pmbus/mp2869) Two cleanups about device ids @ 2026-05-12 16:28 Uwe Kleine-König (The Capable Hub) 2026-05-12 16:28 ` [PATCH v1 1/2] hwmon: (pmbus/mp2869) Remove unused driver data Uwe Kleine-König (The Capable Hub) 2026-05-12 16:28 ` [PATCH v1 2/2] hwmon: (pmbus/mp2869) Drop unjustified __maybe_unused Uwe Kleine-König (The Capable Hub) 0 siblings, 2 replies; 5+ messages in thread From: Uwe Kleine-König (The Capable Hub) @ 2026-05-12 16:28 UTC (permalink / raw) To: Wensheng Wang, Guenter Roeck; +Cc: linux-hwmon, linux-kernel Hello, I'm currently working on a change to modify i2c_device_id. While preparing the hwmon drivers for that (expect a patch series later) I found the pmbus/mp2869 driver to benefit from some more cleanup so this was split out of the bigger patches. Best regards Uwe Uwe Kleine-König (The Capable Hub) (2): hwmon: (pmbus/mp2869) Remove unused driver data hwmon: (pmbus/mp2869) Drop unjustified __maybe_unused drivers/hwmon/pmbus/mp2869.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731 -- 2.47.3 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 1/2] hwmon: (pmbus/mp2869) Remove unused driver data 2026-05-12 16:28 [PATCH v1 0/2] hwmon: (pmbus/mp2869) Two cleanups about device ids Uwe Kleine-König (The Capable Hub) @ 2026-05-12 16:28 ` Uwe Kleine-König (The Capable Hub) 2026-05-12 18:37 ` Guenter Roeck 2026-05-12 16:28 ` [PATCH v1 2/2] hwmon: (pmbus/mp2869) Drop unjustified __maybe_unused Uwe Kleine-König (The Capable Hub) 1 sibling, 1 reply; 5+ messages in thread From: Uwe Kleine-König (The Capable Hub) @ 2026-05-12 16:28 UTC (permalink / raw) To: Wensheng Wang, Guenter Roeck; +Cc: linux-hwmon, linux-kernel The driver doesn't make use of the i2c .driver_data and the of .data. So drop the useless and irritating assignments. While touching all these lines, use named initializers for the i2c device ids and convert to the most common usage of spacing in such arrays. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> --- drivers/hwmon/pmbus/mp2869.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/hwmon/pmbus/mp2869.c b/drivers/hwmon/pmbus/mp2869.c index 4647892e5112..d345be920429 100644 --- a/drivers/hwmon/pmbus/mp2869.c +++ b/drivers/hwmon/pmbus/mp2869.c @@ -632,20 +632,20 @@ static int mp2869_probe(struct i2c_client *client) } static const struct i2c_device_id mp2869_id[] = { - {"mp2869", 0}, - {"mp29608", 1}, - {"mp29612", 2}, - {"mp29816", 3}, - {} + { .name = "mp2869" }, + { .name = "mp29608" }, + { .name = "mp29612" }, + { .name = "mp29816" }, + { } }; MODULE_DEVICE_TABLE(i2c, mp2869_id); static const struct of_device_id __maybe_unused mp2869_of_match[] = { - {.compatible = "mps,mp2869", .data = (void *)0}, - {.compatible = "mps,mp29608", .data = (void *)1}, - {.compatible = "mps,mp29612", .data = (void *)2}, - {.compatible = "mps,mp29816", .data = (void *)3}, - {} + { .compatible = "mps,mp2869" }, + { .compatible = "mps,mp29608" }, + { .compatible = "mps,mp29612" }, + { .compatible = "mps,mp29816" }, + { } }; MODULE_DEVICE_TABLE(of, mp2869_of_match); -- 2.47.3 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/2] hwmon: (pmbus/mp2869) Remove unused driver data 2026-05-12 16:28 ` [PATCH v1 1/2] hwmon: (pmbus/mp2869) Remove unused driver data Uwe Kleine-König (The Capable Hub) @ 2026-05-12 18:37 ` Guenter Roeck 0 siblings, 0 replies; 5+ messages in thread From: Guenter Roeck @ 2026-05-12 18:37 UTC (permalink / raw) To: Uwe Kleine-König (The Capable Hub) Cc: Wensheng Wang, linux-hwmon, linux-kernel On Tue, May 12, 2026 at 06:28:56PM +0200, Uwe Kleine-König (The Capable Hub) wrote: > The driver doesn't make use of the i2c .driver_data and the of .data. So > drop the useless and irritating assignments. > > While touching all these lines, use named initializers for the i2c > device ids and convert to the most common usage of spacing in such > arrays. > > Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Applied. Thanks, Guenter ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 2/2] hwmon: (pmbus/mp2869) Drop unjustified __maybe_unused 2026-05-12 16:28 [PATCH v1 0/2] hwmon: (pmbus/mp2869) Two cleanups about device ids Uwe Kleine-König (The Capable Hub) 2026-05-12 16:28 ` [PATCH v1 1/2] hwmon: (pmbus/mp2869) Remove unused driver data Uwe Kleine-König (The Capable Hub) @ 2026-05-12 16:28 ` Uwe Kleine-König (The Capable Hub) 2026-05-12 18:38 ` Guenter Roeck 1 sibling, 1 reply; 5+ messages in thread From: Uwe Kleine-König (The Capable Hub) @ 2026-05-12 16:28 UTC (permalink / raw) To: Wensheng Wang, Guenter Roeck; +Cc: linux-hwmon, linux-kernel mp2869_of_match is used unconditionally in mp2869_driver, so there is no need for the __maybe_unused marker. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> --- drivers/hwmon/pmbus/mp2869.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/pmbus/mp2869.c b/drivers/hwmon/pmbus/mp2869.c index d345be920429..76c6017507b3 100644 --- a/drivers/hwmon/pmbus/mp2869.c +++ b/drivers/hwmon/pmbus/mp2869.c @@ -640,7 +640,7 @@ static const struct i2c_device_id mp2869_id[] = { }; MODULE_DEVICE_TABLE(i2c, mp2869_id); -static const struct of_device_id __maybe_unused mp2869_of_match[] = { +static const struct of_device_id mp2869_of_match[] = { { .compatible = "mps,mp2869" }, { .compatible = "mps,mp29608" }, { .compatible = "mps,mp29612" }, -- 2.47.3 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 2/2] hwmon: (pmbus/mp2869) Drop unjustified __maybe_unused 2026-05-12 16:28 ` [PATCH v1 2/2] hwmon: (pmbus/mp2869) Drop unjustified __maybe_unused Uwe Kleine-König (The Capable Hub) @ 2026-05-12 18:38 ` Guenter Roeck 0 siblings, 0 replies; 5+ messages in thread From: Guenter Roeck @ 2026-05-12 18:38 UTC (permalink / raw) To: Uwe Kleine-König (The Capable Hub) Cc: Wensheng Wang, linux-hwmon, linux-kernel On Tue, May 12, 2026 at 06:28:57PM +0200, Uwe Kleine-König (The Capable Hub) wrote: > mp2869_of_match is used unconditionally in mp2869_driver, so there is no > need for the __maybe_unused marker. > > Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Applied. Thanks, Guenter ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-05-12 18:38 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-05-12 16:28 [PATCH v1 0/2] hwmon: (pmbus/mp2869) Two cleanups about device ids Uwe Kleine-König (The Capable Hub) 2026-05-12 16:28 ` [PATCH v1 1/2] hwmon: (pmbus/mp2869) Remove unused driver data Uwe Kleine-König (The Capable Hub) 2026-05-12 18:37 ` Guenter Roeck 2026-05-12 16:28 ` [PATCH v1 2/2] hwmon: (pmbus/mp2869) Drop unjustified __maybe_unused Uwe Kleine-König (The Capable Hub) 2026-05-12 18:38 ` Guenter Roeck
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox