Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1550334pxv; Fri, 25 Jun 2021 16:07:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMESLb6BtmxK9Ypb/bYZGPwV0zA/xZgQGY7YR5oNalmUi8ybk/vMzIYVm3LgyJCaKBgUrg X-Received: by 2002:a05:6602:188:: with SMTP id m8mr10320271ioo.201.1624662476951; Fri, 25 Jun 2021 16:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624662476; cv=none; d=google.com; s=arc-20160816; b=pqNJb9gr7EyEQd7SPb4yURnfF6gL2mnvA2MvtUtZn8oEl07DPnxamsVd0k5jRXVVNm eE4dCHJZDtTR/rzefsHhiUlhtaXnPldWP6nrBNRSsbAnRPNJ08LYDH36lxN7UcEnphqI +5I2RHv0h8/n/ucccpdcS0/bxibYMH2wOICIeE0TW0VMb9s99sh3S38tHlbeA8UCrvVG 76fRxKhTbd3JAqyZQ5ae1+KNsENkMd4HYuZgPiF862IaxvCTqDtqfaWEQaWoSZ6bmA0x KfMFrYQb+QhuEDn9A5dkuW99I7qBRNXzIeYc0z4QGrDIlj44cg1ZbkrE7H482jc5u6wG zSRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=xnkZKdJXrd1HgWaumP5v5PiMdMUtFihjXztXCUC5/yU=; b=GbUiPodBLYYMeIhSGc7tlSqzUt7vQ3UzY8F0xUFQ5wx3JYRGg8m4oZrUoeiymHamSX sNTzkQp9RgnB/mNymJY9mZTbyS7EN3OqsTKrTo8RvdNfTu9YCxMQ9fGR8QOqoidMJVwz Du6C4aSUmGx4thAxg1u0uXS2UcGK7qFATp3tNPPHA3r4BXOhTsANO6OEExrcbTCtdgrb NhKHJPcuqqJp6DPirW6AZuRF7pA2jCRPNFuEMDlN/ZrX3qWnl8hucnmrK0dHAcj4FFHj yiBP4aWj09Nh5Jf7p8Y6Am9Ui8ozPvbrYmraHsuBE/lCsnZEfWe92AizvgP49hOxLamt PMkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cMUBnwsG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id i9si6940605ioq.17.2021.06.25.16.07.34; Fri, 25 Jun 2021 16:07:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cMUBnwsG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S229940AbhFYXJR (ORCPT + 99 others); Fri, 25 Jun 2021 19:09:17 -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.