[sashal-linux-stable:queue-4.4 12/12] /tmp/ili210x-771426.s:439: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.4
head: ea87f28c8a2166a018533545da435b6108457a85
commit: ea87f28c8a2166a018533545da435b6108457a85 [12/12] scsi: target: iscsi: Fix cmd abort fabric stop race
config: x86_64-randconfig-a001-20201129 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project f502b14d40e751fe00afc493ef0d08f196524886)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-4.4
git checkout ea87f28c8a2166a018533545da435b6108457a85
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/input/touchscreen/ili210x.c:2:
In file included from include/linux/i2c.h:31:
In file included from include/linux/sched.h:61:
In file included from include/linux/cgroup-defs.h:16:
include/linux/percpu-refcount.h:177:3: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
this_cpu_add(*percpu_count, nr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:526:33: note: expanded from macro 'this_cpu_add'
#define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:397:11: note: expanded from macro '__pcpu_size_call'
case 8: stem##8(variable, __VA_ARGS__);break; \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:274:1: note: expanded from here
this_cpu_add_8
^
arch/x86/include/asm/percpu.h:478:35: note: expanded from macro 'this_cpu_add_8'
#define this_cpu_add_8(pcp, val) percpu_add_op((pcp), val)
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/percpu.h:130:31: note: expanded from macro 'percpu_add_op'
((val) == 1 || (val) == -1)) ? \
~~~ ^ ~~
In file included from drivers/input/touchscreen/ili210x.c:2:
In file included from include/linux/i2c.h:31:
In file included from include/linux/sched.h:61:
In file included from include/linux/cgroup-defs.h:16:
include/linux/percpu-refcount.h:276:3: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
this_cpu_sub(*percpu_count, nr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:536:33: note: expanded from macro 'this_cpu_sub'
#define this_cpu_sub(pcp, val) this_cpu_add(pcp, -(typeof(pcp))(val))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:526:33: note: expanded from macro 'this_cpu_add'
#define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:397:11: note: expanded from macro '__pcpu_size_call'
case 8: stem##8(variable, __VA_ARGS__);break; \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:157:1: note: expanded from here
this_cpu_add_8
^
arch/x86/include/asm/percpu.h:478:35: note: expanded from macro 'this_cpu_add_8'
#define this_cpu_add_8(pcp, val) percpu_add_op((pcp), val)
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/percpu.h:130:31: note: expanded from macro 'percpu_add_op'
((val) == 1 || (val) == -1)) ? \
~~~ ^ ~~
In file included from drivers/input/touchscreen/ili210x.c:3:
In file included from include/linux/interrupt.h:12:
In file included from include/linux/hardirq.h:8:
In file included from arch/x86/include/asm/hardirq.h:5:
In file included from include/linux/irq.h:418:
In file included from arch/x86/include/asm/hw_irq.h:26:
In file included from arch/x86/include/asm/sections.h:5:
arch/x86/include/asm/uaccess.h:754:26: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (likely(sz < 0 || sz >= n))
~~ ^ ~
include/linux/compiler.h:181:40: note: expanded from macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
In file included from drivers/input/touchscreen/ili210x.c:3:
In file included from include/linux/interrupt.h:12:
In file included from include/linux/hardirq.h:8:
In file included from arch/x86/include/asm/hardirq.h:5:
In file included from include/linux/irq.h:418:
In file included from arch/x86/include/asm/hw_irq.h:26:
In file included from arch/x86/include/asm/sections.h:5:
arch/x86/include/asm/uaccess.h:772:26: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (likely(sz < 0 || sz >= n))
~~ ^ ~
include/linux/compiler.h:181:40: note: expanded from macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
4 warnings generated.
/tmp/ili210x-771426.s: Assembler messages:
>> /tmp/ili210x-771426.s:439: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'
/tmp/ili210x-771426.s:446: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'
/tmp/ili210x-771426.s:453: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[RFC PATCH] net: dsa: ksz8795: ksz8795_adjust_link() can be static
by kernel test robot
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
ksz8795.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c
index 09c1173cc6073c..834a8dc251adba 100644
--- a/drivers/net/dsa/microchip/ksz8795.c
+++ b/drivers/net/dsa/microchip/ksz8795.c
@@ -1111,7 +1111,7 @@ static int ksz8795_setup(struct dsa_switch *ds)
return 0;
}
-void ksz8795_adjust_link(struct dsa_switch *ds, int port,
+static void ksz8795_adjust_link(struct dsa_switch *ds, int port,
struct phy_device *phydev)
{
struct ksz_device *dev = ds->priv;
1 year, 8 months
[sashal-linux-stable:queue-4.4 11/12] /tmp/ili210x-955833.s:439: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.4
head: ea87f28c8a2166a018533545da435b6108457a85
commit: e2fc247f85fa0f3bf1412f4cf1b09395458199aa [11/12] scsi: libiscsi: Fix NOP race condition
config: x86_64-randconfig-a001-20201129 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project f502b14d40e751fe00afc493ef0d08f196524886)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-4.4
git checkout e2fc247f85fa0f3bf1412f4cf1b09395458199aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/input/touchscreen/ili210x.c:2:
In file included from include/linux/i2c.h:31:
In file included from include/linux/sched.h:61:
In file included from include/linux/cgroup-defs.h:16:
include/linux/percpu-refcount.h:177:3: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
this_cpu_add(*percpu_count, nr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:526:33: note: expanded from macro 'this_cpu_add'
#define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:397:11: note: expanded from macro '__pcpu_size_call'
case 8: stem##8(variable, __VA_ARGS__);break; \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:274:1: note: expanded from here
this_cpu_add_8
^
arch/x86/include/asm/percpu.h:478:35: note: expanded from macro 'this_cpu_add_8'
#define this_cpu_add_8(pcp, val) percpu_add_op((pcp), val)
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/percpu.h:130:31: note: expanded from macro 'percpu_add_op'
((val) == 1 || (val) == -1)) ? \
~~~ ^ ~~
In file included from drivers/input/touchscreen/ili210x.c:2:
In file included from include/linux/i2c.h:31:
In file included from include/linux/sched.h:61:
In file included from include/linux/cgroup-defs.h:16:
include/linux/percpu-refcount.h:276:3: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
this_cpu_sub(*percpu_count, nr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:536:33: note: expanded from macro 'this_cpu_sub'
#define this_cpu_sub(pcp, val) this_cpu_add(pcp, -(typeof(pcp))(val))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:526:33: note: expanded from macro 'this_cpu_add'
#define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:397:11: note: expanded from macro '__pcpu_size_call'
case 8: stem##8(variable, __VA_ARGS__);break; \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:157:1: note: expanded from here
this_cpu_add_8
^
arch/x86/include/asm/percpu.h:478:35: note: expanded from macro 'this_cpu_add_8'
#define this_cpu_add_8(pcp, val) percpu_add_op((pcp), val)
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/percpu.h:130:31: note: expanded from macro 'percpu_add_op'
((val) == 1 || (val) == -1)) ? \
~~~ ^ ~~
In file included from drivers/input/touchscreen/ili210x.c:3:
In file included from include/linux/interrupt.h:12:
In file included from include/linux/hardirq.h:8:
In file included from arch/x86/include/asm/hardirq.h:5:
In file included from include/linux/irq.h:418:
In file included from arch/x86/include/asm/hw_irq.h:26:
In file included from arch/x86/include/asm/sections.h:5:
arch/x86/include/asm/uaccess.h:754:26: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (likely(sz < 0 || sz >= n))
~~ ^ ~
include/linux/compiler.h:181:40: note: expanded from macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
In file included from drivers/input/touchscreen/ili210x.c:3:
In file included from include/linux/interrupt.h:12:
In file included from include/linux/hardirq.h:8:
In file included from arch/x86/include/asm/hardirq.h:5:
In file included from include/linux/irq.h:418:
In file included from arch/x86/include/asm/hw_irq.h:26:
In file included from arch/x86/include/asm/sections.h:5:
arch/x86/include/asm/uaccess.h:772:26: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (likely(sz < 0 || sz >= n))
~~ ^ ~
include/linux/compiler.h:181:40: note: expanded from macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
4 warnings generated.
/tmp/ili210x-955833.s: Assembler messages:
>> /tmp/ili210x-955833.s:439: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'
/tmp/ili210x-955833.s:446: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'
/tmp/ili210x-955833.s:453: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[hch-block:bi_bdev 55/58] drivers/md/raid1.c:1522:12: error: too many arguments to function call, expected 3, have 4
by kernel test robot
tree: git://git.infradead.org/users/hch/block.git bi_bdev
head: d3c9e59a154c5c7ffda0b882f9df002a6f47607c
commit: 853c94be8934b17884f9dee431436683b484c346 [55/58] block: remove the request_queue argument to the block_bio_remap tracepoint
config: arm-randconfig-r022-20201129 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project f502b14d40e751fe00afc493ef0d08f196524886)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git remote add hch-block git://git.infradead.org/users/hch/block.git
git fetch --no-tags hch-block bi_bdev
git checkout 853c94be8934b17884f9dee431436683b484c346
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/md/raid1.c:1522:12: error: too many arguments to function call, expected 3, have 4
r1_bio->sector);
^~~~~~~~~~~~~~
include/trace/events/block.h:460:1: note: 'trace_block_bio_remap' declared here
TRACE_EVENT(block_bio_remap,
^
include/linux/tracepoint.h:547:2: note: expanded from macro 'TRACE_EVENT'
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
^
include/linux/tracepoint.h:411:2: note: expanded from macro 'DECLARE_TRACE'
__DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
^
include/linux/tracepoint.h:334:21: note: expanded from macro '__DECLARE_TRACE'
static inline void trace_##name(proto) \
^
<scratch space>:11:1: note: expanded from here
trace_block_bio_remap
^
1 error generated.
--
>> drivers/md/raid5.c:5473:12: error: too many arguments to function call, expected 3, have 4
raid_bio->bi_iter.bi_sector);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/trace/events/block.h:460:1: note: 'trace_block_bio_remap' declared here
TRACE_EVENT(block_bio_remap,
^
include/linux/tracepoint.h:547:2: note: expanded from macro 'TRACE_EVENT'
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
^
include/linux/tracepoint.h:411:2: note: expanded from macro 'DECLARE_TRACE'
__DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
^
include/linux/tracepoint.h:334:21: note: expanded from macro '__DECLARE_TRACE'
static inline void trace_##name(proto) \
^
<scratch space>:12:1: note: expanded from here
trace_block_bio_remap
^
1 error generated.
vim +1522 drivers/md/raid1.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 1313
c230e7e53526c2 NeilBrown 2017-04-05 1314 static void raid1_write_request(struct mddev *mddev, struct bio *bio,
c230e7e53526c2 NeilBrown 2017-04-05 1315 int max_write_sectors)
3b046a97cbd35a Robert LeBlanc 2016-12-05 1316 {
3b046a97cbd35a Robert LeBlanc 2016-12-05 1317 struct r1conf *conf = mddev->private;
fd76863e37fef2 colyli(a)suse.de 2017-02-18 1318 struct r1bio *r1_bio;
3b046a97cbd35a Robert LeBlanc 2016-12-05 1319 int i, disks;
3b046a97cbd35a Robert LeBlanc 2016-12-05 1320 struct bitmap *bitmap = mddev->bitmap;
3b046a97cbd35a Robert LeBlanc 2016-12-05 1321 unsigned long flags;
3b046a97cbd35a Robert LeBlanc 2016-12-05 1322 struct md_rdev *blocked_rdev;
3b046a97cbd35a Robert LeBlanc 2016-12-05 1323 struct blk_plug_cb *cb;
3b046a97cbd35a Robert LeBlanc 2016-12-05 1324 struct raid1_plug_cb *plug = NULL;
3b046a97cbd35a Robert LeBlanc 2016-12-05 1325 int first_clone;
3b046a97cbd35a Robert LeBlanc 2016-12-05 1326 int max_sectors;
3b046a97cbd35a Robert LeBlanc 2016-12-05 1327
b3143b9a38d503 NeilBrown 2017-10-17 1328 if (mddev_is_clustered(mddev) &&
3b046a97cbd35a Robert LeBlanc 2016-12-05 1329 md_cluster_ops->area_resyncing(mddev, WRITE,
b3143b9a38d503 NeilBrown 2017-10-17 1330 bio->bi_iter.bi_sector, bio_end_sector(bio))) {
3b046a97cbd35a Robert LeBlanc 2016-12-05 1331
3b046a97cbd35a Robert LeBlanc 2016-12-05 1332 DEFINE_WAIT(w);
3b046a97cbd35a Robert LeBlanc 2016-12-05 1333 for (;;) {
3b046a97cbd35a Robert LeBlanc 2016-12-05 1334 prepare_to_wait(&conf->wait_barrier,
ae89fd3de4793c Mikulas Patocka 2017-10-18 1335 &w, TASK_IDLE);
f81f7302e86f5c Guoqing Jiang 2017-10-24 1336 if (!md_cluster_ops->area_resyncing(mddev, WRITE,
3b046a97cbd35a Robert LeBlanc 2016-12-05 1337 bio->bi_iter.bi_sector,
b3143b9a38d503 NeilBrown 2017-10-17 1338 bio_end_sector(bio)))
3b046a97cbd35a Robert LeBlanc 2016-12-05 1339 break;
3b046a97cbd35a Robert LeBlanc 2016-12-05 1340 schedule();
3b046a97cbd35a Robert LeBlanc 2016-12-05 1341 }
3b046a97cbd35a Robert LeBlanc 2016-12-05 1342 finish_wait(&conf->wait_barrier, &w);
3b046a97cbd35a Robert LeBlanc 2016-12-05 1343 }
f81f7302e86f5c Guoqing Jiang 2017-10-24 1344
f81f7302e86f5c Guoqing Jiang 2017-10-24 1345 /*
f81f7302e86f5c Guoqing Jiang 2017-10-24 1346 * Register the new request and wait if the reconstruction
f81f7302e86f5c Guoqing Jiang 2017-10-24 1347 * thread has put up a bar for new requests.
f81f7302e86f5c Guoqing Jiang 2017-10-24 1348 * Continue immediately if no resync is active currently.
f81f7302e86f5c Guoqing Jiang 2017-10-24 1349 */
fd76863e37fef2 colyli(a)suse.de 2017-02-18 1350 wait_barrier(conf, bio->bi_iter.bi_sector);
fd76863e37fef2 colyli(a)suse.de 2017-02-18 1351
689389a06ce79f NeilBrown 2017-04-05 1352 r1_bio = alloc_r1bio(mddev, bio);
c230e7e53526c2 NeilBrown 2017-04-05 1353 r1_bio->sectors = max_write_sectors;
3b046a97cbd35a Robert LeBlanc 2016-12-05 1354
34db0cd60f8a1f NeilBrown 2011-10-11 1355 if (conf->pending_count >= max_queued_requests) {
34db0cd60f8a1f NeilBrown 2011-10-11 1356 md_wakeup_thread(mddev->thread);
578b54ade8a5e0 NeilBrown 2016-11-14 1357 raid1_log(mddev, "wait queued");
34db0cd60f8a1f NeilBrown 2011-10-11 1358 wait_event(conf->wait_barrier,
34db0cd60f8a1f NeilBrown 2011-10-11 1359 conf->pending_count < max_queued_requests);
34db0cd60f8a1f NeilBrown 2011-10-11 1360 }
1f68f0c4b677cc NeilBrown 2011-07-28 1361 /* first select target devices under rcu_lock and
^1da177e4c3f41 Linus Torvalds 2005-04-16 1362 * inc refcount on their rdev. Record them by setting
^1da177e4c3f41 Linus Torvalds 2005-04-16 1363 * bios[x] to bio
1f68f0c4b677cc NeilBrown 2011-07-28 1364 * If there are known/acknowledged bad blocks on any device on
1f68f0c4b677cc NeilBrown 2011-07-28 1365 * which we have seen a write error, we want to avoid writing those
1f68f0c4b677cc NeilBrown 2011-07-28 1366 * blocks.
1f68f0c4b677cc NeilBrown 2011-07-28 1367 * This potentially requires several writes to write around
1f68f0c4b677cc NeilBrown 2011-07-28 1368 * the bad blocks. Each set of writes gets it's own r1bio
1f68f0c4b677cc NeilBrown 2011-07-28 1369 * with a set of bios attached.
^1da177e4c3f41 Linus Torvalds 2005-04-16 1370 */
c3b328ac846bcf NeilBrown 2011-04-18 1371
8f19ccb2fd70de NeilBrown 2011-12-23 1372 disks = conf->raid_disks * 2;
6bfe0b499082fd Dan Williams 2008-04-30 1373 retry_write:
6bfe0b499082fd Dan Williams 2008-04-30 1374 blocked_rdev = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1375 rcu_read_lock();
1f68f0c4b677cc NeilBrown 2011-07-28 1376 max_sectors = r1_bio->sectors;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1377 for (i = 0; i < disks; i++) {
3cb03002000f13 NeilBrown 2011-10-11 1378 struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev);
6bfe0b499082fd Dan Williams 2008-04-30 1379 if (rdev && unlikely(test_bit(Blocked, &rdev->flags))) {
6bfe0b499082fd Dan Williams 2008-04-30 1380 atomic_inc(&rdev->nr_pending);
6bfe0b499082fd Dan Williams 2008-04-30 1381 blocked_rdev = rdev;
6bfe0b499082fd Dan Williams 2008-04-30 1382 break;
6bfe0b499082fd Dan Williams 2008-04-30 1383 }
1f68f0c4b677cc NeilBrown 2011-07-28 1384 r1_bio->bios[i] = NULL;
8ae126660fddbe Kent Overstreet 2015-04-27 1385 if (!rdev || test_bit(Faulty, &rdev->flags)) {
8f19ccb2fd70de NeilBrown 2011-12-23 1386 if (i < conf->raid_disks)
1f68f0c4b677cc NeilBrown 2011-07-28 1387 set_bit(R1BIO_Degraded, &r1_bio->state);
1f68f0c4b677cc NeilBrown 2011-07-28 1388 continue;
1f68f0c4b677cc NeilBrown 2011-07-28 1389 }
1f68f0c4b677cc NeilBrown 2011-07-28 1390
^1da177e4c3f41 Linus Torvalds 2005-04-16 1391 atomic_inc(&rdev->nr_pending);
1f68f0c4b677cc NeilBrown 2011-07-28 1392 if (test_bit(WriteErrorSeen, &rdev->flags)) {
1f68f0c4b677cc NeilBrown 2011-07-28 1393 sector_t first_bad;
1f68f0c4b677cc NeilBrown 2011-07-28 1394 int bad_sectors;
1f68f0c4b677cc NeilBrown 2011-07-28 1395 int is_bad;
1f68f0c4b677cc NeilBrown 2011-07-28 1396
3b046a97cbd35a Robert LeBlanc 2016-12-05 1397 is_bad = is_badblock(rdev, r1_bio->sector, max_sectors,
1f68f0c4b677cc NeilBrown 2011-07-28 1398 &first_bad, &bad_sectors);
1f68f0c4b677cc NeilBrown 2011-07-28 1399 if (is_bad < 0) {
1f68f0c4b677cc NeilBrown 2011-07-28 1400 /* mustn't write here until the bad block is
1f68f0c4b677cc NeilBrown 2011-07-28 1401 * acknowledged*/
1f68f0c4b677cc NeilBrown 2011-07-28 1402 set_bit(BlockedBadBlocks, &rdev->flags);
1f68f0c4b677cc NeilBrown 2011-07-28 1403 blocked_rdev = rdev;
1f68f0c4b677cc NeilBrown 2011-07-28 1404 break;
1f68f0c4b677cc NeilBrown 2011-07-28 1405 }
1f68f0c4b677cc NeilBrown 2011-07-28 1406 if (is_bad && first_bad <= r1_bio->sector) {
1f68f0c4b677cc NeilBrown 2011-07-28 1407 /* Cannot write here at all */
1f68f0c4b677cc NeilBrown 2011-07-28 1408 bad_sectors -= (r1_bio->sector - first_bad);
1f68f0c4b677cc NeilBrown 2011-07-28 1409 if (bad_sectors < max_sectors)
1f68f0c4b677cc NeilBrown 2011-07-28 1410 /* mustn't write more than bad_sectors
1f68f0c4b677cc NeilBrown 2011-07-28 1411 * to other devices yet
1f68f0c4b677cc NeilBrown 2011-07-28 1412 */
1f68f0c4b677cc NeilBrown 2011-07-28 1413 max_sectors = bad_sectors;
03c902e17f40cf NeilBrown 2006-01-06 1414 rdev_dec_pending(rdev, mddev);
1f68f0c4b677cc NeilBrown 2011-07-28 1415 /* We don't set R1BIO_Degraded as that
1f68f0c4b677cc NeilBrown 2011-07-28 1416 * only applies if the disk is
1f68f0c4b677cc NeilBrown 2011-07-28 1417 * missing, so it might be re-added,
1f68f0c4b677cc NeilBrown 2011-07-28 1418 * and we want to know to recover this
1f68f0c4b677cc NeilBrown 2011-07-28 1419 * chunk.
1f68f0c4b677cc NeilBrown 2011-07-28 1420 * In this case the device is here,
1f68f0c4b677cc NeilBrown 2011-07-28 1421 * and the fact that this chunk is not
1f68f0c4b677cc NeilBrown 2011-07-28 1422 * in-sync is recorded in the bad
1f68f0c4b677cc NeilBrown 2011-07-28 1423 * block log
1f68f0c4b677cc NeilBrown 2011-07-28 1424 */
1f68f0c4b677cc NeilBrown 2011-07-28 1425 continue;
964147d5c86d63 NeilBrown 2010-05-18 1426 }
1f68f0c4b677cc NeilBrown 2011-07-28 1427 if (is_bad) {
1f68f0c4b677cc NeilBrown 2011-07-28 1428 int good_sectors = first_bad - r1_bio->sector;
1f68f0c4b677cc NeilBrown 2011-07-28 1429 if (good_sectors < max_sectors)
1f68f0c4b677cc NeilBrown 2011-07-28 1430 max_sectors = good_sectors;
1f68f0c4b677cc NeilBrown 2011-07-28 1431 }
1f68f0c4b677cc NeilBrown 2011-07-28 1432 }
1f68f0c4b677cc NeilBrown 2011-07-28 1433 r1_bio->bios[i] = bio;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1434 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1435 rcu_read_unlock();
^1da177e4c3f41 Linus Torvalds 2005-04-16 1436
6bfe0b499082fd Dan Williams 2008-04-30 1437 if (unlikely(blocked_rdev)) {
6bfe0b499082fd Dan Williams 2008-04-30 1438 /* Wait for this device to become unblocked */
6bfe0b499082fd Dan Williams 2008-04-30 1439 int j;
6bfe0b499082fd Dan Williams 2008-04-30 1440
6bfe0b499082fd Dan Williams 2008-04-30 1441 for (j = 0; j < i; j++)
6bfe0b499082fd Dan Williams 2008-04-30 1442 if (r1_bio->bios[j])
6bfe0b499082fd Dan Williams 2008-04-30 1443 rdev_dec_pending(conf->mirrors[j].rdev, mddev);
1f68f0c4b677cc NeilBrown 2011-07-28 1444 r1_bio->state = 0;
fd76863e37fef2 colyli(a)suse.de 2017-02-18 1445 allow_barrier(conf, bio->bi_iter.bi_sector);
578b54ade8a5e0 NeilBrown 2016-11-14 1446 raid1_log(mddev, "wait rdev %d blocked", blocked_rdev->raid_disk);
6bfe0b499082fd Dan Williams 2008-04-30 1447 md_wait_for_blocked_rdev(blocked_rdev, mddev);
fd76863e37fef2 colyli(a)suse.de 2017-02-18 1448 wait_barrier(conf, bio->bi_iter.bi_sector);
6bfe0b499082fd Dan Williams 2008-04-30 1449 goto retry_write;
6bfe0b499082fd Dan Williams 2008-04-30 1450 }
6bfe0b499082fd Dan Williams 2008-04-30 1451
c230e7e53526c2 NeilBrown 2017-04-05 1452 if (max_sectors < bio_sectors(bio)) {
c230e7e53526c2 NeilBrown 2017-04-05 1453 struct bio *split = bio_split(bio, max_sectors,
afeee514ce7f4c Kent Overstreet 2018-05-20 1454 GFP_NOIO, &conf->bio_split);
c230e7e53526c2 NeilBrown 2017-04-05 1455 bio_chain(split, bio);
ed00aabd5eb9fb Christoph Hellwig 2020-07-01 1456 submit_bio_noacct(bio);
c230e7e53526c2 NeilBrown 2017-04-05 1457 bio = split;
c230e7e53526c2 NeilBrown 2017-04-05 1458 r1_bio->master_bio = bio;
1f68f0c4b677cc NeilBrown 2011-07-28 1459 r1_bio->sectors = max_sectors;
191ea9b2c7cc3e NeilBrown 2005-06-21 1460 }
4b6d287f627b5f NeilBrown 2005-09-09 1461
4e78064f42ad47 NeilBrown 2010-10-19 1462 atomic_set(&r1_bio->remaining, 1);
4b6d287f627b5f NeilBrown 2005-09-09 1463 atomic_set(&r1_bio->behind_remaining, 0);
06d91a5fe0b50c NeilBrown 2005-06-21 1464
1f68f0c4b677cc NeilBrown 2011-07-28 1465 first_clone = 1;
d8c84c4f8becc1 Ming Lei 2017-03-17 1466
^1da177e4c3f41 Linus Torvalds 2005-04-16 1467 for (i = 0; i < disks; i++) {
8e58e327e25c7f Ming Lei 2017-02-14 1468 struct bio *mbio = NULL;
69df9cfc70421f Guoqing Jiang 2019-12-23 1469 struct md_rdev *rdev = conf->mirrors[i].rdev;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1470 if (!r1_bio->bios[i])
^1da177e4c3f41 Linus Torvalds 2005-04-16 1471 continue;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1472
1f68f0c4b677cc NeilBrown 2011-07-28 1473 if (first_clone) {
1f68f0c4b677cc NeilBrown 2011-07-28 1474 /* do behind I/O ?
1f68f0c4b677cc NeilBrown 2011-07-28 1475 * Not if there are too many, or cannot
1f68f0c4b677cc NeilBrown 2011-07-28 1476 * allocate memory, or a reader on WriteMostly
1f68f0c4b677cc NeilBrown 2011-07-28 1477 * is waiting for behind writes to flush */
1f68f0c4b677cc NeilBrown 2011-07-28 1478 if (bitmap &&
1f68f0c4b677cc NeilBrown 2011-07-28 1479 (atomic_read(&bitmap->behind_writes)
1f68f0c4b677cc NeilBrown 2011-07-28 1480 < mddev->bitmap_info.max_write_behind) &&
8e58e327e25c7f Ming Lei 2017-02-14 1481 !waitqueue_active(&bitmap->behind_wait)) {
16d56e2fcc1fc1 Shaohua Li 2017-07-17 1482 alloc_behind_master_bio(r1_bio, bio);
8e58e327e25c7f Ming Lei 2017-02-14 1483 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1484
e64e4018d57271 Andy Shevchenko 2018-08-01 1485 md_bitmap_startwrite(bitmap, r1_bio->sector, r1_bio->sectors,
e64e4018d57271 Andy Shevchenko 2018-08-01 1486 test_bit(R1BIO_BehindIO, &r1_bio->state));
1f68f0c4b677cc NeilBrown 2011-07-28 1487 first_clone = 0;
1f68f0c4b677cc NeilBrown 2011-07-28 1488 }
8e58e327e25c7f Ming Lei 2017-02-14 1489
841c1316c7da61 Ming Lei 2017-03-17 1490 if (r1_bio->behind_master_bio)
841c1316c7da61 Ming Lei 2017-03-17 1491 mbio = bio_clone_fast(r1_bio->behind_master_bio,
afeee514ce7f4c Kent Overstreet 2018-05-20 1492 GFP_NOIO, &mddev->bio_set);
c230e7e53526c2 NeilBrown 2017-04-05 1493 else
afeee514ce7f4c Kent Overstreet 2018-05-20 1494 mbio = bio_clone_fast(bio, GFP_NOIO, &mddev->bio_set);
8e58e327e25c7f Ming Lei 2017-02-14 1495
841c1316c7da61 Ming Lei 2017-03-17 1496 if (r1_bio->behind_master_bio) {
69df9cfc70421f Guoqing Jiang 2019-12-23 1497 if (test_bit(CollisionCheck, &rdev->flags))
d0d2d8ba049465 Guoqing Jiang 2019-12-23 1498 wait_for_serialization(rdev, r1_bio);
3e148a3209792e Guoqing Jiang 2019-06-19 1499 if (test_bit(WriteMostly, &rdev->flags))
4b6d287f627b5f NeilBrown 2005-09-09 1500 atomic_inc(&r1_bio->behind_remaining);
69df9cfc70421f Guoqing Jiang 2019-12-23 1501 } else if (mddev->serialize_policy)
d0d2d8ba049465 Guoqing Jiang 2019-12-23 1502 wait_for_serialization(rdev, r1_bio);
4b6d287f627b5f NeilBrown 2005-09-09 1503
1f68f0c4b677cc NeilBrown 2011-07-28 1504 r1_bio->bios[i] = mbio;
1f68f0c4b677cc NeilBrown 2011-07-28 1505
4f024f3797c43c Kent Overstreet 2013-10-11 1506 mbio->bi_iter.bi_sector = (r1_bio->sector +
1f68f0c4b677cc NeilBrown 2011-07-28 1507 conf->mirrors[i].rdev->data_offset);
74d46992e0d9de Christoph Hellwig 2017-08-23 1508 bio_set_dev(mbio, conf->mirrors[i].rdev->bdev);
1f68f0c4b677cc NeilBrown 2011-07-28 1509 mbio->bi_end_io = raid1_end_write_request;
a682e0035494c4 Linus Torvalds 2017-02-24 1510 mbio->bi_opf = bio_op(bio) | (bio->bi_opf & (REQ_SYNC | REQ_FUA));
212e7eb7a34034 NeilBrown 2016-11-18 1511 if (test_bit(FailFast, &conf->mirrors[i].rdev->flags) &&
212e7eb7a34034 NeilBrown 2016-11-18 1512 !test_bit(WriteMostly, &conf->mirrors[i].rdev->flags) &&
212e7eb7a34034 NeilBrown 2016-11-18 1513 conf->raid_disks - mddev->degraded > 1)
212e7eb7a34034 NeilBrown 2016-11-18 1514 mbio->bi_opf |= MD_FAILFAST;
1f68f0c4b677cc NeilBrown 2011-07-28 1515 mbio->bi_private = r1_bio;
1f68f0c4b677cc NeilBrown 2011-07-28 1516
^1da177e4c3f41 Linus Torvalds 2005-04-16 1517 atomic_inc(&r1_bio->remaining);
f54a9d0e59c4be NeilBrown 2012-08-02 1518
109e37653033a5 NeilBrown 2016-11-18 1519 if (mddev->gendisk)
74d46992e0d9de Christoph Hellwig 2017-08-23 1520 trace_block_bio_remap(mbio->bi_disk->queue,
109e37653033a5 NeilBrown 2016-11-18 1521 mbio, disk_devt(mddev->gendisk),
109e37653033a5 NeilBrown 2016-11-18 @1522 r1_bio->sector);
109e37653033a5 NeilBrown 2016-11-18 1523 /* flush_pending_writes() needs access to the rdev so...*/
74d46992e0d9de Christoph Hellwig 2017-08-23 1524 mbio->bi_disk = (void *)conf->mirrors[i].rdev;
109e37653033a5 NeilBrown 2016-11-18 1525
f54a9d0e59c4be NeilBrown 2012-08-02 1526 cb = blk_check_plugged(raid1_unplug, mddev, sizeof(*plug));
f54a9d0e59c4be NeilBrown 2012-08-02 1527 if (cb)
f54a9d0e59c4be NeilBrown 2012-08-02 1528 plug = container_of(cb, struct raid1_plug_cb, cb);
f54a9d0e59c4be NeilBrown 2012-08-02 1529 else
f54a9d0e59c4be NeilBrown 2012-08-02 1530 plug = NULL;
f54a9d0e59c4be NeilBrown 2012-08-02 1531 if (plug) {
f54a9d0e59c4be NeilBrown 2012-08-02 1532 bio_list_add(&plug->pending, mbio);
f54a9d0e59c4be NeilBrown 2012-08-02 1533 plug->pending_cnt++;
f54a9d0e59c4be NeilBrown 2012-08-02 1534 } else {
23b245c04d0ef4 Shaohua Li 2017-05-10 1535 spin_lock_irqsave(&conf->device_lock, flags);
4e78064f42ad47 NeilBrown 2010-10-19 1536 bio_list_add(&conf->pending_bio_list, mbio);
34db0cd60f8a1f NeilBrown 2011-10-11 1537 conf->pending_count++;
191ea9b2c7cc3e NeilBrown 2005-06-21 1538 spin_unlock_irqrestore(&conf->device_lock, flags);
b357f04a67c2ae NeilBrown 2012-07-03 1539 md_wakeup_thread(mddev->thread);
4e78064f42ad47 NeilBrown 2010-10-19 1540 }
23b245c04d0ef4 Shaohua Li 2017-05-10 1541 }
1f68f0c4b677cc NeilBrown 2011-07-28 1542
079fa166a28749 NeilBrown 2011-09-10 1543 r1_bio_write_done(r1_bio);
079fa166a28749 NeilBrown 2011-09-10 1544
079fa166a28749 NeilBrown 2011-09-10 1545 /* In case raid1d snuck in to freeze_array */
079fa166a28749 NeilBrown 2011-09-10 1546 wake_up(&conf->wait_barrier);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1547 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1548
:::::: The code at line 1522 was first introduced by commit
:::::: 109e37653033a5fcd3bf8cab0ed6a7ff433f758a md: add block tracing for bio_remapping
:::::: TO: NeilBrown <neilb(a)suse.com>
:::::: CC: Shaohua Li <shli(a)fb.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[luto:x86/fixes 12/12] kernel/sched/membarrier.c:445:1: warning: attribute declaration must precede definition
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git x86/fixes
head: ebb44931654e78d649537beccf31b880a3381866
commit: ebb44931654e78d649537beccf31b880a3381866 [12/12] membarrier: Propagate SYNC_CORE and RSEQ actions more carefully
config: x86_64-randconfig-a005-20201129 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project f502b14d40e751fe00afc493ef0d08f196524886)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?id...
git remote add luto https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git
git fetch --no-tags luto x86/fixes
git checkout ebb44931654e78d649537beccf31b880a3381866
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel/sched/membarrier.c:264:13: error: too few arguments to function call, expected 1, have 0
ipi_func();
~~~~~~~~ ^
kernel/sched/membarrier.c:277:4: error: expected expression
} else {
^
kernel/sched/membarrier.c:290:1: error: function definition is not allowed here
{
^
kernel/sched/membarrier.c:349:1: error: function definition is not allowed here
{
^
kernel/sched/membarrier.c:368:1: error: function definition is not allowed here
{
^
kernel/sched/membarrier.c:445:1: error: redefinition of '__syscall_meta__membarrier'
SYSCALL_DEFINE3(membarrier, int, cmd, unsigned int, flags, int, cpu_id)
^
include/linux/syscalls.h:215:36: note: expanded from macro 'SYSCALL_DEFINE3'
#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
^
include/linux/syscalls.h:223:2: note: expanded from macro 'SYSCALL_DEFINEx'
SYSCALL_METADATA(sname, x, __VA_ARGS__) \
^
include/linux/syscalls.h:174:2: note: expanded from macro 'SYSCALL_METADATA'
SYSCALL_TRACE_EXIT_EVENT(sname); \
^
include/linux/syscalls.h:151:33: note: expanded from macro 'SYSCALL_TRACE_EXIT_EVENT'
static struct syscall_metadata __syscall_meta_##sname; \
^
<scratch space>:79:1: note: expanded from here
__syscall_meta__membarrier
^
kernel/sched/membarrier.c:445:1: note: previous definition is here
include/linux/syscalls.h:215:36: note: expanded from macro 'SYSCALL_DEFINE3'
#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
^
include/linux/syscalls.h:223:2: note: expanded from macro 'SYSCALL_DEFINEx'
SYSCALL_METADATA(sname, x, __VA_ARGS__) \
^
include/linux/syscalls.h:173:2: note: expanded from macro 'SYSCALL_METADATA'
SYSCALL_TRACE_ENTER_EVENT(sname); \
^
include/linux/syscalls.h:135:33: note: expanded from macro 'SYSCALL_TRACE_ENTER_EVENT'
static struct syscall_metadata __syscall_meta_##sname; \
^
<scratch space>:73:1: note: expanded from here
__syscall_meta__membarrier
^
>> kernel/sched/membarrier.c:445:1: warning: attribute declaration must precede definition [-Wignored-attributes]
SYSCALL_DEFINE3(membarrier, int, cmd, unsigned int, flags, int, cpu_id)
^
include/linux/syscalls.h:215:36: note: expanded from macro 'SYSCALL_DEFINE3'
#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
^
include/linux/syscalls.h:223:2: note: expanded from macro 'SYSCALL_DEFINEx'
SYSCALL_METADATA(sname, x, __VA_ARGS__) \
^
include/linux/syscalls.h:175:33: note: expanded from macro 'SYSCALL_METADATA'
static struct syscall_metadata __used \
^
include/linux/compiler_attributes.h:273:56: note: expanded from macro '__used'
#define __used __attribute__((__used__))
^
kernel/sched/membarrier.c:445:1: note: previous definition is here
include/linux/syscalls.h:215:36: note: expanded from macro 'SYSCALL_DEFINE3'
#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
^
include/linux/syscalls.h:223:2: note: expanded from macro 'SYSCALL_DEFINEx'
SYSCALL_METADATA(sname, x, __VA_ARGS__) \
^
include/linux/syscalls.h:173:2: note: expanded from macro 'SYSCALL_METADATA'
SYSCALL_TRACE_ENTER_EVENT(sname); \
^
include/linux/syscalls.h:135:33: note: expanded from macro 'SYSCALL_TRACE_ENTER_EVENT'
static struct syscall_metadata __syscall_meta_##sname; \
^
<scratch space>:73:1: note: expanded from here
__syscall_meta__membarrier
^
kernel/sched/membarrier.c:445:1: error: redefinition of '__syscall_meta__membarrier'
SYSCALL_DEFINE3(membarrier, int, cmd, unsigned int, flags, int, cpu_id)
^
include/linux/syscalls.h:215:36: note: expanded from macro 'SYSCALL_DEFINE3'
#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
^
include/linux/syscalls.h:223:2: note: expanded from macro 'SYSCALL_DEFINEx'
SYSCALL_METADATA(sname, x, __VA_ARGS__) \
^
include/linux/syscalls.h:176:4: note: expanded from macro 'SYSCALL_METADATA'
__syscall_meta_##sname = { \
^
<scratch space>:84:1: note: expanded from here
__syscall_meta__membarrier
^
kernel/sched/membarrier.c:445:1: note: previous definition is here
include/linux/syscalls.h:215:36: note: expanded from macro 'SYSCALL_DEFINE3'
#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
^
include/linux/syscalls.h:223:2: note: expanded from macro 'SYSCALL_DEFINEx'
SYSCALL_METADATA(sname, x, __VA_ARGS__) \
^
include/linux/syscalls.h:173:2: note: expanded from macro 'SYSCALL_METADATA'
SYSCALL_TRACE_ENTER_EVENT(sname); \
^
include/linux/syscalls.h:135:33: note: expanded from macro 'SYSCALL_TRACE_ENTER_EVENT'
static struct syscall_metadata __syscall_meta_##sname; \
^
<scratch space>:73:1: note: expanded from here
__syscall_meta__membarrier
^
kernel/sched/membarrier.c:445:1: error: function declared in block scope cannot have 'static' storage class
SYSCALL_DEFINE3(membarrier, int, cmd, unsigned int, flags, int, cpu_id)
^
include/linux/syscalls.h:215:36: note: expanded from macro 'SYSCALL_DEFINE3'
#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
^
include/linux/syscalls.h:224:2: note: expanded from macro 'SYSCALL_DEFINEx'
__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
^
arch/x86/include/asm/syscall_wrapper.h:228:2: note: expanded from macro '__SYSCALL_DEFINEx'
static long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
^
kernel/sched/membarrier.c:445:1: error: function declared in block scope cannot have 'static' storage class
include/linux/syscalls.h:215:36: note: expanded from macro 'SYSCALL_DEFINE3'
#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
^
include/linux/syscalls.h:224:2: note: expanded from macro 'SYSCALL_DEFINEx'
__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
^
arch/x86/include/asm/syscall_wrapper.h:229:2: note: expanded from macro '__SYSCALL_DEFINEx'
static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\
^
kernel/sched/membarrier.c:445:1: error: function definition is not allowed here
include/linux/syscalls.h:215:36: note: expanded from macro 'SYSCALL_DEFINE3'
#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
^
include/linux/syscalls.h:224:2: note: expanded from macro 'SYSCALL_DEFINEx'
__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
^
arch/x86/include/asm/syscall_wrapper.h:230:2: note: expanded from macro '__SYSCALL_DEFINEx'
__X64_SYS_STUBx(x, name, __VA_ARGS__) \
^
arch/x86/include/asm/syscall_wrapper.h:96:2: note: expanded from macro '__X64_SYS_STUBx'
__SYS_STUBx(x64, sys##name, \
^
arch/x86/include/asm/syscall_wrapper.h:78:2: note: expanded from macro '__SYS_STUBx'
{ \
^
kernel/sched/membarrier.c:445:1: error: function definition is not allowed here
vim +445 kernel/sched/membarrier.c
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 408
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 409 /**
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 410 * sys_membarrier - issue memory barriers on a set of threads
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 411 * @cmd: Takes command values defined in enum membarrier_cmd.
2a36ab717e8fe67 Peter Oskolkov 2020-09-23 412 * @flags: Currently needs to be 0 for all commands other than
2a36ab717e8fe67 Peter Oskolkov 2020-09-23 413 * MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ: in the latter
2a36ab717e8fe67 Peter Oskolkov 2020-09-23 414 * case it can be MEMBARRIER_CMD_FLAG_CPU, indicating that @cpu_id
2a36ab717e8fe67 Peter Oskolkov 2020-09-23 415 * contains the CPU on which to interrupt (= restart)
2a36ab717e8fe67 Peter Oskolkov 2020-09-23 416 * the RSEQ critical section.
2a36ab717e8fe67 Peter Oskolkov 2020-09-23 417 * @cpu_id: if @flags == MEMBARRIER_CMD_FLAG_CPU, indicates the cpu on which
2a36ab717e8fe67 Peter Oskolkov 2020-09-23 418 * RSEQ CS should be interrupted (@cmd must be
2a36ab717e8fe67 Peter Oskolkov 2020-09-23 419 * MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ).
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 420 *
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 421 * If this system call is not implemented, -ENOSYS is returned. If the
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 422 * command specified does not exist, not available on the running
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 423 * kernel, or if the command argument is invalid, this system call
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 424 * returns -EINVAL. For a given command, with flags argument set to 0,
227a4aadc75ba22 Mathieu Desnoyers 2019-09-19 425 * if this system call returns -ENOSYS or -EINVAL, it is guaranteed to
227a4aadc75ba22 Mathieu Desnoyers 2019-09-19 426 * always return the same value until reboot. In addition, it can return
227a4aadc75ba22 Mathieu Desnoyers 2019-09-19 427 * -ENOMEM if there is not enough memory available to perform the system
227a4aadc75ba22 Mathieu Desnoyers 2019-09-19 428 * call.
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 429 *
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 430 * All memory accesses performed in program order from each targeted thread
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 431 * is guaranteed to be ordered with respect to sys_membarrier(). If we use
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 432 * the semantic "barrier()" to represent a compiler barrier forcing memory
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 433 * accesses to be performed in program order across the barrier, and
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 434 * smp_mb() to represent explicit memory barriers forcing full memory
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 435 * ordering across the barrier, we have the following ordering table for
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 436 * each pair of barrier(), sys_membarrier() and smp_mb():
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 437 *
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 438 * The pair ordering is detailed as (O: ordered, X: not ordered):
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 439 *
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 440 * barrier() smp_mb() sys_membarrier()
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 441 * barrier() X X O
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 442 * smp_mb() X O O
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 443 * sys_membarrier() O O O
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 444 */
2a36ab717e8fe67 Peter Oskolkov 2020-09-23 @445 SYSCALL_DEFINE3(membarrier, int, cmd, unsigned int, flags, int, cpu_id)
:::::: The code at line 445 was first introduced by commit
:::::: 2a36ab717e8fe678d98f81c14a0b124712719840 rseq/membarrier: Add MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ
:::::: TO: Peter Oskolkov <posk(a)google.com>
:::::: CC: Peter Zijlstra <peterz(a)infradead.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[luto:x86/fixes 12/12] kernel/sched/membarrier.c:445:1: warning: ISO C90 forbids mixing declarations and code
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git x86/fixes
head: ebb44931654e78d649537beccf31b880a3381866
commit: ebb44931654e78d649537beccf31b880a3381866 [12/12] membarrier: Propagate SYNC_CORE and RSEQ actions more carefully
config: x86_64-randconfig-a006-20201129 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project f502b14d40e751fe00afc493ef0d08f196524886)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?id...
git remote add luto https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git
git fetch --no-tags luto x86/fixes
git checkout ebb44931654e78d649537beccf31b880a3381866
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel/sched/membarrier.c:264:13: error: too few arguments to function call, expected 1, have 0
ipi_func();
~~~~~~~~ ^
kernel/sched/membarrier.c:277:4: error: expected expression
} else {
^
kernel/sched/membarrier.c:290:1: error: function definition is not allowed here
{
^
kernel/sched/membarrier.c:349:1: error: function definition is not allowed here
{
^
kernel/sched/membarrier.c:368:1: error: function definition is not allowed here
{
^
kernel/sched/membarrier.c:445:1: error: function declared in block scope cannot have 'static' storage class
SYSCALL_DEFINE3(membarrier, int, cmd, unsigned int, flags, int, cpu_id)
^
include/linux/syscalls.h:215:36: note: expanded from macro 'SYSCALL_DEFINE3'
#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
^
include/linux/syscalls.h:224:2: note: expanded from macro 'SYSCALL_DEFINEx'
__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
^
arch/x86/include/asm/syscall_wrapper.h:228:2: note: expanded from macro '__SYSCALL_DEFINEx'
static long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
^
kernel/sched/membarrier.c:445:1: error: function declared in block scope cannot have 'static' storage class
include/linux/syscalls.h:215:36: note: expanded from macro 'SYSCALL_DEFINE3'
#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
^
include/linux/syscalls.h:224:2: note: expanded from macro 'SYSCALL_DEFINEx'
__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
^
arch/x86/include/asm/syscall_wrapper.h:229:2: note: expanded from macro '__SYSCALL_DEFINEx'
static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\
^
kernel/sched/membarrier.c:445:1: error: function definition is not allowed here
include/linux/syscalls.h:215:36: note: expanded from macro 'SYSCALL_DEFINE3'
#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
^
include/linux/syscalls.h:224:2: note: expanded from macro 'SYSCALL_DEFINEx'
__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
^
arch/x86/include/asm/syscall_wrapper.h:230:2: note: expanded from macro '__SYSCALL_DEFINEx'
__X64_SYS_STUBx(x, name, __VA_ARGS__) \
^
arch/x86/include/asm/syscall_wrapper.h:96:2: note: expanded from macro '__X64_SYS_STUBx'
__SYS_STUBx(x64, sys##name, \
^
arch/x86/include/asm/syscall_wrapper.h:78:2: note: expanded from macro '__SYS_STUBx'
{ \
^
kernel/sched/membarrier.c:445:1: error: function definition is not allowed here
include/linux/syscalls.h:215:36: note: expanded from macro 'SYSCALL_DEFINE3'
#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
^
include/linux/syscalls.h:224:2: note: expanded from macro 'SYSCALL_DEFINEx'
__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
^
arch/x86/include/asm/syscall_wrapper.h:231:2: note: expanded from macro '__SYSCALL_DEFINEx'
__IA32_SYS_STUBx(x, name, __VA_ARGS__) \
^
arch/x86/include/asm/syscall_wrapper.h:116:2: note: expanded from macro '__IA32_SYS_STUBx'
__SYS_STUBx(ia32, sys##name, \
^
arch/x86/include/asm/syscall_wrapper.h:78:2: note: expanded from macro '__SYS_STUBx'
{ \
^
kernel/sched/membarrier.c:445:1: error: function definition is not allowed here
include/linux/syscalls.h:215:36: note: expanded from macro 'SYSCALL_DEFINE3'
#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
^
include/linux/syscalls.h:224:2: note: expanded from macro 'SYSCALL_DEFINEx'
__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
^
arch/x86/include/asm/syscall_wrapper.h:233:2: note: expanded from macro '__SYSCALL_DEFINEx'
{ \
^
kernel/sched/membarrier.c:446:1: error: function definition is not allowed here
{
^
kernel/sched/membarrier.c:495:2: error: expected '}'
}
^
kernel/sched/membarrier.c:159:1: note: to match this '{'
{
^
>> kernel/sched/membarrier.c:445:1: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
SYSCALL_DEFINE3(membarrier, int, cmd, unsigned int, flags, int, cpu_id)
^
include/linux/syscalls.h:215:36: note: expanded from macro 'SYSCALL_DEFINE3'
#define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
^
include/linux/syscalls.h:224:2: note: expanded from macro 'SYSCALL_DEFINEx'
__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
^
arch/x86/include/asm/syscall_wrapper.h:228:14: note: expanded from macro '__SYSCALL_DEFINEx'
static long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
^
<scratch space>:226:1: note: expanded from here
__se_sys_membarrier
^
kernel/sched/membarrier.c:239:9: error: use of undeclared label 'out'
goto out;
^
1 warning and 13 errors generated.
vim +445 kernel/sched/membarrier.c
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 408
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 409 /**
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 410 * sys_membarrier - issue memory barriers on a set of threads
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 411 * @cmd: Takes command values defined in enum membarrier_cmd.
2a36ab717e8fe67 Peter Oskolkov 2020-09-23 412 * @flags: Currently needs to be 0 for all commands other than
2a36ab717e8fe67 Peter Oskolkov 2020-09-23 413 * MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ: in the latter
2a36ab717e8fe67 Peter Oskolkov 2020-09-23 414 * case it can be MEMBARRIER_CMD_FLAG_CPU, indicating that @cpu_id
2a36ab717e8fe67 Peter Oskolkov 2020-09-23 415 * contains the CPU on which to interrupt (= restart)
2a36ab717e8fe67 Peter Oskolkov 2020-09-23 416 * the RSEQ critical section.
2a36ab717e8fe67 Peter Oskolkov 2020-09-23 417 * @cpu_id: if @flags == MEMBARRIER_CMD_FLAG_CPU, indicates the cpu on which
2a36ab717e8fe67 Peter Oskolkov 2020-09-23 418 * RSEQ CS should be interrupted (@cmd must be
2a36ab717e8fe67 Peter Oskolkov 2020-09-23 419 * MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ).
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 420 *
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 421 * If this system call is not implemented, -ENOSYS is returned. If the
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 422 * command specified does not exist, not available on the running
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 423 * kernel, or if the command argument is invalid, this system call
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 424 * returns -EINVAL. For a given command, with flags argument set to 0,
227a4aadc75ba22 Mathieu Desnoyers 2019-09-19 425 * if this system call returns -ENOSYS or -EINVAL, it is guaranteed to
227a4aadc75ba22 Mathieu Desnoyers 2019-09-19 426 * always return the same value until reboot. In addition, it can return
227a4aadc75ba22 Mathieu Desnoyers 2019-09-19 427 * -ENOMEM if there is not enough memory available to perform the system
227a4aadc75ba22 Mathieu Desnoyers 2019-09-19 428 * call.
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 429 *
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 430 * All memory accesses performed in program order from each targeted thread
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 431 * is guaranteed to be ordered with respect to sys_membarrier(). If we use
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 432 * the semantic "barrier()" to represent a compiler barrier forcing memory
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 433 * accesses to be performed in program order across the barrier, and
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 434 * smp_mb() to represent explicit memory barriers forcing full memory
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 435 * ordering across the barrier, we have the following ordering table for
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 436 * each pair of barrier(), sys_membarrier() and smp_mb():
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 437 *
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 438 * The pair ordering is detailed as (O: ordered, X: not ordered):
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 439 *
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 440 * barrier() smp_mb() sys_membarrier()
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 441 * barrier() X X O
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 442 * smp_mb() X O O
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 443 * sys_membarrier() O O O
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 444 */
2a36ab717e8fe67 Peter Oskolkov 2020-09-23 @445 SYSCALL_DEFINE3(membarrier, int, cmd, unsigned int, flags, int, cpu_id)
22e4ebb97582283 Mathieu Desnoyers 2017-07-28 @446 {
:::::: The code at line 445 was first introduced by commit
:::::: 2a36ab717e8fe678d98f81c14a0b124712719840 rseq/membarrier: Add MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ
:::::: TO: Peter Oskolkov <posk(a)google.com>
:::::: CC: Peter Zijlstra <peterz(a)infradead.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
mapping.c:undefined reference to `phys_to_dma'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: aae5ab854e38151e69f261dbf0e3b7e396403178
commit: 5ceda74093a5c1c3f42a02b894df031f3bbc9af1 dma-direct: rename and cleanup __phys_to_dma
date: 3 months ago
config: mips-randconfig-r031-20201129 (attached as .config)
compiler: mips64-linux-gcc (GCC) 9.3.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...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 5ceda74093a5c1c3f42a02b894df031f3bbc9af1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
mips64-linux-ld: kernel/dma/mapping.o: in function `dma_map_page_attrs':
>> mapping.c:(.text+0x10c): undefined reference to `phys_to_dma'
mips64-linux-ld: kernel/dma/mapping.o: in function `dma_unmap_page_attrs':
mapping.c:(.text+0x23c): undefined reference to `dma_to_phys'
mips64-linux-ld: mapping.c:(.text+0x274): undefined reference to `dma_to_phys'
mips64-linux-ld: kernel/dma/mapping.o: in function `dma_sync_single_for_cpu':
mapping.c:(.text+0x3d4): undefined reference to `dma_to_phys'
mips64-linux-ld: kernel/dma/direct.o: in function `dma_direct_get_required_mask':
>> direct.c:(.text+0xe4): undefined reference to `phys_to_dma'
mips64-linux-ld: kernel/dma/direct.o: in function `dma_direct_alloc':
direct.c:(.text+0x210): undefined reference to `dma_to_phys'
>> mips64-linux-ld: direct.c:(.text+0x2d8): undefined reference to `phys_to_dma'
mips64-linux-ld: direct.c:(.text+0x354): undefined reference to `phys_to_dma'
mips64-linux-ld: direct.c:(.text+0x42c): undefined reference to `phys_to_dma'
mips64-linux-ld: direct.c:(.text+0x4d8): undefined reference to `dma_to_phys'
mips64-linux-ld: kernel/dma/direct.o: in function `dma_direct_free':
direct.c:(.text+0x5d8): undefined reference to `dma_to_phys'
mips64-linux-ld: kernel/dma/direct.o: in function `dma_direct_map_sg':
direct.c:(.text+0x764): undefined reference to `phys_to_dma'
mips64-linux-ld: kernel/dma/direct.o: in function `dma_direct_get_sgtable':
direct.c:(.text+0xa00): undefined reference to `dma_to_phys'
mips64-linux-ld: kernel/dma/direct.o: in function `dma_direct_mmap':
direct.c:(.text+0xb10): undefined reference to `dma_to_phys'
mips64-linux-ld: kernel/dma/direct.o: in function `dma_direct_supported':
direct.c:(.text+0xbf8): undefined reference to `phys_to_dma'
mips64-linux-ld: kernel/dma/direct.o: in function `dma_direct_need_sync':
direct.c:(.text+0xc28): undefined reference to `dma_to_phys'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[hwmon:hwmon-next 6/27] drivers/hwmon/ina3221.c:492:9: error: implicit declaration of function 'pm_runtime_resume_and_get'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
head: bb077c79ffcab5f044c8172825f05fa122fbe7d0
commit: 5452ef62fbc3c5ac86f8c80ce1201a07618abc9c [6/27] hwmon: (ina3221) Fix PM usage counter unbalance in ina3221_write_enable
config: i386-randconfig-r003-20201129 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git/...
git remote add hwmon https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
git fetch --no-tags hwmon hwmon-next
git checkout 5452ef62fbc3c5ac86f8c80ce1201a07618abc9c
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/hwmon/ina3221.c: In function 'ina3221_write_enable':
>> drivers/hwmon/ina3221.c:492:9: error: implicit declaration of function 'pm_runtime_resume_and_get'; did you mean 'pm_runtime_resume'? [-Werror=implicit-function-declaration]
492 | ret = pm_runtime_resume_and_get(ina->pm_dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| pm_runtime_resume
cc1: some warnings being treated as errors
vim +492 drivers/hwmon/ina3221.c
475
476 static int ina3221_write_enable(struct device *dev, int channel, bool enable)
477 {
478 struct ina3221_data *ina = dev_get_drvdata(dev);
479 u16 config, mask = INA3221_CONFIG_CHx_EN(channel);
480 u16 config_old = ina->reg_config & mask;
481 u32 tmp;
482 int ret;
483
484 config = enable ? mask : 0;
485
486 /* Bypass if enable status is not being changed */
487 if (config_old == config)
488 return 0;
489
490 /* For enabling routine, increase refcount and resume() at first */
491 if (enable) {
> 492 ret = pm_runtime_resume_and_get(ina->pm_dev);
493 if (ret < 0) {
494 dev_err(dev, "Failed to get PM runtime\n");
495 return ret;
496 }
497 }
498
499 /* Enable or disable the channel */
500 tmp = (ina->reg_config & ~mask) | (config & mask);
501 ret = regmap_write(ina->regmap, INA3221_CONFIG, tmp);
502 if (ret)
503 goto fail;
504
505 /* Cache the latest config register value */
506 ina->reg_config = tmp;
507
508 /* For disabling routine, decrease refcount or suspend() at last */
509 if (!enable)
510 pm_runtime_put_sync(ina->pm_dev);
511
512 return 0;
513
514 fail:
515 if (enable) {
516 dev_err(dev, "Failed to enable channel %d: error %d\n",
517 channel, ret);
518 pm_runtime_put_sync(ina->pm_dev);
519 }
520
521 return ret;
522 }
523
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months