All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: Xu Yilun <yilun.xu@intel.com>, Tom Rix <trix@redhat.com>,
	Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>, Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, David Laight <David.Laight@ACULAB.COM>,
	Michael Walle <michael@walle.cc>
Subject: [PATCH v4 0/2] hwmon: introduce hwmon_sanitize()
Date: Tue,  5 Apr 2022 11:24:50 +0200	[thread overview]
Message-ID: <20220405092452.4033674-1-michael@walle.cc> (raw)

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


             reply	other threads:[~2022-04-05 10:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-05  9:24 Michael Walle [this message]
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

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=20220405092452.4033674-1-michael@walle.cc \
    --to=michael@walle.cc \
    --cc=David.Laight@ACULAB.COM \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=kuba@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linux@roeck-us.net \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=trix@redhat.com \
    --cc=yilun.xu@intel.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.