From: kernel test robot <lkp@intel.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org
Subject: [mkp:5.18/discovery2 64/67] drivers/scsi/sd.c:1096:4: warning: add explicit braces to avoid dangling else
Date: Sat, 12 Feb 2022 18:39:09 +0800 [thread overview]
Message-ID: <202202121642.NBfsbeBr-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/linux.git 5.18/discovery2
head: 7c371ec158614870d9c9c5d1a9e0f0c35f9198d7
commit: 56db0eb9f48930efde746c3cb9af11524102dc76 [64/67] scsi: sd: Implement support for NDOB flag in WRITE SAME(16)
config: riscv-randconfig-r021-20220211 (https://download.01.org/0day-ci/archive/20220212/202202121642.NBfsbeBr-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c7eb84634519e6497be42f5fe323f9a04ed67127)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/mkp/linux.git/commit/?id=56db0eb9f48930efde746c3cb9af11524102dc76
git remote add mkp https://git.kernel.org/pub/scm/linux/kernel/git/mkp/linux.git
git fetch --no-tags mkp 5.18/discovery2
git checkout 56db0eb9f48930efde746c3cb9af11524102dc76
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/scsi/
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/sd.c:1096:4: warning: add explicit braces to avoid dangling else [-Wdangling-else]
else
^
1 warning generated.
vim +1096 drivers/scsi/sd.c
1076
1077 static void sd_config_write_zeroes(struct scsi_disk *sdkp,
1078 enum sd_zeroing_mode mode)
1079 {
1080 struct request_queue *q = sdkp->disk->queue;
1081 unsigned int logical_block_size = sdkp->device->sector_size;
1082
1083 if (mode == SD_ZERO_DEFAULT && !sdkp->zeroing_override) {
1084 mode = SD_ZERO_WRITE;
1085
1086 if (sdkp->lbprz && sdkp->lbpws)
1087 if (sdkp->ndob)
1088 mode = SD_ZERO_WS16_NDOB;
1089 else
1090 mode = SD_ZERO_WS16_UNMAP;
1091 else if (sdkp->lbprz && sdkp->lbpws10)
1092 mode = SD_ZERO_WS10_UNMAP;
1093 else if (sdkp->max_ws_blocks)
1094 if (sdkp->ndob)
1095 mode = SD_ZERO_WS16_NDOB;
> 1096 else
1097 mode = SD_ZERO_WS;
1098 }
1099
1100 if (mode == SD_ZERO_DISABLE)
1101 sdkp->zeroing_override = true;
1102
1103 sdkp->zeroing_mode = mode;
1104 blk_queue_max_write_zeroes_sectors(q, sdkp->max_ws_blocks *
1105 (logical_block_size >> 9));
1106 }
1107
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
reply other threads:[~2022-02-12 10:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202202121642.NBfsbeBr-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=martin.petersen@oracle.com \
/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