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.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 8CF14C2B9F8 for ; Tue, 25 May 2021 05:39:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D0BA46140E for ; Tue, 25 May 2021 05:39:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0BA46140E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 028AC6B006C; Tue, 25 May 2021 01:39:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F1A7D6B006E; Tue, 25 May 2021 01:39:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D94046B0070; Tue, 25 May 2021 01:39:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0196.hostedemail.com [216.40.44.196]) by kanga.kvack.org (Postfix) with ESMTP id A5C836B006C for ; Tue, 25 May 2021 01:39:54 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 416DB8249980 for ; Tue, 25 May 2021 05:39:54 +0000 (UTC) X-FDA: 78178651908.14.3D34364 Received: from muru.com (muru.com [72.249.23.125]) by imf08.hostedemail.com (Postfix) with ESMTP id 2D3498019123 for ; Tue, 25 May 2021 05:39:48 +0000 (UTC) Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 5B8CC807E; Tue, 25 May 2021 05:39:56 +0000 (UTC) Date: Tue, 25 May 2021 08:39:47 +0300 From: Tony Lindgren To: kernel test robot Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, Linux Memory Management List Subject: Re: [linux-next:master 2881/4780] drivers/bus/ti-sysc.c:1398:13: warning: variable 'error' is used uninitialized whenever 'if' condition is false Message-ID: References: <202105241750.2S5ZpIyU-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202105241750.2S5ZpIyU-lkp@intel.com> Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=none; spf=none (imf08.hostedemail.com: domain of tony@atomide.com has no SPF policy when checking 72.249.23.125) smtp.mailfrom=tony@atomide.com X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 2D3498019123 X-Stat-Signature: 5ybtqu4nqn9d89rkthmdkjymm9qmrt3e X-HE-Tag: 1621921188-532087 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: * kernel test robot [210524 10:00]: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: 674dc447b09fb668976c6ab1356b11e02ff209ed > commit: ec527f23e06a0521cd5b043aa31a4ccdf6cea549 [2881/4780] bus: ti-sysc: Fix am335x resume hang for usb otg module > config: arm-randconfig-r035-20210524 (attached as .config) > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 93d1e5822ed64abd777eb94ea9899e96c4c39fbe) > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # install arm cross compiling tool for clang build > # apt-get install binutils-arm-linux-gnueabi > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ec527f23e06a0521cd5b043aa31a4ccdf6cea549 > git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > git fetch --no-tags linux-next master > git checkout ec527f23e06a0521cd5b043aa31a4ccdf6cea549 > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > > All warnings (new ones prefixed by >>): > > >> drivers/bus/ti-sysc.c:1398:13: warning: variable 'error' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] > } else if (ddata->needs_resume) { > ^~~~~~~~~~~~~~~~~~~ > drivers/bus/ti-sysc.c:1406:9: note: uninitialized use occurs here > return error; > ^~~~~ > drivers/bus/ti-sysc.c:1398:9: note: remove the 'if' if its condition is always true > } else if (ddata->needs_resume) { > ^~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/bus/ti-sysc.c:1386:11: note: initialize the variable 'error' to silence this warning > int error; > ^ > = 0 > 1 warning generated. > > > vim +1398 drivers/bus/ti-sysc.c > > 1382 > 1383 static int __maybe_unused sysc_noirq_resume(struct device *dev) > 1384 { > 1385 struct sysc *ddata; > 1386 int error; > 1387 > 1388 ddata = dev_get_drvdata(dev); > 1389 > 1390 if (ddata->cfg.quirks & > 1391 (SYSC_QUIRK_LEGACY_IDLE | SYSC_QUIRK_NO_IDLE)) > 1392 return 0; > 1393 > 1394 if (ddata->cfg.quirks & SYSC_QUIRK_REINIT_ON_RESUME) { > 1395 error = sysc_reinit_module(ddata, ddata->needs_resume); > 1396 if (error) > 1397 dev_warn(dev, "noirq_resume failed: %i\n", error); > > 1398 } else if (ddata->needs_resume) { > 1399 error = sysc_runtime_resume(dev); > 1400 if (error) > 1401 dev_warn(dev, "noirq_resume failed: %i\n", error); > 1402 } > 1403 > 1404 ddata->needs_resume = 0; > 1405 > 1406 return error; > 1407 } > 1408 Thanks for the report, I'll update the patch to init error = 0 here. Regards, Tony