All of lore.kernel.org
 help / color / mirror / Atom feed
* [mkp:5.18/discovery2 64/67] drivers/scsi/sd.c:1096:4: warning: add explicit braces to avoid dangling else
@ 2022-02-12 10:39 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-02-12 10:39 UTC (permalink / raw)
  To: Martin K. Petersen; +Cc: llvm, kbuild-all, linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [mkp:5.18/discovery2 64/67] drivers/scsi/sd.c:1096:4: warning: add explicit braces to avoid dangling else
@ 2022-02-12 10:39 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-02-12 10:39 UTC (permalink / raw)
  To: kbuild-all

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

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(a)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(a)lists.01.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-12 10:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-12 10:39 [mkp:5.18/discovery2 64/67] drivers/scsi/sd.c:1096:4: warning: add explicit braces to avoid dangling else kernel test robot
2022-02-12 10:39 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.