[PATCH 1/2] staging: vchiq: fix __user annotations

kernel test robot lkp at intel.com
Wed Sep 23 02:02:16 UTC 2020


Hi Arnd,

I love your patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]

url:    https://github.com/0day-ci/linux/commits/Arnd-Bergmann/staging-vchiq-fix-__user-annotations/20200923-042315
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 69fea2b4e59c52844cf5196c9c81157792d194fb
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

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

   drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c: In function 'vc_vchi_audio_init':
>> drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:125:9: error: variable 'params' has initializer but incomplete type
     125 |  struct vchiq_service_params params = {
         |         ^~~~~~~~~~~~~~~~~~~~
>> drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:126:4: error: 'struct vchiq_service_params' has no member named 'version'
     126 |   .version  = VC_AUDIOSERV_VER,
         |    ^~~~~~~
   In file included from drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:8:
>> drivers/staging/vc04_services/bcm2835-audio/vc_vchi_audioserv_defs.h:8:26: warning: excess elements in struct initializer
       8 | #define VC_AUDIOSERV_VER 2
         |                          ^
   drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:126:15: note: in expansion of macro 'VC_AUDIOSERV_VER'
     126 |   .version  = VC_AUDIOSERV_VER,
         |               ^~~~~~~~~~~~~~~~
   drivers/staging/vc04_services/bcm2835-audio/vc_vchi_audioserv_defs.h:8:26: note: (near initialization for 'params')
       8 | #define VC_AUDIOSERV_VER 2
         |                          ^
   drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:126:15: note: in expansion of macro 'VC_AUDIOSERV_VER'
     126 |   .version  = VC_AUDIOSERV_VER,
         |               ^~~~~~~~~~~~~~~~
>> drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:127:4: error: 'struct vchiq_service_params' has no member named 'version_min'
     127 |   .version_min  = VC_AUDIOSERV_MIN_VER,
         |    ^~~~~~~~~~~
   In file included from drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:8:
   drivers/staging/vc04_services/bcm2835-audio/vc_vchi_audioserv_defs.h:7:30: warning: excess elements in struct initializer
       7 | #define VC_AUDIOSERV_MIN_VER 1
         |                              ^
   drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:127:19: note: in expansion of macro 'VC_AUDIOSERV_MIN_VER'
     127 |   .version_min  = VC_AUDIOSERV_MIN_VER,
         |                   ^~~~~~~~~~~~~~~~~~~~
   drivers/staging/vc04_services/bcm2835-audio/vc_vchi_audioserv_defs.h:7:30: note: (near initialization for 'params')
       7 | #define VC_AUDIOSERV_MIN_VER 1
         |                              ^
   drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:127:19: note: in expansion of macro 'VC_AUDIOSERV_MIN_VER'
     127 |   .version_min  = VC_AUDIOSERV_MIN_VER,
         |                   ^~~~~~~~~~~~~~~~~~~~
>> drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:128:4: error: 'struct vchiq_service_params' has no member named 'fourcc'
     128 |   .fourcc   = VCHIQ_MAKE_FOURCC('A', 'U', 'D', 'S'),
         |    ^~~~~~
   In file included from drivers/staging/vc04_services/bcm2835-audio/bcm2835.h:9,
                    from drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:7:
>> drivers/staging/vc04_services/bcm2835-audio/../include/linux/raspberrypi/vchiq.h:8:4: warning: excess elements in struct initializer
       8 |    (((x0) << 24) | ((x1) << 16) | ((x2) << 8) | (x3))
         |    ^
   drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:128:15: note: in expansion of macro 'VCHIQ_MAKE_FOURCC'
     128 |   .fourcc   = VCHIQ_MAKE_FOURCC('A', 'U', 'D', 'S'),
         |               ^~~~~~~~~~~~~~~~~
   drivers/staging/vc04_services/bcm2835-audio/../include/linux/raspberrypi/vchiq.h:8:4: note: (near initialization for 'params')
       8 |    (((x0) << 24) | ((x1) << 16) | ((x2) << 8) | (x3))
         |    ^
   drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:128:15: note: in expansion of macro 'VCHIQ_MAKE_FOURCC'
     128 |   .fourcc   = VCHIQ_MAKE_FOURCC('A', 'U', 'D', 'S'),
         |               ^~~~~~~~~~~~~~~~~
>> drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:129:4: error: 'struct vchiq_service_params' has no member named 'callback'
     129 |   .callback  = audio_vchi_callback,
         |    ^~~~~~~~
>> drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:129:16: warning: excess elements in struct initializer
     129 |   .callback  = audio_vchi_callback,
         |                ^~~~~~~~~~~~~~~~~~~
   drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:129:16: note: (near initialization for 'params')
>> drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:130:4: error: 'struct vchiq_service_params' has no member named 'userdata'
     130 |   .userdata  = instance,
         |    ^~~~~~~~
   drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:130:16: warning: excess elements in struct initializer
     130 |   .userdata  = instance,
         |                ^~~~~~~~
   drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:130:16: note: (near initialization for 'params')
>> drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:125:30: error: storage size of 'params' isn't known
     125 |  struct vchiq_service_params params = {
         |                              ^~~~~~
   drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:125:30: warning: unused variable 'params' [-Wunused-variable]
--
   drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c: In function 'vchiq_mmal_init':
>> drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1861:9: error: variable 'params' has initializer but incomplete type
    1861 |  struct vchiq_service_params params = {
         |         ^~~~~~~~~~~~~~~~~~~~
>> drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1862:4: error: 'struct vchiq_service_params' has no member named 'version'
    1862 |   .version  = VC_MMAL_VER,
         |    ^~~~~~~
   In file included from drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:31:
>> drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h:29:21: warning: excess elements in struct initializer
      29 | #define VC_MMAL_VER 15
         |                     ^~
   drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1862:15: note: in expansion of macro 'VC_MMAL_VER'
    1862 |   .version  = VC_MMAL_VER,
         |               ^~~~~~~~~~~
   drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h:29:21: note: (near initialization for 'params')
      29 | #define VC_MMAL_VER 15
         |                     ^~
   drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1862:15: note: in expansion of macro 'VC_MMAL_VER'
    1862 |   .version  = VC_MMAL_VER,
         |               ^~~~~~~~~~~
>> drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1863:4: error: 'struct vchiq_service_params' has no member named 'version_min'
    1863 |   .version_min  = VC_MMAL_MIN_VER,
         |    ^~~~~~~~~~~
   In file included from drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:31:
   drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h:30:25: warning: excess elements in struct initializer
      30 | #define VC_MMAL_MIN_VER 10
         |                         ^~
   drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1863:19: note: in expansion of macro 'VC_MMAL_MIN_VER'
    1863 |   .version_min  = VC_MMAL_MIN_VER,
         |                   ^~~~~~~~~~~~~~~
   drivers/staging/vc04_services/vchiq-mmal/mmal-msg.h:30:25: note: (near initialization for 'params')
      30 | #define VC_MMAL_MIN_VER 10
         |                         ^~
   drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1863:19: note: in expansion of macro 'VC_MMAL_MIN_VER'
    1863 |   .version_min  = VC_MMAL_MIN_VER,
         |                   ^~~~~~~~~~~~~~~
>> drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1864:4: error: 'struct vchiq_service_params' has no member named 'fourcc'
    1864 |   .fourcc   = VCHIQ_MAKE_FOURCC('m', 'm', 'a', 'l'),
         |    ^~~~~~
   In file included from drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:26:
>> drivers/staging/vc04_services/vchiq-mmal/../include/linux/raspberrypi/vchiq.h:8:4: warning: excess elements in struct initializer
       8 |    (((x0) << 24) | ((x1) << 16) | ((x2) << 8) | (x3))
         |    ^
   drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1864:15: note: in expansion of macro 'VCHIQ_MAKE_FOURCC'
    1864 |   .fourcc   = VCHIQ_MAKE_FOURCC('m', 'm', 'a', 'l'),
         |               ^~~~~~~~~~~~~~~~~
   drivers/staging/vc04_services/vchiq-mmal/../include/linux/raspberrypi/vchiq.h:8:4: note: (near initialization for 'params')
       8 |    (((x0) << 24) | ((x1) << 16) | ((x2) << 8) | (x3))
         |    ^
   drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1864:15: note: in expansion of macro 'VCHIQ_MAKE_FOURCC'
    1864 |   .fourcc   = VCHIQ_MAKE_FOURCC('m', 'm', 'a', 'l'),
         |               ^~~~~~~~~~~~~~~~~
>> drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1865:4: error: 'struct vchiq_service_params' has no member named 'callback'
    1865 |   .callback  = service_callback,
         |    ^~~~~~~~
>> drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1865:16: warning: excess elements in struct initializer
    1865 |   .callback  = service_callback,
         |                ^~~~~~~~~~~~~~~~
   drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1865:16: note: (near initialization for 'params')
>> drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1866:4: error: 'struct vchiq_service_params' has no member named 'userdata'
    1866 |   .userdata  = NULL,
         |    ^~~~~~~~
   In file included from include/uapi/linux/posix_types.h:5,
                    from include/uapi/linux/types.h:14,
                    from include/linux/types.h:6,
                    from include/linux/limits.h:6,
                    from include/linux/kernel.h:7,
                    from drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:19:
   include/linux/stddef.h:8:14: warning: excess elements in struct initializer
       8 | #define NULL ((void *)0)
         |              ^
   drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1866:16: note: in expansion of macro 'NULL'
    1866 |   .userdata  = NULL,
         |                ^~~~
   include/linux/stddef.h:8:14: note: (near initialization for 'params')
       8 | #define NULL ((void *)0)
         |              ^
   drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1866:16: note: in expansion of macro 'NULL'
    1866 |   .userdata  = NULL,
         |                ^~~~
>> drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1861:30: error: storage size of 'params' isn't known
    1861 |  struct vchiq_service_params params = {
         |                              ^~~~~~
   drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1861:30: warning: unused variable 'params' [-Wunused-variable]

# https://github.com/0day-ci/linux/commit/7e3c995c9a6394a86c53108753c8c2d9034410e5
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Arnd-Bergmann/staging-vchiq-fix-__user-annotations/20200923-042315
git checkout 7e3c995c9a6394a86c53108753c8c2d9034410e5
vim +126 drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c

23b028c871e113 drivers/staging/bcm2835-audio/bcm2835-vchiq.c               Michael Zoran          2017-01-25  120  
d7ca3a71545bae drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Takashi Iwai           2018-09-04  121  static int
a7983fd9462560 drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Nicolas Saenz Julienne 2020-06-29  122  vc_vchi_audio_init(struct vchiq_instance *vchiq_instance,
d7ca3a71545bae drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Takashi Iwai           2018-09-04  123  		   struct bcm2835_audio_instance *instance)
23b028c871e113 drivers/staging/bcm2835-audio/bcm2835-vchiq.c               Michael Zoran          2017-01-25  124  {
65c7536672b9ee drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Nicolas Saenz Julienne 2020-06-29 @125  	struct vchiq_service_params params = {
65c7536672b9ee drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Nicolas Saenz Julienne 2020-06-29 @126  		.version		= VC_AUDIOSERV_VER,
65c7536672b9ee drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Nicolas Saenz Julienne 2020-06-29 @127  		.version_min		= VC_AUDIOSERV_MIN_VER,
b06eba5c525aed drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Nicolas Saenz Julienne 2020-06-29 @128  		.fourcc			= VCHIQ_MAKE_FOURCC('A', 'U', 'D', 'S'),
f5a3db42e8a6a9 drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Takashi Iwai           2018-09-04 @129  		.callback		= audio_vchi_callback,
65c7536672b9ee drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Nicolas Saenz Julienne 2020-06-29 @130  		.userdata		= instance,
f5a3db42e8a6a9 drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Takashi Iwai           2018-09-04  131  	};
23b028c871e113 drivers/staging/bcm2835-audio/bcm2835-vchiq.c               Michael Zoran          2017-01-25  132  	int status;
23b028c871e113 drivers/staging/bcm2835-audio/bcm2835-vchiq.c               Michael Zoran          2017-01-25  133  
23b028c871e113 drivers/staging/bcm2835-audio/bcm2835-vchiq.c               Michael Zoran          2017-01-25  134  	/* Open the VCHI service connections */
9d52311134e969 drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Nicolas Saenz Julienne 2020-06-29  135  	status = vchiq_open_service(vchiq_instance, &params,
3a8895a9219f6b drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Nicolas Saenz Julienne 2020-06-29  136  				    &instance->service_handle);
c8280337226fc4 drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Aishwarya Pant         2017-03-03  137  
23b028c871e113 drivers/staging/bcm2835-audio/bcm2835-vchiq.c               Michael Zoran          2017-01-25  138  	if (status) {
435ba133f96eef drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Takashi Iwai           2018-09-04  139  		dev_err(instance->dev,
435ba133f96eef drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Takashi Iwai           2018-09-04  140  			"failed to open VCHI service connection (status=%d)\n",
435ba133f96eef drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Takashi Iwai           2018-09-04  141  			status);
d7ca3a71545bae drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Takashi Iwai           2018-09-04  142  		return -EPERM;
23b028c871e113 drivers/staging/bcm2835-audio/bcm2835-vchiq.c               Michael Zoran          2017-01-25  143  	}
f5a3db42e8a6a9 drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Takashi Iwai           2018-09-04  144  
23b028c871e113 drivers/staging/bcm2835-audio/bcm2835-vchiq.c               Michael Zoran          2017-01-25  145  	/* Finished with the service for now */
9d52311134e969 drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Nicolas Saenz Julienne 2020-06-29  146  	vchiq_release_service(instance->service_handle);
23b028c871e113 drivers/staging/bcm2835-audio/bcm2835-vchiq.c               Michael Zoran          2017-01-25  147  
d7ca3a71545bae drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c Takashi Iwai           2018-09-04  148  	return 0;
23b028c871e113 drivers/staging/bcm2835-audio/bcm2835-vchiq.c               Michael Zoran          2017-01-25  149  }
23b028c871e113 drivers/staging/bcm2835-audio/bcm2835-vchiq.c               Michael Zoran          2017-01-25  150  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 58077 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20200923/689daab5/attachment-0001.bin>


More information about the devel mailing list