Re: [PATCH v3] block: ublk: enable zoned storage support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andreas,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on eeac8ede17557680855031c6f305ece2378af326]

url:    https://github.com/intel-lab-lkp/linux/commits/Andreas-Hindborg/block-ublk-enable-zoned-storage-support/20230316-225725
base:   eeac8ede17557680855031c6f305ece2378af326
patch link:    https://lore.kernel.org/r/20230316145539.300523-1-nmi%40metaspace.dk
patch subject: [PATCH v3] block: ublk: enable zoned storage support
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20230317/202303170805.9OMzCcn7-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 12.1.0
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
        # https://github.com/intel-lab-lkp/linux/commit/723d5c2508e09f127226d38c698d3e4e6cff83f1
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Andreas-Hindborg/block-ublk-enable-zoned-storage-support/20230316-225725
        git checkout 723d5c2508e09f127226d38c698d3e4e6cff83f1
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash drivers/block/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202303170805.9OMzCcn7-lkp@xxxxxxxxx/

All error/warnings (new ones prefixed by >>):

   drivers/block/ublk_drv-zoned.c: In function 'ublk_alloc_report_buffer':
>> drivers/block/ublk_drv-zoned.c:50:23: error: implicit declaration of function '__vmalloc'; did you mean '__kmalloc'? [-Werror=implicit-function-declaration]
      50 |                 buf = __vmalloc(bufsize, GFP_KERNEL | __GFP_NORETRY);
         |                       ^~~~~~~~~
         |                       __kmalloc
>> drivers/block/ublk_drv-zoned.c:50:21: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      50 |                 buf = __vmalloc(bufsize, GFP_KERNEL | __GFP_NORETRY);
         |                     ^
   cc1: some warnings being treated as errors


vim +50 drivers/block/ublk_drv-zoned.c

    31	
    32	// Based on virtblk_alloc_report_buffer
    33	static void *ublk_alloc_report_buffer(struct ublk_device *ublk,
    34					      unsigned int nr_zones,
    35					      unsigned int zone_sectors, size_t *buflen)
    36	{
    37		struct request_queue *q = ublk->ub_disk->queue;
    38		size_t bufsize;
    39		void *buf;
    40	
    41		nr_zones = min_t(unsigned int, nr_zones,
    42				 get_capacity(ublk->ub_disk) >> ilog2(zone_sectors));
    43	
    44		bufsize = nr_zones * sizeof(struct blk_zone);
    45		bufsize =
    46			min_t(size_t, bufsize, queue_max_hw_sectors(q) << SECTOR_SHIFT);
    47		bufsize = min_t(size_t, bufsize, queue_max_segments(q) << PAGE_SHIFT);
    48	
    49		while (bufsize >= sizeof(struct blk_zone)) {
  > 50			buf = __vmalloc(bufsize, GFP_KERNEL | __GFP_NORETRY);
    51			if (buf) {
    52				*buflen = bufsize;
    53				return buf;
    54			}
    55			bufsize >>= 1;
    56		}
    57	
    58		bufsize = 0;
    59		return NULL;
    60	}
    61	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux