Re: [PATCH v10 3/3] ublk: enable zoned storage support

From: kernel test robot
Date: Thu Aug 03 2023 - 14:59:06 EST


Hi Andreas,

kernel test robot noticed the following build errors:

[auto build test ERROR on 5d0c230f1de8c7515b6567d9afba1f196fb4e2f4]

url: https://github.com/intel-lab-lkp/linux/commits/Andreas-Hindborg-Samsung/ublk-add-helper-to-check-if-device-supports-user-copy/20230803-224003
base: 5d0c230f1de8c7515b6567d9afba1f196fb4e2f4
patch link: https://lore.kernel.org/r/20230803140701.18515-4-nmi%40metaspace.dk
patch subject: [PATCH v10 3/3] ublk: enable zoned storage support
config: sh-randconfig-r024-20230731 (https://download.01.org/0day-ci/archive/20230804/202308040229.pFTUh2cG-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230804/202308040229.pFTUh2cG-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308040229.pFTUh2cG-lkp@xxxxxxxxx/

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

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


vim +281 drivers/block/ublk_drv.c

264
265 /* Based on virtblk_alloc_report_buffer */
266 static void *ublk_alloc_report_buffer(struct ublk_device *ublk,
267 unsigned int nr_zones, size_t *buflen)
268 {
269 struct request_queue *q = ublk->ub_disk->queue;
270 size_t bufsize;
271 void *buf;
272
273 nr_zones = min_t(unsigned int, nr_zones,
274 ublk->ub_disk->nr_zones);
275
276 bufsize = nr_zones * sizeof(struct blk_zone);
277 bufsize =
278 min_t(size_t, bufsize, queue_max_hw_sectors(q) << SECTOR_SHIFT);
279
280 while (bufsize >= sizeof(struct blk_zone)) {
> 281 buf = __vmalloc(bufsize, GFP_KERNEL | __GFP_NORETRY);
282 if (buf) {
283 *buflen = bufsize;
284 return buf;
285 }
286 bufsize >>= 1;
287 }
288
289 *buflen = 0;
290 return NULL;
291 }
292

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