Re: [PATCH] ANDROID: staging: add userpanic-dev driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Woody,

Thank you for the patch! Perhaps something to improve:

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

url:    https://github.com/0day-ci/linux/commits/Woody-Lin/ANDROID-staging-add-userpanic-dev-driver/20210826-173040
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git a69bbd2f77a6e26b2b1c3d7fcc5c715169dc01c5
config: openrisc-randconfig-r032-20210826 (attached as .config)
compiler: or1k-linux-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://github.com/0day-ci/linux/commit/89dde12be7959a5a75172d0609d344f104d80070
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Woody-Lin/ANDROID-staging-add-userpanic-dev-driver/20210826-173040
        git checkout 89dde12be7959a5a75172d0609d344f104d80070
        # 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=openrisc SHELL=/bin/bash drivers/staging/android/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   drivers/staging/android/userpanic-dev.c: In function 'userpanic_device_ioctl':
   drivers/staging/android/userpanic-dev.c:21:34: error: implicit declaration of function '_IOW' [-Werror=implicit-function-declaration]
      21 | #define CRASH_INFO              (_IOW('U', 179, struct userpanic_crash_info))
         |                                  ^~~~
   drivers/staging/android/userpanic-dev.c:52:14: note: in expansion of macro 'CRASH_INFO'
      52 |         case CRASH_INFO:
         |              ^~~~~~~~~~
   drivers/staging/android/userpanic-dev.c:21:49: error: expected expression before 'struct'
      21 | #define CRASH_INFO              (_IOW('U', 179, struct userpanic_crash_info))
         |                                                 ^~~~~~
   drivers/staging/android/userpanic-dev.c:52:14: note: in expansion of macro 'CRASH_INFO'
      52 |         case CRASH_INFO:
         |              ^~~~~~~~~~
   drivers/staging/android/userpanic-dev.c:53:21: error: implicit declaration of function 'copy_from_user' [-Werror=implicit-function-declaration]
      53 |                 if (copy_from_user(&crash_info, (void __user *)arg, sizeof(crash_info)))
         |                     ^~~~~~~~~~~~~~
   In file included from include/linux/printk.h:7,
                    from include/asm-generic/bug.h:22,
                    from ./arch/openrisc/include/generated/asm/bug.h:1,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/gfp.h:5,
                    from include/linux/slab.h:15,
                    from drivers/staging/android/userpanic-dev.c:11:
   include/linux/kern_levels.h:5:25: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
       5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
         |                         ^~~~~~
   include/linux/kern_levels.h:11:25: note: in expansion of macro 'KERN_SOH'
      11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
         |                         ^~~~~~~~
   include/linux/printk.h:390:16: note: in expansion of macro 'KERN_ERR'
     390 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
         |                ^~~~~~~~
   drivers/staging/android/userpanic-dev.c:61:25: note: in expansion of macro 'pr_err'
      61 |                         pr_err("failed to strndup .title_uaddr: %d\n", PTR_ERR(title));
         |                         ^~~~~~
   include/linux/kern_levels.h:5:25: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
       5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
         |                         ^~~~~~
   include/linux/kern_levels.h:11:25: note: in expansion of macro 'KERN_SOH'
      11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
         |                         ^~~~~~~~
   include/linux/printk.h:390:16: note: in expansion of macro 'KERN_ERR'
     390 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
         |                ^~~~~~~~
   drivers/staging/android/userpanic-dev.c:69:33: note: in expansion of macro 'pr_err'
      69 |                                 pr_err("failed to strndup .msg_uaddr: %d\n", PTR_ERR(msg));
         |                                 ^~~~~~
   drivers/staging/android/userpanic-dev.c: At top level:
   drivers/staging/android/userpanic-dev.c:83:21: error: variable 'userpanic_device_fops' has initializer but incomplete type
      83 | static const struct file_operations userpanic_device_fops = {
         |                     ^~~~~~~~~~~~~~~
   drivers/staging/android/userpanic-dev.c:84:10: error: 'const struct file_operations' has no member named 'owner'
      84 |         .owner          = THIS_MODULE,
         |          ^~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/printk.h:8,
                    from include/asm-generic/bug.h:22,
                    from ./arch/openrisc/include/generated/asm/bug.h:1,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/gfp.h:5,
                    from include/linux/slab.h:15,
                    from drivers/staging/android/userpanic-dev.c:11:
   include/linux/export.h:19:21: warning: excess elements in struct initializer
      19 | #define THIS_MODULE ((struct module *)0)
         |                     ^
   drivers/staging/android/userpanic-dev.c:84:27: note: in expansion of macro 'THIS_MODULE'
      84 |         .owner          = THIS_MODULE,
         |                           ^~~~~~~~~~~
   include/linux/export.h:19:21: note: (near initialization for 'userpanic_device_fops')
      19 | #define THIS_MODULE ((struct module *)0)
         |                     ^
   drivers/staging/android/userpanic-dev.c:84:27: note: in expansion of macro 'THIS_MODULE'
      84 |         .owner          = THIS_MODULE,
         |                           ^~~~~~~~~~~
   drivers/staging/android/userpanic-dev.c:85:10: error: 'const struct file_operations' has no member named 'unlocked_ioctl'
      85 |         .unlocked_ioctl = userpanic_device_ioctl,
         |          ^~~~~~~~~~~~~~
>> drivers/staging/android/userpanic-dev.c:85:27: warning: excess elements in struct initializer
      85 |         .unlocked_ioctl = userpanic_device_ioctl,
         |                           ^~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/android/userpanic-dev.c:85:27: note: (near initialization for 'userpanic_device_fops')
   drivers/staging/android/userpanic-dev.c:86:10: error: 'const struct file_operations' has no member named 'compat_ioctl'
      86 |         .compat_ioctl   = compat_ptr_ioctl,
         |          ^~~~~~~~~~~~
   drivers/staging/android/userpanic-dev.c:86:27: error: 'compat_ptr_ioctl' undeclared here (not in a function)
      86 |         .compat_ioctl   = compat_ptr_ioctl,
         |                           ^~~~~~~~~~~~~~~~
   drivers/staging/android/userpanic-dev.c:86:27: warning: excess elements in struct initializer
   drivers/staging/android/userpanic-dev.c:86:27: note: (near initialization for 'userpanic_device_fops')
   drivers/staging/android/userpanic-dev.c:83:37: error: storage size of 'userpanic_device_fops' isn't known
      83 | static const struct file_operations userpanic_device_fops = {
         |                                     ^~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +85 drivers/staging/android/userpanic-dev.c

    82	
    83	static const struct file_operations userpanic_device_fops = {
  > 84		.owner          = THIS_MODULE,
  > 85		.unlocked_ioctl = userpanic_device_ioctl,
    86		.compat_ioctl   = compat_ptr_ioctl,
    87	};
    88	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux