[hare-scsi-devel:scsi-private.v2 10/21] include/linux/compiler_types.h:140:41: error: 'struct CommandList' has no member named 'refcount'
From: kernel test robot
Date: Thu Nov 11 2021 - 21:01:30 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git scsi-private.v2
head: 915b986531e666d840f72752c597fb6b4ea69d35
commit: 6c35d6adbd0e5c8c4634ca29482138fa9f369acb [10/21] hpsa: drop refcount field from CommandList
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/commit/?id=6c35d6adbd0e5c8c4634ca29482138fa9f369acb
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 6c35d6adbd0e5c8c4634ca29482138fa9f369acb
# 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@xxxxxxxxx>
All errors (new ones prefixed by >>):
In file included from include/linux/bits.h:22,
from include/linux/bitops.h:6,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/scsi/hpsa.c:21:
>> include/linux/compiler_types.h:140:41: error: 'struct CommandList' has no member named 'refcount'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
drivers/scsi/hpsa_cmd.h:466:1: note: in expansion of macro 'static_assert'
466 | static_assert(offsetof(struct CommandList, refcount) % __alignof__(atomic_t) == 0);
| ^~~~~~~~~~~~~
include/linux/stddef.h:17:33: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
drivers/scsi/hpsa_cmd.h:466:15: note: in expansion of macro 'offsetof'
466 | static_assert(offsetof(struct CommandList, refcount) % __alignof__(atomic_t) == 0);
| ^~~~~~~~
include/linux/compiler_types.h:140:41: error: expression in static assertion is not an integer
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
drivers/scsi/hpsa_cmd.h:466:1: note: in expansion of macro 'static_assert'
466 | static_assert(offsetof(struct CommandList, refcount) % __alignof__(atomic_t) == 0);
| ^~~~~~~~~~~~~
include/linux/stddef.h:17:33: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
drivers/scsi/hpsa_cmd.h:466:15: note: in expansion of macro 'offsetof'
466 | static_assert(offsetof(struct CommandList, refcount) % __alignof__(atomic_t) == 0);
| ^~~~~~~~
drivers/scsi/hpsa.c: In function 'hpsa_eh_device_reset_handler':
drivers/scsi/hpsa.c:6071:33: error: 'struct scsi_cmnd' has no member named 'request'
6071 | scsicmd->request->tag);
| ^~
drivers/scsi/hpsa.c:6081:33: error: 'struct scsi_cmnd' has no member named 'request'
6081 | scsicmd->request->tag);
| ^~
drivers/scsi/hpsa.c: In function 'cmd_alloc':
drivers/scsi/hpsa.c:6196:43: error: passing argument 1 of 'scsi_host_get_internal_cmd' from incompatible pointer type [-Werror=incompatible-pointer-types]
6196 | 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 +140 include/linux/compiler_types.h
71391bdd2e9aab1 Xiaozhou Liu 2018-12-14 139
71391bdd2e9aab1 Xiaozhou Liu 2018-12-14 @140 #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
71391bdd2e9aab1 Xiaozhou Liu 2018-12-14 141
:::::: The code at line 140 was first introduced by commit
:::::: 71391bdd2e9aab188f86bf1ecd9b232531ec7eea include/linux/compiler_types.h: don't pollute userspace with macro definitions
:::::: TO: Xiaozhou Liu <liuxiaozhou@xxxxxxxxxxxxx>
:::::: CC: Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip