From patchwork Mon Mar 28 11:52:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 12793475 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75630C433EF for ; Mon, 28 Mar 2022 11:55:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241064AbiC1L4n (ORCPT ); Mon, 28 Mar 2022 07:56:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241571AbiC1L4X (ORCPT ); Mon, 28 Mar 2022 07:56:23 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F18F205F5; Mon, 28 Mar 2022 04:52:35 -0700 (PDT) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 33E9F2223A; Mon, 28 Mar 2022 13:52:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1648468353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=CT9vNlpty7jzFYreukJyjTlzhIu97loT7wE6CkBFGYE=; b=QzitOIhEEkmaafVhIrvvpTwOkgESkVPoXelSuJ4I7G0AgxSrCzwGcPblDaiNlnByuEYCUA KBFKjCPS0iNCa0Jw/1SUMsG/nHBPrrCv3NlddMoo47MH60JDXG4VRpGJVygwptrgSkTIDs DIGp6x4eKUZ9nCcFI64YUaCF6TT7sVI= From: Michael Walle 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@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Michael Walle Subject: [PATCH v1 0/2] hwmon: introduce hwmon_sanitize() Date: Mon, 28 Mar 2022 13:52:24 +0200 Message-Id: <20220328115226.3042322-1-michael@walle.cc> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org 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. I'm not sure how to handle this correctly, as this touches both the network tree and the hwmon tree. Also, the GPY PHY temperature senors driver would use it. Michael Walle (2): hwmon: introduce hwmon_sanitize_name() net: phy: use hwmon_sanitize_name() drivers/hwmon/intel-m10-bmc-hwmon.c | 5 +---- drivers/net/phy/nxp-tja11xx.c | 5 +---- drivers/net/phy/sfp.c | 6 ++---- include/linux/hwmon.h | 16 ++++++++++++++++ 4 files changed, 20 insertions(+), 12 deletions(-)