Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp255274rwr; Thu, 4 May 2023 02:29:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7lH3l3MrKKecikHyCNL+Z6RMbFpG+PD+dpZyJSoshQw/I+yPfAyzCE/ZQlD49tHWaTfKQ+ X-Received: by 2002:a05:6a00:b54:b0:63b:89a2:d624 with SMTP id p20-20020a056a000b5400b0063b89a2d624mr1762887pfo.12.1683192566607; Thu, 04 May 2023 02:29:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683192566; cv=none; d=google.com; s=arc-20160816; b=DS6N913m3fv20PqDY6sbEHzH4hJ3CSF2YbKD2lbsYx2jvFDXI+C2+BQwqsCSilFP5/ dowisEf/hwXxNwVbMF0XyAukpJ31tTcsTosLdNsta+8GJajJ8JSvFPemC7Lf2VnGu2vo LUl9ZxlpdsMn9oJ7UeYirWWHw+KadcPSEGcOhpDQG5BEDIOXT3eCWDXbFcHgo5sJUGeG zf7sfUnkEDAJD7AZXgRdiOqttRgRj/azBqJ9J58uvPmTTHwm84XaDVNGpNxYM5dRKSd0 KC708nuwUL6UcVxSmh3A2COM6HgRuLeqyQ8UKsiP1+yqdM/R+O/pahYzg9rdPsPrTAuf ywpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=3jxddRirM3O58mHPPw3MP2nQhRxroeD5ama6U0wmKbg=; b=K83sZELd1pDFv8qUvy1zWxXO1ZDTQGvIt2T5XduYmlLps2pavDJDxEbkAYY4QFB/FJ gJWTTdVS0S/Su9FrHulxIFIFMFX1ELETpZ3/Veuv2BdhJHXxYZTzZEnTFMcrUzki8rab E+WmRfm9k7amrtFvCFQ2IWPShnqqC3+jVonoEx5DoqQeNm0d6KUDEq0Bvqt/Usn4Q5dQ idvXb5/85TYlI3G+5OeIERmbvcl0hGKlxKNTJ+09OdiFpC20UYLWZ2qDYSyhZprYCm4v 2o64GUWWhxi3FlnLgoE2EJfjISEUwEp2/amFfvb4/3kXwr1NWLaG7cYhOwwKJFTIJg8k TfLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HEkFsohF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i19-20020aa796f3000000b0063b1739532esi35840555pfq.139.2023.05.04.02.29.13; Thu, 04 May 2023 02:29:26 -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=@linuxfoundation.org header.s=korg header.b=HEkFsohF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229951AbjEDJIy (ORCPT + 99 others); Thu, 4 May 2023 05:08:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229607AbjEDJIw (ORCPT ); Thu, 4 May 2023 05:08:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CFFE8F for ; Thu, 4 May 2023 02:08:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D83F26328C for ; Thu, 4 May 2023 09:08:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6BC3C433EF; Thu, 4 May 2023 09:08:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1683191330; bh=A2Y8ocJewa9pRLM5TJJDkxuMMlwkyXdMFrnpas75cFY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HEkFsohFscDqkBUdcSNwm67WI6FDw1kaL77Ysg/Yo+ihNbMvH217bSmHIGhecOmE2 MQUtBR5xuVSU8F9zMBWe0np6yKT4c8EJioeaXXuueauCZ/4+3y031h2FCxMaq4F1QD LCo4CzVMy71/IXpS8mKqK7bIRlbsOP1PM617R5FE= Date: Thu, 4 May 2023 18:08:46 +0900 From: Greg KH To: Peng Fan Cc: "Peng Fan (OSS)" , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "rafael@kernel.org" , "andriy.shevchenko@linux.intel.com" , "hdegoede@redhat.com" , "jgg@ziepe.ca" , "saravanak@google.com" , "keescook@chromium.org" , "tglx@linutronix.de" , "linux-kernel@vger.kernel.org" , "abel.vesa@linaro.org" Subject: Re: [PATCH] devres: provide API devm_kstrndup Message-ID: <2023050445-blizzard-splendid-cf1c@gregkh> References: <20230504075754.372780-1-peng.fan@oss.nxp.com> <2023050413-margin-devotedly-468d@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On Thu, May 04, 2023 at 08:59:41AM +0000, Peng Fan wrote: > Hi Greg, > > > -----Original Message----- > > From: Greg KH > > Sent: 2023年5月4日 16:58 > > To: Peng Fan (OSS) > > Cc: robh+dt@kernel.org; krzysztof.kozlowski+dt@linaro.org; > > rafael@kernel.org; andriy.shevchenko@linux.intel.com; > > hdegoede@redhat.com; jgg@ziepe.ca; saravanak@google.com; > > keescook@chromium.org; tglx@linutronix.de; linux-kernel@vger.kernel.org; > > abel.vesa@linaro.org; Peng Fan > > Subject: Re: [PATCH] devres: provide API devm_kstrndup > > > > On Thu, May 04, 2023 at 03:57:54PM +0800, Peng Fan (OSS) wrote: > > > From: Peng Fan > > > > > > This patch introduces devm_kstrndup API so that the device's driver > > > can allocate memory and copy string. > > > > > > Signed-off-by: Peng Fan > > > --- > > > drivers/base/devres.c | 28 ++++++++++++++++++++++++++++ > > > include/linux/device.h | 1 + > > > 2 files changed, 29 insertions(+) > > > > We can not add apis with no users, please submit this at the same time a > > driver needs it. > > > > And what driver would need to copy a string? > > https://lore.kernel.org/all/20230504085506.504474-1-peng.fan@oss.nxp.com/ Please never add new module parameters, ESPECIALLY for a driver. This is not the 1990's anymore, please use the correct apis instead (hint, sysfs, configfs, DT, etc.) > Should I submit V2 with the upper patch in a patchset? I can't take this as-is, for the reason I said, so yes. And again, your dependant patch is not ok either, so I don't think this is needed anymore. thanks, greg k-h