Hi Keith, I love your patch! Perhaps something to improve: [auto build test WARNING on axboe-block/for-next] [also build test WARNING on linus/master v6.1 next-20221220] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Keith-Busch/block-save-user-max_sectors-limit/20221222-003202 base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next patch link: https://lore.kernel.org/r/20221221162758.407742-1-kbusch%40meta.com patch subject: [PATCH] block: save user max_sectors limit config: microblaze-randconfig-s052-20221218 compiler: microblaze-linux-gcc (GCC) 12.1.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-39-gce1a6720-dirty # https://github.com/intel-lab-lkp/linux/commit/aab1e7d5915a6d2ff8418eda6d2334b1e4d79162 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Keith-Busch/block-save-user-max_sectors-limit/20221222-003202 git checkout aab1e7d5915a6d2ff8418eda6d2334b1e4d79162 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=microblaze olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=microblaze SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> block/blk-settings.c:138:23: sparse: sparse: incompatible types in comparison expression (different signedness): >> block/blk-settings.c:138:23: sparse: unsigned int * >> block/blk-settings.c:138:23: sparse: int * >> block/blk-settings.c:138:23: sparse: sparse: cast from unknown type >> block/blk-settings.c:138:23: sparse: sparse: incompatible types in comparison expression (different signedness): >> block/blk-settings.c:138:23: sparse: unsigned int * >> block/blk-settings.c:138:23: sparse: int * >> block/blk-settings.c:138:23: sparse: sparse: cast from unknown type >> block/blk-settings.c:138:23: sparse: sparse: incompatible types in comparison expression (different signedness): >> block/blk-settings.c:138:23: sparse: unsigned int * >> block/blk-settings.c:138:23: sparse: int * >> block/blk-settings.c:138:23: sparse: sparse: cast from unknown type >> block/blk-settings.c:138:23: sparse: sparse: incompatible types in comparison expression (different signedness): >> block/blk-settings.c:138:23: sparse: unsigned int * >> block/blk-settings.c:138:23: sparse: int * >> block/blk-settings.c:138:23: sparse: sparse: cast from unknown type >> block/blk-settings.c:138:23: sparse: sparse: incompatible types in comparison expression (different signedness): >> block/blk-settings.c:138:23: sparse: unsigned int * >> block/blk-settings.c:138:23: sparse: int * >> block/blk-settings.c:138:23: sparse: sparse: cast from unknown type vim +138 block/blk-settings.c 102 103 /** 104 * blk_queue_max_hw_sectors - set max sectors for a request for this queue 105 * @q: the request queue for the device 106 * @max_hw_sectors: max hardware sectors in the usual 512b unit 107 * 108 * Description: 109 * Enables a low level driver to set a hard upper limit, 110 * max_hw_sectors, on the size of requests. max_hw_sectors is set by 111 * the device driver based upon the capabilities of the I/O 112 * controller. 113 * 114 * max_dev_sectors is a hard limit imposed by the storage device for 115 * READ/WRITE requests. It is set by the disk driver. 116 * 117 * max_sectors is a soft limit imposed by the block layer for 118 * filesystem type requests. This value can be overridden on a 119 * per-device basis in /sys/block//queue/max_sectors_kb. 120 * The soft limit can not exceed max_hw_sectors. 121 **/ 122 void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int max_hw_sectors) 123 { 124 struct queue_limits *limits = &q->limits; 125 unsigned int max_sectors; 126 127 if ((max_hw_sectors << 9) < PAGE_SIZE) { 128 max_hw_sectors = 1 << (PAGE_SHIFT - 9); 129 printk(KERN_INFO "%s: set to minimum %d\n", 130 __func__, max_hw_sectors); 131 } 132 133 max_hw_sectors = round_down(max_hw_sectors, 134 limits->logical_block_size >> SECTOR_SHIFT); 135 limits->max_hw_sectors = max_hw_sectors; 136 137 max_sectors = min_not_zero(max_hw_sectors, limits->max_dev_sectors); > 138 max_sectors = min_t(unsigned int, max_sectors, max(limits->max_sectors, 139 BLK_DEF_MAX_SECTORS)); 140 max_sectors = round_down(max_sectors, 141 limits->logical_block_size >> SECTOR_SHIFT); 142 limits->max_sectors = max_sectors; 143 144 if (!q->disk) 145 return; 146 q->disk->bdi->io_pages = max_sectors >> (PAGE_SHIFT - 9); 147 } 148 EXPORT_SYMBOL(blk_queue_max_hw_sectors); 149 -- 0-DAY CI Kernel Test Service https://01.org/lkp