Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1854370imu; Wed, 28 Nov 2018 16:42:47 -0800 (PST) X-Google-Smtp-Source: AJdET5fwCHPA2USFhacLZCWjS4dqX8gMGZCrrEKxg3yn7nY4qR5uUXH8TslxtvemsnC90vd64M6x X-Received: by 2002:a62:cd44:: with SMTP id o65mr39486524pfg.222.1543452167142; Wed, 28 Nov 2018 16:42:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543452167; cv=none; d=google.com; s=arc-20160816; b=Q+zb8S5wShRn53KfiK57aw1+RCC2bpZeNf3ZngQd5If/HwwLEGOCwh8muyUyALgql3 khwC9ouydp3ei1/gn9slDqIiTMdaQSwPrAoO6HOcTjC2PpGnPHWtL6aAlTVefsZErCEq 7ZPQiP4WX5UwlS9OT5uNDI9RksmOZjyrp95EP/vExw18RSra8QarmlvDK6MzBgU5t+8X Cbze0E9zns0ztnv0BSPWDQe8evMKgbZtrjBJxZ0ctsPzDsXfBprkEm/T//DR5LndKw0y G15GcSEdUnDvRIwU4ZKd8jTS4Sd7pVK3yiq2iQrCX3EcTC5Waxz59Hw2Sc///xdr/BJb elSA== 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=MrM4NIOJF9AskgtEvh7RdVC2UR6NyOjtJgFCjx0Wn84=; b=n6bdroKrDsbhzvCqp7Qp6HQ71yTuqMeXepfKndiOz7AMkDSpxJZnLxGRKPY9RNfNMD YWGSwKibV5g3XC5FqMrw7hqP2N2ZGSCho7GbwY6ZSDBDJpd3Bxk4oIEX614jhY5OkN8F sV2H9GWMNm186jqKIOYAaOkmYL0DzKZEMJeNyrd8ZcUvlFS4czxb+eMuHmV+p2doI2t7 gIxqxUXfWy6QGqH9jq6i6iojq0tCIOJ1Oeo7FLrGcJTftG9F7o4p11bFe6mRLBZIJXfX 0x349CHrpS97tl0bGGKuqCIpPIUzY/jWfNvF7X1skwuSrBcOKWzv0nV2jB2Yiazxu5pR r/PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lTvpvEqD; 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 41si173176plf.347.2018.11.28.16.42.32; Wed, 28 Nov 2018 16:42:47 -0800 (PST) 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=lTvpvEqD; 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 S1726773AbeK2LpU (ORCPT + 99 others); Thu, 29 Nov 2018 06:45:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:51472 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726485AbeK2LpU (ORCPT ); Thu, 29 Nov 2018 06:45:20 -0500 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 1BBFD20832; Thu, 29 Nov 2018 00:41:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543452110; bh=mNn4j0DrF7UFW+rjHZiqbyYTmZ6HMSXM5VWr/goC1/w=; h=To:From:In-Reply-To:Cc:References:Subject:Date:From; b=lTvpvEqD9hcF+SeYn77z3LqaL8ZfNhW2j4S4mFy4sVyXKH5Rbc96h7yanB/7rYq72 DYVsNQWCRXkIpqSQHaTpz+T1sFNEcYpuTK6/5YUB4XGjUlO6XeLNPyPd1oeijCzNwP ZgA6ON7zbnhG7LQZR8imkJ8dP+D5ssuJuvVo78yQ= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: "A.s. Dong" , Abel Vesa , Lucas Stach , Sascha Hauer From: Stephen Boyd In-Reply-To: <1542125975-8448-1-git-send-email-abel.vesa@nxp.com> Cc: Michael Turquette , Rob Herring , Mark Rutland , Shawn Guo , Fabio Estevam , dl-linux-imx , "linux-clk@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Abel Vesa , Abel Vesa References: <1542125975-8448-1-git-send-email-abel.vesa@nxp.com> Message-ID: <154345210894.88331.8277410833858111600@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH v13 0/5] Add i.MX8MQ clock driver Date: Wed, 28 Nov 2018 16:41:48 -0800 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Abel Vesa (2018-11-13 08:19:56) > Here is a link to the 12th version: > https://lkml.org/lkml/2018/11/7/642 > = > Changes since v12: > * replaced the division in clk_pll_recalc_rate in clk-frac > with do_div as suggested by Stephen > = > Abel Vesa (2): > clk: imx: Add imx composite clock > clk: imx: Add clock driver for i.MX8MQ CCM > = > Lucas Stach (3): > dt-bindings: add binding for i.MX8MQ CCM > clk: imx: add fractional PLL output clock > clk: imx: Add SCCG PLL type > = I had to apply this set of fixes to silence sparse and smatch warnings about things that are not right. Please take a look over things and see if it's sane. diff --git a/drivers/clk/imx/clk-composite-8m.c b/drivers/clk/imx/clk-compo= site-8m.c index bcd31d889584..6d9d3714b4df 100644 --- a/drivers/clk/imx/clk-composite-8m.c +++ b/drivers/clk/imx/clk-composite-8m.c @@ -127,8 +127,8 @@ struct clk *imx8m_clk_composite_flags(const char *name, int num_parents, void __iomem *reg, unsigned long flags) { - struct clk_hw *hw =3D NULL, *mux_hw =3D NULL; - struct clk_hw *div_hw =3D NULL, *gate_hw =3D NULL; + struct clk_hw *hw =3D ERR_PTR(-ENOMEM), *mux_hw; + struct clk_hw *div_hw, *gate_hw; struct clk_divider *div =3D NULL; struct clk_gate *gate =3D NULL; struct clk_mux *mux =3D NULL; diff --git a/drivers/clk/imx/clk-frac-pll.c b/drivers/clk/imx/clk-frac-pll.c index a3732be5ad7f..98726206f3c4 100644 --- a/drivers/clk/imx/clk-frac-pll.c +++ b/drivers/clk/imx/clk-frac-pll.c @@ -14,6 +14,8 @@ #include #include = +#include "clk.h" + #define PLL_CFG0 0x0 #define PLL_CFG1 0x4 = @@ -214,7 +216,7 @@ struct clk *imx_clk_frac_pll(const char *name, const ch= ar *parent_name, ret =3D clk_hw_register(NULL, hw); if (ret) { kfree(pll); - return ERR_CAST(hw); + return ERR_PTR(ret); } = return hw->clk; diff --git a/drivers/clk/imx/clk-sccg-pll.c b/drivers/clk/imx/clk-sccg-pll.c index 4666b96bdb3f..ee7752bace89 100644 --- a/drivers/clk/imx/clk-sccg-pll.c +++ b/drivers/clk/imx/clk-sccg-pll.c @@ -249,7 +249,7 @@ struct clk *imx_clk_sccg_pll(const char *name, ret =3D clk_hw_register(NULL, hw); if (ret) { kfree(pll); - return ERR_CAST(hw); + return ERR_PTR(ret); } = return hw->clk;