public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	cang@codeaurora.org, alim.akhtar@samsung.com,
	avri.altman@wdc.com, bvanassche@acm.org,
	Jaegeuk Kim <jaegeuk@google.com>
Subject: Re: [PATCH v3 2/5] scsi: ufs: clear UAC for FFU and RPMB LUNs
Date: Wed, 28 Oct 2020 01:48:46 +0800	[thread overview]
Message-ID: <202010280134.KTJY5OZl-lkp@intel.com> (raw)
In-Reply-To: <20201024150646.1790529-3-jaegeuk@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 4999 bytes --]

Hi Jaegeuk,

I love your patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on mkp-scsi/for-next linus/master linux/master v5.10-rc1 next-20201027]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Jaegeuk-Kim/scsi-ufs-atomic-update-for-clkgating_enable/20201025-000720
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: x86_64-randconfig-a012-20201027 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project f2c25c70791de95d2466e09b5b58fc37f6ccd7a4)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/48327c0914e146090df19aaa6df3f0ed569d9669
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jaegeuk-Kim/scsi-ufs-atomic-update-for-clkgating_enable/20201025-000720
        git checkout 48327c0914e146090df19aaa6df3f0ed569d9669
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/scsi/ufs/ufshcd.c:7618:3: warning: variable 'sdp' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
                   BUG_ON(1);
                   ^~~~~~~~~
   include/asm-generic/bug.h:63:32: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                  ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:58:30: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/scsi/ufs/ufshcd.c:7619:6: note: uninitialized use occurs here
           if (sdp) {
               ^~~
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                      ^~~~
   drivers/scsi/ufs/ufshcd.c:7618:3: note: remove the 'if' if its condition is always true
                   BUG_ON(1);
                   ^
   include/asm-generic/bug.h:63:32: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                  ^
   include/linux/compiler.h:56:23: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                         ^
   drivers/scsi/ufs/ufshcd.c:7608:25: note: initialize the variable 'sdp' to silence this warning
           struct scsi_device *sdp;
                                  ^
                                   = NULL
   1 warning generated.

vim +7618 drivers/scsi/ufs/ufshcd.c

  7605	
  7606	static int ufshcd_clear_ua_wlun(struct ufs_hba *hba, u8 wlun)
  7607	{
  7608		struct scsi_device *sdp;
  7609		unsigned long flags;
  7610		int ret = 0;
  7611	
  7612		spin_lock_irqsave(hba->host->host_lock, flags);
  7613		if (wlun  == UFS_UPIU_UFS_DEVICE_WLUN)
  7614			sdp = hba->sdev_ufs_device;
  7615		else if (wlun  == UFS_UPIU_RPMB_WLUN)
  7616			sdp = hba->sdev_rpmb;
  7617		else
> 7618			BUG_ON(1);
  7619		if (sdp) {
  7620			ret = scsi_device_get(sdp);
  7621			if (!ret && !scsi_device_online(sdp)) {
  7622				ret = -ENODEV;
  7623				scsi_device_put(sdp);
  7624			}
  7625		} else {
  7626			ret = -ENODEV;
  7627		}
  7628		spin_unlock_irqrestore(hba->host->host_lock, flags);
  7629		if (ret)
  7630			goto out_err;
  7631	
  7632		ret = ufshcd_send_request_sense(hba, sdp);
  7633		scsi_device_put(sdp);
  7634	out_err:
  7635		if (ret)
  7636			dev_err(hba->dev, "%s: UAC clear LU=%x ret = %d\n",
  7637					__func__, wlun, ret);
  7638		return ret;
  7639	}
  7640	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31213 bytes --]

  parent reply	other threads:[~2020-10-27 17:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-24 15:06 [UFS v3] UFS fixes Jaegeuk Kim
2020-10-24 15:06 ` [PATCH v3 1/5] scsi: ufs: atomic update for clkgating_enable Jaegeuk Kim
2020-10-26  3:28   ` Can Guo
2020-10-26  6:13     ` Jaegeuk Kim
2020-10-26  6:43       ` Can Guo
2020-10-26 19:48         ` Jaegeuk Kim
2020-10-27  2:44           ` Can Guo
2020-10-24 15:06 ` [PATCH v3 2/5] scsi: ufs: clear UAC for FFU and RPMB LUNs Jaegeuk Kim
2020-10-26 18:25   ` asutoshd
2020-10-26 19:43     ` Jaegeuk Kim
2020-10-27 17:48   ` kernel test robot [this message]
2020-10-24 15:06 ` [PATCH v3 3/5] scsi: ufs: use WQ_HIGHPRI for gating work Jaegeuk Kim
2020-10-26 18:27   ` asutoshd
2020-10-24 15:06 ` [PATCH v3 4/5] scsi: add more contexts in the ufs tracepoints Jaegeuk Kim
2020-10-24 15:06 ` [PATCH v3 5/5] scsi: ufs: fix clkgating on/off correctly Jaegeuk Kim
2020-10-26 18:33   ` asutoshd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202010280134.KTJY5OZl-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=cang@codeaurora.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=jaegeuk@google.com \
    --cc=jaegeuk@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kernel-team@android.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox