[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202202121642.NBfsbeBr-lkp@intel.com>
Date: Sat, 12 Feb 2022 18:39:09 +0800
From: kernel test robot <lkp@...el.com>
To: "Martin K. Petersen" <martin.petersen@...cle.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [mkp:5.18/discovery2 64/67] drivers/scsi/sd.c:1096:4: warning: add
explicit braces to avoid dangling else
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@...el.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
Powered by blists - more mailing lists