[drm:drm-next 3/3] include/linux/stddef.h:7:14: error: positional initialization of field in 'struct' declared with 'designated_init' attribute

kbuild test robot fengguang.wu at intel.com
Thu Sep 28 05:53:43 UTC 2017


tree:   git://people.freedesktop.org/~airlied/linux.git drm-next
head:   754270c7c56292e97d0eff924a5d5d83f92add07
commit: 754270c7c56292e97d0eff924a5d5d83f92add07 [3/3] Merge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-next
config: x86_64-randconfig-ne0-09281127 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 754270c7c56292e97d0eff924a5d5d83f92add07
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/posix_types.h:4:0,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from drivers/gpu/drm/amd/amdgpu/../powerplay/inc/pp_debug.h:33,
                    from drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:24:
>> include/linux/stddef.h:7:14: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
    #define NULL ((void *)0)
                 ^
>> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:127:3: note: in expansion of macro 'NULL'
     {NULL, phm_thermal_l2h_irq},
      ^~~~
   include/linux/stddef.h:7:14: note: (near initialization for 'thermal_irq_src[0]')
    #define NULL ((void *)0)
                 ^
>> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:127:3: note: in expansion of macro 'NULL'
     {NULL, phm_thermal_l2h_irq},
      ^~~~
>> include/linux/stddef.h:7:14: error: invalid initializer
    #define NULL ((void *)0)
                 ^
>> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:127:3: note: in expansion of macro 'NULL'
     {NULL, phm_thermal_l2h_irq},
      ^~~~
   include/linux/stddef.h:7:14: note: (near initialization for 'thermal_irq_src[0].<anonymous>')
    #define NULL ((void *)0)
                 ^
>> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:127:3: note: in expansion of macro 'NULL'
     {NULL, phm_thermal_l2h_irq},
      ^~~~
>> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:127:9: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
     {NULL, phm_thermal_l2h_irq},
            ^~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:127:9: note: (near initialization for 'thermal_irq_src[0]')
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:127:9: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:127:9: note: (near initialization for 'thermal_irq_src[0].set')
   In file included from include/uapi/linux/posix_types.h:4:0,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from drivers/gpu/drm/amd/amdgpu/../powerplay/inc/pp_debug.h:33,
                    from drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:24:
>> include/linux/stddef.h:7:14: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
    #define NULL ((void *)0)
                 ^
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:128:3: note: in expansion of macro 'NULL'
     {NULL, phm_thermal_h2l_irq},
      ^~~~
   include/linux/stddef.h:7:14: note: (near initialization for 'thermal_irq_src[1]')
    #define NULL ((void *)0)
                 ^
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:128:3: note: in expansion of macro 'NULL'
     {NULL, phm_thermal_h2l_irq},
      ^~~~
>> include/linux/stddef.h:7:14: error: invalid initializer
    #define NULL ((void *)0)
                 ^
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:128:3: note: in expansion of macro 'NULL'
     {NULL, phm_thermal_h2l_irq},
      ^~~~
   include/linux/stddef.h:7:14: note: (near initialization for 'thermal_irq_src[1].<anonymous>')
    #define NULL ((void *)0)
                 ^
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:128:3: note: in expansion of macro 'NULL'
     {NULL, phm_thermal_h2l_irq},
      ^~~~
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:128:9: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
     {NULL, phm_thermal_h2l_irq},
            ^~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:128:9: note: (near initialization for 'thermal_irq_src[1]')
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:128:9: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:128:9: note: (near initialization for 'thermal_irq_src[1].set')
   In file included from include/uapi/linux/posix_types.h:4:0,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from drivers/gpu/drm/amd/amdgpu/../powerplay/inc/pp_debug.h:33,
                    from drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:24:
>> include/linux/stddef.h:7:14: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
    #define NULL ((void *)0)
                 ^
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:129:3: note: in expansion of macro 'NULL'
     {NULL, phm_ctf_irq}
      ^~~~
   include/linux/stddef.h:7:14: note: (near initialization for 'thermal_irq_src[2]')
    #define NULL ((void *)0)
                 ^
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:129:3: note: in expansion of macro 'NULL'
     {NULL, phm_ctf_irq}
      ^~~~
>> include/linux/stddef.h:7:14: error: invalid initializer
    #define NULL ((void *)0)
                 ^
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:129:3: note: in expansion of macro 'NULL'
     {NULL, phm_ctf_irq}
      ^~~~
   include/linux/stddef.h:7:14: note: (near initialization for 'thermal_irq_src[2].<anonymous>')
    #define NULL ((void *)0)
                 ^
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:129:3: note: in expansion of macro 'NULL'
     {NULL, phm_ctf_irq}
      ^~~~
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:129:9: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
     {NULL, phm_ctf_irq}
            ^~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:129:9: note: (near initialization for 'thermal_irq_src[2]')
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:129:9: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hwmgr.c:129:9: note: (near initialization for 'thermal_irq_src[2].set')
   cc1: some warnings being treated as errors

vim +7 include/linux/stddef.h

^1da177e Linus Torvalds   2005-04-16  5  
^1da177e Linus Torvalds   2005-04-16  6  #undef NULL
^1da177e Linus Torvalds   2005-04-16 @7  #define NULL ((void *)0)
6e218287 Richard Knutsson 2006-09-30  8  

:::::: The code at line 7 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds at ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds at ppc970.osdl.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 24670 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170928/a5034044/attachment-0001.gz>


More information about the dri-devel mailing list