2021-11-11 00:27:17

by kernel test robot

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

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 <[email protected]>

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/[email protected]


Attachments:
(No filename) (3.55 kB)
.config.gz (33.39 kB)
Download all attachments

2021-11-11 00:35:22

by Jens Axboe

[permalink] [raw]
Subject: Re: block/blk-ia-ranges.c:119: warning: expecting prototype for disk_register_ia_ranges(). Prototype was for disk_register_independent_access_ranges() instead

On 11/10/21 5:26 PM, kernel test robot wrote:
> 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 <[email protected]>
>
> 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

Thanks, fixed here:

https://git.kernel.dk/cgit/linux-block/commit/?h=block-5.16&id=68636e242d45453d48a7d30a18a49f80d4ae08c0

--
Jens Axboe


2021-11-11 00:36:56

by Damien Le Moal

[permalink] [raw]
Subject: Re: block/blk-ia-ranges.c:119: warning: expecting prototype for disk_register_ia_ranges(). Prototype was for disk_register_independent_access_ranges() instead

On 2021/11/11 9:35, Jens Axboe wrote:
> On 11/10/21 5:26 PM, kernel test robot wrote:
>> 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 <[email protected]>
>>
>> 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
>
> Thanks, fixed here:
>
> https://git.kernel.dk/cgit/linux-block/commit/?h=block-5.16&id=68636e242d45453d48a7d30a18a49f80d4ae08c0
>

I was about to hit send for a fix patch :)
Thanks Jens.


--
Damien Le Moal
Western Digital Research

2021-11-11 00:37:32

by Jens Axboe

[permalink] [raw]
Subject: Re: block/blk-ia-ranges.c:119: warning: expecting prototype for disk_register_ia_ranges(). Prototype was for disk_register_independent_access_ranges() instead

On 11/10/21 5:36 PM, Damien Le Moal wrote:
> On 2021/11/11 9:35, Jens Axboe wrote:
>> On 11/10/21 5:26 PM, kernel test robot wrote:
>>> 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 <[email protected]>
>>>
>>> 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
>>
>> Thanks, fixed here:
>>
>> https://git.kernel.dk/cgit/linux-block/commit/?h=block-5.16&id=68636e242d45453d48a7d30a18a49f80d4ae08c0
>>
>
> I was about to hit send for a fix patch :)
> Thanks Jens.

Quickest draw in the west ;-)

--
Jens Axboe