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=-11.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 17AC9C48BC2 for ; Fri, 25 Jun 2021 23:06:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EAE0361945 for ; Fri, 25 Jun 2021 23:06:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230002AbhFYXJS (ORCPT ); Fri, 25 Jun 2021 19:09:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:41042 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbhFYXJQ (ORCPT ); Fri, 25 Jun 2021 19:09:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8B8CC61945; Fri, 25 Jun 2021 23:06:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624662415; bh=FVWjfkyip/Ks0O6bAoeaWP3eziSs+2NyyTBM+e9UYn8=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=cMUBnwsGjNIBcSavj1rE2NiHFWM6N8CHIslzvHJQTOdsEKKMH6LsZqlCIvkvKKE40 tazNNR7fUgeubbv29rlQUsp/X6XXQ0NagsGph5BEEzhzi3NAr/2Adnaww/QQCM8FOb oY1sbVeMOCottt48w6komagQ7xdW6TZ8Frp7J6uAWAJvlqZ5a06szlZwesKvlNzQhO XmAFZGES5WKfFPvq6/E7Gwy8RbkpwgRob51OfqpSW/dEXAkYh3v18QbVwyeocokC6P xbvlbLph+XtDntYlSDpuBUzH/gCdOaqi1/KEBrPLi+vloM1Oju3CqpfXcs6oI48uMN NNj9hJYXkHCYw== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: Subject: Re: [PATCH v3] clk: zynqmp: fix compile testing without ZYNQMP_FIRMWARE From: Stephen Boyd Cc: Arnd Bergmann , Michael Turquette , Punit Agrawal , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org To: git@xilinx.com, linux-kernel@vger.kernel.org, michal.simek@xilinx.com, monstr@monstr.eu, quanyang.wang@windriver.com Date: Fri, 25 Jun 2021 16:06:54 -0700 Message-ID: <162466241428.3259633.9651068291046255073@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Michal Simek (2021-06-22 03:15:11) > When the firmware code is disabled, the incomplete error handling > in the clk driver causes compile-time warnings: >=20 > drivers/clk/zynqmp/pll.c: In function 'zynqmp_pll_recalc_rate': > drivers/clk/zynqmp/pll.c:147:29: error: 'fbdiv' is used uninitialized [-W= error=3Duninitialized] > 147 | rate =3D parent_rate * fbdiv; > | ~~~~~~~~~~~~^~~~~~~ > In function 'zynqmp_pll_get_mode', > inlined from 'zynqmp_pll_recalc_rate' at drivers/clk/zynqmp/pll.c:148= :6: > drivers/clk/zynqmp/pll.c:61:27: error: 'ret_payload' is used uninitialize= d [-Werror=3Duninitialized] > 61 | return ret_payload[1]; > | ~~~~~~~~~~~^~~ > drivers/clk/zynqmp/pll.c: In function 'zynqmp_pll_recalc_rate': > drivers/clk/zynqmp/pll.c:53:13: note: 'ret_payload' declared here > 53 | u32 ret_payload[PAYLOAD_ARG_CNT]; > | ^~~~~~~~~~~ > drivers/clk/zynqmp/clk-mux-zynqmp.c: In function 'zynqmp_clk_mux_get_pare= nt': > drivers/clk/zynqmp/clk-mux-zynqmp.c:57:16: error: 'val' is used uninitial= ized [-Werror=3Duninitialized] > 57 | return val; > | ^~~ >=20 > As it was apparently intentional to support this for compile testing > purposes, change the code to have just enough error handling for the > compiler to not notice the remaining bugs. >=20 > Fixes: 21f237534661 ("clk: zynqmp: Drop dependency on ARCH_ZYNQMP") > Co-developed-by: Arnd Bergmann > Signed-off-by: Michal Simek > --- Applied to clk-next. I see this fixes a bug in this upcoming release but I'm sure we can pick this back to stable tree in a week or so once the merge window opens. It's not like this is fixing anything besides compile testing anyway.