[djwong-xfs:quotaoff-cleanups-5.14 15/20] arch/ia64/include/asm/mmu_context.h:127:41: error: variable 'old_rr4' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git quotaoff-cleanups-5.14
head: 6337f6e913ea464634f1582db813250e7be01438
commit: 5917b981c20de6ebc9bd1e44f7148b868c186627 [15/20] xfs: don't crash with assfail
config: ia64-randconfig-r015-20210520 (attached as .config)
compiler: ia64-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/djwong/xfs-linux.git/comm...
git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git fetch --no-tags djwong-xfs quotaoff-cleanups-5.14
git checkout 5917b981c20de6ebc9bd1e44f7148b868c186627
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
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 arch/ia64/include/asm/pgtable.h:154,
from include/linux/pgtable.h:6,
from arch/ia64/include/asm/uaccess.h:40,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from fs/ext4/balloc.c:17:
arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
>> arch/ia64/include/asm/mmu_context.h:127:41: error: variable 'old_rr4' set but not used [-Werror=unused-but-set-variable]
127 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
| ^~~~~~~
cc1: all warnings being treated as errors
--
In file included from arch/ia64/include/asm/pgtable.h:154,
from include/linux/pgtable.h:6,
from arch/ia64/include/asm/uaccess.h:40,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from fs/ext4/super.c:22:
arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
>> arch/ia64/include/asm/mmu_context.h:127:41: error: variable 'old_rr4' set but not used [-Werror=unused-but-set-variable]
127 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
| ^~~~~~~
fs/ext4/super.c: In function 'ext4_remount':
fs/ext4/super.c:5840:6: error: variable 'enable_quota' set but not used [-Werror=unused-but-set-variable]
5840 | int enable_quota = 0;
| ^~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/old_rr4 +127 arch/ia64/include/asm/mmu_context.h
^1da177e4c3f41 include/asm-ia64/mmu_context.h Linus Torvalds 2005-04-16 121
^1da177e4c3f41 include/asm-ia64/mmu_context.h Linus Torvalds 2005-04-16 122 static inline void
badea125d7cbd9 include/asm-ia64/mmu_context.h David Mosberger-Tang 2005-07-25 123 reload_context (nv_mm_context_t context)
^1da177e4c3f41 include/asm-ia64/mmu_context.h Linus Torvalds 2005-04-16 124 {
^1da177e4c3f41 include/asm-ia64/mmu_context.h Linus Torvalds 2005-04-16 125 unsigned long rid;
^1da177e4c3f41 include/asm-ia64/mmu_context.h Linus Torvalds 2005-04-16 126 unsigned long rid_incr = 0;
^1da177e4c3f41 include/asm-ia64/mmu_context.h Linus Torvalds 2005-04-16 @127 unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
^1da177e4c3f41 include/asm-ia64/mmu_context.h Linus Torvalds 2005-04-16 128
0a41e250116058 include/asm-ia64/mmu_context.h Peter Chubb 2005-08-16 129 old_rr4 = ia64_get_rr(RGN_BASE(RGN_HPAGE));
^1da177e4c3f41 include/asm-ia64/mmu_context.h Linus Torvalds 2005-04-16 130 rid = context << 3; /* make space for encoding the region number */
^1da177e4c3f41 include/asm-ia64/mmu_context.h Linus Torvalds 2005-04-16 131 rid_incr = 1 << 8;
^1da177e4c3f41 include/asm-ia64/mmu_context.h Linus Torvalds 2005-04-16 132
^1da177e4c3f41 include/asm-ia64/mmu_context.h Linus Torvalds 2005-04-16 133 /* encode the region id, preferred page size, and VHPT enable bit: */
^1da177e4c3f41 include/asm-ia64/mmu_context.h Linus Torvalds 2005-04-16 134 rr0 = (rid << 8) | (PAGE_SHIFT << 2) | 1;
^1da177e4c3f41 include/asm-ia64/mmu_context.h Linus Torvalds 2005-04-16 135 rr1 = rr0 + 1*rid_incr;
^1da177e4c3f41 include/asm-ia64/mmu_context.h Linus Torvalds 2005-04-16 136 rr2 = rr0 + 2*rid_incr;
^1da177e4c3f41 include/asm-ia64/mmu_context.h Linus Torvalds 2005-04-16 137 rr3 = rr0 + 3*rid_incr;
^1da177e4c3f41 include/asm-ia64/mmu_context.h Linus Torvalds 2005-04-16 138 rr4 = rr0 + 4*rid_incr;
^1da177e4c3f41 include/asm-ia64/mmu_context.h Linus Torvalds 2005-04-16 139 #ifdef CONFIG_HUGETLB_PAGE
^1da177e4c3f41 include/asm-ia64/mmu_context.h Linus Torvalds 2005-04-16 140 rr4 = (rr4 & (~(0xfcUL))) | (old_rr4 & 0xfc);
0a41e250116058 include/asm-ia64/mmu_context.h Peter Chubb 2005-08-16 141
:::::: The code at line 127 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[hch-block:bvec-phys 7/30] drivers/block/ps3disk.c:90:48: error: 'bv' undeclared; did you mean 'bvec'?
by kernel test robot
tree: git://git.infradead.org/users/hch/block.git bvec-phys
head: 1caceae1dbe2ae172c3df6aa09d8122e0cc6b9e3
commit: 2abcd5b331a54386d77b81e7bd8f5d5f8e675db9 [7/30] ps3disk: use memcpy_{from,to}_bvec
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-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
git remote add hch-block git://git.infradead.org/users/hch/block.git
git fetch --no-tags hch-block bvec-phys
git checkout 2abcd5b331a54386d77b81e7bd8f5d5f8e675db9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
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/block/ps3disk.c: In function 'ps3disk_scatter_gather':
>> drivers/block/ps3disk.c:90:48: error: 'bv' undeclared (first use in this function); did you mean 'bvec'?
90 | memcpy_from_bvec(dev->bounce_buf + offset, &bv)
| ^~
| bvec
drivers/block/ps3disk.c:90:48: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/block/ps3disk.c:90:51: error: expected ';' before 'else'
90 | memcpy_from_bvec(dev->bounce_buf + offset, &bv)
| ^
| ;
91 | else
| ~~~~
vim +90 drivers/block/ps3disk.c
79
80
81 static void ps3disk_scatter_gather(struct ps3_storage_device *dev,
82 struct request *req, int gather)
83 {
84 unsigned int offset = 0;
85 struct req_iterator iter;
86 struct bio_vec bvec;
87
88 rq_for_each_segment(bvec, req, iter) {
89 if (gather)
> 90 memcpy_from_bvec(dev->bounce_buf + offset, &bv)
91 else
92 memcpy_to_bvec(&bv dev->bounce_buf + offset);
93 offset += bvec.bv_len;
94 }
95 }
96
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[thomash:topic/ttm_branch_v3 8/14] drivers/gpu/drm/ttm/ttm_bo.c:582 ttm_bo_evict_swapout_allowable() warn: variable dereferenced before check 'locked' (see line 570)
by Dan Carpenter
tree: git://people.freedesktop.org/~thomash/linux topic/ttm_branch_v3
head: ed0bde777934916c30fbecb2b351f549eb3a0d0f
commit: dd4d9fc44dbd04b20f2f3a8d7d2512cf271ebe8a [8/14] drm/ttm, drm/amdgpu: Allow the driver some control over swapping
config: x86_64-randconfig-m001-20210520 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/gpu/drm/ttm/ttm_bo.c:582 ttm_bo_evict_swapout_allowable() warn: variable dereferenced before check 'locked' (see line 570)
Old smatch warnings:
drivers/gpu/drm/ttm/ttm_bo.c:687 ttm_mem_evict_first() warn: inconsistent returns '&bdev->lru_lock'.
vim +/locked +582 drivers/gpu/drm/ttm/ttm_bo.c
d5769ba315d8ff Roger He 2017-12-21 559 static bool ttm_bo_evict_swapout_allowable(struct ttm_buffer_object *bo,
dd4d9fc44dbd04 Thomas Hellström 2021-05-17 560 struct ttm_operation_ctx *ctx,
dd4d9fc44dbd04 Thomas Hellström 2021-05-17 561 const struct ttm_place *place,
dd4d9fc44dbd04 Thomas Hellström 2021-05-17 562 bool *locked, bool *busy)
d5769ba315d8ff Roger He 2017-12-21 563 {
d5769ba315d8ff Roger He 2017-12-21 564 bool ret = false;
d5769ba315d8ff Roger He 2017-12-21 565
e532a135d7044b Gerd Hoffmann 2019-08-05 566 if (bo->base.resv == ctx->resv) {
52791eeec1d9f4 Christian König 2019-08-11 567 dma_resv_assert_held(bo->base.resv);
c44dfe4de05391 Christian König 2020-11-02 568 if (ctx->allow_res_evict)
d5769ba315d8ff Roger He 2017-12-21 569 ret = true;
d367bd2a5e2b12 Christian König 2019-05-22 @570 *locked = false;
d367bd2a5e2b12 Christian König 2019-05-22 571 if (busy)
d367bd2a5e2b12 Christian König 2019-05-22 572 *busy = false;
d5769ba315d8ff Roger He 2017-12-21 573 } else {
52791eeec1d9f4 Christian König 2019-08-11 574 ret = dma_resv_trylock(bo->base.resv);
d367bd2a5e2b12 Christian König 2019-05-22 575 *locked = ret;
d367bd2a5e2b12 Christian König 2019-05-22 576 if (busy)
d367bd2a5e2b12 Christian König 2019-05-22 577 *busy = !ret;
d5769ba315d8ff Roger He 2017-12-21 578 }
d5769ba315d8ff Roger He 2017-12-21 579
dd4d9fc44dbd04 Thomas Hellström 2021-05-17 580 if (ret && place && !bo->bdev->funcs->eviction_valuable(bo, place)) {
dd4d9fc44dbd04 Thomas Hellström 2021-05-17 581 ret = false;
dd4d9fc44dbd04 Thomas Hellström 2021-05-17 @582 if (locked)
It should be "if (*locked)"
dd4d9fc44dbd04 Thomas Hellström 2021-05-17 583 dma_resv_unlock(bo->base.resv);
dd4d9fc44dbd04 Thomas Hellström 2021-05-17 584 }
dd4d9fc44dbd04 Thomas Hellström 2021-05-17 585
d5769ba315d8ff Roger He 2017-12-21 586 return ret;
d5769ba315d8ff Roger He 2017-12-21 587 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[rdma:for-next 11/17] drivers/infiniband/sw/rxe/rxe_verbs.c:1115:2: warning: initializer overrides prior initialization of this subobject
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
head: 0b7216f4521fa511ce43f30f50a5b67b0d5cf15c
commit: 9081b2315bbf7535ded6e402204290525e4b3a04 [11/17] RDMA/rxe: Add ib_alloc_mw and ib_dealloc_mw verbs
config: x86_64-randconfig-a016-20210520 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project bf9ef3efaa99c02e7bfc4c57207301b8de39a278)
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/rdma/rdma.git/commit/?id=...
git remote add rdma https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git
git fetch --no-tags rdma for-next
git checkout 9081b2315bbf7535ded6e402204290525e4b3a04
# 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 >>):
>> drivers/infiniband/sw/rxe/rxe_verbs.c:1115:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
INIT_RDMA_OBJ_SIZE(ib_mw, rxe_mw, ibmw),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/rdma/ib_verbs.h:2261:3: note: expanded from macro 'INIT_RDMA_OBJ_SIZE'
(sizeof(struct drv_struct) + \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/sw/rxe/rxe_verbs.c:1111:2: note: previous initialization is here
INIT_RDMA_OBJ_SIZE(ib_mw, rxe_mw, ibmw),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/rdma/ib_verbs.h:2261:3: note: expanded from macro 'INIT_RDMA_OBJ_SIZE'
(sizeof(struct drv_struct) + \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +1115 drivers/infiniband/sw/rxe/rxe_verbs.c
ca22354b140853b Jason Gunthorpe 2019-02-12 1055
573efc4b3ce8f01 Kamal Heib 2018-12-10 1056 static const struct ib_device_ops rxe_dev_ops = {
7a15414252ae4f1 Jason Gunthorpe 2019-06-05 1057 .owner = THIS_MODULE,
b9560a419bfd498 Jason Gunthorpe 2019-06-05 1058 .driver_id = RDMA_DRIVER_RXE,
72c6ec18eb6161c Jason Gunthorpe 2019-06-05 1059 .uverbs_abi_ver = RXE_UVERBS_ABI_VERSION,
b9560a419bfd498 Jason Gunthorpe 2019-06-05 1060
573efc4b3ce8f01 Kamal Heib 2018-12-10 1061 .alloc_hw_stats = rxe_ib_alloc_hw_stats,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1062 .alloc_mr = rxe_alloc_mr,
9081b2315bbf753 Bob Pearson 2021-04-29 1063 .alloc_mw = rxe_alloc_mw,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1064 .alloc_pd = rxe_alloc_pd,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1065 .alloc_ucontext = rxe_alloc_ucontext,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1066 .attach_mcast = rxe_attach_mcast,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1067 .create_ah = rxe_create_ah,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1068 .create_cq = rxe_create_cq,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1069 .create_qp = rxe_create_qp,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1070 .create_srq = rxe_create_srq,
676a80adba0131e Jason Gunthorpe 2020-10-03 1071 .create_user_ah = rxe_create_ah,
c367074b6c37c2d Jason Gunthorpe 2019-01-22 1072 .dealloc_driver = rxe_dealloc,
9081b2315bbf753 Bob Pearson 2021-04-29 1073 .dealloc_mw = rxe_dealloc_mw,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1074 .dealloc_pd = rxe_dealloc_pd,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1075 .dealloc_ucontext = rxe_dealloc_ucontext,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1076 .dereg_mr = rxe_dereg_mr,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1077 .destroy_ah = rxe_destroy_ah,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1078 .destroy_cq = rxe_destroy_cq,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1079 .destroy_qp = rxe_destroy_qp,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1080 .destroy_srq = rxe_destroy_srq,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1081 .detach_mcast = rxe_detach_mcast,
ca22354b140853b Jason Gunthorpe 2019-02-12 1082 .enable_driver = rxe_enable_driver,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1083 .get_dma_mr = rxe_get_dma_mr,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1084 .get_hw_stats = rxe_ib_get_hw_stats,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1085 .get_link_layer = rxe_get_link_layer,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1086 .get_port_immutable = rxe_port_immutable,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1087 .map_mr_sg = rxe_map_mr_sg,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1088 .mmap = rxe_mmap,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1089 .modify_ah = rxe_modify_ah,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1090 .modify_device = rxe_modify_device,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1091 .modify_port = rxe_modify_port,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1092 .modify_qp = rxe_modify_qp,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1093 .modify_srq = rxe_modify_srq,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1094 .peek_cq = rxe_peek_cq,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1095 .poll_cq = rxe_poll_cq,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1096 .post_recv = rxe_post_recv,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1097 .post_send = rxe_post_send,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1098 .post_srq_recv = rxe_post_srq_recv,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1099 .query_ah = rxe_query_ah,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1100 .query_device = rxe_query_device,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1101 .query_pkey = rxe_query_pkey,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1102 .query_port = rxe_query_port,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1103 .query_qp = rxe_query_qp,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1104 .query_srq = rxe_query_srq,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1105 .reg_user_mr = rxe_reg_user_mr,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1106 .req_notify_cq = rxe_req_notify_cq,
573efc4b3ce8f01 Kamal Heib 2018-12-10 1107 .resize_cq = rxe_resize_cq,
d345691471b426e Leon Romanovsky 2019-04-03 1108
d345691471b426e Leon Romanovsky 2019-04-03 1109 INIT_RDMA_OBJ_SIZE(ib_ah, rxe_ah, ibah),
e39afe3d6dbd908 Leon Romanovsky 2019-05-28 1110 INIT_RDMA_OBJ_SIZE(ib_cq, rxe_cq, ibcq),
9081b2315bbf753 Bob Pearson 2021-04-29 1111 INIT_RDMA_OBJ_SIZE(ib_mw, rxe_mw, ibmw),
21a428a019c9a6d Leon Romanovsky 2019-02-03 1112 INIT_RDMA_OBJ_SIZE(ib_pd, rxe_pd, ibpd),
68e326dea1dba93 Leon Romanovsky 2019-04-03 1113 INIT_RDMA_OBJ_SIZE(ib_srq, rxe_srq, ibsrq),
a2a074ef396f873 Leon Romanovsky 2019-02-12 1114 INIT_RDMA_OBJ_SIZE(ib_ucontext, rxe_ucontext, ibuc),
364e282c4fe7e24 Bob Pearson 2021-03-25 @1115 INIT_RDMA_OBJ_SIZE(ib_mw, rxe_mw, ibmw),
573efc4b3ce8f01 Kamal Heib 2018-12-10 1116 };
573efc4b3ce8f01 Kamal Heib 2018-12-10 1117
:::::: The code at line 1115 was first introduced by commit
:::::: 364e282c4fe7e24a5f32cd6e93e1056c6a6e3d31 RDMA/rxe: Split MEM into MR and MW
:::::: TO: Bob Pearson <rpearsonhpe(a)gmail.com>
:::::: CC: Jason Gunthorpe <jgg(a)nvidia.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
arch/mips/mm/tlbex.c:2599 check_pabits() warn: always true condition '(fillbits >= ((__builtin_constant_p(0)) ?(((0) < 2) ?0:63 - __builtin_clzll(0)):((4 <= 4)) ?__ilog2_u32(0):__ilog2_u64(0))) => (0-u32max >= 0)'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c3d0e3fd41b7f0f5d5d5b6022ab7e813f04ea727
commit: 2f78788b55baa3410b1ec91a576286abe1ad4d6a ilog2: improve ilog2 for constant arguments
date: 5 months ago
config: mips-randconfig-m031-20210520 (attached as .config)
compiler: mips64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
arch/mips/mm/tlbex.c:2599 check_pabits() warn: always true condition '(fillbits >= ((__builtin_constant_p(0)) ?(((0) < 2) ?0:63 - __builtin_clzll(0)):((4 <= 4)) ?__ilog2_u32(0):__ilog2_u64(0))) => (0-u32max >= 0)'
vim +2599 arch/mips/mm/tlbex.c
c5b367835cfc7a8 Steven J. Hill 2015-02-26 2569
00bf1c691d082c1 Paul Burton 2015-09-22 2570 static void check_pabits(void)
00bf1c691d082c1 Paul Burton 2015-09-22 2571 {
00bf1c691d082c1 Paul Burton 2015-09-22 2572 unsigned long entry;
00bf1c691d082c1 Paul Burton 2015-09-22 2573 unsigned pabits, fillbits;
00bf1c691d082c1 Paul Burton 2015-09-22 2574
00bf1c691d082c1 Paul Burton 2015-09-22 2575 if (!cpu_has_rixi || !_PAGE_NO_EXEC) {
00bf1c691d082c1 Paul Burton 2015-09-22 2576 /*
00bf1c691d082c1 Paul Burton 2015-09-22 2577 * We'll only be making use of the fact that we can rotate bits
00bf1c691d082c1 Paul Burton 2015-09-22 2578 * into the fill if the CPU supports RIXI, so don't bother
00bf1c691d082c1 Paul Burton 2015-09-22 2579 * probing this for CPUs which don't.
00bf1c691d082c1 Paul Burton 2015-09-22 2580 */
00bf1c691d082c1 Paul Burton 2015-09-22 2581 return;
00bf1c691d082c1 Paul Burton 2015-09-22 2582 }
00bf1c691d082c1 Paul Burton 2015-09-22 2583
00bf1c691d082c1 Paul Burton 2015-09-22 2584 write_c0_entrylo0(~0ul);
00bf1c691d082c1 Paul Burton 2015-09-22 2585 back_to_back_c0_hazard();
00bf1c691d082c1 Paul Burton 2015-09-22 2586 entry = read_c0_entrylo0();
00bf1c691d082c1 Paul Burton 2015-09-22 2587
00bf1c691d082c1 Paul Burton 2015-09-22 2588 /* clear all non-PFN bits */
00bf1c691d082c1 Paul Burton 2015-09-22 2589 entry &= ~((1 << MIPS_ENTRYLO_PFN_SHIFT) - 1);
00bf1c691d082c1 Paul Burton 2015-09-22 2590 entry &= ~(MIPS_ENTRYLO_RI | MIPS_ENTRYLO_XI);
00bf1c691d082c1 Paul Burton 2015-09-22 2591
00bf1c691d082c1 Paul Burton 2015-09-22 2592 /* find a lower bound on PABITS, and upper bound on fill bits */
00bf1c691d082c1 Paul Burton 2015-09-22 2593 pabits = fls_long(entry) + 6;
00bf1c691d082c1 Paul Burton 2015-09-22 2594 fillbits = max_t(int, (int)BITS_PER_LONG - pabits, 0);
00bf1c691d082c1 Paul Burton 2015-09-22 2595
00bf1c691d082c1 Paul Burton 2015-09-22 2596 /* minus the RI & XI bits */
00bf1c691d082c1 Paul Burton 2015-09-22 2597 fillbits -= min_t(unsigned, fillbits, 2);
00bf1c691d082c1 Paul Burton 2015-09-22 2598
00bf1c691d082c1 Paul Burton 2015-09-22 @2599 if (fillbits >= ilog2(_PAGE_NO_EXEC))
00bf1c691d082c1 Paul Burton 2015-09-22 2600 fill_includes_sw_bits = true;
00bf1c691d082c1 Paul Burton 2015-09-22 2601
00bf1c691d082c1 Paul Burton 2015-09-22 2602 pr_debug("Entry* registers contain %u fill bits\n", fillbits);
00bf1c691d082c1 Paul Burton 2015-09-22 2603 }
00bf1c691d082c1 Paul Burton 2015-09-22 2604
:::::: The code at line 2599 was first introduced by commit
:::::: 00bf1c691d082c1945fdba032c03a9a82e9e7e61 MIPS: tlbex: Avoid placing software PTE bits in Entry* PFN fields
:::::: TO: Paul Burton <paul.burton(a)imgtec.com>
:::::: CC: Ralf Baechle <ralf(a)linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[dm:for-next 5/8] drivers/md/persistent-data/dm-btree.c:702:5: warning: no previous prototype for function 'shadow_child'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next
head: 68040817337fda98196974401391f2d1b9f87e49
commit: d69e2e7e28bd1d13ad2ac1f2e9ea6184567d1587 [5/8] dm btree: improve btree residency
config: x86_64-randconfig-a013-20210520 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project bf9ef3efaa99c02e7bfc4c57207301b8de39a278)
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/device-mapper/linux-dm.gi...
git remote add dm https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
git fetch --no-tags dm for-next
git checkout d69e2e7e28bd1d13ad2ac1f2e9ea6184567d1587
# 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 >>):
>> drivers/md/persistent-data/dm-btree.c:702:5: warning: no previous prototype for function 'shadow_child' [-Wmissing-prototypes]
int shadow_child(struct dm_btree_info *info, struct dm_btree_value_type *vt,
^
drivers/md/persistent-data/dm-btree.c:702:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int shadow_child(struct dm_btree_info *info, struct dm_btree_value_type *vt,
^
static
1 warning generated.
vim +/shadow_child +702 drivers/md/persistent-data/dm-btree.c
696
697 /*
698 * We often need to modify a sibling node. This function shadows a particular
699 * child of the given parent node. Making sure to update the parent to point
700 * to the new shadow.
701 */
> 702 int shadow_child(struct dm_btree_info *info, struct dm_btree_value_type *vt,
703 struct btree_node *parent, unsigned index, struct dm_block **result)
704 {
705 int r, inc;
706 dm_block_t root;
707 struct btree_node *node;
708
709 root = value64(parent, index);
710
711 r = dm_tm_shadow_block(info->tm, root, &btree_node_validator,
712 result, &inc);
713 if (r)
714 return r;
715
716 node = dm_block_data(*result);
717
718 if (inc)
719 inc_children(info->tm, node, vt);
720
721 *((__le64 *) value_ptr(parent, index)) =
722 cpu_to_le64(dm_block_location(*result));
723
724 return 0;
725 }
726
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[dm:for-next 7/8] include/uapi/linux/byteorder/little_endian.h:32:42: warning: cast from pointer to integer of different size
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next
head: 68040817337fda98196974401391f2d1b9f87e49
commit: def6a7a9a7f0e7e3886fb77cf45c4a48e7e71c36 [7/8] dm space maps: improve performance with inc/dec on ranges of blocks
config: i386-allyesconfig (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/device-mapper/linux-dm.gi...
git remote add dm https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
git fetch --no-tags dm for-next
git checkout def6a7a9a7f0e7e3886fb77cf45c4a48e7e71c36
# 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 warnings (new ones prefixed by >>):
In file included from include/linux/byteorder/little_endian.h:5,
from arch/x86/include/uapi/asm/byteorder.h:5,
from include/asm-generic/bitops/le.h:7,
from arch/x86/include/asm/bitops.h:395,
from include/linux/bitops.h:32,
from include/linux/kernel.h:12,
from arch/x86/include/asm/percpu.h:27,
from arch/x86/include/asm/current.h:6,
from include/linux/sched.h:12,
from include/linux/blkdev.h:5,
from drivers/md/persistent-data/dm-block-manager.h:11,
from drivers/md/persistent-data/dm-btree.h:9,
from drivers/md/persistent-data/dm-array.h:9,
from drivers/md/persistent-data/dm-array.c:7:
drivers/md/persistent-data/dm-array.c: In function 'block_inc':
>> include/uapi/linux/byteorder/little_endian.h:32:42: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
32 | #define __le64_to_cpu(x) ((__force __u64)(__le64)(x))
| ^
include/linux/byteorder/generic.h:87:21: note: in expansion of macro '__le64_to_cpu'
87 | #define le64_to_cpu __le64_to_cpu
| ^~~~~~~~~~~~~
drivers/md/persistent-data/dm-array.c:578:34: note: in expansion of macro 'le64_to_cpu'
578 | dm_tm_inc(info->btree_info.tm, le64_to_cpu(block_le));
| ^~~~~~~~~~~
vim +32 include/uapi/linux/byteorder/little_endian.h
5921e6f8809b161 David Howells 2012-10-13 14
5921e6f8809b161 David Howells 2012-10-13 15 #define __constant_htonl(x) ((__force __be32)___constant_swab32((x)))
5921e6f8809b161 David Howells 2012-10-13 16 #define __constant_ntohl(x) ___constant_swab32((__force __be32)(x))
5921e6f8809b161 David Howells 2012-10-13 17 #define __constant_htons(x) ((__force __be16)___constant_swab16((x)))
5921e6f8809b161 David Howells 2012-10-13 18 #define __constant_ntohs(x) ___constant_swab16((__force __be16)(x))
5921e6f8809b161 David Howells 2012-10-13 19 #define __constant_cpu_to_le64(x) ((__force __le64)(__u64)(x))
5921e6f8809b161 David Howells 2012-10-13 20 #define __constant_le64_to_cpu(x) ((__force __u64)(__le64)(x))
5921e6f8809b161 David Howells 2012-10-13 21 #define __constant_cpu_to_le32(x) ((__force __le32)(__u32)(x))
5921e6f8809b161 David Howells 2012-10-13 22 #define __constant_le32_to_cpu(x) ((__force __u32)(__le32)(x))
5921e6f8809b161 David Howells 2012-10-13 23 #define __constant_cpu_to_le16(x) ((__force __le16)(__u16)(x))
5921e6f8809b161 David Howells 2012-10-13 24 #define __constant_le16_to_cpu(x) ((__force __u16)(__le16)(x))
5921e6f8809b161 David Howells 2012-10-13 25 #define __constant_cpu_to_be64(x) ((__force __be64)___constant_swab64((x)))
5921e6f8809b161 David Howells 2012-10-13 26 #define __constant_be64_to_cpu(x) ___constant_swab64((__force __u64)(__be64)(x))
5921e6f8809b161 David Howells 2012-10-13 27 #define __constant_cpu_to_be32(x) ((__force __be32)___constant_swab32((x)))
5921e6f8809b161 David Howells 2012-10-13 28 #define __constant_be32_to_cpu(x) ___constant_swab32((__force __u32)(__be32)(x))
5921e6f8809b161 David Howells 2012-10-13 29 #define __constant_cpu_to_be16(x) ((__force __be16)___constant_swab16((x)))
5921e6f8809b161 David Howells 2012-10-13 30 #define __constant_be16_to_cpu(x) ___constant_swab16((__force __u16)(__be16)(x))
5921e6f8809b161 David Howells 2012-10-13 31 #define __cpu_to_le64(x) ((__force __le64)(__u64)(x))
5921e6f8809b161 David Howells 2012-10-13 @32 #define __le64_to_cpu(x) ((__force __u64)(__le64)(x))
5921e6f8809b161 David Howells 2012-10-13 33 #define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
5921e6f8809b161 David Howells 2012-10-13 34 #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
5921e6f8809b161 David Howells 2012-10-13 35 #define __cpu_to_le16(x) ((__force __le16)(__u16)(x))
5921e6f8809b161 David Howells 2012-10-13 36 #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
5921e6f8809b161 David Howells 2012-10-13 37 #define __cpu_to_be64(x) ((__force __be64)__swab64((x)))
5921e6f8809b161 David Howells 2012-10-13 38 #define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x))
5921e6f8809b161 David Howells 2012-10-13 39 #define __cpu_to_be32(x) ((__force __be32)__swab32((x)))
5921e6f8809b161 David Howells 2012-10-13 40 #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
5921e6f8809b161 David Howells 2012-10-13 41 #define __cpu_to_be16(x) ((__force __be16)__swab16((x)))
5921e6f8809b161 David Howells 2012-10-13 42 #define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
5921e6f8809b161 David Howells 2012-10-13 43
:::::: The code at line 32 was first introduced by commit
:::::: 5921e6f8809b1616932ca4afd40fe449faa8fd88 UAPI: (Scripted) Disintegrate include/linux/byteorder
:::::: TO: David Howells <dhowells(a)redhat.com>
:::::: CC: David Howells <dhowells(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[kbuild] [kees:kspp/memcpy/next-20210519/v0 49/53] drivers/scsi/aha1740.c:271:19: warning: argument to 'sizeof' in '__builtin_memcpy' call is the same expression as the destination; did you mean to provide an explicit length?
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/memcpy/next-20210519/v0
head: 48fff7f29af65f2ab9e56bc71a0ef652f91a68cd
commit: 431fe12213302a60466170edda968b1ce84c9c16 [49/53] fortify: Detect struct member overflows in mem{cpy,move,set}()
config: i386-randconfig-c001-20210519 (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/kees/linux.git/commit/?id...
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees kspp/memcpy/next-20210519/v0
git checkout 431fe12213302a60466170edda968b1ce84c9c16
# 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 warnings (new ones prefixed by >>):
In file included from arch/x86/include/asm/string.h:3,
from include/linux/string.h:21,
from arch/x86/include/asm/page_32.h:35,
from arch/x86/include/asm/page.h:14,
from arch/x86/include/asm/thread_info.h:12,
from include/linux/thread_info.h:60,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/blkdev.h:5,
from drivers/scsi/aha1740.c:40:
drivers/scsi/aha1740.c: In function 'aha1740_intr_handle':
>> drivers/scsi/aha1740.c:271:19: warning: argument to 'sizeof' in '__builtin_memcpy' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
271 | sizeof(SCtmp->sense_buffer),
| ^
arch/x86/include/asm/string_32.h:182:48: note: in definition of macro 'memcpy'
182 | #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
| ^
drivers/scsi/aha1740.c:270:5: note: in expansion of macro 'memcpy_and_pad'
270 | memcpy_and_pad(SCtmp->sense_buffer,
| ^~~~~~~~~~~~~~
vim +271 drivers/scsi/aha1740.c
7d12e780e003f93 David Howells 2006-10-05 208 static irqreturn_t aha1740_intr_handle(int irq, void *dev_id)
^1da177e4c3f415 Linus Torvalds 2005-04-16 209 {
^1da177e4c3f415 Linus Torvalds 2005-04-16 210 struct Scsi_Host *host = (struct Scsi_Host *) dev_id;
91ebc1facd7797d Johannes Thumshirn 2018-06-13 211 void (*my_done)(struct scsi_cmnd *);
^1da177e4c3f415 Linus Torvalds 2005-04-16 212 int errstatus, adapstat;
^1da177e4c3f415 Linus Torvalds 2005-04-16 213 int number_serviced;
^1da177e4c3f415 Linus Torvalds 2005-04-16 214 struct ecb *ecbptr;
91ebc1facd7797d Johannes Thumshirn 2018-06-13 215 struct scsi_cmnd *SCtmp;
^1da177e4c3f415 Linus Torvalds 2005-04-16 216 unsigned int base;
^1da177e4c3f415 Linus Torvalds 2005-04-16 217 unsigned long flags;
^1da177e4c3f415 Linus Torvalds 2005-04-16 218 int handled = 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 219 struct aha1740_sg *sgptr;
^1da177e4c3f415 Linus Torvalds 2005-04-16 220 struct eisa_device *edev;
^1da177e4c3f415 Linus Torvalds 2005-04-16 221
^1da177e4c3f415 Linus Torvalds 2005-04-16 222 if (!host)
^1da177e4c3f415 Linus Torvalds 2005-04-16 223 panic("aha1740.c: Irq from unknown host!\n");
^1da177e4c3f415 Linus Torvalds 2005-04-16 224 spin_lock_irqsave(host->host_lock, flags);
^1da177e4c3f415 Linus Torvalds 2005-04-16 225 base = host->io_port;
^1da177e4c3f415 Linus Torvalds 2005-04-16 226 number_serviced = 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 227 edev = HOSTDATA(host)->edev;
^1da177e4c3f415 Linus Torvalds 2005-04-16 228
^1da177e4c3f415 Linus Torvalds 2005-04-16 229 while(inb(G2STAT(base)) & G2STAT_INTPEND) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 230 handled = 1;
^1da177e4c3f415 Linus Torvalds 2005-04-16 231 DEB(printk("aha1740_intr top of loop.\n"));
^1da177e4c3f415 Linus Torvalds 2005-04-16 232 adapstat = inb(G2INTST(base));
^1da177e4c3f415 Linus Torvalds 2005-04-16 233 ecbptr = ecb_dma_to_cpu (host, inl(MBOXIN0(base)));
^1da177e4c3f415 Linus Torvalds 2005-04-16 234 outb(G2CNTRL_IRST,G2CNTRL(base)); /* interrupt reset */
^1da177e4c3f415 Linus Torvalds 2005-04-16 235
^1da177e4c3f415 Linus Torvalds 2005-04-16 236 switch ( adapstat & G2INTST_MASK ) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 237 case G2INTST_CCBRETRY:
^1da177e4c3f415 Linus Torvalds 2005-04-16 238 case G2INTST_CCBERROR:
^1da177e4c3f415 Linus Torvalds 2005-04-16 239 case G2INTST_CCBGOOD:
^1da177e4c3f415 Linus Torvalds 2005-04-16 240 /* Host Ready -> Mailbox in complete */
^1da177e4c3f415 Linus Torvalds 2005-04-16 241 outb(G2CNTRL_HRDY,G2CNTRL(base));
^1da177e4c3f415 Linus Torvalds 2005-04-16 242 if (!ecbptr) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 243 printk("Aha1740 null ecbptr in interrupt (%x,%x,%x,%d)\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 244 inb(G2STAT(base)),adapstat,
^1da177e4c3f415 Linus Torvalds 2005-04-16 245 inb(G2INTST(base)), number_serviced++);
^1da177e4c3f415 Linus Torvalds 2005-04-16 246 continue;
^1da177e4c3f415 Linus Torvalds 2005-04-16 247 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 248 SCtmp = ecbptr->SCpnt;
^1da177e4c3f415 Linus Torvalds 2005-04-16 249 if (!SCtmp) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 250 printk("Aha1740 null SCtmp in interrupt (%x,%x,%x,%d)\n",
^1da177e4c3f415 Linus Torvalds 2005-04-16 251 inb(G2STAT(base)),adapstat,
^1da177e4c3f415 Linus Torvalds 2005-04-16 252 inb(G2INTST(base)), number_serviced++);
^1da177e4c3f415 Linus Torvalds 2005-04-16 253 continue;
^1da177e4c3f415 Linus Torvalds 2005-04-16 254 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 255 sgptr = (struct aha1740_sg *) SCtmp->host_scribble;
c66cc13c16377d1 FUJITA Tomonori 2007-05-14 256 scsi_dma_unmap(SCtmp);
^1da177e4c3f415 Linus Torvalds 2005-04-16 257
^1da177e4c3f415 Linus Torvalds 2005-04-16 258 /* Free the sg block */
^1da177e4c3f415 Linus Torvalds 2005-04-16 259 dma_free_coherent (&edev->dev,
^1da177e4c3f415 Linus Torvalds 2005-04-16 260 sizeof (struct aha1740_sg),
^1da177e4c3f415 Linus Torvalds 2005-04-16 261 SCtmp->host_scribble,
^1da177e4c3f415 Linus Torvalds 2005-04-16 262 sgptr->sg_dma_addr);
^1da177e4c3f415 Linus Torvalds 2005-04-16 263
^1da177e4c3f415 Linus Torvalds 2005-04-16 264 /* Fetch the sense data, and tuck it away, in
^1da177e4c3f415 Linus Torvalds 2005-04-16 265 the required slot. The Adaptec
^1da177e4c3f415 Linus Torvalds 2005-04-16 266 automatically fetches it, and there is no
^1da177e4c3f415 Linus Torvalds 2005-04-16 267 guarantee that we will still have it in the
^1da177e4c3f415 Linus Torvalds 2005-04-16 268 cdb when we come back */
^1da177e4c3f415 Linus Torvalds 2005-04-16 269 if ( (adapstat & G2INTST_MASK) == G2INTST_CCBERROR ) {
123445f622832f3 Kees Cook 2021-04-14 270 memcpy_and_pad(SCtmp->sense_buffer,
123445f622832f3 Kees Cook 2021-04-14 @271 sizeof(SCtmp->sense_buffer),
I don't understand this warning, but SCtmp->sense_buffer is char pointer
so this can't be right. It should probably be SCSI_SENSE_BUFFERSIZE
still.
123445f622832f3 Kees Cook 2021-04-14 272 ecbptr->sense,
123445f622832f3 Kees Cook 2021-04-14 273 min(sizeof(SCtmp->sense_buffer),
123445f622832f3 Kees Cook 2021-04-14 274 sizeof(ecbptr->sense)),
123445f622832f3 Kees Cook 2021-04-14 275 0);
^1da177e4c3f415 Linus Torvalds 2005-04-16 276 errstatus = aha1740_makecode(ecbptr->sense,ecbptr->status);
^1da177e4c3f415 Linus Torvalds 2005-04-16 277 } else
^1da177e4c3f415 Linus Torvalds 2005-04-16 278 errstatus = 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 279 DEB(if (errstatus)
regards,
dan carpenter
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
1 year, 4 months
[hch-block:bvec-phys 23/30] drivers/vhost/vringh.c:1185:2: error: 'kaddr' undeclared
by kernel test robot
Hi Christoph,
FYI, the error/warning still remains.
tree: git://git.infradead.org/users/hch/block.git bvec-phys
head: 1caceae1dbe2ae172c3df6aa09d8122e0cc6b9e3
commit: 89142b678be44d8b11844add9d2b511dcb66edd9 [23/30] vhost: use bvec_kmap_local in {get,put}u16_iotlb
config: ia64-allmodconfig (attached as .config)
compiler: ia64-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
git remote add hch-block git://git.infradead.org/users/hch/block.git
git fetch --no-tags hch-block bvec-phys
git checkout 89142b678be44d8b11844add9d2b511dcb66edd9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
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/vhost/vringh.c: In function 'getu16_iotlb':
>> drivers/vhost/vringh.c:1185:2: error: 'kaddr' undeclared (first use in this function)
1185 | kaddr = bvec_kmap_local(&iov);
| ^~~~~
drivers/vhost/vringh.c:1185:2: note: each undeclared identifier is reported only once for each function it appears in
drivers/vhost/vringh.c:1176:8: warning: unused variable 'from' [-Wunused-variable]
1176 | void *from;
| ^~~~
drivers/vhost/vringh.c: In function 'putu16_iotlb':
>> drivers/vhost/vringh.c:1207:2: error: implicit declaration of function 'kunmap_loal'; did you mean 'kunmap_local'? [-Werror=implicit-function-declaration]
1207 | kunmap_loal(kaddr);
| ^~~~~~~~~~~
| kunmap_local
cc1: some warnings being treated as errors
vim +/kaddr +1185 drivers/vhost/vringh.c
1171
1172 static inline int getu16_iotlb(const struct vringh *vrh,
1173 u16 *val, const __virtio16 *p)
1174 {
1175 struct bio_vec iov;
1176 void *from;
1177 int ret;
1178
1179 /* Atomic read is needed for getu16 */
1180 ret = iotlb_translate(vrh, (u64)(uintptr_t)p, sizeof(*p),
1181 &iov, 1, VHOST_MAP_RO);
1182 if (ret < 0)
1183 return ret;
1184
> 1185 kaddr = bvec_kmap_local(&iov);
1186 *val = vringh16_to_cpu(vrh, READ_ONCE(*(__virtio16 *)kaddr));
1187 kunmap_local(kaddr);
1188
1189 return 0;
1190 }
1191
1192 static inline int putu16_iotlb(const struct vringh *vrh,
1193 __virtio16 *p, u16 val)
1194 {
1195 struct bio_vec iov;
1196 void *kaddr;
1197 int ret;
1198
1199 /* Atomic write is needed for putu16 */
1200 ret = iotlb_translate(vrh, (u64)(uintptr_t)p, sizeof(*p),
1201 &iov, 1, VHOST_MAP_WO);
1202 if (ret < 0)
1203 return ret;
1204
1205 kaddr = bvec_kmap_local(&iov);
1206 WRITE_ONCE(*(__virtio16 *)kaddr, cpu_to_vringh16(vrh, val));
> 1207 kunmap_loal(kaddr);
1208
1209 return 0;
1210 }
1211
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months