From mboxrd@z Thu Jan 1 00:00:00 1970 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 0AC39C7EE21 for ; Thu, 4 May 2023 09:08:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230062AbjEDJIy (ORCPT ); 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: 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