All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 3437/4145] include/linux/hashtable.h:27:25: error: expected declaration specifiers or '...' before '(' token
@ 2020-06-29 22:51 kernel test robot
  2020-06-30  7:09 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2020-06-29 22:51 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 24561 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   c28e58ee9dadc99f79cf16ca805221feddd432ad
commit: da6690767cbd344998f36081815c85f3d467e78c [3437/4145] regulator: consumer: Supply missing prototypes for 3 core functions
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-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
        git checkout da6690767cbd344998f36081815c85f3d467e78c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

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

All errors (new ones prefixed by >>):

   In file included from include/linux/elevator.h:6,
                    from include/linux/blkdev.h:288,
                    from include/linux/blk-cgroup.h:23,
                    from include/linux/writeback.h:14,
                    from include/linux/memcontrol.h:22,
                    from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from include/linux/regulator/consumer.h:35,
                    from drivers/crypto/ux500/hash/hash_core.c:28:
>> include/linux/hashtable.h:27:25: error: expected declaration specifiers or '...' before '(' token
      27 | #define HASH_SIZE(name) (ARRAY_SIZE(name))
         |                         ^
   include/linux/hashtable.h:52:53: note: in expansion of macro 'HASH_SIZE'
      52 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))
         |                                                     ^~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c:548:12: note: in expansion of macro 'hash_init'
     548 | static int hash_init(struct ahash_request *req)
         |            ^~~~~~~~~
   In file included from include/linux/clk.h:13,
                    from drivers/crypto/ux500/hash/hash_core.c:16:
   drivers/crypto/ux500/hash/hash_core.c: In function 'ahash_sha1_init':
   include/linux/kernel.h:47:38: warning: division 'sizeof (struct ahash_request *) / sizeof (struct ahash_request)' does not compute the number of array elements [-Wsizeof-pointer-div]
      47 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
         |                                      ^
   include/linux/hashtable.h:27:26: note: in expansion of macro 'ARRAY_SIZE'
      27 | #define HASH_SIZE(name) (ARRAY_SIZE(name))
         |                          ^~~~~~~~~~
   include/linux/hashtable.h:52:53: note: in expansion of macro 'HASH_SIZE'
      52 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))
         |                                                     ^~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c:1362:9: note: in expansion of macro 'hash_init'
    1362 |  return hash_init(req);
         |         ^~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c:1352:50: note: first 'sizeof' operand was declared here
    1352 | static int ahash_sha1_init(struct ahash_request *req)
         |                            ~~~~~~~~~~~~~~~~~~~~~~^~~
   In file included from include/linux/bits.h:23,
                    from include/linux/bitops.h:5,
                    from include/linux/kernel.h:12,
                    from include/linux/clk.h:13,
                    from drivers/crypto/ux500/hash/hash_core.c:16:
>> include/linux/build_bug.h:16:51: error: negative width in bit-field '<anonymous>'
      16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
         |                                                   ^
   include/linux/compiler.h:409:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
     409 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
         |                            ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:47:59: note: in expansion of macro '__must_be_array'
      47 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
         |                                                           ^~~~~~~~~~~~~~~
   include/linux/hashtable.h:27:26: note: in expansion of macro 'ARRAY_SIZE'
      27 | #define HASH_SIZE(name) (ARRAY_SIZE(name))
         |                          ^~~~~~~~~~
   include/linux/hashtable.h:52:53: note: in expansion of macro 'HASH_SIZE'
      52 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))
         |                                                     ^~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c:1362:9: note: in expansion of macro 'hash_init'
    1362 |  return hash_init(req);
         |         ^~~~~~~~~
   In file included from include/linux/elevator.h:6,
                    from include/linux/blkdev.h:288,
                    from include/linux/blk-cgroup.h:23,
                    from include/linux/writeback.h:14,
                    from include/linux/memcontrol.h:22,
                    from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from include/linux/regulator/consumer.h:35,
                    from drivers/crypto/ux500/hash/hash_core.c:28:
>> drivers/crypto/ux500/hash/hash_core.c:1362:19: error: passing argument 1 of '__hash_init' from incompatible pointer type [-Werror=incompatible-pointer-types]
    1362 |  return hash_init(req);
         |                   ^~~
         |                   |
         |                   struct ahash_request *
   include/linux/hashtable.h:52:42: note: in definition of macro 'hash_init'
      52 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))
         |                                          ^~~~~~~~~
   include/linux/hashtable.h:34:51: note: expected 'struct hlist_head *' but argument is of type 'struct ahash_request *'
      34 | static inline void __hash_init(struct hlist_head *ht, unsigned int sz)
         |                                ~~~~~~~~~~~~~~~~~~~^~
