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=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no 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 4CB8FC433E1 for ; Thu, 4 Jun 2020 04:38:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 22D50207D0 for ; Thu, 4 Jun 2020 04:38:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591245520; bh=2lMQ7ysGCU8GBBi628ZDf5NUJ8tIyihWdEeZRWeBBRs=; h=In-Reply-To:References:Subject:From:Cc:To:Date:List-ID:From; b=wFcHKTN1c29l8kflCBGM+jMYg/aBOlgPZwZC1HW6Yhd3z7EPUlWMXOeJ3HL9AxIGk 5ByaQS4CIHadNu3GsHc6KdSIbS5pCUyzTbBZ5dMCVTpQ941tkA/bFznNXSrSQPyswH 46rnsrJ9T8JbH2FNnJ155ziPjt38zMaKh622seBw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728490AbgFDEii (ORCPT ); Thu, 4 Jun 2020 00:38:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:45784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726956AbgFDEih (ORCPT ); Thu, 4 Jun 2020 00:38:37 -0400 Received: from kernel.org (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 04A91206C3; Thu, 4 Jun 2020 04:38:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591245517; bh=2lMQ7ysGCU8GBBi628ZDf5NUJ8tIyihWdEeZRWeBBRs=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=rjNKa+NoPrDtpvFIskphpRAzqIuZC2EDaeiH8NLviKFG4z0voPiz2uE07z0nrysfQ 2eLhdaruaSQ74UQKr1AOe02dy7ouM14/8cQEr/sK93Ykg+9oEquqLX/ary5lgIdgf1 J8RYhQkIfWZ8Ohep5Uxh6ufpuFKZW5VLYrPucY5o= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20200603233203.1695403-7-keescook@chromium.org> References: <20200603233203.1695403-1-keescook@chromium.org> <20200603233203.1695403-7-keescook@chromium.org> Subject: Re: [PATCH 06/10] clk: st: Remove uninitialized_var() usage From: Stephen Boyd Cc: Kees Cook , Linus Torvalds , Miguel Ojeda , Alexander Potapenko , Joe Perches , Andy Whitcroft , x86@kernel.org, drbd-dev@lists.linbit.com, linux-block@vger.kernel.org, b43-dev@lists.infradead.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-ide@vger.kernel.org, linux-clk@vger.kernel.org, linux-spi@vger.kernel.org, linux-mm@kvack.org, clang-built-linux@googlegroups.com To: Kees Cook , linux-kernel@vger.kernel.org Date: Wed, 03 Jun 2020 21:38:36 -0700 Message-ID: <159124551620.69627.18245138803269803785@swboyd.mtv.corp.google.com> User-Agent: alot/0.9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Kees Cook (2020-06-03 16:31:59) > Using uninitialized_var() is dangerous as it papers over real bugs[1] > (or can in the future), and suppresses unrelated compiler warnings (e.g. > "unused variable"). If the compiler thinks it is uninitialized, either > simply initialize the variable or make compiler changes. As a precursor > to removing[2] this[3] macro[4], just remove this variable since it was > actually unused: >=20 > drivers/clk/st/clkgen-fsyn.c: In function \u2018quadfs_set_rate\u2019: > drivers/clk/st/clkgen-fsyn.c:793:6: warning: unused variable \u2018i\u201= 9 [-Wunused-variable] > 793 | int i; > | ^ >=20 > [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.co= m/ > [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=3D1TGqCR5vQkCzWJ0QxK6Cern= OU6eedsudAixw@mail.gmail.com/ > [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz= 9knmPuXhOeg@mail.gmail.com/ > [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=3DyVJu65TpLg= N_ybYNv0VEOKA@mail.gmail.com/ >=20 > Signed-off-by: Kees Cook > --- Acked-by: Stephen Boyd