mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] hwmon: use device_for_each_child_node_scoped()
@ 2024-04-04 11:13 Javier Carrasco
  2024-04-04 11:13 ` [PATCH 1/2] hwmon: (ltc2991) " Javier Carrasco
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Javier Carrasco @ 2024-04-04 11:13 UTC (permalink / raw)
  To: Antoniu Miclaus, Jean Delvare, Guenter Roeck, Tim Harvey
  Cc: linux-hwmon, linux-kernel, Javier Carrasco

Switch to the _scoped() version introduced in commit 365130fd47af
("device property: Introduce device_for_each_child_node_scoped()")
to remove the need for manual calling of fwnode_handle_put() in the
paths where the code exits the loop early.

There are only two users of the non scoped version in the hwmon
subsystem:

- ltc2991
- gsc-hwmon

All calls of fwnode_handle_put() were in error paths.

This series is based on the master branch of linux-next (next-20240404)
to profif from the scoped version of device_for_each_child_node().

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
Javier Carrasco (2):
      hwmon: (ltc2991) use device_for_each_child_node_scoped()
      hwmon: (gsc-hwmon) use device_for_each_child_node_scoped()

 drivers/hwmon/gsc-hwmon.c |  7 +------
 drivers/hwmon/ltc2991.c   | 11 +++--------
 2 files changed, 4 insertions(+), 14 deletions(-)
---
base-commit: 2b3d5988ae2cb5cd945ddbc653f0a71706231fdd
change-id: 20240404-hwmon_device_for_each_child_node_scoped-6e581c1d8a31

Best regards,
-- 
Javier Carrasco <javier.carrasco.cruz@gmail.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-06-07 22:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-04 11:13 [PATCH 0/2] hwmon: use device_for_each_child_node_scoped() Javier Carrasco
2024-04-04 11:13 ` [PATCH 1/2] hwmon: (ltc2991) " Javier Carrasco
2024-06-07 22:08   ` Guenter Roeck
2024-04-04 11:13 ` [PATCH 2/2] hwmon: (gsc-hwmon) " Javier Carrasco
2024-06-07 22:09   ` Guenter Roeck
2024-06-07 21:00 ` [PATCH 0/2] hwmon: " Javier Carrasco
2024-06-07 22:11   ` Guenter Roeck

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®