>> include/linux/hashtable.h:52:30: error: void value not ignored as it ought to be
      52 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))
         |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c:1362:9: note: in expansion of macro 'hash_init'
    1362 |  return hash_init(req);
         |         ^~~~~~~~~
   In file included from include/linux/clk.h:13,
                    from drivers/crypto/ux500/hash/hash_core.c:16:
   drivers/crypto/ux500/hash/hash_core.c: In function 'ahash_sha256_init':
   include/linux/kernel.h:47:38: warning: division 'sizeof (struct ahash_request *) / sizeof (struct ahash_request)' does not compute the number of array elements [-Wsizeof-pointer-div]
      47 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
         |                                      ^
   include/linux/hashtable.h:27:26: note: in expansion of macro 'ARRAY_SIZE'
      27 | #define HASH_SIZE(name) (ARRAY_SIZE(name))
         |                          ^~~~~~~~~~
   include/linux/hashtable.h:52:53: note: in expansion of macro 'HASH_SIZE'
      52 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))
         |                                                     ^~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c:1375:9: note: in expansion of macro 'hash_init'
    1375 |  return hash_init(req);
         |         ^~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c:1365:52: note: first 'sizeof' operand was declared here
    1365 | static int ahash_sha256_init(struct ahash_request *req)
         |                              ~~~~~~~~~~~~~~~~~~~~~~^~~
   In file included from include/linux/bits.h:23,
                    from include/linux/bitops.h:5,
                    from include/linux/kernel.h:12,
                    from include/linux/clk.h:13,
                    from drivers/crypto/ux500/hash/hash_core.c:16:
>> include/linux/build_bug.h:16:51: error: negative width in bit-field '<anonymous>'
      16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
         |                                                   ^
   include/linux/compiler.h:409:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
     409 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
         |                            ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:47:59: note: in expansion of macro '__must_be_array'
      47 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
         |                                                           ^~~~~~~~~~~~~~~
   include/linux/hashtable.h:27:26: note: in expansion of macro 'ARRAY_SIZE'
      27 | #define HASH_SIZE(name) (ARRAY_SIZE(name))
         |                          ^~~~~~~~~~
   include/linux/hashtable.h:52:53: note: in expansion of macro 'HASH_SIZE'
      52 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))
         |                                                     ^~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c:1375:9: note: in expansion of macro 'hash_init'
    1375 |  return hash_init(req);
         |         ^~~~~~~~~
   In file included from include/linux/elevator.h:6,
                    from include/linux/blkdev.h:288,
                    from include/linux/blk-cgroup.h:23,
                    from include/linux/writeback.h:14,
                    from include/linux/memcontrol.h:22,
                    from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from include/linux/regulator/consumer.h:35,
                    from drivers/crypto/ux500/hash/hash_core.c:28:
   drivers/crypto/ux500/hash/hash_core.c:1375:19: error: passing argument 1 of '__hash_init' from incompatible pointer type [-Werror=incompatible-pointer-types]
    1375 |  return hash_init(req);
         |                   ^~~
         |                   |
         |                   struct ahash_request *
   include/linux/hashtable.h:52:42: note: in definition of macro 'hash_init'
      52 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))
         |                                          ^~~~~~~~~
   include/linux/hashtable.h:34:51: note: expected 'struct hlist_head *' but argument is of type 'struct ahash_request *'
      34 | static inline void __hash_init(struct hlist_head *ht, unsigned int sz)
         |                                ~~~~~~~~~~~~~~~~~~~^~
