[axboe-block:block-5.16 5/5] block/blk-ia-ranges.c:119: warning: expecting prototype for disk_register_independent_access__ranges(). Prototype was for disk_register_independent_access_ranges() instead
From: kernel test robot
Date: Wed Nov 10 2021 - 23:48:37 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git block-5.16
head: 68636e242d45453d48a7d30a18a49f80d4ae08c0
commit: 68636e242d45453d48a7d30a18a49f80d4ae08c0 [5/5] block: fix kerneldoc for disk_register_independent_access__ranges()
config: ia64-defconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?id=68636e242d45453d48a7d30a18a49f80d4ae08c0
git remote add axboe-block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
git fetch --no-tags axboe-block block-5.16
git checkout 68636e242d45453d48a7d30a18a49f80d4ae08c0
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
>> block/blk-ia-ranges.c:119: warning: expecting prototype for disk_register_independent_access__ranges(). Prototype was for disk_register_independent_access_ranges() instead
vim +119 block/blk-ia-ranges.c
a2247f19ee1c5a Damien Le Moal 2021-10-27 105
a2247f19ee1c5a Damien Le Moal 2021-10-27 106 /**
68636e242d4545 Jens Axboe 2021-11-10 107 * disk_register_independent_access__ranges - register with sysfs a set of
68636e242d4545 Jens Axboe 2021-11-10 108 * independent access ranges
a2247f19ee1c5a Damien Le Moal 2021-10-27 109 * @disk: Target disk
a2247f19ee1c5a Damien Le Moal 2021-10-27 110 * @new_iars: New set of independent access ranges
a2247f19ee1c5a Damien Le Moal 2021-10-27 111 *
a2247f19ee1c5a Damien Le Moal 2021-10-27 112 * Register with sysfs a set of independent access ranges for @disk.
a2247f19ee1c5a Damien Le Moal 2021-10-27 113 * If @new_iars is not NULL, this set of ranges is registered and the old set
a2247f19ee1c5a Damien Le Moal 2021-10-27 114 * specified by q->ia_ranges is unregistered. Otherwise, q->ia_ranges is
a2247f19ee1c5a Damien Le Moal 2021-10-27 115 * registered if it is not already.
a2247f19ee1c5a Damien Le Moal 2021-10-27 116 */
a2247f19ee1c5a Damien Le Moal 2021-10-27 117 int disk_register_independent_access_ranges(struct gendisk *disk,
a2247f19ee1c5a Damien Le Moal 2021-10-27 118 struct blk_independent_access_ranges *new_iars)
a2247f19ee1c5a Damien Le Moal 2021-10-27 @119 {
a2247f19ee1c5a Damien Le Moal 2021-10-27 120 struct request_queue *q = disk->queue;
a2247f19ee1c5a Damien Le Moal 2021-10-27 121 struct blk_independent_access_ranges *iars;
a2247f19ee1c5a Damien Le Moal 2021-10-27 122 int i, ret;
a2247f19ee1c5a Damien Le Moal 2021-10-27 123
a2247f19ee1c5a Damien Le Moal 2021-10-27 124 lockdep_assert_held(&q->sysfs_dir_lock);
a2247f19ee1c5a Damien Le Moal 2021-10-27 125 lockdep_assert_held(&q->sysfs_lock);
a2247f19ee1c5a Damien Le Moal 2021-10-27 126
a2247f19ee1c5a Damien Le Moal 2021-10-27 127 /* If a new range set is specified, unregister the old one */
a2247f19ee1c5a Damien Le Moal 2021-10-27 128 if (new_iars) {
a2247f19ee1c5a Damien Le Moal 2021-10-27 129 if (q->ia_ranges)
a2247f19ee1c5a Damien Le Moal 2021-10-27 130 disk_unregister_independent_access_ranges(disk);
a2247f19ee1c5a Damien Le Moal 2021-10-27 131 q->ia_ranges = new_iars;
a2247f19ee1c5a Damien Le Moal 2021-10-27 132 }
a2247f19ee1c5a Damien Le Moal 2021-10-27 133
a2247f19ee1c5a Damien Le Moal 2021-10-27 134 iars = q->ia_ranges;
a2247f19ee1c5a Damien Le Moal 2021-10-27 135 if (!iars)
a2247f19ee1c5a Damien Le Moal 2021-10-27 136 return 0;
a2247f19ee1c5a Damien Le Moal 2021-10-27 137
a2247f19ee1c5a Damien Le Moal 2021-10-27 138 /*
a2247f19ee1c5a Damien Le Moal 2021-10-27 139 * At this point, iars is the new set of sector access ranges that needs
a2247f19ee1c5a Damien Le Moal 2021-10-27 140 * to be registered with sysfs.
a2247f19ee1c5a Damien Le Moal 2021-10-27 141 */
a2247f19ee1c5a Damien Le Moal 2021-10-27 142 WARN_ON(iars->sysfs_registered);
a2247f19ee1c5a Damien Le Moal 2021-10-27 143 ret = kobject_init_and_add(&iars->kobj, &blk_ia_ranges_ktype,
a2247f19ee1c5a Damien Le Moal 2021-10-27 144 &q->kobj, "%s", "independent_access_ranges");
a2247f19ee1c5a Damien Le Moal 2021-10-27 145 if (ret) {
a2247f19ee1c5a Damien Le Moal 2021-10-27 146 q->ia_ranges = NULL;
a2247f19ee1c5a Damien Le Moal 2021-10-27 147 kfree(iars);
a2247f19ee1c5a Damien Le Moal 2021-10-27 148 return ret;
a2247f19ee1c5a Damien Le Moal 2021-10-27 149 }
a2247f19ee1c5a Damien Le Moal 2021-10-27 150
a2247f19ee1c5a Damien Le Moal 2021-10-27 151 for (i = 0; i < iars->nr_ia_ranges; i++) {
a2247f19ee1c5a Damien Le Moal 2021-10-27 152 iars->ia_range[i].queue = q;
a2247f19ee1c5a Damien Le Moal 2021-10-27 153 ret = kobject_init_and_add(&iars->ia_range[i].kobj,
a2247f19ee1c5a Damien Le Moal 2021-10-27 154 &blk_ia_range_ktype, &iars->kobj,
a2247f19ee1c5a Damien Le Moal 2021-10-27 155 "%d", i);
a2247f19ee1c5a Damien Le Moal 2021-10-27 156 if (ret) {
a2247f19ee1c5a Damien Le Moal 2021-10-27 157 while (--i >= 0)
a2247f19ee1c5a Damien Le Moal 2021-10-27 158 kobject_del(&iars->ia_range[i].kobj);
a2247f19ee1c5a Damien Le Moal 2021-10-27 159 kobject_del(&iars->kobj);
a2247f19ee1c5a Damien Le Moal 2021-10-27 160 kobject_put(&iars->kobj);
a2247f19ee1c5a Damien Le Moal 2021-10-27 161 return ret;
a2247f19ee1c5a Damien Le Moal 2021-10-27 162 }
a2247f19ee1c5a Damien Le Moal 2021-10-27 163 }
a2247f19ee1c5a Damien Le Moal 2021-10-27 164
a2247f19ee1c5a Damien Le Moal 2021-10-27 165 iars->sysfs_registered = true;
a2247f19ee1c5a Damien Le Moal 2021-10-27 166
a2247f19ee1c5a Damien Le Moal 2021-10-27 167 return 0;
a2247f19ee1c5a Damien Le Moal 2021-10-27 168 }
a2247f19ee1c5a Damien Le Moal 2021-10-27 169
:::::: The code at line 119 was first introduced by commit
:::::: a2247f19ee1c5ad75ef095cdfb909a3244b88aa8 block: Add independent access ranges support
:::::: TO: Damien Le Moal <damien.lemoal@xxxxxxx>
:::::: CC: Jens Axboe <axboe@xxxxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip