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=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 1A076C17460 for ; Tue, 5 Nov 2019 12:59:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EFA2F21D71 for ; Tue, 5 Nov 2019 12:59:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388869AbfKEM7V (ORCPT ); Tue, 5 Nov 2019 07:59:21 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:56829 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388678AbfKEM7U (ORCPT ); Tue, 5 Nov 2019 07:59:20 -0500 Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1iRyQW-0002wH-Ga; Tue, 05 Nov 2019 13:59:16 +0100 Subject: Re: [PATCH] clk: imx: pll14xx: initialize flags to 0 To: Peng Fan , "sboyd@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "festevam@gmail.com" , Abel Vesa Cc: Aisheng Dong , "linux-kernel@vger.kernel.org" , dl-linux-imx , "kernel@pengutronix.de" , Leonard Crestez , "linux-clk@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" References: <1572938372-7006-1-git-send-email-peng.fan@nxp.com> From: Ahmad Fatoum Message-ID: <7966140a-7fec-0a8f-6ced-e4fbccef51da@pengutronix.de> Date: Tue, 5 Nov 2019 13:59:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <1572938372-7006-1-git-send-email-peng.fan@nxp.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Peng, On 11/5/19 8:21 AM, Peng Fan wrote: > From: Peng Fan > > init.flags is initialized with value from pll_clk->flags, however > imx_1443x_pll and imx_1416x_pll are not static structure, They don't have a static in front of them, but they still have static storage duration. > so flags > might be random value. So let's initialize flags as 0 now. I fail to see how. Members not listed in the { initializer-list } are implicitly initialized as if they were static objects, so flags should already be zero. (I assumed this patch is based on Shawn's imx-clk-5.5 tag) Cheers Ahmad > > Signed-off-by: Peng Fan > --- > drivers/clk/imx/clk-pll14xx.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c > index fa76e04251c4..a7f1c1abe664 100644 > --- a/drivers/clk/imx/clk-pll14xx.c > +++ b/drivers/clk/imx/clk-pll14xx.c > @@ -65,12 +65,14 @@ struct imx_pll14xx_clk imx_1443x_pll = { > .type = PLL_1443X, > .rate_table = imx_pll1443x_tbl, > .rate_count = ARRAY_SIZE(imx_pll1443x_tbl), > + .flags = 0, > }; > > struct imx_pll14xx_clk imx_1416x_pll = { > .type = PLL_1416X, > .rate_table = imx_pll1416x_tbl, > .rate_count = ARRAY_SIZE(imx_pll1416x_tbl), > + .flags = 0, > }; > > static const struct imx_pll14xx_rate_table *imx_get_pll_settings( > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |