public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] hwmon: introduce hwmon_sanitize()
@ 2022-04-05  9:24 Michael Walle
  2022-04-05  9:24 ` [PATCH v4 1/2] hwmon: introduce hwmon_sanitize_name() Michael Walle
  2022-04-05  9:24 ` [PATCH v4 2/2] hwmon: intel-m10-bmc-hwmon: use devm_hwmon_sanitize_name() Michael Walle
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Walle @ 2022-04-05  9:24 UTC (permalink / raw)
  To: Xu Yilun, Tom Rix, Jean Delvare, Guenter Roeck, Andrew Lunn,
	Heiner Kallweit, Russell King, David S . Miller, Jakub Kicinski,
	Paolo Abeni
  Cc: linux-hwmon, linux-kernel, netdev, David Laight, Michael Walle

During development of the support for the temperature sensor on the GPY
PHY, I've noticed that there is ususually a loop over the name to
replace any invalid characters. Instead of open coding it in the drivers
provide a convenience function.

changes since v3:
 - don't return NULL but ERR_PTR(-ENOMEM)
 - check !dev in devm_ variant

changes since v2:
 - doc update
 - dropped last three patches, the net patches will be submitted
   seperately

changes since v1:
 - split patches
 - add hwmon-kernel-api.rst documentation
 - move the strdup into the hwmon core
 - also provide a resource managed variant

Michael Walle (2):
  hwmon: introduce hwmon_sanitize_name()
  hwmon: intel-m10-bmc-hwmon: use devm_hwmon_sanitize_name()

 Documentation/hwmon/hwmon-kernel-api.rst | 16 +++++++
 drivers/hwmon/hwmon.c                    | 53 ++++++++++++++++++++++++
 drivers/hwmon/intel-m10-bmc-hwmon.c      | 11 ++---
 include/linux/hwmon.h                    |  3 ++
 4 files changed, 75 insertions(+), 8 deletions(-)

-- 
2.30.2


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

end of thread, other threads:[~2022-04-08 15:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-05  9:24 [PATCH v4 0/2] hwmon: introduce hwmon_sanitize() Michael Walle
2022-04-05  9:24 ` [PATCH v4 1/2] hwmon: introduce hwmon_sanitize_name() Michael Walle
2022-04-05 12:08   ` Tom Rix
2022-04-08 15:42   ` Guenter Roeck
2022-04-05  9:24 ` [PATCH v4 2/2] hwmon: intel-m10-bmc-hwmon: use devm_hwmon_sanitize_name() Michael Walle
2022-04-05 12:09   ` Tom Rix
2022-04-08 15:43   ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox