Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5336672pxb; Mon, 28 Mar 2022 11:06:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSUhdbgIJl21NQgoXYvZHidoJqvT2/xFUwcb/7xQUAkbx2NsY7fNEKRSZMmmp+NyD9/m4E X-Received: by 2002:a67:cb0c:0:b0:325:444:428 with SMTP id b12-20020a67cb0c000000b0032504440428mr12211485vsl.66.1648490766608; Mon, 28 Mar 2022 11:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648490766; cv=none; d=google.com; s=arc-20160816; b=GsvJkN0i6fsEVg5gjlKEf7J+bHptk59iY2sXMB2Ueyjc+IjlDzS2GB/pXYRhh7p3Q/ eKkYPHLTdwWtctZ6O1dJ1ZRQNz7DAog0KHxGKhQgdyBGeMsKKK9o5yyQlsqLpgziiP1F YV4GYxz9+yDVlKFhUpaHyoR0dxvbxmqhr3k0ZyHGvz5sw/CBf5kv52zoiYKmBz2aBL/i 0LpYmn/jETLEYHiyk8VxUkQkx+X7DmPICKeE8r7Wus1jTEuRiqNqha3/GkNl23nX089e 79km6b1xO3dMn+2d8/GwPGekRZFeY7RcuQrvzUKPm+VmEPZfw9IS95dV+TYRKqby2zuJ +gow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CT9vNlpty7jzFYreukJyjTlzhIu97loT7wE6CkBFGYE=; b=R6YjmUN7oWLpuTFd6SJH2PAmZnV/8PSo019ts4QOalvquYZ2AxyI3u3tguAuTsXdh/ BFVCm9PHrJuSh/jxG/St2Vajh62BOKsTVzH3KkEmUQPRHTds7S0Cs87O9xEVXrn1L3Pj QLFe2hufd1h+TAhE+8hzsAAMVQNUnE8LRlxThNaz64/H0XekqFyJ7qWg0lOo+qIkoEg8 ehogMPuhtBFHaR4Agke1SxEa40UK4w9mNfbpOWmnVupCL+4MkA6KmAWhbo4CWbzrpEO8 xn1zVQBZjivdjvKOLMBYklMqCh4CB0I5sQuJIpJ8GPlYYVdXBJS2vfHymEQRa6kb054C 0Rog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=QzitOIhE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q1-20020ab06701000000b0034c07a93b1csi2472306uam.183.2022.03.28.11.05.25; Mon, 28 Mar 2022 11:06:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=QzitOIhE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241969AbiC1L4o (ORCPT + 99 others); Mon, 28 Mar 2022 07:56:44 -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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) -- 2.30.2