>> include/linux/hashtable.h:52:30: error: void value not ignored as it ought to be
      52 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))
         |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c:1375:9: note: in expansion of macro 'hash_init'
    1375 |  return hash_init(req);
         |         ^~~~~~~~~
   In file included from include/linux/clk.h:13,
                    from drivers/crypto/ux500/hash/hash_core.c:16:
   drivers/crypto/ux500/hash/hash_core.c: In function 'hmac_sha1_init':
   include/linux/kernel.h:47:38: warning: division 'sizeof (struct ahash_request *) / sizeof (struct ahash_request)' does not compute the number of array elements [-Wsizeof-pointer-div]
      47 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
         |                                      ^
   include/linux/hashtable.h:27:26: note: in expansion of macro 'ARRAY_SIZE'
      27 | #define HASH_SIZE(name) (ARRAY_SIZE(name))
         |                          ^~~~~~~~~~
   include/linux/hashtable.h:52:53: note: in expansion of macro 'HASH_SIZE'
      52 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))
         |                                                     ^~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c:1428:9: note: in expansion of macro 'hash_init'
    1428 |  return hash_init(req);
         |         ^~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c:1418:49: note: first 'sizeof' operand was declared here
    1418 | static int hmac_sha1_init(struct ahash_request *req)
         |                           ~~~~~~~~~~~~~~~~~~~~~~^~~
   In file included from include/linux/bits.h:23,
                    from include/linux/bitops.h:5,
                    from include/linux/kernel.h:12,
                    from include/linux/clk.h:13,
                    from drivers/crypto/ux500/hash/hash_core.c:16:
>> include/linux/build_bug.h:16:51: error: negative width in bit-field '<anonymous>'
      16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
         |                                                   ^
   include/linux/compiler.h:409:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
     409 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
         |                            ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:47:59: note: in expansion of macro '__must_be_array'
      47 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
         |                                                           ^~~~~~~~~~~~~~~
   include/linux/hashtable.h:27:26: note: in expansion of macro 'ARRAY_SIZE'
      27 | #define HASH_SIZE(name) (ARRAY_SIZE(name))
         |                          ^~~~~~~~~~
   include/linux/hashtable.h:52:53: note: in expansion of macro 'HASH_SIZE'
      52 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))
         |                                                     ^~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c:1428:9: note: in expansion of macro 'hash_init'
    1428 |  return hash_init(req);
         |         ^~~~~~~~~
   In file included from include/linux/elevator.h:6,
                    from include/linux/blkdev.h:288,
                    from include/linux/blk-cgroup.h:23,
                    from include/linux/writeback.h:14,
                    from include/linux/memcontrol.h:22,
                    from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from include/linux/regulator/consumer.h:35,
                    from drivers/crypto/ux500/hash/hash_core.c:28:
   drivers/crypto/ux500/hash/hash_core.c:1428:19: error: passing argument 1 of '__hash_init' from incompatible pointer type [-Werror=incompatible-pointer-types]
    1428 |  return hash_init(req);
         |                   ^~~
         |                   |
         |                   struct ahash_request *
   include/linux/hashtable.h:52:42: note: in definition of macro 'hash_init'
      52 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))
         |                                          ^~~~~~~~~
   include/linux/hashtable.h:34:51: note: expected 'struct hlist_head *' but argument is of type 'struct ahash_request *'
      34 | static inline void __hash_init(struct hlist_head *ht, unsigned int sz)
         |                                ~~~~~~~~~~~~~~~~~~~^~
>> include/linux/hashtable.h:52:30: error: void value not ignored as it ought to be
      52 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))
         |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c:1428:9: note: in expansion of macro 'hash_init'
    1428 |  return hash_init(req);
         |         ^~~~~~~~~
   In file included from include/linux/clk.h:13,
                    from drivers/crypto/ux500/hash/hash_core.c:16:
   drivers/crypto/ux500/hash/hash_core.c: In function 'hmac_sha256_init':
   include/linux/kernel.h:47:38: warning: division 'sizeof (struct ahash_request *) / sizeof (struct ahash_request)' does not compute the number of array elements [-Wsizeof-pointer-div]
      47 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
         |                                      ^
   include/linux/hashtable.h:27:26: note: in expansion of macro 'ARRAY_SIZE'
      27 | #define HASH_SIZE(name) (ARRAY_SIZE(name))
         |                          ^~~~~~~~~~
   include/linux/hashtable.h:52:53: note: in expansion of macro 'HASH_SIZE'
      52 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))
         |                                                     ^~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c:1441:9: note: in expansion of macro 'hash_init'
    1441 |  return hash_init(req);
         |         ^~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c:1431:51: note: first 'sizeof' operand was declared here
    1431 | static int hmac_sha256_init(struct ahash_request *req)
         |                             ~~~~~~~~~~~~~~~~~~~~~~^~~
   In file included from include/linux/bits.h:23,
                    from include/linux/bitops.h:5,
                    from include/linux/kernel.h:12,
                    from include/linux/clk.h:13,
                    from drivers/crypto/ux500/hash/hash_core.c:16:
