All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [drm-drm-misc:drm-misc-next 5/5] include/linux/kernel.h:994:32: error: dereferencing pointer to incomplete type 'struct drm_bridge'
Date: Mon, 11 Nov 2019 23:53:20 +0800	[thread overview]
Message-ID: <201911112308.UOBDjIac%lkp@intel.com> (raw)

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

tree:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
head:   6aa192698089b450b06d609355fc9c82c07856d2
commit: 6aa192698089b450b06d609355fc9c82c07856d2 [5/5] drm/bridge: Add Analogix anx6345 support
config: i386-randconfig-h004-201945 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        git checkout 6aa192698089b450b06d609355fc9c82c07856d2
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:48:20: error: field 'bridge' has incomplete type
     struct drm_bridge bridge;
                       ^~~~~~
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:52:21: error: field 'link' has incomplete type
     struct drm_dp_link link;
                        ^~~~
   In file included from include/linux/export.h:44:0,
                    from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from include/linux/delay.h:22,
                    from drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:9:
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c: In function 'bridge_to_anx6345':
>> include/linux/kernel.h:994:32: error: dereferencing pointer to incomplete type 'struct drm_bridge'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
                                   ^~~~~~
   include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
      if (!(condition))     \
            ^~~~~~~~~
   include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:994:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
     ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:994:20: note: in expansion of macro '__same_type'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
                       ^~~~~~~~~~~
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:76:9: note: in expansion of macro 'container_of'
     return container_of(bridge, struct anx6345, bridge);
            ^~~~~~~~~~~~
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c: In function 'anx6345_dp_link_training':
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:148:8: error: implicit declaration of function 'drm_dp_link_probe'; did you mean 'drm_dp_dpcd_write'? [-Werror=implicit-function-declaration]
     err = drm_dp_link_probe(&anx6345->aux, &anx6345->link);
           ^~~~~~~~~~~~~~~~~
           drm_dp_dpcd_write
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:155:8: error: implicit declaration of function 'drm_dp_link_power_up'; did you mean 'drm_plane_cleanup'? [-Werror=implicit-function-declaration]
     err = drm_dp_link_power_up(&anx6345->aux, &anx6345->link);
           ^~~~~~~~~~~~~~~~~~~~
           drm_plane_cleanup
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:208:8: error: implicit declaration of function 'drm_dp_link_configure'; did you mean 'of_dma_configure'? [-Werror=implicit-function-declaration]
     err = drm_dp_link_configure(&anx6345->aux, &anx6345->link);
           ^~~~~~~~~~~~~~~~~~~~~
           of_dma_configure
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c: At top level:
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:604:21: error: variable 'anx6345_bridge_funcs' has initializer but incomplete type
    static const struct drm_bridge_funcs anx6345_bridge_funcs = {
                        ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:605:3: error: 'const struct drm_bridge_funcs' has no member named 'attach'
     .attach = anx6345_bridge_attach,
      ^~~~~~
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:605:12: warning: excess elements in struct initializer
     .attach = anx6345_bridge_attach,
               ^~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:605:12: note: (near initialization for 'anx6345_bridge_funcs')
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:606:3: error: 'const struct drm_bridge_funcs' has no member named 'mode_valid'
     .mode_valid = anx6345_bridge_mode_valid,
      ^~~~~~~~~~
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:606:16: warning: excess elements in struct initializer
     .mode_valid = anx6345_bridge_mode_valid,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:606:16: note: (near initialization for 'anx6345_bridge_funcs')
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:607:3: error: 'const struct drm_bridge_funcs' has no member named 'disable'
     .disable = anx6345_bridge_disable,
      ^~~~~~~
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:607:13: warning: excess elements in struct initializer
     .disable = anx6345_bridge_disable,
                ^~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:607:13: note: (near initialization for 'anx6345_bridge_funcs')
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:608:3: error: 'const struct drm_bridge_funcs' has no member named 'enable'
     .enable = anx6345_bridge_enable,
      ^~~~~~
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:608:12: warning: excess elements in struct initializer
     .enable = anx6345_bridge_enable,
               ^~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:608:12: note: (near initialization for 'anx6345_bridge_funcs')
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c: In function 'anx6345_i2c_probe':
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:740:3: error: implicit declaration of function 'drm_bridge_add'; did you mean 'drm_panel_add'? [-Werror=implicit-function-declaration]
      drm_bridge_add(&anx6345->bridge);
      ^~~~~~~~~~~~~~
      drm_panel_add
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c: In function 'anx6345_i2c_remove':
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:757:2: error: implicit declaration of function 'drm_bridge_remove'; did you mean 'drm_panel_remove'? [-Werror=implicit-function-declaration]
     drm_bridge_remove(&anx6345->bridge);
     ^~~~~~~~~~~~~~~~~
     drm_panel_remove
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c: At top level:
   drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:604:38: error: storage size of 'anx6345_bridge_funcs' isn't known
    static const struct drm_bridge_funcs anx6345_bridge_funcs = {
                                         ^~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:48:20: error: field 'bridge' has incomplete type
     struct drm_bridge bridge;
                       ^~~~~~
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:52:21: error: field 'link' has incomplete type
     struct drm_dp_link link;
                        ^~~~
   In file included from include/linux/export.h:44:0,
                    from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from include/linux/delay.h:22,
                    from drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:9:
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c: In function 'bridge_to_anx6345':
>> include/linux/kernel.h:994:32: error: dereferencing pointer to incomplete type 'struct drm_bridge'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
                                   ^~~~~~
   include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
      if (!(condition))     \
            ^~~~~~~~~
   include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:994:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
     ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:994:20: note: in expansion of macro '__same_type'
     BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
                       ^~~~~~~~~~~
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:76:9: note: in expansion of macro 'container_of'
     return container_of(bridge, struct anx6345, bridge);
            ^~~~~~~~~~~~
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c: In function 'anx6345_dp_link_training':
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:148:8: error: implicit declaration of function 'drm_dp_link_probe'; did you mean 'drm_dp_dpcd_write'? [-Werror=implicit-function-declaration]
     err = drm_dp_link_probe(&anx6345->aux, &anx6345->link);
           ^~~~~~~~~~~~~~~~~
           drm_dp_dpcd_write
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:155:8: error: implicit declaration of function 'drm_dp_link_power_up'; did you mean 'drm_plane_cleanup'? [-Werror=implicit-function-declaration]
     err = drm_dp_link_power_up(&anx6345->aux, &anx6345->link);
           ^~~~~~~~~~~~~~~~~~~~
           drm_plane_cleanup
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:208:8: error: implicit declaration of function 'drm_dp_link_configure'; did you mean 'of_dma_configure'? [-Werror=implicit-function-declaration]
     err = drm_dp_link_configure(&anx6345->aux, &anx6345->link);
           ^~~~~~~~~~~~~~~~~~~~~
           of_dma_configure
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c: At top level:
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:604:21: error: variable 'anx6345_bridge_funcs' has initializer but incomplete type
    static const struct drm_bridge_funcs anx6345_bridge_funcs = {
                        ^~~~~~~~~~~~~~~~
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:605:3: error: 'const struct drm_bridge_funcs' has no member named 'attach'
     .attach = anx6345_bridge_attach,
      ^~~~~~
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:605:12: warning: excess elements in struct initializer
     .attach = anx6345_bridge_attach,
               ^~~~~~~~~~~~~~~~~~~~~
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:605:12: note: (near initialization for 'anx6345_bridge_funcs')
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:606:3: error: 'const struct drm_bridge_funcs' has no member named 'mode_valid'
     .mode_valid = anx6345_bridge_mode_valid,
      ^~~~~~~~~~
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:606:16: warning: excess elements in struct initializer
     .mode_valid = anx6345_bridge_mode_valid,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:606:16: note: (near initialization for 'anx6345_bridge_funcs')
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:607:3: error: 'const struct drm_bridge_funcs' has no member named 'disable'
     .disable = anx6345_bridge_disable,
      ^~~~~~~
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:607:13: warning: excess elements in struct initializer
     .disable = anx6345_bridge_disable,
                ^~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:607:13: note: (near initialization for 'anx6345_bridge_funcs')
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:608:3: error: 'const struct drm_bridge_funcs' has no member named 'enable'
     .enable = anx6345_bridge_enable,
      ^~~~~~
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:608:12: warning: excess elements in struct initializer
     .enable = anx6345_bridge_enable,
               ^~~~~~~~~~~~~~~~~~~~~
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:608:12: note: (near initialization for 'anx6345_bridge_funcs')
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c: In function 'anx6345_i2c_probe':
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:740:3: error: implicit declaration of function 'drm_bridge_add'; did you mean 'drm_panel_add'? [-Werror=implicit-function-declaration]
      drm_bridge_add(&anx6345->bridge);
      ^~~~~~~~~~~~~~
      drm_panel_add
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c: In function 'anx6345_i2c_remove':
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:757:2: error: implicit declaration of function 'drm_bridge_remove'; did you mean 'drm_panel_remove'? [-Werror=implicit-function-declaration]
     drm_bridge_remove(&anx6345->bridge);
     ^~~~~~~~~~~~~~~~~
     drm_panel_remove
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c: At top level:
   drivers/gpu//drm/bridge/analogix/analogix-anx6345.c:604:38: error: storage size of 'anx6345_bridge_funcs' isn't known
    static const struct drm_bridge_funcs anx6345_bridge_funcs = {
                                         ^~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +994 include/linux/kernel.h

cf14f27f82af78 Alexei Starovoitov 2018-03-28  984  
^1da177e4c3f41 Linus Torvalds     2005-04-16  985  /**
^1da177e4c3f41 Linus Torvalds     2005-04-16  986   * container_of - cast a member of a structure out to the containing structure
^1da177e4c3f41 Linus Torvalds     2005-04-16  987   * @ptr:	the pointer to the member.
^1da177e4c3f41 Linus Torvalds     2005-04-16  988   * @type:	the type of the container struct this is embedded in.
^1da177e4c3f41 Linus Torvalds     2005-04-16  989   * @member:	the name of the member within the struct.
^1da177e4c3f41 Linus Torvalds     2005-04-16  990   *
^1da177e4c3f41 Linus Torvalds     2005-04-16  991   */
^1da177e4c3f41 Linus Torvalds     2005-04-16  992  #define container_of(ptr, type, member) ({				\
c7acec713d14c6 Ian Abbott         2017-07-12  993  	void *__mptr = (void *)(ptr);					\
c7acec713d14c6 Ian Abbott         2017-07-12 @994  	BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&	\
c7acec713d14c6 Ian Abbott         2017-07-12  995  			 !__same_type(*(ptr), void),			\
c7acec713d14c6 Ian Abbott         2017-07-12  996  			 "pointer type mismatch in container_of()");	\
c7acec713d14c6 Ian Abbott         2017-07-12  997  	((type *)(__mptr - offsetof(type, member))); })
^1da177e4c3f41 Linus Torvalds     2005-04-16  998  

:::::: The code at line 994 was first introduced by commit
:::::: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle pointers to arrays better in container_of()

:::::: TO: Ian Abbott <abbotti@mev.co.uk>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

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

             reply	other threads:[~2019-11-11 15:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 15:53 kbuild test robot [this message]
2019-11-12  9:22 ` [drm-drm-misc:drm-misc-next 5/5] include/linux/kernel.h:994:32: error: dereferencing pointer to incomplete type 'struct drm_bridge' Maxime Ripard
2019-11-12 12:10   ` Torsten Duwe
2019-11-12 12:10     ` Torsten Duwe
2019-11-12 18:44     ` Maxime Ripard

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=201911112308.UOBDjIac%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.