lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 18 Oct 2022 04:53:36 +0800
From:   kernel test robot <lkp@...el.com>
To:     Eddie James <eajames@...ux.ibm.com>, joel@....id.au
Cc:     kbuild-all@...ts.01.org, broonie@...nel.org, jk@...abs.org,
        alistair@...ple.id.au, linux-kernel@...r.kernel.org,
        linux-fsi@...ts.ozlabs.org, eajames@...ux.ibm.com
Subject: Re: [PATCH 4/5] drivers: fsi: separate char device code for occ and
 sbefifo

Hi Eddie,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.1-rc1 next-20221017]
[cannot apply to broonie-regmap/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Eddie-James/fsi-Add-regmap-and-refactor-sbefifo/20221017-114633
patch link:    https://lore.kernel.org/r/20221014220540.55570-5-eajames%40linux.ibm.com
patch subject: [PATCH 4/5] drivers: fsi: separate char device code for occ and sbefifo
config: arm-defconfig
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/498e22ba941d12f714dd5f55dedf709edfe4966f
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Eddie-James/fsi-Add-regmap-and-refactor-sbefifo/20221017-114633
        git checkout 498e22ba941d12f714dd5f55dedf709edfe4966f
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/fsi/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   drivers/fsi/occ-cdev.c:4:49: warning: 'struct file' declared inside parameter list will not be visible outside of this definition or declaration
       4 | static int occ_open(struct inode *inode, struct file *file)
         |                                                 ^~~~
   drivers/fsi/occ-cdev.c:4:28: warning: 'struct inode' declared inside parameter list will not be visible outside of this definition or declaration
       4 | static int occ_open(struct inode *inode, struct file *file)
         |                            ^~~~~
   drivers/fsi/occ-cdev.c: In function 'occ_open':
   drivers/fsi/occ-cdev.c:6:37: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
       6 |         struct occ_client *client = kzalloc(sizeof(*client), GFP_KERNEL);
         |                                     ^~~~~~~
   drivers/fsi/occ-cdev.c:6:51: error: invalid application of 'sizeof' to incomplete type 'struct occ_client'
       6 |         struct occ_client *client = kzalloc(sizeof(*client), GFP_KERNEL);
         |                                                   ^
   drivers/fsi/occ-cdev.c:6:62: error: 'GFP_KERNEL' undeclared (first use in this function)
       6 |         struct occ_client *client = kzalloc(sizeof(*client), GFP_KERNEL);
         |                                                              ^~~~~~~~~~
   drivers/fsi/occ-cdev.c:6:62: note: each undeclared identifier is reported only once for each function it appears in
   drivers/fsi/occ-cdev.c:7:39: error: invalid use of undefined type 'struct file'
       7 |         struct miscdevice *mdev = file->private_data;
         |                                       ^~
   drivers/fsi/occ-cdev.c:8:27: error: implicit declaration of function 'to_occ' [-Werror=implicit-function-declaration]
       8 |         struct occ *occ = to_occ(mdev);
         |                           ^~~~~~
   drivers/fsi/occ-cdev.c:8:27: warning: initialization of 'struct occ *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   drivers/fsi/occ-cdev.c:11:25: error: 'ENOMEM' undeclared (first use in this function)
      11 |                 return -ENOMEM;
         |                         ^~~~~~
   drivers/fsi/occ-cdev.c:13:15: error: invalid use of undefined type 'struct occ_client'
      13 |         client->buffer = (u8 *)__get_free_page(GFP_KERNEL);
         |               ^~
   drivers/fsi/occ-cdev.c:13:27: error: 'u8' undeclared (first use in this function)
      13 |         client->buffer = (u8 *)__get_free_page(GFP_KERNEL);
         |                           ^~
   drivers/fsi/occ-cdev.c:13:31: error: expected expression before ')' token
      13 |         client->buffer = (u8 *)__get_free_page(GFP_KERNEL);
         |                               ^
   drivers/fsi/occ-cdev.c:14:20: error: invalid use of undefined type 'struct occ_client'
      14 |         if (!client->buffer) {
         |                    ^~
   drivers/fsi/occ-cdev.c:15:17: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
      15 |                 kfree(client);
         |                 ^~~~~
   drivers/fsi/occ-cdev.c:19:15: error: invalid use of undefined type 'struct occ_client'
      19 |         client->occ = occ;
         |               ^~
   drivers/fsi/occ-cdev.c:20:9: error: implicit declaration of function 'mutex_init' [-Werror=implicit-function-declaration]
      20 |         mutex_init(&client->lock);
         |         ^~~~~~~~~~
   drivers/fsi/occ-cdev.c:20:27: error: invalid use of undefined type 'struct occ_client'
      20 |         mutex_init(&client->lock);
         |                           ^~
   drivers/fsi/occ-cdev.c:21:13: error: invalid use of undefined type 'struct file'
      21 |         file->private_data = client;
         |             ^~
   drivers/fsi/occ-cdev.c:22:9: error: implicit declaration of function 'get_device' [-Werror=implicit-function-declaration]
      22 |         get_device(occ->dev);
         |         ^~~~~~~~~~
>> drivers/fsi/occ-cdev.c:22:23: error: invalid use of undefined type 'struct occ'
      22 |         get_device(occ->dev);
         |                       ^~
   drivers/fsi/occ-cdev.c:25:9: error: implicit declaration of function 'BUILD_BUG_ON' [-Werror=implicit-function-declaration]
      25 |         BUILD_BUG_ON((OCC_CMD_DATA_BYTES + 3) > PAGE_SIZE);
         |         ^~~~~~~~~~~~
>> drivers/fsi/occ-cdev.c:25:23: error: 'OCC_CMD_DATA_BYTES' undeclared (first use in this function)
      25 |         BUILD_BUG_ON((OCC_CMD_DATA_BYTES + 3) > PAGE_SIZE);
         |                       ^~~~~~~~~~~~~~~~~~
   drivers/fsi/occ-cdev.c:25:49: error: 'PAGE_SIZE' undeclared (first use in this function)
      25 |         BUILD_BUG_ON((OCC_CMD_DATA_BYTES + 3) > PAGE_SIZE);
         |                                                 ^~~~~~~~~
   drivers/fsi/occ-cdev.c:26:23: error: 'OCC_RESP_DATA_BYTES' undeclared (first use in this function)
      26 |         BUILD_BUG_ON((OCC_RESP_DATA_BYTES + 7) > PAGE_SIZE);
         |                       ^~~~~~~~~~~~~~~~~~~
   drivers/fsi/occ-cdev.c: At top level:
   drivers/fsi/occ-cdev.c:31:8: error: unknown type name 'ssize_t'
      31 | static ssize_t occ_read(struct file *file, char __user *buf, size_t len,
         |        ^~~~~~~
   drivers/fsi/occ-cdev.c:31:62: error: unknown type name 'size_t'
      31 | static ssize_t occ_read(struct file *file, char __user *buf, size_t len,
         |                                                              ^~~~~~
   drivers/fsi/occ-cdev.c:1:1: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
     +++ |+#include <stddef.h>
       1 | // SPDX-License-Identifier: GPL-2.0
   drivers/fsi/occ-cdev.c:32:25: error: unknown type name 'loff_t'
      32 |                         loff_t *offset)
         |                         ^~~~~~
   drivers/fsi/occ-cdev.c:64:8: error: unknown type name 'ssize_t'
      64 | static ssize_t occ_write(struct file *file, const char __user *buf,
         |        ^~~~~~~
   drivers/fsi/occ-cdev.c:65:26: error: unknown type name 'size_t'
      65 |                          size_t len, loff_t *offset)
         |                          ^~~~~~
   drivers/fsi/occ-cdev.c:65:26: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
   drivers/fsi/occ-cdev.c:65:38: error: unknown type name 'loff_t'
      65 |                          size_t len, loff_t *offset)
         |                                      ^~~~~~
   drivers/fsi/occ-cdev.c:122:52: warning: 'struct file' declared inside parameter list will not be visible outside of this definition or declaration
     122 | static int occ_release(struct inode *inode, struct file *file)
         |                                                    ^~~~
   drivers/fsi/occ-cdev.c:122:31: warning: 'struct inode' declared inside parameter list will not be visible outside of this definition or declaration
     122 | static int occ_release(struct inode *inode, struct file *file)
         |                               ^~~~~
   drivers/fsi/occ-cdev.c: In function 'occ_release':
   drivers/fsi/occ-cdev.c:124:41: error: invalid use of undefined type 'struct file'
     124 |         struct occ_client *client = file->private_data;
         |                                         ^~
   drivers/fsi/occ-cdev.c:126:9: error: implicit declaration of function 'put_device' [-Werror=implicit-function-declaration]
     126 |         put_device(client->occ->dev);
         |         ^~~~~~~~~~
   drivers/fsi/occ-cdev.c:126:26: error: invalid use of undefined type 'struct occ_client'
     126 |         put_device(client->occ->dev);
         |                          ^~
   drivers/fsi/occ-cdev.c:127:9: error: implicit declaration of function 'free_page' [-Werror=implicit-function-declaration]
     127 |         free_page((unsigned long)client->buffer);
         |         ^~~~~~~~~
   drivers/fsi/occ-cdev.c:127:40: error: invalid use of undefined type 'struct occ_client'
     127 |         free_page((unsigned long)client->buffer);
         |                                        ^~
   drivers/fsi/occ-cdev.c: At top level:
   drivers/fsi/occ-cdev.c:133:21: error: variable 'occ_fops' has initializer but incomplete type
     133 | static const struct file_operations occ_fops = {
         |                     ^~~~~~~~~~~~~~~
   drivers/fsi/occ-cdev.c:134:10: error: 'const struct file_operations' has no member named 'owner'
     134 |         .owner = THIS_MODULE,
         |          ^~~~~
   drivers/fsi/occ-cdev.c:134:18: error: 'THIS_MODULE' undeclared here (not in a function); did you mean 'IS_MODULE'?
     134 |         .owner = THIS_MODULE,
         |                  ^~~~~~~~~~~
         |                  IS_MODULE
   drivers/fsi/occ-cdev.c:134:18: warning: excess elements in struct initializer
   drivers/fsi/occ-cdev.c:134:18: note: (near initialization for 'occ_fops')
   drivers/fsi/occ-cdev.c:135:10: error: 'const struct file_operations' has no member named 'open'
     135 |         .open = occ_open,
         |          ^~~~
   drivers/fsi/occ-cdev.c:135:17: warning: excess elements in struct initializer
     135 |         .open = occ_open,
         |                 ^~~~~~~~
   drivers/fsi/occ-cdev.c:135:17: note: (near initialization for 'occ_fops')
   drivers/fsi/occ-cdev.c:136:10: error: 'const struct file_operations' has no member named 'read'
     136 |         .read = occ_read,
         |          ^~~~
   drivers/fsi/occ-cdev.c:136:17: error: 'occ_read' undeclared here (not in a function)
     136 |         .read = occ_read,
         |                 ^~~~~~~~
   drivers/fsi/occ-cdev.c:136:17: warning: excess elements in struct initializer
   drivers/fsi/occ-cdev.c:136:17: note: (near initialization for 'occ_fops')
   drivers/fsi/occ-cdev.c:137:10: error: 'const struct file_operations' has no member named 'write'
     137 |         .write = occ_write,
         |          ^~~~~
   drivers/fsi/occ-cdev.c:137:18: error: 'occ_write' undeclared here (not in a function)
     137 |         .write = occ_write,
         |                  ^~~~~~~~~
   drivers/fsi/occ-cdev.c:137:18: warning: excess elements in struct initializer
   drivers/fsi/occ-cdev.c:137:18: note: (near initialization for 'occ_fops')
   drivers/fsi/occ-cdev.c:138:10: error: 'const struct file_operations' has no member named 'release'
     138 |         .release = occ_release,
         |          ^~~~~~~
   drivers/fsi/occ-cdev.c:138:20: warning: excess elements in struct initializer
     138 |         .release = occ_release,
         |                    ^~~~~~~~~~~
   drivers/fsi/occ-cdev.c:138:20: note: (near initialization for 'occ_fops')
   drivers/fsi/occ-cdev.c:133:37: error: storage size of 'occ_fops' isn't known
     133 | static const struct file_operations occ_fops = {
         |                                     ^~~~~~~~
   drivers/fsi/occ-cdev.c:133:37: warning: 'occ_fops' defined but not used [-Wunused-const-variable=]


vim +22 drivers/fsi/occ-cdev.c

     3	
     4	static int occ_open(struct inode *inode, struct file *file)
     5	{
     6		struct occ_client *client = kzalloc(sizeof(*client), GFP_KERNEL);
     7		struct miscdevice *mdev = file->private_data;
     8		struct occ *occ = to_occ(mdev);
     9	
    10		if (!client)
    11			return -ENOMEM;
    12	
    13		client->buffer = (u8 *)__get_free_page(GFP_KERNEL);
    14		if (!client->buffer) {
    15			kfree(client);
    16			return -ENOMEM;
    17		}
    18	
    19		client->occ = occ;
    20		mutex_init(&client->lock);
    21		file->private_data = client;
  > 22		get_device(occ->dev);
    23	
    24		/* We allocate a 1-page buffer, make sure it all fits */
  > 25		BUILD_BUG_ON((OCC_CMD_DATA_BYTES + 3) > PAGE_SIZE);
    26		BUILD_BUG_ON((OCC_RESP_DATA_BYTES + 7) > PAGE_SIZE);
    27	
    28		return 0;
    29	}
    30	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (262274 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