>> include/linux/build_bug.h:16:51: error: negative width in bit-field '<anonymous>'
      16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
         |                                                   ^
   include/linux/compiler.h:409:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
     409 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
         |                            ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:47:59: note: in expansion of macro '__must_be_array'
      47 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
         |                                                           ^~~~~~~~~~~~~~~
   include/linux/hashtable.h:27:26: note: in expansion of macro 'ARRAY_SIZE'
      27 | #define HASH_SIZE(name) (ARRAY_SIZE(name))
         |                          ^~~~~~~~~~
   include/linux/hashtable.h:52:53: note: in expansion of macro 'HASH_SIZE'
      52 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))
         |                                                     ^~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c:1441:9: note: in expansion of macro 'hash_init'
    1441 |  return hash_init(req);
         |         ^~~~~~~~~
   In file included from include/linux/elevator.h:6,
                    from include/linux/blkdev.h:288,
                    from include/linux/blk-cgroup.h:23,
                    from include/linux/writeback.h:14,
                    from include/linux/memcontrol.h:22,
                    from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from include/linux/regulator/consumer.h:35,
                    from drivers/crypto/ux500/hash/hash_core.c:28:
   drivers/crypto/ux500/hash/hash_core.c:1441:19: error: passing argument 1 of '__hash_init' from incompatible pointer type [-Werror=incompatible-pointer-types]
    1441 |  return hash_init(req);
         |                   ^~~
         |                   |
         |                   struct ahash_request *
   include/linux/hashtable.h:52:42: note: in definition of macro 'hash_init'
      52 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))
         |                                          ^~~~~~~~~
   include/linux/hashtable.h:34:51: note: expected 'struct hlist_head *' but argument is of type 'struct ahash_request *'
      34 | static inline void __hash_init(struct hlist_head *ht, unsigned int sz)
         |                                ~~~~~~~~~~~~~~~~~~~^~
>> include/linux/hashtable.h:52:30: error: void value not ignored as it ought to be
      52 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))
         |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c:1441:9: note: in expansion of macro 'hash_init'
    1441 |  return hash_init(req);
         |         ^~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c: At top level:
>> drivers/crypto/ux500/hash/hash_core.c:1518:12: error: 'hash_init' undeclared here (not in a function); did you mean 'sha1_init'?
    1518 |    .init = hash_init,
         |            ^~~~~~~~~
         |            sha1_init
   drivers/crypto/ux500/hash/hash_core.c:531:13: warning: 'hash_dma_valid_data' defined but not used [-Wunused-function]
     531 | static bool hash_dma_valid_data(struct scatterlist *sg, int datasize)
         |             ^~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +27 include/linux/hashtable.h

d9b482c8ba1973 Sasha Levin  2012-10-30  15  
d9b482c8ba1973 Sasha Levin  2012-10-30  16  #define DEFINE_HASHTABLE(name, bits)						\
d9b482c8ba1973 Sasha Levin  2012-10-30  17  	struct hlist_head name[1 << (bits)] =					\
d9b482c8ba1973 Sasha Levin  2012-10-30  18  			{ [0 ... ((1 << (bits)) - 1)] = HLIST_HEAD_INIT }
d9b482c8ba1973 Sasha Levin  2012-10-30  19  
6180d9de61a5c4 Eric Dumazet 2015-11-18  20  #define DEFINE_READ_MOSTLY_HASHTABLE(name, bits)				\
6180d9de61a5c4 Eric Dumazet 2015-11-18  21  	struct hlist_head name[1 << (bits)] __read_mostly =			\
6180d9de61a5c4 Eric Dumazet 2015-11-18  22  			{ [0 ... ((1 << (bits)) - 1)] = HLIST_HEAD_INIT }
6180d9de61a5c4 Eric Dumazet 2015-11-18  23  
d9b482c8ba1973 Sasha Levin  2012-10-30  24  #define DECLARE_HASHTABLE(name, bits)                                   	\
d9b482c8ba1973 Sasha Levin  2012-10-30  25  	struct hlist_head name[1 << (bits)]
d9b482c8ba1973 Sasha Levin  2012-10-30  26  
d9b482c8ba1973 Sasha Levin  2012-10-30 @27  #define HASH_SIZE(name) (ARRAY_SIZE(name))
d9b482c8ba1973 Sasha Levin  2012-10-30  28  #define HASH_BITS(name) ilog2(HASH_SIZE(name))
d9b482c8ba1973 Sasha Levin  2012-10-30  29  
d9b482c8ba1973 Sasha Levin  2012-10-30  30  /* Use hash_32 when possible to allow for fast 32bit hashing in 64bit kernels. */
d9b482c8ba1973 Sasha Levin  2012-10-30  31  #define hash_min(val, bits)							\
d9b482c8ba1973 Sasha Levin  2012-10-30  32  	(sizeof(val) <= 4 ? hash_32(val, bits) : hash_long(val, bits))
d9b482c8ba1973 Sasha Levin  2012-10-30  33  
d9b482c8ba1973 Sasha Levin  2012-10-30  34  static inline void __hash_init(struct hlist_head *ht, unsigned int sz)
d9b482c8ba1973 Sasha Levin  2012-10-30  35  {
d9b482c8ba1973 Sasha Levin  2012-10-30  36  	unsigned int i;
d9b482c8ba1973 Sasha Levin  2012-10-30  37  
d9b482c8ba1973 Sasha Levin  2012-10-30  38  	for (i = 0; i < sz; i++)
d9b482c8ba1973 Sasha Levin  2012-10-30  39  		INIT_HLIST_HEAD(&ht[i]);
d9b482c8ba1973 Sasha Levin  2012-10-30  40  }
d9b482c8ba1973 Sasha Levin  2012-10-30  41  
d9b482c8ba1973 Sasha Levin  2012-10-30  42  /**
d9b482c8ba1973 Sasha Levin  2012-10-30  43   * hash_init - initialize a hash table
d9b482c8ba1973 Sasha Levin  2012-10-30  44   * @hashtable: hashtable to be initialized
d9b482c8ba1973 Sasha Levin  2012-10-30  45   *
d9b482c8ba1973 Sasha Levin  2012-10-30  46   * Calculates the size of the hashtable from the given parameter, otherwise
d9b482c8ba1973 Sasha Levin  2012-10-30  47   * same as hash_init_size.
d9b482c8ba1973 Sasha Levin  2012-10-30  48   *
d9b482c8ba1973 Sasha Levin  2012-10-30  49   * This has to be a macro since HASH_BITS() will not work on pointers since
d9b482c8ba1973 Sasha Levin  2012-10-30  50   * it calculates the size during preprocessing.
d9b482c8ba1973 Sasha Levin  2012-10-30  51   */
d9b482c8ba1973 Sasha Levin  2012-10-30 @52  #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))
d9b482c8ba1973 Sasha Levin  2012-10-30  53  

:::::: The code@line 27 was first introduced by commit
:::::: d9b482c8ba1973a189f2d4c8175d405b87fbf2d7 hashtable: introduce a small and naive hashtable

:::::: TO: Sasha Levin <levinsasha928@gmail.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 75683 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-next:master 3437/4145] include/linux/hashtable.h:27:25: error: expected declaration specifiers or '...' before '(' token
  2020-06-29 22:51 [linux-next:master 3437/4145] include/linux/hashtable.h:27:25: error: expected declaration specifiers or '...' before '(' token kernel test robot
@ 2020-06-30  7:09 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2020-06-30  7:09 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2106 bytes --]

On Tue, 30 Jun 2020, kernel test robot wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   c28e58ee9dadc99f79cf16ca805221feddd432ad
> commit: da6690767cbd344998f36081815c85f3d467e78c [3437/4145] regulator: consumer: Supply missing prototypes for 3 core functions
> config: arm-allyesconfig (attached as .config)
> compiler: arm-linux-gnueabi-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
>         git checkout da6690767cbd344998f36081815c85f3d467e78c
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from include/linux/elevator.h:6,
>                     from include/linux/blkdev.h:288,
>                     from include/linux/blk-cgroup.h:23,
>                     from include/linux/writeback.h:14,
>                     from include/linux/memcontrol.h:22,
>                     from include/linux/swap.h:9,
>                     from include/linux/suspend.h:5,
>                     from include/linux/regulator/consumer.h:35,
>                     from drivers/crypto/ux500/hash/hash_core.c:28:
> >> include/linux/hashtable.h:27:25: error: expected declaration specifiers or '...' before '(' token
>       27 | #define HASH_SIZE(name) (ARRAY_SIZE(name))
>          |                         ^
>    include/linux/hashtable.h:52:53: note: in expansion of macro 'HASH_SIZE'
>       52 | #define hash_init(hashtable) __hash_init(hashtable, HASH_SIZE(hashtable))

I've submitted a fix for this.  Waiting for an immutable branch.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-30  7:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-29 22:51 [linux-next:master 3437/4145] include/linux/hashtable.h:27:25: error: expected declaration specifiers or '...' before '(' token kernel test robot
2020-06-30  7:09 ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.