public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Hannes Reinecke <hare@suse.de>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [hare-scsi-devel:scsi-private.v2 10/21] include/linux/compiler_types.h:140:41: error: 'struct CommandList' has no member named 'refcount'
Date: Fri, 12 Nov 2021 10:00:12 +0800	[thread overview]
Message-ID: <202111121005.KKwwqDM8-lkp@intel.com> (raw)

[-- 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 --]

                 reply	other threads:[~2021-11-12  2:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202111121005.KKwwqDM8-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hare@suse.de \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox