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]
Message-ID: <202210182138.pccveqQT-lkp@intel.com>
Date:   Tue, 18 Oct 2022 21:14:40 +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 5/5] drivers: fsi: occ and sbefifo refactor

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-20221018]
[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-6-eajames%40linux.ibm.com
patch subject: [PATCH 5/5] drivers: fsi: occ and sbefifo refactor
config: mips-allmodconfig
compiler: mips-linux-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/49dc2362239ea2e0f174255d6915f637a72670c8
        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 49dc2362239ea2e0f174255d6915f637a72670c8
        # 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=mips 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.c:315:63: error: invalid use of undefined type 'struct occ'
     315 |         struct occ_response *resp = (struct occ_response *)occ->buffer;
         |                                                               ^~
   drivers/fsi/occ.c:324:16: error: invalid use of undefined type 'struct occ'
     324 |         if (occ->dead)
         |                ^~
   In file included from include/linux/rhashtable-types.h:14,
                    from include/linux/ipc.h:7,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15:
   drivers/fsi/occ.c:330:43: error: invalid use of undefined type 'struct occ'
     330 |         rc = mutex_lock_interruptible(&occ->lock);
         |                                           ^~
   include/linux/mutex.h:188:72: note: in definition of macro 'mutex_lock_interruptible'
     188 | #define mutex_lock_interruptible(lock) mutex_lock_interruptible_nested(lock, 0)
         |                                                                        ^~~~
   drivers/fsi/occ.c:342:21: error: invalid use of undefined type 'struct occ'
     342 |         seq_no = occ->sequence_number++;
         |                     ^~
   drivers/fsi/occ.c:343:17: error: invalid use of undefined type 'struct occ'
     343 |         if (!occ->sequence_number)
         |                 ^~
   drivers/fsi/occ.c:344:20: error: invalid use of undefined type 'struct occ'
     344 |                 occ->sequence_number = 1;
         |                    ^~
   drivers/fsi/occ.c:347:72: error: passing argument 6 of 'occ_putsram' from incompatible pointer type [-Werror=incompatible-pointer-types]
     347 |         rc = occ_putsram(occ, request, request_size, seq_no, checksum, pending);
         |                                                                        ^~~~~~~
         |                                                                        |
         |                                                                        struct occ_pending *
   drivers/fsi/occ.c:166:44: note: expected 'struct occ_pending *' but argument is of type 'struct occ_pending *'
     166 |                        struct occ_pending *pending)
         |                        ~~~~~~~~~~~~~~~~~~~~^~~~~~~
   drivers/fsi/occ.c:351:36: error: passing argument 2 of 'occ_trigger_attn' from incompatible pointer type [-Werror=incompatible-pointer-types]
     351 |         rc = occ_trigger_attn(occ, pending);
         |                                    ^~~~~~~
         |                                    |
         |                                    struct occ_pending *
   drivers/fsi/occ.c:243:66: note: expected 'struct occ_pending *' but argument is of type 'struct occ_pending *'
     243 | static int occ_trigger_attn(struct occ *occ, struct occ_pending *pending)
         |                                              ~~~~~~~~~~~~~~~~~~~~^~~~~~~
   drivers/fsi/occ.c:358:45: error: passing argument 4 of 'occ_getsram' from incompatible pointer type [-Werror=incompatible-pointer-types]
     358 |                 rc = occ_getsram(occ, 0, 8, pending);
         |                                             ^~~~~~~
         |                                             |
         |                                             struct occ_pending *
   drivers/fsi/occ.c:105:86: note: expected 'struct occ_pending *' but argument is of type 'struct occ_pending *'
     105 | static int occ_getsram(struct occ *occ, u32 offset, ssize_t len, struct occ_pending *pending)
         |                                                                  ~~~~~~~~~~~~~~~~~~~~^~~~~~~
   drivers/fsi/occ.c:364:45: error: invalid use of undefined type 'struct occ'
     364 |                                 dev_err(&occ->dev,
         |                                             ^~
   include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                         ^~~
   drivers/fsi/occ.c:364:33: note: in expansion of macro 'dev_err'
     364 |                                 dev_err(&occ->dev,
         |                                 ^~~~~~~
   drivers/fsi/occ.c:382:64: error: invalid use of undefined type 'struct occ'
     382 |                         if ((resp_data_length + 7) > sizeof(occ->buffer)) {
         |                                                                ^~
   drivers/fsi/occ.c:392:80: error: passing argument 4 of 'occ_getsram' from incompatible pointer type [-Werror=incompatible-pointer-types]
     392 |                                 rc = occ_getsram(occ, 0, resp_data_length + 7, pending);
         |                                                                                ^~~~~~~
         |                                                                                |
         |                                                                                struct occ_pending *
   drivers/fsi/occ.c:105:86: note: expected 'struct occ_pending *' but argument is of type 'struct occ_pending *'
     105 | static int occ_getsram(struct occ *occ, u32 offset, ssize_t len, struct occ_pending *pending)
         |                                                                  ~~~~~~~~~~~~~~~~~~~~^~~~~~~
   drivers/fsi/occ.c:408:52: error: passing argument 3 of 'occ_store' from incompatible pointer type [-Werror=incompatible-pointer-types]
     408 |         rc = occ_store(resp, resp_data_length + 7, pending);
         |                                                    ^~~~~~~
         |                                                    |
         |                                                    struct occ_pending *
   drivers/fsi/occ.c:54:73: note: expected 'struct occ_pending *' but argument is of type 'struct occ_pending *'
      54 | static int occ_store(const void *data, size_t size, struct occ_pending *pending)
         |                                                     ~~~~~~~~~~~~~~~~~~~~^~~~~~~
   drivers/fsi/occ.c:411:26: error: invalid use of undefined type 'struct occ'
     411 |         mutex_unlock(&occ->lock);
         |                          ^~
   In file included from include/linux/bits.h:22,
                    from include/linux/ratelimit_types.h:5,
                    from include/linux/ratelimit.h:5:
   drivers/fsi/occ.c: In function 'occ_free':
   include/linux/container_of.h:19:54: error: invalid use of undefined type 'struct occ'
      19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |                                                      ^~
   include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
   include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
      19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |         ^~~~~~~~~~~~~
   include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
      19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |                       ^~~~~~~~~~~
   drivers/fsi/occ.c:417:27: note: in expansion of macro 'container_of'
     417 |         struct occ *occ = container_of(dev, struct occ, dev);
         |                           ^~~~~~~~~~~~
>> include/linux/compiler_types.h:298:27: error: expression in static assertion is not an integer
     298 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
         |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
   include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
      19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |         ^~~~~~~~~~~~~
   include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
      19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |                       ^~~~~~~~~~~
   drivers/fsi/occ.c:417:27: note: in expansion of macro 'container_of'
     417 |         struct occ *occ = container_of(dev, struct occ, dev);
         |                           ^~~~~~~~~~~~
   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/kasan-checks.h:5,
                    from include/asm-generic/rwonce.h:26,
                    from ./arch/mips/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:246,
                    from include/linux/dev_printk.h:14:
   include/linux/stddef.h:16:33: error: invalid use of undefined type 'struct occ'
      16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
         |                                 ^~~~~~~~~~~~~~~~~~
   include/linux/container_of.h:22:28: note: in expansion of macro 'offsetof'
      22 |         ((type *)(__mptr - offsetof(type, member))); })
         |                            ^~~~~~~~
   drivers/fsi/occ.c:417:27: note: in expansion of macro 'container_of'
     417 |         struct occ *occ = container_of(dev, struct occ, dev);
         |                           ^~~~~~~~~~~~
   drivers/fsi/occ.c: In function 'occ_register_hwmon':
   drivers/fsi/occ.c:431:31: error: invalid use of undefined type 'struct occ'
     431 |                 .parent = &occ->dev,
         |                               ^~
   drivers/fsi/occ.c:440:30: error: invalid use of undefined type 'struct occ'
     440 |                 dev_warn(&occ->dev, "Failed to create hwmon device: %ld.\n", PTR_ERR(hwmon_dev));
         |                              ^~
   include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                         ^~~
   drivers/fsi/occ.c:440:17: note: in expansion of macro 'dev_warn'
     440 |                 dev_warn(&occ->dev, "Failed to create hwmon device: %ld.\n", PTR_ERR(hwmon_dev));
         |                 ^~~~~~~~
   drivers/fsi/occ.c: At top level:
   drivers/fsi/occ.c:453:84: warning: 'enum versions' declared inside parameter list will not be visible outside of this definition or declaration
     453 |                        int (*get_devt)(struct device *, int, dev_t *, int *), enum versions v)
         |                                                                                    ^~~~~~~~
   drivers/fsi/occ.c:453:93: error: parameter 3 ('v') has incomplete type
     453 |                        int (*get_devt)(struct device *, int, dev_t *, int *), enum versions v)
         |                                                                               ~~~~~~~~~~~~~~^
   drivers/fsi/occ.c:452:13: error: function declaration isn't a prototype [-Werror=strict-prototypes]
     452 | struct occ *occ_create(struct sbefifo *sbefifo,
         |             ^~~~~~~~~~
   drivers/fsi/occ.c:452:13: error: redefinition of 'occ_create'
   drivers/fsi/occ.h:64:27: note: previous definition of 'occ_create' with type 'struct occ *()'
      64 | static inline struct occ *occ_create(struct sbefifo *sbefifo,
         |                           ^~~~~~~~~~
   drivers/fsi/occ.c: In function 'occ_create':
   drivers/fsi/occ.c:462:30: error: invalid application of 'sizeof' to incomplete type 'struct occ'
     462 |         occ = kvzalloc(sizeof(*occ), GFP_KERNEL);
         |                              ^
   drivers/fsi/occ.c:468:66: error: invalid use of undefined type 'struct occ'
     468 |         rc = get_devt(sbefifo->dev.parent, (int)fsi_dev_occ, &occ->dev.devt, &idx);
         |                                                                  ^~
   drivers/fsi/occ.c:475:12: error: invalid use of undefined type 'struct occ'
     475 |         occ->dev.type = &fsi_cdev_type;
         |            ^~
   drivers/fsi/occ.c:476:12: error: invalid use of undefined type 'struct occ'
     476 |         occ->dev.parent = &sbefifo->dev;
         |            ^~
   drivers/fsi/occ.c:477:12: error: invalid use of undefined type 'struct occ'
     477 |         occ->dev.release = occ_free;
         |            ^~
   drivers/fsi/occ.c:478:31: error: invalid use of undefined type 'struct occ'
     478 |         device_initialize(&occ->dev);
         |                               ^~
   drivers/fsi/occ.c:479:26: error: invalid use of undefined type 'struct occ'
     479 |         dev_set_name(&occ->dev, "occ%d", idx);
         |                          ^~
   drivers/fsi/occ.c:481:9: error: implicit declaration of function 'occ_cdev_init'; did you mean 'cdev_init'? [-Werror=implicit-function-declaration]
     481 |         occ_cdev_init(occ);
         |         ^~~~~~~~~~~~~
         |         cdev_init
   drivers/fsi/occ.c:483:24: error: invalid use of undefined type 'struct occ'
     483 |         mutex_init(&occ->lock);
         |                        ^~
   include/linux/mutex.h:105:23: note: in definition of macro 'mutex_init'
     105 |         __mutex_init((mutex), #mutex, &__key);                          \
         |                       ^~~~~
   drivers/fsi/occ.c:484:12: error: invalid use of undefined type 'struct occ'
     484 |         occ->sbefifo = sbefifo;
         |            ^~
   drivers/fsi/occ.c:485:12: error: invalid use of undefined type 'struct occ'
     485 |         occ->version = v;
         |            ^~
   drivers/fsi/occ.c:490:12: error: invalid use of undefined type 'struct occ'
     490 |         occ->sequence_number = (u8)((jiffies % 0xff) + 1);
         |            ^~
   drivers/fsi/occ.c: At top level:
   drivers/fsi/occ.c:497:6: error: redefinition of 'occ_destroy'
     497 | void occ_destroy(struct occ *occ, void(*free_devt)(dev_t))
         |      ^~~~~~~~~~~
   drivers/fsi/occ.h:71:20: note: previous definition of 'occ_destroy' with type 'void(struct occ *, void (*)(dev_t))' {aka 'void(struct occ *, void (*)(unsigned int))'}
      71 | static inline void occ_destroy(struct occ *occ, void(*free_devt)(dev_t)) {}
         |                    ^~~~~~~~~~~
   drivers/fsi/occ.c: In function 'occ_destroy':
   drivers/fsi/occ.c:499:12: error: invalid use of undefined type 'struct occ'
     499 |         occ->dead = 1;
         |            ^~
   drivers/fsi/occ.c:501:35: error: invalid use of undefined type 'struct occ'
     501 |         device_for_each_child(&occ->dev, NULL, occ_unregister_child);
         |                                   ^~
   drivers/fsi/occ.c:504:30: error: invalid use of undefined type 'struct occ'
     504 |                 free_devt(occ->dev.devt);
         |                              ^~
   drivers/fsi/occ.c:506:17: error: invalid use of undefined type 'struct occ'
     506 |         if (!occ->no_cdev)
         |                 ^~
   drivers/fsi/occ.c:507:37: error: invalid use of undefined type 'struct occ'
     507 |                 cdev_device_del(&occ->occ, &occ->dev);
         |                                     ^~
   drivers/fsi/occ.c:507:48: error: invalid use of undefined type 'struct occ'
     507 |                 cdev_device_del(&occ->occ, &occ->dev);
         |                                                ^~
   drivers/fsi/occ.c:509:24: error: invalid use of undefined type 'struct occ'
     509 |         put_device(&occ->dev);
         |                        ^~
   drivers/fsi/occ.c: In function 'fsi_occ_submit':
   include/linux/container_of.h:19:54: error: invalid use of undefined type 'struct occ'
      19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |                                                      ^~
   include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
   include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
      19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |         ^~~~~~~~~~~~~
   include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
      19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |                       ^~~~~~~~~~~
   drivers/fsi/occ.c:515:27: note: in expansion of macro 'container_of'
     515 |         struct occ *occ = container_of(dev, struct occ, dev);
         |                           ^~~~~~~~~~~~
>> include/linux/compiler_types.h:298:27: error: expression in static assertion is not an integer
     298 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
         |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
   include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
      19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |         ^~~~~~~~~~~~~
   include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
      19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |                       ^~~~~~~~~~~
   drivers/fsi/occ.c:515:27: note: in expansion of macro 'container_of'
     515 |         struct occ *occ = container_of(dev, struct occ, dev);
         |                           ^~~~~~~~~~~~
   include/linux/stddef.h:16:33: error: invalid use of undefined type 'struct occ'
      16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
         |                                 ^~~~~~~~~~~~~~~~~~
   include/linux/container_of.h:22:28: note: in expansion of macro 'offsetof'
      22 |         ((type *)(__mptr - offsetof(type, member))); })
         |                            ^~~~~~~~
   drivers/fsi/occ.c:515:27: note: in expansion of macro 'container_of'
     515 |         struct occ *occ = container_of(dev, struct occ, dev);
         |                           ^~~~~~~~~~~~
   drivers/fsi/occ.c:516:28: error: storage size of 'pending' isn't known
     516 |         struct occ_pending pending;
         |                            ^~~~~~~
   drivers/fsi/occ.c:516:28: warning: unused variable 'pending' [-Wunused-variable]
   cc1: some warnings being treated as errors
--
   In file included from drivers/fsi/occ-cdev.c:12:
   drivers/fsi/occ.h:66:43: warning: 'enum versions' declared inside parameter list will not be visible outside of this definition or declaration
      66 |                                      enum versions v)
         |                                           ^~~~~~~~
   drivers/fsi/occ.h:66:52: error: parameter 3 ('v') has incomplete type
      66 |                                      enum versions v)
         |                                      ~~~~~~~~~~~~~~^
   drivers/fsi/occ.h:64:27: error: function declaration isn't a prototype [-Werror=strict-prototypes]
      64 | static inline struct occ *occ_create(struct sbefifo *sbefifo,
         |                           ^~~~~~~~~~
   drivers/fsi/occ-cdev.c:14:40: warning: 'struct occ_user' declared inside parameter list will not be visible outside of this definition or declaration
      14 | static void occ_release_command(struct occ_user *user)
         |                                        ^~~~~~~~
   drivers/fsi/occ-cdev.c: In function 'occ_release_command':
   drivers/fsi/occ-cdev.c:16:17: error: invalid use of undefined type 'struct occ_user'
      16 |         if (user->pending.allocated)
         |                 ^~
   drivers/fsi/occ-cdev.c:17:27: error: invalid use of undefined type 'struct occ_user'
      17 |                 kfree(user->pending.buffer);
         |                           ^~
   drivers/fsi/occ-cdev.c:19:13: error: invalid use of undefined type 'struct occ_user'
      19 |         user->pending.buffer = user->buffer;
         |             ^~
   drivers/fsi/occ-cdev.c:19:36: error: invalid use of undefined type 'struct occ_user'
      19 |         user->pending.buffer = user->buffer;
         |                                    ^~
   drivers/fsi/occ-cdev.c:20:13: error: invalid use of undefined type 'struct occ_user'
      20 |         user->pending.buffer_size = sizeof(user->buffer);
         |             ^~
   drivers/fsi/occ-cdev.c:20:48: error: invalid use of undefined type 'struct occ_user'
      20 |         user->pending.buffer_size = sizeof(user->buffer);
         |                                                ^~
   drivers/fsi/occ-cdev.c:21:13: error: invalid use of undefined type 'struct occ_user'
      21 |         user->pending.data_size = 0;
         |             ^~
   drivers/fsi/occ-cdev.c:22:13: error: invalid use of undefined type 'struct occ_user'
      22 |         user->pending.allocated = 0;
         |             ^~
   drivers/fsi/occ-cdev.c: In function 'occ_open':
   drivers/fsi/occ-cdev.c:29:30: error: invalid application of 'sizeof' to incomplete type 'struct occ_user'
      29 |         user = kmalloc(sizeof(*user), GFP_KERNEL);
         |                              ^
   In file included from include/linux/seqlock.h:19,
                    from include/linux/dcache.h:11,
                    from include/linux/fs.h:8,
                    from drivers/fsi/occ-cdev.c:7:
   drivers/fsi/occ-cdev.c:34:25: error: invalid use of undefined type 'struct occ_user'
      34 |         mutex_init(&user->lock);
         |                         ^~
   include/linux/mutex.h:105:23: note: in definition of macro 'mutex_init'
     105 |         __mutex_init((mutex), #mutex, &__key);                          \
         |                       ^~~~~
   drivers/fsi/occ-cdev.c:35:13: error: invalid use of undefined type 'struct occ_user'
      35 |         user->occ = container_of(inode->i_cdev, struct occ, occ);
         |             ^~
   In file included from include/linux/container_of.h:5,
                    from drivers/fsi/occ-cdev.c:4:
   include/linux/container_of.h:19:54: error: invalid use of undefined type 'struct occ'
      19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |                                                      ^~
   include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
   include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
      19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |         ^~~~~~~~~~~~~
   include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
      19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |                       ^~~~~~~~~~~
   drivers/fsi/occ-cdev.c:35:21: note: in expansion of macro 'container_of'
      35 |         user->occ = container_of(inode->i_cdev, struct occ, occ);
         |                     ^~~~~~~~~~~~
>> include/linux/compiler_types.h:298:27: error: expression in static assertion is not an integer
     298 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
         |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
   include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
      19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |         ^~~~~~~~~~~~~
   include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
      19 |         static_assert(__same_type(*(ptr), ((type *)0)->member) ||       \
         |                       ^~~~~~~~~~~
   drivers/fsi/occ-cdev.c:35:21: note: in expansion of macro 'container_of'
      35 |         user->occ = container_of(inode->i_cdev, struct occ, occ);
         |                     ^~~~~~~~~~~~
   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/kasan-checks.h:5,
                    from include/asm-generic/rwonce.h:26,
                    from ./arch/mips/include/generated/asm/rwonce.h:1,
                    from include/linux/compiler.h:246,
                    from include/linux/build_bug.h:5:
   include/linux/stddef.h:16:33: error: invalid use of undefined type 'struct occ'
      16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
         |                                 ^~~~~~~~~~~~~~~~~~
   include/linux/container_of.h:22:28: note: in expansion of macro 'offsetof'
      22 |         ((type *)(__mptr - offsetof(type, member))); })
         |                            ^~~~~~~~
   drivers/fsi/occ-cdev.c:35:21: note: in expansion of macro 'container_of'
      35 |         user->occ = container_of(inode->i_cdev, struct occ, occ);
         |                     ^~~~~~~~~~~~
   drivers/fsi/occ-cdev.c:36:13: error: invalid use of undefined type 'struct occ_user'
      36 |         user->pending.buffer = user->buffer;
         |             ^~
   drivers/fsi/occ-cdev.c:36:36: error: invalid use of undefined type 'struct occ_user'
      36 |         user->pending.buffer = user->buffer;
         |                                    ^~
   drivers/fsi/occ-cdev.c:37:13: error: invalid use of undefined type 'struct occ_user'
      37 |         user->pending.buffer_size = sizeof(user->buffer);
         |             ^~
   drivers/fsi/occ-cdev.c:37:48: error: invalid use of undefined type 'struct occ_user'
      37 |         user->pending.buffer_size = sizeof(user->buffer);
         |                                                ^~
   drivers/fsi/occ-cdev.c:38:13: error: invalid use of undefined type 'struct occ_user'
      38 |         user->pending.data_size = 0;
         |             ^~
   drivers/fsi/occ-cdev.c:39:13: error: invalid use of undefined type 'struct occ_user'
      39 |         user->pending.allocated = 0;
         |             ^~
   drivers/fsi/occ-cdev.c:40:13: error: invalid use of undefined type 'struct occ_user'
      40 |         user->pending.pending = 0;
         |             ^~
   drivers/fsi/occ-cdev.c:41:13: error: invalid use of undefined type 'struct occ_user'
      41 |         user->pending.resizable = 1;
         |             ^~
   drivers/fsi/occ-cdev.c: In function 'occ_read':
   drivers/fsi/occ-cdev.c:52:26: error: 'OCC_SRAM_BYTES' undeclared (first use in this function)
      52 |         if (len + offs > OCC_SRAM_BYTES)
         |                          ^~~~~~~~~~~~~~
   drivers/fsi/occ-cdev.c:52:26: note: each undeclared identifier is reported only once for each function it appears in
   drivers/fsi/occ-cdev.c:56:25: error: invalid use of undefined type 'struct occ_user'
      56 |         mutex_lock(&user->lock);
         |                         ^~
   include/linux/mutex.h:187:44: note: in definition of macro 'mutex_lock'
     187 | #define mutex_lock(lock) mutex_lock_nested(lock, 0)
         |                                            ^~~~
   drivers/fsi/occ-cdev.c:59:26: error: invalid use of undefined type 'struct occ_user'
      59 |                 if (!user->pending.pending) {
         |                          ^~
   drivers/fsi/occ-cdev.c:64:21: error: invalid use of undefined type 'struct occ_user'
      64 |                 user->pending.pending = 0;
         |                     ^~
   drivers/fsi/occ-cdev.c:67:22: error: implicit declaration of function 'occ_submit' [-Werror=implicit-function-declaration]
      67 |                 rc = occ_submit(user->occ, user->pending.buffer, user->pending.data_size + 6,
         |                      ^~~~~~~~~~
   drivers/fsi/occ-cdev.c:67:37: error: invalid use of undefined type 'struct occ_user'
      67 |                 rc = occ_submit(user->occ, user->pending.buffer, user->pending.data_size + 6,
         |                                     ^~
   drivers/fsi/occ-cdev.c:67:48: error: invalid use of undefined type 'struct occ_user'
      67 |                 rc = occ_submit(user->occ, user->pending.buffer, user->pending.data_size + 6,
         |                                                ^~
   drivers/fsi/occ-cdev.c:67:70: error: invalid use of undefined type 'struct occ_user'
      67 |                 rc = occ_submit(user->occ, user->pending.buffer, user->pending.data_size + 6,
         |                                                                      ^~
   drivers/fsi/occ-cdev.c:68:38: error: invalid use of undefined type 'struct occ_user'
      68 |                                 &user->pending);
         |                                      ^~
   In file included from include/linux/kernel.h:26,
                    from include/linux/cpumask.h:10,
                    from arch/mips/include/asm/processor.h:15,
                    from arch/mips/include/asm/thread_info.h:16,
                    from include/linux/thread_info.h:60,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/mips/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:56,
                    from include/linux/wait.h:9,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6:
   drivers/fsi/occ-cdev.c:73:27: error: invalid use of undefined type 'struct occ_user'


vim +298 include/linux/compiler_types.h

eb111869301e15b7 Rasmus Villemoes 2019-09-13  296  
d15155824c501480 Will Deacon      2017-10-24  297  /* Are two types/vars the same type (ignoring qualifiers)? */
d15155824c501480 Will Deacon      2017-10-24 @298  #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
d15155824c501480 Will Deacon      2017-10-24  299  

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