block/blk-ia-ranges.c:119: warning: expecting prototype for disk_register_ia_ranges(). Prototype was for disk_register_independent_access_ranges() instead

From: kernel test robot
Date: Wed Nov 10 2021 - 19:27:16 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 881007522c8fcc3785c75432dbb149ca1b78e106
commit: a2247f19ee1c5ad75ef095cdfb909a3244b88aa8 block: Add independent access ranges support
date: 2 weeks ago
config: m68k-randconfig-r036-20211027 (attached as .config)
compiler: m68k-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/torvalds/linux.git/commit/?id=a2247f19ee1c5ad75ef095cdfb909a3244b88aa8
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a2247f19ee1c5ad75ef095cdfb909a3244b88aa8
# 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=m68k 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_ia_ranges(). Prototype was for disk_register_independent_access_ranges() instead


vim +119 block/blk-ia-ranges.c

105
106 /**
107 * disk_register_ia_ranges - register with sysfs a set of independent
108 * access ranges
109 * @disk: Target disk
110 * @new_iars: New set of independent access ranges
111 *
112 * Register with sysfs a set of independent access ranges for @disk.
113 * If @new_iars is not NULL, this set of ranges is registered and the old set
114 * specified by q->ia_ranges is unregistered. Otherwise, q->ia_ranges is
115 * registered if it is not already.
116 */
117 int disk_register_independent_access_ranges(struct gendisk *disk,
118 struct blk_independent_access_ranges *new_iars)
> 119 {
120 struct request_queue *q = disk->queue;
121 struct blk_independent_access_ranges *iars;
122 int i, ret;
123
124 lockdep_assert_held(&q->sysfs_dir_lock);
125 lockdep_assert_held(&q->sysfs_lock);
126
127 /* If a new range set is specified, unregister the old one */
128 if (new_iars) {
129 if (q->ia_ranges)
130 disk_unregister_independent_access_ranges(disk);
131 q->ia_ranges = new_iars;
132 }
133
134 iars = q->ia_ranges;
135 if (!iars)
136 return 0;
137
138 /*
139 * At this point, iars is the new set of sector access ranges that needs
140 * to be registered with sysfs.
141 */
142 WARN_ON(iars->sysfs_registered);
143 ret = kobject_init_and_add(&iars->kobj, &blk_ia_ranges_ktype,
144 &q->kobj, "%s", "independent_access_ranges");
145 if (ret) {
146 q->ia_ranges = NULL;
147 kfree(iars);
148 return ret;
149 }
150
151 for (i = 0; i < iars->nr_ia_ranges; i++) {
152 iars->ia_range[i].queue = q;
153 ret = kobject_init_and_add(&iars->ia_range[i].kobj,
154 &blk_ia_range_ktype, &iars->kobj,
155 "%d", i);
156 if (ret) {
157 while (--i >= 0)
158 kobject_del(&iars->ia_range[i].kobj);
159 kobject_del(&iars->kobj);
160 kobject_put(&iars->kobj);
161 return ret;
162 }
163 }
164
165 iars->sysfs_registered = true;
166
167 return 0;
168 }
169

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip