Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1272212imm; Fri, 12 Oct 2018 15:08:57 -0700 (PDT) X-Google-Smtp-Source: ACcGV61ugOosHwS0GM0sxYhw9LVJrDh8uxH3fAq2Bhg5XMUEk6j2Uk/ZcRFOQRg52hjg/tt0p+fl X-Received: by 2002:a63:bd01:: with SMTP id a1-v6mr7146934pgf.58.1539382137943; Fri, 12 Oct 2018 15:08:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539382137; cv=none; d=google.com; s=arc-20160816; b=BfyLbd8ohZ2RQ7k9afcFDwgKQlNSqNj8CC+FErHMf4VgVd6aNPuly0LqM2aEBlCgQW igIpgsANiIx2CgJ/q2ftlPn7gJ1taSGX1mU5+y6FbDePM508BafOWsnkjyDix1fOe6tH HT4QlgbDBD58TGlAZ5bVJpjL5N11D0B8jxFTF8Ig8hk/B8AIY8GUcZZi9gWuxF4yVTQx nhsqfP96+2tyD4zN7ceIR4R1o42ix7bUJ/oRb5s0o5b6Dljqpo8CZfDLNP4UIFOfCYEh r4h+C3VVZNLli6fu1rpjxnAWOo1C3L/utt9rp0Tcx5nnAqw3Izs+MOYC85J7DOj89sfn I/yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature; bh=cDrKdyRxtYU+EgcYVoh8WBZuPglbMyx2ZXAaJwvYo2s=; b=wggphA3/BDBEQ6y2W1Lmof7yPy6I6N5GhW0p+lhRLgDoRpV+31weTlqcJE+PZH+HBJ 3MxrumRsBnMoKsNXWrUPBFkyJJ+k3V3U/IWC5jL7OUdB+dKhEdPwgBtq56gcNdiH2rmv ukXlTK0B543B8lSaabb3eisovG+G2QriiBC4qXr/wmA0CQwnyZx6EkxlZHow2MGijfxx 9tpqOVYUMmPD0C5xMjROlCOKXpBmYU7QF3wjjE/mBLqBEcDYqC4eZBOpXoVoQlBInmEo dQ46ofMwlQxK09p9JXKk6pP1LD6OvHTh15XCzwNa+R+GM1LXo5aSAk4uugvcNe5vvXzY hNxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HECtpkod; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f38-v6si2619684plb.168.2018.10.12.15.08.41; Fri, 12 Oct 2018 15:08:57 -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=@kernel.org header.s=default header.b=HECtpkod; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726005AbeJMFmr (ORCPT + 99 others); Sat, 13 Oct 2018 01:42:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:50808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725765AbeJMFmr (ORCPT ); Sat, 13 Oct 2018 01:42:47 -0400 Received: from localhost (unknown [104.132.0.74]) (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 E8DBB2087D; Fri, 12 Oct 2018 22:08:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539382098; bh=PCloDrn+jrYe8o5w2Acii78A2ZgA24kgY6ZZQirzUfI=; h=To:From:In-Reply-To:Cc:References:Subject:Date:From; b=HECtpkod83ADz4NTzqNPrGSxDyg1+y5yLKJaIg0Rj9lenkWcYKGQqiVrofy6ipfXa 5XbWRWX5xqDlqjeMUcSe5k7rI1bOwhZW/KrFeQZL95GTMslUiKuRbtGhB/TFpema0Y Bn2LWYFa867uPff/+oGatcwF8TZKvKDrK1XOgAag= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Ricardo Salveti , ilia.lin@gmail.com From: Stephen Boyd In-Reply-To: Cc: ilialin@codeaurora.org, mturquette@baylibre.com, 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 References: <20180614215358.11264-1-ilia.lin@gmail.com> <20180614215358.11264-4-ilia.lin@gmail.com> Message-ID: <153938209728.5275.8811599608746761178@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH v13 3/8] clk: Use devm_ in the register fixed factor clock Date: Fri, 12 Oct 2018 15:08:17 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Ricardo Salveti (2018-09-14 11:53:02) > 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-fac= tor.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 de= vice *dev, > > init.num_parents =3D 1; > > > > hw =3D &fix->hw; > > - ret =3D clk_hw_register(dev, hw); > > + ret =3D 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. > = Yep. Probably better to just have a driver register the clk_hw structure itself with the clk framework vs. trying to get it right here in the generic type registration function.