From patchwork Wed Feb 26 15:44:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Gonzalez X-Patchwork-Id: 11406623 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 64BA592A for ; Wed, 26 Feb 2020 15:55:42 +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 4034721556 for ; Wed, 26 Feb 2020 15:55:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BVVOxMeY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4034721556 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.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:MIME-Version:Date:Message-ID:To:Subject :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=HlmQasQzNFWDomSygYWjB6UGzxIbFUpFnCSlf8sy7BY=; b=BVVOxMeYoEa+0g UmwCW/Op3aM76thuc2XLJVpPhzMiPr2/PXW57sWqZbyUNsD1kQbh4ckXeNs64PP8my3nORKzyJqRh L0YclDeupj9CVfmSUIAM/GSFqswjYYjoPV9mZH2DDzIlipq0qLzTChs7nEBS1h1MJ/E3nFy7TeLvb uHdcic/wKNKz2VYwz4Bwuxp2Ev8loJ8zsMW+jkqoQO5c+1H2xdmRf1emuRFz8ViEgOYFweBnrOBdX puNIXPlbUlWsIiaATUk6Bf+egJY2m6GyljyGcn94hmSs+pXoZyc6tLvklicjhJSCsTu2QZqKYELmx hSGrAf5fZTVyJRGT8inA==; 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 1j6z2C-000864-3N; Wed, 26 Feb 2020 15:55:40 +0000 Received: from ns.iliad.fr ([212.27.33.1]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6z1j-0007cC-DZ for linux-arm-kernel@lists.infradead.org; Wed, 26 Feb 2020 15:55:14 +0000 Received: from ns.iliad.fr (localhost [127.0.0.1]) by ns.iliad.fr (Postfix) with ESMTP id D19A620076; Wed, 26 Feb 2020 16:55:04 +0100 (CET) Received: from [192.168.108.51] (freebox.vlq16.iliad.fr [213.36.7.13]) by ns.iliad.fr (Postfix) with ESMTP id BF00C20025; Wed, 26 Feb 2020 16:55:04 +0100 (CET) From: Marc Gonzalez Subject: [RFC PATCH v4 0/2] Small devm helper for devm implementations To: Stephen Boyd , Michael Turquette , Kuninori Morimoto , Russell King , Sudip Mukherjee , Dmitry Torokhov , Guenter Roeck , Bjorn Andersson , Robin Murphy , Geert Uytterhoeven , Arnd Bergmann , Ard Biesheuvel , Greg Kroah-Hartman , Rafael Wysocki , Suzuki Poulose , Mark Rutland Message-ID: <68219a85-295d-7b7c-9658-c3045bbcbaeb@free.fr> Date: Wed, 26 Feb 2020 16:44:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 Content-Language: en-US X-Virus-Scanned: ClamAV using ClamSMTP ; ns.iliad.fr ; Wed Feb 26 16:55:04 2020 +0100 (CET) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200226_075511_610251_0C566C23 X-CRM114-Status: UNSURE ( 7.84 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [212.27.33.1 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [marc.w.gonzalez[at]free.fr] 0.0 SPOOFED_FREEMAIL No description available. 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: linux-clk , Linux ARM , LKML Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hello, Differences from v3 to v4 x Add a bunch of kerneldoc above devm_add() [Greg KH] x Split patch in two [Greg KH] 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 Marc Gonzalez (2): devres: Provide new helper for devm functions clk: Use devm_add in managed functions drivers/base/devres.c | 28 +++++++++++ drivers/clk/clk-devres.c | 101 ++++++++++++++------------------------- include/linux/device.h | 3 ++ 3 files changed, 68 insertions(+), 64 deletions(-)