Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1502677pxb; Wed, 30 Mar 2022 05:09:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwD1sK6f5wrZqX1ZyiPGgVy6VV1m5Uw1DwJuULARlDoK82An71jS+sy9b5kb/DYoXZm5daq X-Received: by 2002:aa7:91d5:0:b0:4fa:6d3c:55d9 with SMTP id z21-20020aa791d5000000b004fa6d3c55d9mr32868002pfa.41.1648642188054; Wed, 30 Mar 2022 05:09:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648642188; cv=none; d=google.com; s=arc-20160816; b=jOHTIypl8QSDfK0zoDN3svDNxUvmMmAC86apOBVRdUGD14lxC4E/5Y2+BG3Y/Se0oZ RG9ZIISM1YzyQ1RuxuiNVUg2rFQObpaaI8X/SFoU9uENtpCG/+sXObFO/HeavEilOvdU inVo+y3GZAWSqvOCBTEvDIKY70zr5HB6UkqsoD+eK/gjeGMdnD6/fnJtEwzdS0LMI10g xvkHhJpYj4vMNYMc5aQWDyJKlK6cM/iZMtcYJDWOp18AFfJjBFaHDdYkDMkgpxLL96BW pOc0kaubfpWJ1yXNuddfcpKpL5/agSb+kx/97G8B2KeaUeqQDgZu/nzhqB1MJFRNuQR2 gMew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=R8VF1083Jml6bSlqQeVvGDZxIbXB4VClUDd8cNl8HqA=; b=hEMPzua5DYCSQoEU2xh48myjqmBXE588KtCA79WnB7ncE2eDo60Cffb1qRMNITj/4N naO9rgPLwEYsiqUukDBOf+FnnmGrCobK4bfb3YfiODhbChz8ccGr4Z3aFU1U7gbPXaCb YHuMu1MrD9cglc7Y/0I3QYiOHFkqX9PqMuFHIqC7NZvNeEel3fj3CpKB7v+mxBS12Kzo fTZsveiENrPeOb3ME6cqL8F4C36Zbai3A6O4gy9vNrXjw6GnO9nlMxETM4Sc09LN14sN nNDNMgnzVex1nG6IaQoc/a7AedGfQd7/LZ96XfbrcCNQ3Zr3pw2k5s+7xoua05me2msB 9eLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@roeck-us.net header.s=default header.b="ycg/a9dl"; 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 a21-20020a63e855000000b00383f92e1f96si23443783pgk.79.2022.03.30.05.09.33; Wed, 30 Mar 2022 05:09:48 -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=fail header.i=@roeck-us.net header.s=default header.b="ycg/a9dl"; 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 S237589AbiC2N4i (ORCPT + 99 others); Tue, 29 Mar 2022 09:56:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234222AbiC2N4g (ORCPT ); Tue, 29 Mar 2022 09:56:36 -0400 Received: from gateway31.websitewelcome.com (gateway31.websitewelcome.com [192.185.144.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 767771E3E33 for ; Tue, 29 Mar 2022 06:54:53 -0700 (PDT) Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 00D748A6CC for ; Tue, 29 Mar 2022 08:54:53 -0500 (CDT) Received: from 162-215-252-75.unifiedlayer.com ([208.91.199.152]) by cmsmtp with SMTP id ZCHEn8FVMHnotZCHEn1dRS; Tue, 29 Mar 2022 08:52:52 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:Subject:From:References:Cc:To:MIME-Version:Date:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=R8VF1083Jml6bSlqQeVvGDZxIbXB4VClUDd8cNl8HqA=; b=ycg/a9dlJnrsrXw2QIi/hOynJz YapMKagNgi0vMp0GKaSr32e2PIXcmtWBEGCIkRUbEDIFRzkBAbqKOr9vwcCt/gwl2/RmYmxlbDwkc 9irvStDtwQR1PmxXGudquz6OypiepTQyImdwe86pa2qNZ+RBuuzFhvfjW8UYrAbVPqd0T9MNXdgU2 GsCNUaso2xsF8byuJGCZZ8Fu7zTMQHxp0LxKZ+T7dZRFOegM8Xv9lhn0dn2oyMuj+gfN5KuX2d71l /zHjs+zTOn4H2vXsh38qxOjPkyq6NOLnzP08v7IukXPeYIKRnd3vSoZ22hmGWKFxT6imnN4wfFsHq 9C00d64A==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:54542) by bh-25.webhostbox.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nZCHD-00353G-Re; Tue, 29 Mar 2022 13:52:51 +0000 Message-ID: Date: Tue, 29 Mar 2022 06:52:50 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Content-Language: en-US To: Michael Walle Cc: Andrew Lunn , Xu Yilun , Tom Rix , Jean Delvare , Heiner Kallweit , Russell King , "David S . Miller" , Jakub Kicinski , Paolo Abeni , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org References: <20220328115226.3042322-1-michael@walle.cc> From: Guenter Roeck Subject: Re: [PATCH v1 0/2] hwmon: introduce hwmon_sanitize() In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-BWhitelist: no X-Source-IP: 108.223.40.66 X-Source-L: No X-Exim-ID: 1nZCHD-00353G-Re X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 108-223-40-66.lightspeed.sntcca.sbcglobal.net [108.223.40.66]:54542 X-Source-Auth: linux@roeck-us.net X-Email-Count: 8 X-Source-Cap: cm9lY2s7YWN0aXZzdG07YmgtMjUud2ViaG9zdGJveC5uZXQ= X-Local-Domain: yes X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no 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 On 3/28/22 15:50, Michael Walle wrote: > Am 2022-03-28 18:27, schrieb Guenter Roeck: >> On 3/28/22 05:56, Andrew Lunn wrote: >>>> 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. >>> >>> There are a few options: >>> >>> 1) Get the hwmon_sanitize_name() merged into hwmon, ask for a stable >>> branch, and get it merged into netdev net-next. >>> >>> 2) Have the hwmon maintainers ACK the change and agree that it can be >>> merged via netdev. >>> >>> Probably the second option is easiest, and since it is not touching >>> the core of hwmon, it is unlikely to cause merge conflicts. >>> >> >> No, it isn't the easiest solution because it also modifies a hwmon >> driver to use it. > > So that leaves us with option 1? The next version will contain the > additional patch which moves the hwmon_is_bad_char() from the include > to the core and make it private. That will then need an immutable > branch from netdev to get merged back into hwmon before that patch > can be applied, right? We can not control if someone else starts using the function before it is removed. As pointed out, the immutable branch needs to be from hwmon, and the patch to make hwmon_is_bad_char private can only be applied after all of its users are gone from the mainline kernel. I would actually suggest to allocate the new string as part of the function and have it return a pointer to a new string. Something like char *devm_hwmon_sanitize_name(struct device *dev, const char *name); and char *hwmon_sanitize_name(const char *name); because the string duplication is also part of all calling code. Guenter