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 X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D3E6C11D05 for ; Thu, 20 Feb 2020 14:16:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E435C222C4 for ; Thu, 20 Feb 2020 14:16:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mPm2Vkx1"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="QbjHw5kA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E435C222C4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=X8Hk8EC3YwQLRmLqahl3Xvs2edGHyw9W+kohnarJdYg=; b=mPm2Vkx1VGgVnk 0CBpP+0KNQymUcgDZCy/cJnZzTobsI47sr8AfPbes8GXl3j+6XsxBPKU83xx+0mxLkblS+urFVxE6 0qR94sgYsZLlpXi7loyYCRmYFvLUU8phpEJINz+ASDjeCYLiMXbq3+G4I2oo+T1J47Sn3v/AgACNU tBzSThpp7eruTIaeDr+skjZ3hwh8qLCu6/qXRJeFbHvdQISXtO4rTRAMmdBvAveT3m90Qaznu/FTp rwKQbsdAot18RUtm9XahpkfExwWl29lNnGeuqo7trbiV3pbT8RNYuf6EA5n7x4HiuZaXrKAdvWmjl Kls4Jqgr7vH/0FNnV81w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4mdA-0002ff-Ou; Thu, 20 Feb 2020 14:16:44 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4md7-0002fH-W1 for linux-arm-kernel@lists.infradead.org; Thu, 20 Feb 2020 14:16:43 +0000 Received: from localhost (static-140-208-78-212.thenetworkfactory.nl [212.78.208.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EC20B208E4; Thu, 20 Feb 2020 14:16:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582208201; bh=ELL3hEpGo9sAinW5R6kKrZvV1yKEFg4R0dnJKKl/e5E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QbjHw5kA8g04sBo+4CIz97a/75O3v3KPnvVZEWPkhLl9HNfY8YSJVGOU0eHiS6wBI sGzdXyEQ5LQVkLw+CI8Ti/rlYUV+mrdoF+jILKt7dL6Bb8Buoh5f5oR35Sf7QC0ijM yqtry28uArBqZ/Forgszj6uh9kyddJIl9X41IZdA= Date: Thu, 20 Feb 2020 15:16:37 +0100 From: Greg Kroah-Hartman To: Marc Gonzalez Subject: Re: [RESEND RFC PATCH v3] clk: Use new helper in managed functions Message-ID: <20200220141637.GA3433108@kroah.com> References: <20200220112700.GJ3374196@kroah.com> <8866e533-967f-e208-1ec8-888d72f3052e@free.fr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <8866e533-967f-e208-1ec8-888d72f3052e@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200220_061642_068285_940E2A13 X-CRM114-Status: GOOD ( 18.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-clk , LKML , Arnd Bergmann , Kuninori Morimoto , Ard Biesheuvel , Stephen Boyd , Suzuki Poulose , Michael Turquette , Dmitry Torokhov , Rafael Wysocki , Russell King , Bjorn Andersson , Geert Uytterhoeven , Linux ARM , Robin Murphy , Sudip Mukherjee , Guenter Roeck Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Feb 20, 2020 at 03:05:54PM +0100, Marc Gonzalez wrote: > On 20/02/2020 12:27, Greg Kroah-Hartman wrote: > > > On Thu, Feb 20, 2020 at 11:04:58AM +0100, Marc Gonzalez wrote: > > > >> Introduce devm_add() to wrap devres_alloc() / devres_add() calls. > >> > >> Using that helper produces simpler code, and smaller object size. > >> E.g. with gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu: > >> > >> text data bss dec hex filename > >> - 1708 80 0 1788 6fc drivers/clk/clk-devres.o > >> + 1524 80 0 1604 644 drivers/clk/clk-devres.o > >> > >> Signed-off-by: Marc Gonzalez > >> --- > >> Differences from v2 to v3 > >> x Make devm_add() return an error-code rather than the raw data pointer > >> (in case devres_alloc ever returns an ERR_PTR) as suggested by Geert > >> x Provide a variadic version devm_vadd() to work with structs as suggested > >> by Geert > >> x Don't use nested ifs in clk_devm* implementations (hopefully simpler > >> code logic to follow) as suggested by Geert > >> > >> Questions: > >> x This patch might need to be split in two? (Introduce the new API, then use it) > >> x Convert other subsystems to show the value of this proposal? > >> x Maybe comment the API usage somewhere > >> --- > >> drivers/base/devres.c | 15 ++++++ > >> drivers/clk/clk-devres.c | 99 ++++++++++++++-------------------------- > >> include/linux/device.h | 3 ++ > >> 3 files changed, 53 insertions(+), 64 deletions(-) > >> > >> diff --git a/drivers/base/devres.c b/drivers/base/devres.c > >> index 0bbb328bd17f..b2603789755b 100644 > >> --- a/drivers/base/devres.c > >> +++ b/drivers/base/devres.c > >> @@ -685,6 +685,21 @@ int devres_release_group(struct device *dev, void *id) > >> } > >> EXPORT_SYMBOL_GPL(devres_release_group); > >> > >> +int devm_add(struct device *dev, dr_release_t func, void *arg, size_t size) > > > > Please add a bunch of kerneldoc here, as I have no idea what this > > function does just by looking at the name of it :( > > Fair enough. (This was one of my "Questions" in the patch comments.) > > Note: My patch adds a new function, then makes use of said function. > Is this typically done in two patches or one? > > Patch 1/2 augmenting the API. > Patch 2/2 making use of the new function. 2 is usual. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel