Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1139038imm; Fri, 14 Sep 2018 11:54:04 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdara6zgPyIMhNZsYaZdbAFNPAnLpklPOj9ajHlsZFHSLu70EPzseHNUPB1t8/tsfOrQxpNB X-Received: by 2002:a63:e0e:: with SMTP id d14-v6mr11342162pgl.38.1536951244778; Fri, 14 Sep 2018 11:54:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536951244; cv=none; d=google.com; s=arc-20160816; b=XMjgUKdsjDv6juXsy5tES3LGE8cgajruO43aOoyKmsZNoi0X3LgY3Oa9ZPF7ubc2gp CidyMzM3/QXU42QonD8EWzWHn2Gr/7zn7A4fdJC5/U0mWnX9ynsrO5KerFnp+N47ID0m K2wELwEiSAE/x2v27tThm+JZfAFB++teI9O9YAX9yujPoC/OHLeh2JJIKUUf+dFxTBgj k2LAPhNR34oq6cw5tmIZf8VGHGzBUx14llBgSEh2CmU1+lMZOu1wBK6zIgLYwyFxlJQ9 SeunqtninSfAvktiYfxRIoxBhBZoEEUfRFhJTBBqPaqBJ7ZozsnPlyYxyP0D6mCtRcKX 616A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=rRjnGRS1bYLyzAXtzY1UvPUuddUnYex/3I0zOxiWEL4=; b=ingmHPqXx44pF8BbPjgdphO+PqoI3FS1mCZlqnKcVrTSv0ge6XrBlbSuwtlr8mBDzd eLfJ6awZ90aWiTc5xPirLMXtcEkpbBqYPDmfc99Uzc/K5+YHPbRqtci5gIKpYYXuvPHq YDnJhkBV1GY6sZg2B9UIJg3/wJEO61rRYfFAJRJuXN9I+FxHODbTpuAmxX2rLOlsBviL SZdLk+R75HhmHkAdS3jqCWzCPi57JB+59Bh5+MBMWCg/rK9ni8yt0U5n5bo3i7E9BV36 tygRK4mJH0YIIV7qOB0pkpiVMBLDm5N9sLAmEmxGfrR6DThH/1cAg8iIxia56SAvllT3 UlbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rsalveti-net.20150623.gappssmtp.com header.s=20150623 header.b=Uc4MSbbq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3-v6si7540697plb.44.2018.09.14.11.53.49; Fri, 14 Sep 2018 11:54:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@rsalveti-net.20150623.gappssmtp.com header.s=20150623 header.b=Uc4MSbbq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728007AbeIOAJ1 (ORCPT + 99 others); Fri, 14 Sep 2018 20:09:27 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:38852 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727246AbeIOAJ1 (ORCPT ); Fri, 14 Sep 2018 20:09:27 -0400 Received: by mail-lj1-f194.google.com with SMTP id p6-v6so8338615ljc.5 for ; Fri, 14 Sep 2018 11:53:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rsalveti-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rRjnGRS1bYLyzAXtzY1UvPUuddUnYex/3I0zOxiWEL4=; b=Uc4MSbbqYHC589cCx6sYo0FOQhc5TDJeegaNYWnD0qfosTowW8rC8BzXlFCwh7H5el yp2GyiqAg2jQDWWF9HwnzT9YJEUl16sw+Yw3/jGzWZvn4NB52XoffbIlvnkBecBMbqK0 aittLgVOrT+3NOcjbqsNDA6+DkJkJQpJxpvoSw5yG+NkmYHxSTupjumXd2c3Pcpmss8J 0Oj5DXhQfJJD3Dk1RoRDVUck36LhbLrjiSKiKT08d1Sj2XVPyjo9McjlFLKALA9Ewyta WmRCrX/HmTtVL8mz2/uxDEUEC9qNGa+STvk1n6NcOZNxM2fNBR6ri5SP8XeFuyQgS6gB 4hLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rRjnGRS1bYLyzAXtzY1UvPUuddUnYex/3I0zOxiWEL4=; b=Xj9XBnT8SlyImjC7/hax5Sy7BUCjH01mSwlDqNsibKy/1K3xRT+2smsYTQm0bLaVMn J6oZ04NtDc8xpAzr4fMzb4cxIqrSlKuw/nnvqiJ7pi964RwTKU74Z+PX0R0qcHEhL0Bw 28SGh9XK2g2W8e0PBIQnGct3SgftmOByozxauInWvQQhE29fOHzGBXprF5/fs5eb5t6B z3aQt+fNLI4viQ/iv0o+8FDZWeYwndo/DrY/d7rAzTKsoDFG10GemxTRv7MpfBmFOUYi CiMyAh9kWGl7Ceqme7DIcukuS6hC+499lqsfTpT0t5STr+IodxXu49oIkkFAHgHPbAks Ejeg== X-Gm-Message-State: APzg51BJAoht8WcTXt20udp6z1CcoJ4LaQvLw662Qic/DLRCemivZJPq PSYr2q/YVSJFF0NTgngFuj5N5SaA9jGag6m345wpuw== X-Received: by 2002:a2e:80d3:: with SMTP id r19-v6mr8479635ljg.85.1536951219386; Fri, 14 Sep 2018 11:53:39 -0700 (PDT) MIME-Version: 1.0 References: <20180614215358.11264-1-ilia.lin@gmail.com> <20180614215358.11264-4-ilia.lin@gmail.com> In-Reply-To: <20180614215358.11264-4-ilia.lin@gmail.com> From: Ricardo Salveti Date: Fri, 14 Sep 2018 15:53:02 -0300 Message-ID: Subject: Re: [PATCH v13 3/8] clk: Use devm_ in the register fixed factor clock To: ilia.lin@gmail.com Cc: ilialin@codeaurora.org, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, andy.gross@linaro.org, david.brown@linaro.org, will.deacon@arm.com, Amit Kucheria , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 14, 2018 at 6:55 PM wrote: > > From: Ilia Lin > > Use devm_clk_hw_register instead of clk_hw_register > to simplify the usage of this API. This way drivers that call > the clk_hw_register_fixed_factor won't need to maintain > a data structure for further cleanup. > > Signed-off-by: Ilia Lin > Tested-by: Amit Kucheria > --- > drivers/clk/clk-fixed-factor.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c > index a5d402de5584..8e39bda8e596 100644 > --- a/drivers/clk/clk-fixed-factor.c > +++ b/drivers/clk/clk-fixed-factor.c > @@ -94,7 +94,7 @@ struct clk_hw *clk_hw_register_fixed_factor(struct device *dev, > init.num_parents = 1; > > hw = &fix->hw; > - ret = clk_hw_register(dev, hw); > + ret = devm_clk_hw_register(dev, hw); Not sure what is the current state of this patch-set, but this change breaks drivers calling clk_hw_register_fixed_factor with a NULL dev (e.g. imx_clk_fixed_factor), as devm_clk_hw_register needs a valid dev for devres_add to work. > if (ret) { > kfree(fix); > hw = ERR_PTR(ret); > -- > 2.11.0 Cheers, -- Ricardo Salveti de Araujo