Re: [PATCH] dm: remove unneeded variable
by kernel test robot
Hi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on device-mapper-dm/for-next]
[also build test ERROR on v5.15 next-20211111]
[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]
url: https://github.com/0day-ci/linux/commits/cgel-zte-gmail-com/dm-remove-unn...
base: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next
config: i386-debian-10.3 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/dbcfa76d0a7e2af056369733ed58150e4...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review cgel-zte-gmail-com/dm-remove-unneeded-variable/20211111-155437
git checkout dbcfa76d0a7e2af056369733ed58150e479ec0c7
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/md/
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 >>):
In file included from drivers/md/dm-ps-round-robin.c:12:
drivers/md/dm-ps-round-robin.c: In function 'rr_status':
>> include/linux/device-mapper.h:602:22: error: 'sz' undeclared (first use in this function); did you mean 's8'?
602 | #define DMEMIT(x...) sz += ((sz >= maxlen) ? \
| ^~
drivers/md/dm-ps-round-robin.c:93:3: note: in expansion of macro 'DMEMIT'
93 | DMEMIT("0 ");
| ^~~~~~
include/linux/device-mapper.h:602:22: note: each undeclared identifier is reported only once for each function it appears in
602 | #define DMEMIT(x...) sz += ((sz >= maxlen) ? \
| ^~
drivers/md/dm-ps-round-robin.c:93:3: note: in expansion of macro 'DMEMIT'
93 | DMEMIT("0 ");
| ^~~~~~
vim +602 include/linux/device-mapper.h
0da336e5fab75c Alasdair G Kergon 2008-04-24 601
0da336e5fab75c Alasdair G Kergon 2008-04-24 @602 #define DMEMIT(x...) sz += ((sz >= maxlen) ? \
0da336e5fab75c Alasdair G Kergon 2008-04-24 603 0 : scnprintf(result + sz, maxlen - sz, x))
0da336e5fab75c Alasdair G Kergon 2008-04-24 604
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [PATCH linux] e1000e: Delete redundant variable definitions
by kernel test robot
Hi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linux/master]
url: https://github.com/0day-ci/linux/commits/cgel-zte-gmail-com/e1000e-Delete...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git debe436e77c72fcee804fb867f275e6d31aa999c
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-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://github.com/0day-ci/linux/commit/81faea6b288a1c17c390413bcb3021fef...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review cgel-zte-gmail-com/e1000e-Delete-redundant-variable-definitions/20211111-170640
git checkout 81faea6b288a1c17c390413bcb3021fef7e89bad
# 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=arc SHELL=/bin/bash
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 >>):
In file included from include/linux/printk.h:555,
from include/asm-generic/bug.h:22,
from arch/arc/include/asm/bug.h:30,
from include/linux/ktime.h:26,
from include/linux/timer.h:6,
from drivers/net/ethernet/intel/e1000e/e1000.h:11,
from drivers/net/ethernet/intel/e1000e/ptp.c:9:
drivers/net/ethernet/intel/e1000e/ptp.c: In function 'e1000e_systim_overflow_work':
>> drivers/net/ethernet/intel/e1000e/e1000.h:31:20: error: 'hw' undeclared (first use in this function)
31 | netdev_dbg(hw->adapter->netdev, format, ## arg)
| ^~
include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
134 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:170:9: note: in expansion of macro '_dynamic_func_call'
170 | _dynamic_func_call(fmt, __dynamic_netdev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/netdevice.h:5324:9: note: in expansion of macro 'dynamic_netdev_dbg'
5324 | dynamic_netdev_dbg(__dev, format, ##args); \
| ^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/e1000e/e1000.h:31:9: note: in expansion of macro 'netdev_dbg'
31 | netdev_dbg(hw->adapter->netdev, format, ## arg)
| ^~~~~~~~~~
drivers/net/ethernet/intel/e1000e/ptp.c:248:9: note: in expansion of macro 'e_dbg'
248 | e_dbg("SYSTIM overflow check at %lld.%09lu\n",
| ^~~~~
drivers/net/ethernet/intel/e1000e/e1000.h:31:20: note: each undeclared identifier is reported only once for each function it appears in
31 | netdev_dbg(hw->adapter->netdev, format, ## arg)
| ^~
include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
134 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:170:9: note: in expansion of macro '_dynamic_func_call'
170 | _dynamic_func_call(fmt, __dynamic_netdev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/netdevice.h:5324:9: note: in expansion of macro 'dynamic_netdev_dbg'
5324 | dynamic_netdev_dbg(__dev, format, ##args); \
| ^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/e1000e/e1000.h:31:9: note: in expansion of macro 'netdev_dbg'
31 | netdev_dbg(hw->adapter->netdev, format, ## arg)
| ^~~~~~~~~~
drivers/net/ethernet/intel/e1000e/ptp.c:248:9: note: in expansion of macro 'e_dbg'
248 | e_dbg("SYSTIM overflow check at %lld.%09lu\n",
| ^~~~~
vim +/hw +31 drivers/net/ethernet/intel/e1000e/e1000.h
bc7f75fa97884d drivers/net/e1000e/e1000.h Auke Kok 2007-09-17 29
44defeb3f6f98e drivers/net/e1000e/e1000.h Jeff Kirsher 2008-08-04 30 #define e_dbg(format, arg...) \
8544b9f7371ec6 drivers/net/e1000e/e1000.h Bruce Allan 2010-03-24 @31 netdev_dbg(hw->adapter->netdev, format, ## arg)
44defeb3f6f98e drivers/net/e1000e/e1000.h Jeff Kirsher 2008-08-04 32 #define e_err(format, arg...) \
8544b9f7371ec6 drivers/net/e1000e/e1000.h Bruce Allan 2010-03-24 33 netdev_err(adapter->netdev, format, ## arg)
44defeb3f6f98e drivers/net/e1000e/e1000.h Jeff Kirsher 2008-08-04 34 #define e_info(format, arg...) \
8544b9f7371ec6 drivers/net/e1000e/e1000.h Bruce Allan 2010-03-24 35 netdev_info(adapter->netdev, format, ## arg)
44defeb3f6f98e drivers/net/e1000e/e1000.h Jeff Kirsher 2008-08-04 36 #define e_warn(format, arg...) \
8544b9f7371ec6 drivers/net/e1000e/e1000.h Bruce Allan 2010-03-24 37 netdev_warn(adapter->netdev, format, ## arg)
44defeb3f6f98e drivers/net/e1000e/e1000.h Jeff Kirsher 2008-08-04 38 #define e_notice(format, arg...) \
8544b9f7371ec6 drivers/net/e1000e/e1000.h Bruce Allan 2010-03-24 39 netdev_notice(adapter->netdev, format, ## arg)
bc7f75fa97884d drivers/net/e1000e/e1000.h Auke Kok 2007-09-17 40
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[omap-audio:peter/linux-next-wip 5558/6167] fs/io_uring.c:2335:40: warning: variable 'prev' set but not used
by kernel test robot
tree: https://github.com/omap-audio/linux-audio peter/linux-next-wip
head: d08c31cfb65e8197b0ab607484d26fc48366dcee
commit: 593365467b869247ed6ee30c1ba92b553b4d5a3c [5558/6167] io_uring: use slist for completion batching
config: nios2-defconfig (attached as .config)
compiler: nios2-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://github.com/omap-audio/linux-audio/commit/593365467b869247ed6ee30c...
git remote add omap-audio https://github.com/omap-audio/linux-audio
git fetch --no-tags omap-audio peter/linux-next-wip
git checkout 593365467b869247ed6ee30c1ba92b553b4d5a3c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2
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 >>):
fs/io_uring.c: In function 'io_queue_async_work':
fs/io_uring.c:1456:61: warning: parameter 'locked' set but not used [-Wunused-but-set-parameter]
1456 | static void io_queue_async_work(struct io_kiocb *req, bool *locked)
| ~~~~~~^~~~~~
fs/io_uring.c: In function '__io_submit_flush_completions':
>> fs/io_uring.c:2335:40: warning: variable 'prev' set but not used [-Wunused-but-set-variable]
2335 | struct io_wq_work_node *node, *prev;
| ^~~~
vim +/prev +2335 fs/io_uring.c
2331
2332 static void __io_submit_flush_completions(struct io_ring_ctx *ctx)
2333 __must_hold(&ctx->uring_lock)
2334 {
> 2335 struct io_wq_work_node *node, *prev;
2336 struct io_submit_state *state = &ctx->submit_state;
2337 struct req_batch rb;
2338
2339 spin_lock(&ctx->completion_lock);
2340 wq_list_for_each(node, prev, &state->compl_reqs) {
2341 struct io_kiocb *req = container_of(node, struct io_kiocb,
2342 comp_list);
2343
2344 __io_cqring_fill_event(ctx, req->user_data, req->result,
2345 req->compl.cflags);
2346 }
2347 io_commit_cqring(ctx);
2348 spin_unlock(&ctx->completion_lock);
2349 io_cqring_ev_posted(ctx);
2350
2351 io_init_req_batch(&rb);
2352 node = state->compl_reqs.first;
2353 do {
2354 struct io_kiocb *req = container_of(node, struct io_kiocb,
2355 comp_list);
2356
2357 node = req->comp_list.next;
2358 if (req_ref_put_and_test(req))
2359 io_req_free_batch(&rb, req, &ctx->submit_state);
2360 } while (node);
2361
2362 io_req_free_batch_finish(ctx, &rb);
2363 INIT_WQ_LIST(&state->compl_reqs);
2364 }
2365
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[dhowells-fs:fscache-rewrite-indexing-2 61/64] fs/cifs/file.c:641:51: error: unused variable 'auxdata'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-rewrite-indexing-2
head: 90bb44e5d6dcd202b7443fbe2dd1f71cd408b942
commit: caf16b68f740181a5d93053818bc5a27cd51b2c7 [61/64] cifs: Support fscache indexing rewrite (untested)
config: openrisc-buildonly-randconfig-r005-20211024 (attached as .config)
compiler: or1k-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/dhowells/linux-fs.git/com...
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs fscache-rewrite-indexing-2
git checkout caf16b68f740181a5d93053818bc5a27cd51b2c7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=openrisc
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 >>):
In file included from fs/cifs/file.c:32:
fs/cifs/fscache.h:103:38: error: redefinition of 'cifs_inode_cookie'
103 | static inline struct fscache_cookie *cifs_inode_cookie(struct inode *inode)
| ^~~~~~~~~~~~~~~~~
fs/cifs/fscache.h:93:38: note: previous definition of 'cifs_inode_cookie' with type 'struct fscache_cookie *(struct inode *)'
93 | static inline struct fscache_cookie *cifs_inode_cookie(struct inode *inode) { return NULL; }
| ^~~~~~~~~~~~~~~~~
fs/cifs/file.c: In function 'cifs_open':
fs/cifs/file.c:641:51: error: storage size of 'auxdata' isn't known
641 | struct cifs_fscache_inode_auxdata auxdata;
| ^~~~~~~
fs/cifs/file.c:642:17: error: implicit declaration of function 'cifs_fscache_fill_auxdata' [-Werror=implicit-function-declaration]
642 | cifs_fscache_fill_auxdata(file_inode(file), &auxdata);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> fs/cifs/file.c:641:51: error: unused variable 'auxdata' [-Werror=unused-variable]
641 | struct cifs_fscache_inode_auxdata auxdata;
| ^~~~~~~
fs/cifs/file.c: In function 'cifs_close':
fs/cifs/file.c:890:9: error: too many arguments to function 'cifs_fscache_unuse_inode_cookie'
890 | cifs_fscache_unuse_inode_cookie(inode, file->f_mode & FMODE_WRITE);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from fs/cifs/file.c:32:
fs/cifs/fscache.h:92:20: note: declared here
92 | static inline void cifs_fscache_unuse_inode_cookie(struct inode *inode) {}
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
In file included from fs/cifs/inode.c:25:
fs/cifs/fscache.h:103:38: error: redefinition of 'cifs_inode_cookie'
103 | static inline struct fscache_cookie *cifs_inode_cookie(struct inode *inode)
| ^~~~~~~~~~~~~~~~~
fs/cifs/fscache.h:93:38: note: previous definition of 'cifs_inode_cookie' with type 'struct fscache_cookie *(struct inode *)'
93 | static inline struct fscache_cookie *cifs_inode_cookie(struct inode *inode) { return NULL; }
| ^~~~~~~~~~~~~~~~~
fs/cifs/inode.c: In function 'cifs_invalidate_mapping':
fs/cifs/inode.c:2263:43: error: storage size of 'auxdata' isn't known
2263 | struct cifs_fscache_inode_auxdata auxdata;
| ^~~~~~~
fs/cifs/inode.c:2274:9: error: implicit declaration of function 'cifs_fscache_fill_auxdata' [-Werror=implicit-function-declaration]
2274 | cifs_fscache_fill_auxdata(&cifsi->vfs_inode, &auxdata);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> fs/cifs/inode.c:2263:43: error: unused variable 'auxdata' [-Werror=unused-variable]
2263 | struct cifs_fscache_inode_auxdata auxdata;
| ^~~~~~~
cc1: all warnings being treated as errors
vim +/auxdata +641 fs/cifs/file.c
515
516 {
517 int rc = -EACCES;
518 unsigned int xid;
519 __u32 oplock;
520 struct cifs_sb_info *cifs_sb;
521 struct TCP_Server_Info *server;
522 struct cifs_tcon *tcon;
523 struct tcon_link *tlink;
524 struct cifsFileInfo *cfile = NULL;
525 void *page;
526 const char *full_path;
527 bool posix_open_ok = false;
528 struct cifs_fid fid;
529 struct cifs_pending_open open;
530
531 xid = get_xid();
532
533 cifs_sb = CIFS_SB(inode->i_sb);
534 if (unlikely(cifs_forced_shutdown(cifs_sb))) {
535 free_xid(xid);
536 return -EIO;
537 }
538
539 tlink = cifs_sb_tlink(cifs_sb);
540 if (IS_ERR(tlink)) {
541 free_xid(xid);
542 return PTR_ERR(tlink);
543 }
544 tcon = tlink_tcon(tlink);
545 server = tcon->ses->server;
546
547 page = alloc_dentry_path();
548 full_path = build_path_from_dentry(file_dentry(file), page);
549 if (IS_ERR(full_path)) {
550 rc = PTR_ERR(full_path);
551 goto out;
552 }
553
554 cifs_dbg(FYI, "inode = 0x%p file flags are 0x%x for %s\n",
555 inode, file->f_flags, full_path);
556
557 if (file->f_flags & O_DIRECT &&
558 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_STRICT_IO) {
559 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_BRL)
560 file->f_op = &cifs_file_direct_nobrl_ops;
561 else
562 file->f_op = &cifs_file_direct_ops;
563 }
564
565 /* Get the cached handle as SMB2 close is deferred */
566 rc = cifs_get_readable_path(tcon, full_path, &cfile);
567 if (rc == 0) {
568 if (file->f_flags == cfile->f_flags) {
569 file->private_data = cfile;
570 spin_lock(&CIFS_I(inode)->deferred_lock);
571 cifs_del_deferred_close(cfile);
572 spin_unlock(&CIFS_I(inode)->deferred_lock);
573 goto out;
574 } else {
575 _cifsFileInfo_put(cfile, true, false);
576 }
577 }
578
579 if (server->oplocks)
580 oplock = REQ_OPLOCK;
581 else
582 oplock = 0;
583
584 if (!tcon->broken_posix_open && tcon->unix_ext &&
585 cap_unix(tcon->ses) && (CIFS_UNIX_POSIX_PATH_OPS_CAP &
586 le64_to_cpu(tcon->fsUnixInfo.Capability))) {
587 /* can not refresh inode info since size could be stale */
588 rc = cifs_posix_open(full_path, &inode, inode->i_sb,
589 cifs_sb->ctx->file_mode /* ignored */,
590 file->f_flags, &oplock, &fid.netfid, xid);
591 if (rc == 0) {
592 cifs_dbg(FYI, "posix open succeeded\n");
593 posix_open_ok = true;
594 } else if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) {
595 if (tcon->ses->serverNOS)
596 cifs_dbg(VFS, "server %s of type %s returned unexpected error on SMB posix open, disabling posix open support. Check if server update available.\n",
597 tcon->ses->ip_addr,
598 tcon->ses->serverNOS);
599 tcon->broken_posix_open = true;
600 } else if ((rc != -EIO) && (rc != -EREMOTE) &&
601 (rc != -EOPNOTSUPP)) /* path not found or net err */
602 goto out;
603 /*
604 * Else fallthrough to retry open the old way on network i/o
605 * or DFS errors.
606 */
607 }
608
609 if (server->ops->get_lease_key)
610 server->ops->get_lease_key(inode, &fid);
611
612 cifs_add_pending_open(&fid, tlink, &open);
613
614 if (!posix_open_ok) {
615 if (server->ops->get_lease_key)
616 server->ops->get_lease_key(inode, &fid);
617
618 rc = cifs_nt_open(full_path, inode, cifs_sb, tcon,
619 file->f_flags, &oplock, &fid, xid);
620 if (rc) {
621 cifs_del_pending_open(&open);
622 goto out;
623 }
624 }
625
626 cfile = cifs_new_fileinfo(&fid, file, tlink, oplock);
627 if (cfile == NULL) {
628 if (server->ops->close)
629 server->ops->close(xid, tcon, &fid);
630 cifs_del_pending_open(&open);
631 rc = -ENOMEM;
632 goto out;
633 }
634
635
636 fscache_use_cookie(cifs_inode_cookie(file_inode(file)),
637 file->f_mode & FMODE_WRITE);
638 if (file->f_flags & O_DIRECT &&
639 (!((file->f_flags & O_ACCMODE) != O_RDONLY) ||
640 file->f_flags & O_APPEND)) {
> 641 struct cifs_fscache_inode_auxdata auxdata;
642 cifs_fscache_fill_auxdata(file_inode(file), &auxdata);
643 fscache_invalidate(cifs_inode_cookie(file_inode(file)),
644 &auxdata, i_size_read(file_inode(file)),
645 FSCACHE_INVAL_DIO_WRITE);
646 }
647
648 if ((oplock & CIFS_CREATE_ACTION) && !posix_open_ok && tcon->unix_ext) {
649 /*
650 * Time to set mode which we can not set earlier due to
651 * problems creating new read-only files.
652 */
653 struct cifs_unix_set_info_args args = {
654 .mode = inode->i_mode,
655 .uid = INVALID_UID, /* no change */
656 .gid = INVALID_GID, /* no change */
657 .ctime = NO_CHANGE_64,
658 .atime = NO_CHANGE_64,
659 .mtime = NO_CHANGE_64,
660 .device = 0,
661 };
662 CIFSSMBUnixSetFileInfo(xid, tcon, &args, fid.netfid,
663 cfile->pid);
664 }
665
666 out:
667 free_dentry_path(page);
668 free_xid(xid);
669 cifs_put_tlink(tlink);
670 return rc;
671 }
672
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[hare-scsi-devel:scsi-private.v2 15/21] drivers/scsi/aacraid/linit.c:641:28: warning: dereferencing 'void *' pointer
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git scsi-private.v2
head: 915b986531e666d840f72752c597fb6b4ea69d35
commit: e6b8e84251bef24827e609d3a87c5d6652302b85 [15/21] aacraid: add 'owner' field to 'struct fib'
config: x86_64-kexec (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commi...
git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
git fetch --no-tags hare-scsi-devel scsi-private.v2
git checkout e6b8e84251bef24827e609d3a87c5d6652302b85
# save the attached .config to linux build tree
make W=1 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 >>):
drivers/scsi/aacraid/linit.c: In function 'fib_count_iter':
>> drivers/scsi/aacraid/linit.c:641:28: warning: dereferencing 'void *' pointer
641 | struct fib *fibptr = &data->dev->fibs[scsi_cmd_to_rq(scmnd)->tag];
| ^~
drivers/scsi/aacraid/linit.c:641:28: error: request for member 'dev' in something not a structure or union
vim +641 drivers/scsi/aacraid/linit.c
637
638 static bool fib_count_iter(struct scsi_cmnd *scmnd, void *data, bool reserved)
639 {
640 struct fib_count_data *fib_count = data;
> 641 struct fib *fibptr = &data->dev->fibs[scsi_cmd_to_rq(scmnd)->tag];
642
643 switch (fibptr->owner) {
644 case AAC_OWNER_FIRMWARE:
645 fib_count->fwcnt++;
646 break;
647 case AAC_OWNER_ERROR_HANDLER:
648 fib_count->ehcnt++;
649 break;
650 case AAC_OWNER_LOWLEVEL:
651 fib_count->llcnt++;
652 break;
653 case AAC_OWNER_MIDLEVEL:
654 fib_count->mlcnt++;
655 break;
656 default:
657 fib_count->krlcnt++;
658 break;
659 }
660 return true;
661 }
662
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
mm/page_alloc.c:3480:15: warning: no previous prototype for 'should_fail_alloc_page'
by kernel test robot
Hi Alexei,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: debe436e77c72fcee804fb867f275e6d31aa999c
commit: 76cd61739fd107a7f7ec4c24a045e98d8ee150f0 mm/error_inject: Fix allow_error_inject function signatures.
date: 1 year, 2 months ago
config: nds32-buildonly-randconfig-r002-20210927 (attached as .config)
compiler: nds32le-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...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 76cd61739fd107a7f7ec4c24a045e98d8ee150f0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nds32
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 >>):
>> mm/page_alloc.c:3480:15: warning: no previous prototype for 'should_fail_alloc_page' [-Wmissing-prototypes]
3480 | noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
| ^~~~~~~~~~~~~~~~~~~~~~
mm/page_alloc.c:6120:23: warning: no previous prototype for 'memmap_init' [-Wmissing-prototypes]
6120 | void __meminit __weak memmap_init(unsigned long size, int nid,
| ^~~~~~~~~~~
vim +/should_fail_alloc_page +3480 mm/page_alloc.c
3479
> 3480 noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
3481 {
3482 return __should_fail_alloc_page(gfp_mask, order);
3483 }
3484 ALLOW_ERROR_INJECTION(should_fail_alloc_page, TRUE);
3485
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/gpu/drm/qxl/qxl_object.c:172:29: sparse: sparse: cast removes address space '__iomem' of expression
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: debe436e77c72fcee804fb867f275e6d31aa999c
commit: 49a3f51dfeeecb52c5aa28c5cb9592fe5e39bf95 drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends
date: 1 year ago
config: riscv-randconfig-s032-20211109 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 11.2.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-dirty
# 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 49a3f51dfeeecb52c5aa28c5cb9592fe5e39bf95
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash arch/riscv/kernel/ drivers/clk/qcom/ drivers/clocksource/ drivers/firmware/arm_scmi/ drivers/firmware/efi/test/ drivers/gpu/drm/kmb/ drivers/gpu/drm/qxl/ drivers/mmc/host/ drivers/mtd/nand/onenand/ drivers/mtd/nand/raw/ drivers/pci/endpoint/functions/ drivers/phy/marvell/ drivers/pwm/ drivers/soc/bcm/bcm63xx/ drivers/staging/vc04_services/ drivers/uio/ drivers/usb/gadget/function/ drivers/video/fbdev/ fs/ kernel/ lib/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/qxl/qxl_object.c:172:29: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/qxl/qxl_object.c:198:40: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] __iomem * @@
drivers/gpu/drm/qxl/qxl_object.c:198:40: sparse: expected void *
drivers/gpu/drm/qxl/qxl_object.c:198:40: sparse: got void [noderef] __iomem *
drivers/gpu/drm/qxl/qxl_object.c:232:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *vaddr @@ got void *pmap @@
drivers/gpu/drm/qxl/qxl_object.c:232:33: sparse: expected void [noderef] __iomem *vaddr
drivers/gpu/drm/qxl/qxl_object.c:232:33: sparse: got void *pmap
vim +/__iomem +172 drivers/gpu/drm/qxl/qxl_object.c
156
157 int qxl_bo_kmap(struct qxl_bo *bo, struct dma_buf_map *map)
158 {
159 int r;
160
161 if (bo->kptr) {
162 bo->map_count++;
163 goto out;
164 }
165 r = ttm_bo_vmap(&bo->tbo, &bo->map);
166 if (r)
167 return r;
168 bo->map_count = 1;
169
170 /* TODO: Remove kptr in favor of map everywhere. */
171 if (bo->map.is_iomem)
> 172 bo->kptr = (void *)bo->map.vaddr_iomem;
173 else
174 bo->kptr = bo->map.vaddr;
175
176 out:
177 *map = bo->map;
178 return 0;
179 }
180
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/thermal/intel/int340x_thermal/processor_thermal_mbox.c:79:16: error: implicit declaration of function 'readq'; did you mean 'readl'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: debe436e77c72fcee804fb867f275e6d31aa999c
commit: aeb58c860dc516794fdf7ff89d96ead2644d5889 thermal/drivers/int340x: processor_thermal: Suppot 64 bit RFIM responses
date: 7 days ago
config: i386-debian-10.3 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# 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 aeb58c860dc516794fdf7ff89d96ead2644d5889
# 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/thermal/intel/int340x_thermal/processor_thermal_mbox.c: In function 'send_mbox_cmd':
>> drivers/thermal/intel/int340x_thermal/processor_thermal_mbox.c:79:16: error: implicit declaration of function 'readq'; did you mean 'readl'? [-Werror=implicit-function-declaration]
79 | *cmd_resp = readq((void __iomem *) (proc_priv->mmio_base + MBOX_OFFSET_DATA));
| ^~~~~
| readl
cc1: some warnings being treated as errors
vim +79 drivers/thermal/intel/int340x_thermal/processor_thermal_mbox.c
25
26 static int send_mbox_cmd(struct pci_dev *pdev, u16 cmd_id, u32 cmd_data, u64 *cmd_resp)
27 {
28 struct proc_thermal_device *proc_priv;
29 u32 retries, data;
30 int ret;
31
32 mutex_lock(&mbox_lock);
33 proc_priv = pci_get_drvdata(pdev);
34
35 /* Poll for rb bit == 0 */
36 retries = MBOX_RETRY_COUNT;
37 do {
38 data = readl((void __iomem *) (proc_priv->mmio_base + MBOX_OFFSET_INTERFACE));
39 if (data & BIT_ULL(MBOX_BUSY_BIT)) {
40 ret = -EBUSY;
41 continue;
42 }
43 ret = 0;
44 break;
45 } while (--retries);
46
47 if (ret)
48 goto unlock_mbox;
49
50 if (cmd_id == MBOX_CMD_WORKLOAD_TYPE_WRITE)
51 writel(cmd_data, (void __iomem *) ((proc_priv->mmio_base + MBOX_OFFSET_DATA)));
52
53 /* Write command register */
54 data = BIT_ULL(MBOX_BUSY_BIT) | cmd_id;
55 writel(data, (void __iomem *) ((proc_priv->mmio_base + MBOX_OFFSET_INTERFACE)));
56
57 /* Poll for rb bit == 0 */
58 retries = MBOX_RETRY_COUNT;
59 do {
60 data = readl((void __iomem *) (proc_priv->mmio_base + MBOX_OFFSET_INTERFACE));
61 if (data & BIT_ULL(MBOX_BUSY_BIT)) {
62 ret = -EBUSY;
63 continue;
64 }
65
66 if (data) {
67 ret = -ENXIO;
68 goto unlock_mbox;
69 }
70
71 ret = 0;
72
73 if (!cmd_resp)
74 break;
75
76 if (cmd_id == MBOX_CMD_WORKLOAD_TYPE_READ)
77 *cmd_resp = readl((void __iomem *) (proc_priv->mmio_base + MBOX_OFFSET_DATA));
78 else
> 79 *cmd_resp = readq((void __iomem *) (proc_priv->mmio_base + MBOX_OFFSET_DATA));
80
81 break;
82 } while (--retries);
83
84 unlock_mbox:
85 mutex_unlock(&mbox_lock);
86 return ret;
87 }
88
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[hare-scsi-devel:scsi-private.v2 8/21] drivers/scsi/hpsa.c:6069:33: error: 'struct scsi_cmnd' has no member named 'request'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git scsi-private.v2
head: 915b986531e666d840f72752c597fb6b4ea69d35
commit: 9847ce30bd0993567f380f282af9ffa1086b6b53 [8/21] hpsa: use reserved commands
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-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/hare/scsi-devel.git/commi...
git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
git fetch --no-tags hare-scsi-devel scsi-private.v2
git checkout 9847ce30bd0993567f380f282af9ffa1086b6b53
# 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=arc SHELL=/bin/bash
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/scsi/hpsa.c: In function 'hpsa_eh_device_reset_handler':
>> drivers/scsi/hpsa.c:6069:33: error: 'struct scsi_cmnd' has no member named 'request'
6069 | scsicmd->request->tag);
| ^~
drivers/scsi/hpsa.c:6079:33: error: 'struct scsi_cmnd' has no member named 'request'
6079 | scsicmd->request->tag);
| ^~
drivers/scsi/hpsa.c: In function 'cmd_tagged_alloc':
drivers/scsi/hpsa.c:6142:23: error: 'struct scsi_cmnd' has no member named 'request'
6142 | int idx = scmd->request->tag;
| ^~
drivers/scsi/hpsa.c: In function 'cmd_alloc':
>> drivers/scsi/hpsa.c:6200:43: error: passing argument 1 of 'scsi_host_get_internal_cmd' from incompatible pointer type [-Werror=incompatible-pointer-types]
6200 | scmd = scsi_host_get_internal_cmd(h, (direction & XFER_WRITE) ?
| ^
| |
| struct ctlr_info *
In file included from drivers/scsi/hpsa.c:42:
include/scsi/scsi_host.h:814:34: note: expected 'struct Scsi_Host *' but argument is of type 'struct ctlr_info *'
814 | void *scsi_host_get_internal_cmd(struct Scsi_Host *, int data_direction,
| ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +6069 drivers/scsi/hpsa.c
6025
6026 /* Need at least one of these error handlers to keep ../scsi/hosts.c from
6027 * complaining. Doing a host- or bus-reset can't do anything good here.
6028 */
6029 static int hpsa_eh_device_reset_handler(struct scsi_cmnd *scsicmd)
6030 {
6031 int rc = SUCCESS;
6032 int i;
6033 struct ctlr_info *h;
6034 struct hpsa_scsi_dev_t *dev = NULL;
6035 u8 reset_type;
6036 char msg[48];
6037 unsigned long flags;
6038
6039 /* find the controller to which the command to be aborted was sent */
6040 h = sdev_to_hba(scsicmd->device);
6041 if (h == NULL) /* paranoia */
6042 return FAILED;
6043
6044 spin_lock_irqsave(&h->reset_lock, flags);
6045 h->reset_in_progress = 1;
6046 spin_unlock_irqrestore(&h->reset_lock, flags);
6047
6048 if (lockup_detected(h)) {
6049 rc = FAILED;
6050 goto return_reset_status;
6051 }
6052
6053 dev = scsicmd->device->hostdata;
6054 if (!dev) {
6055 dev_err(&h->pdev->dev, "%s: device lookup failed\n", __func__);
6056 rc = FAILED;
6057 goto return_reset_status;
6058 }
6059
6060 if (dev->devtype == TYPE_ENCLOSURE) {
6061 rc = SUCCESS;
6062 goto return_reset_status;
6063 }
6064
6065 /* if controller locked up, we can guarantee command won't complete */
6066 if (lockup_detected(h)) {
6067 snprintf(msg, sizeof(msg),
6068 "cmd %d RESET FAILED, lockup detected",
> 6069 scsicmd->request->tag);
6070 hpsa_show_dev_msg(KERN_WARNING, h, dev, msg);
6071 rc = FAILED;
6072 goto return_reset_status;
6073 }
6074
6075 /* this reset request might be the result of a lockup; check */
6076 if (detect_controller_lockup(h)) {
6077 snprintf(msg, sizeof(msg),
6078 "cmd %d RESET FAILED, new lockup detected",
> 6079 scsicmd->request->tag);
6080 hpsa_show_dev_msg(KERN_WARNING, h, dev, msg);
6081 rc = FAILED;
6082 goto return_reset_status;
6083 }
6084
6085 /* Do not attempt on controller */
6086 if (is_hba_lunid(dev->scsi3addr)) {
6087 rc = SUCCESS;
6088 goto return_reset_status;
6089 }
6090
6091 if (is_logical_dev_addr_mode(dev->scsi3addr))
6092 reset_type = HPSA_DEVICE_RESET_MSG;
6093 else
6094 reset_type = HPSA_PHYS_TARGET_RESET;
6095
6096 sprintf(msg, "resetting %s",
6097 reset_type == HPSA_DEVICE_RESET_MSG ? "logical " : "physical ");
6098 hpsa_show_dev_msg(KERN_WARNING, h, dev, msg);
6099
6100 /*
6101 * wait to see if any commands will complete before sending reset
6102 */
6103 dev->in_reset = true; /* block any new cmds from OS for this device */
6104 for (i = 0; i < 10; i++) {
6105 if (atomic_read(&dev->commands_outstanding) > 0)
6106 msleep(1000);
6107 else
6108 break;
6109 }
6110
6111 /* send a reset to the SCSI LUN which the command was sent to */
6112 rc = hpsa_do_reset(h, dev, reset_type, DEFAULT_REPLY_QUEUE);
6113 if (rc == 0)
6114 rc = SUCCESS;
6115 else
6116 rc = FAILED;
6117
6118 sprintf(msg, "reset %s %s",
6119 reset_type == HPSA_DEVICE_RESET_MSG ? "logical " : "physical ",
6120 rc == SUCCESS ? "completed successfully" : "failed");
6121 hpsa_show_dev_msg(KERN_WARNING, h, dev, msg);
6122
6123 return_reset_status:
6124 spin_lock_irqsave(&h->reset_lock, flags);
6125 h->reset_in_progress = 0;
6126 if (dev)
6127 dev->in_reset = false;
6128 spin_unlock_irqrestore(&h->reset_lock, flags);
6129 return rc;
6130 }
6131
6132 /*
6133 * For operations with an associated SCSI command, a command block is allocated
6134 * at init, and managed by cmd_tagged_alloc() and cmd_tagged_free() using the
6135 * block request tag as an index into a table of entries. cmd_tagged_free() is
6136 * the complement, although cmd_free() may be called instead.
6137 * This function is only called for new requests from queue_command.
6138 */
6139 static struct CommandList *cmd_tagged_alloc(struct ctlr_info *h,
6140 struct scsi_cmnd *scmd)
6141 {
6142 int idx = scmd->request->tag;
6143 struct CommandList *c = h->cmd_pool + idx;
6144
6145 if (idx < 0 || idx >= h->nr_cmds) {
6146 dev_err(&h->pdev->dev, "Bad block tag: %d not in [%d..%d]\n",
6147 idx, 0, h->nr_cmds - 1);
6148 /* The index value comes from the block layer, so if it's out of
6149 * bounds, it's probably not our bug.
6150 */
6151 BUG();
6152 }
6153
6154 if (unlikely(!hpsa_is_cmd_idle(c))) {
6155 /*
6156 * We expect that the SCSI layer will hand us a unique tag
6157 * value. Thus, there should never be a collision here between
6158 * two requests...because if the selected command isn't idle
6159 * then someone is going to be very disappointed.
6160 */
6161 if (idx != h->last_collision_tag) { /* Print once per tag */
6162 dev_warn(&h->pdev->dev,
6163 "%s: tag collision (tag=%d)\n", __func__, idx);
6164 if (scmd)
6165 scsi_print_command(scmd);
6166 h->last_collision_tag = idx;
6167 }
6168 return NULL;
6169 }
6170
6171 atomic_inc(&c->refcount);
6172 hpsa_cmd_partial_init(h, idx, c);
6173
6174 /*
6175 * This is a new command obtained from queue_command so
6176 * there have not been any driver initiated retry attempts.
6177 */
6178 c->retry_pending = false;
6179
6180 return c;
6181 }
6182
6183 static void cmd_tagged_free(struct ctlr_info *h, struct CommandList *c)
6184 {
6185 /*
6186 * Release our reference to the block. We don't need to do anything
6187 * else to free it, because it is accessed by index.
6188 */
6189 (void)atomic_dec(&c->refcount);
6190 c->scsi_cmd = NULL;
6191 }
6192
6193 static struct CommandList *cmd_alloc(struct ctlr_info *h, u8 direction)
6194 {
6195 struct scsi_cmnd *scmd;
6196 struct request *rq;
6197 struct CommandList *c;
6198 int idx;
6199
> 6200 scmd = scsi_host_get_internal_cmd(h, (direction & XFER_WRITE) ?
6201 DMA_TO_DEVICE : DMA_FROM_DEVICE,
6202 REQ_NOWAIT);
6203 if (!scmd) {
6204 dev_warn(&h->pdev->dev, "failed to allocate reserved cmd\n");
6205 return NULL;
6206 }
6207 rq = scsi_cmd_to_rq(scmd);
6208 idx = rq->tag;
6209 c = cmd_tagged_alloc(h, scmd);
6210 if (!c) {
6211 dev_warn(&h->pdev->dev, "failed to allocate reserved cmd %u\n",
6212 idx);
6213 scsi_put_internal_cmd(scmd);
6214 return NULL;
6215 }
6216 hpsa_cmd_partial_init(h, idx, c);
6217 c->scsi_cmd = scmd;
6218 c->device = NULL;
6219 c->cmd_type = CMD_IOCTL_PEND;
6220 dev_dbg(&h->pdev->dev, "using reserved cmd %u\n", idx);
6221 return c;
6222 }
6223
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week