linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [hare-scsi-devel:scsi-private.v2 10/21] include/linux/compiler_types.h:140:41: error: 'struct CommandList' has no member named 'refcount'
@ 2021-11-12  2:00 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-11-12  2:00 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 5640 bytes --]

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@intel.com>

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@bytedance.com>
:::::: CC: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 69180 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-12  2:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12  2:00 [hare-scsi-devel:scsi-private.v2 10/21] include/linux/compiler_types.h:140:41: error: 'struct CommandList' has no member named 'refcount' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).