[gustavoars:testing/WFAMNAE-next20240312 1/1] lib/crc64-rocksoft.c:69:13: error: no member named 'tfm' in 'struct shash_desc'

From: kernel test robot
Date: Wed Mar 13 2024 - 03:03:52 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/WFAMNAE-next20240312
head: 33ee4d07d6d337670a64f9d41e14e7579cfa9015
commit: 33ee4d07d6d337670a64f9d41e14e7579cfa9015 [1/1] treewide: avoid -Wfamnae warnings
config: i386-buildonly-randconfig-003-20240313 (https://download.01.org/0day-ci/archive/20240313/202403131436.V9IBdFAo-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240313/202403131436.V9IBdFAo-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403131436.V9IBdFAo-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

In file included from lib/crc64-rocksoft.c:8:
include/crypto/hash.h:155:2: error: expected member name or ';' after declaration specifiers
155 | struct_group_tagged(shash_desc_hdr, hdr,
| ^
include/linux/stddef.h:81:2: note: expanded from macro 'struct_group_tagged'
81 | __struct_group(TAG, NAME, /* no attrs */, MEMBERS)
| ^
include/uapi/linux/stddef.h:28:20: note: expanded from macro '__struct_group'
28 | struct { MEMBERS } ATTRS; \
| ^
In file included from lib/crc64-rocksoft.c:8:
include/crypto/hash.h:155:2: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
155 | struct_group_tagged(shash_desc_hdr, hdr,
| ^
156 | struct crypto_shash *tfm;
157 | __aligned(ARCH_SLAB_MINALIGN));
| int
include/linux/stddef.h:81:2: note: expanded from macro 'struct_group_tagged'
81 | __struct_group(TAG, NAME, /* no attrs */, MEMBERS)
| ^
include/uapi/linux/stddef.h:28:20: note: expanded from macro '__struct_group'
28 | struct { MEMBERS } ATTRS; \
| ^
In file included from lib/crc64-rocksoft.c:8:
include/crypto/hash.h:155:2: warning: expected ';' at end of declaration list
include/linux/stddef.h:81:2: note: expanded from macro 'struct_group_tagged'
81 | __struct_group(TAG, NAME, /* no attrs */, MEMBERS)
| ^
include/uapi/linux/stddef.h:28:20: note: expanded from macro '__struct_group'
28 | struct { MEMBERS } ATTRS; \
| ^
In file included from lib/crc64-rocksoft.c:8:
include/crypto/hash.h:155:2: error: expected member name or ';' after declaration specifiers
include/linux/stddef.h:81:2: note: expanded from macro 'struct_group_tagged'
81 | __struct_group(TAG, NAME, /* no attrs */, MEMBERS)
| ^
include/uapi/linux/stddef.h:29:24: note: expanded from macro '__struct_group'
29 | struct TAG { MEMBERS } ATTRS NAME; \
| ^
In file included from lib/crc64-rocksoft.c:8:
include/crypto/hash.h:155:2: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
155 | struct_group_tagged(shash_desc_hdr, hdr,
| ^
156 | struct crypto_shash *tfm;
157 | __aligned(ARCH_SLAB_MINALIGN));
| int
include/linux/stddef.h:81:2: note: expanded from macro 'struct_group_tagged'
81 | __struct_group(TAG, NAME, /* no attrs */, MEMBERS)
| ^
include/uapi/linux/stddef.h:29:24: note: expanded from macro '__struct_group'
29 | struct TAG { MEMBERS } ATTRS NAME; \
| ^
In file included from lib/crc64-rocksoft.c:8:
include/crypto/hash.h:155:2: warning: expected ';' at end of declaration list
include/linux/stddef.h:81:2: note: expanded from macro 'struct_group_tagged'
81 | __struct_group(TAG, NAME, /* no attrs */, MEMBERS)
| ^
include/uapi/linux/stddef.h:29:24: note: expanded from macro '__struct_group'
29 | struct TAG { MEMBERS } ATTRS NAME; \
| ^
In file included from lib/crc64-rocksoft.c:8:
include/crypto/hash.h:158:8: error: flexible array member '__ctx' not allowed in otherwise empty struct
158 | void *__ctx[];
| ^
include/crypto/hash.h:891:35: error: no member named 'tfm' in 'struct shash_desc'
891 | struct crypto_shash *tfm = desc->tfm;
| ~~~~ ^
include/crypto/hash.h:951:49: error: no member named 'tfm' in 'struct shash_desc'
951 | sizeof(*desc) + crypto_shash_descsize(desc->tfm));
| ~~~~ ^
>> lib/crc64-rocksoft.c:69:13: error: no member named 'tfm' in 'struct shash_desc'
69 | desc.shash.tfm = rcu_dereference(crc64_rocksoft_tfm);
| ~~~~~~~~~~ ^
2 warnings and 8 errors generated.


vim +69 lib/crc64-rocksoft.c

f3813f4b287e48 Keith Busch 2022-03-03 56
f3813f4b287e48 Keith Busch 2022-03-03 57 u64 crc64_rocksoft_update(u64 crc, const unsigned char *buffer, size_t len)
f3813f4b287e48 Keith Busch 2022-03-03 58 {
f3813f4b287e48 Keith Busch 2022-03-03 59 struct {
f3813f4b287e48 Keith Busch 2022-03-03 60 struct shash_desc shash;
f3813f4b287e48 Keith Busch 2022-03-03 61 u64 crc;
f3813f4b287e48 Keith Busch 2022-03-03 62 } desc;
f3813f4b287e48 Keith Busch 2022-03-03 63 int err;
f3813f4b287e48 Keith Busch 2022-03-03 64
f3813f4b287e48 Keith Busch 2022-03-03 65 if (static_branch_unlikely(&crc64_rocksoft_fallback))
f3813f4b287e48 Keith Busch 2022-03-03 66 return crc64_rocksoft_generic(crc, buffer, len);
f3813f4b287e48 Keith Busch 2022-03-03 67
f3813f4b287e48 Keith Busch 2022-03-03 68 rcu_read_lock();
f3813f4b287e48 Keith Busch 2022-03-03 @69 desc.shash.tfm = rcu_dereference(crc64_rocksoft_tfm);
f3813f4b287e48 Keith Busch 2022-03-03 70 desc.crc = crc;
f3813f4b287e48 Keith Busch 2022-03-03 71 err = crypto_shash_update(&desc.shash, buffer, len);
f3813f4b287e48 Keith Busch 2022-03-03 72 rcu_read_unlock();
f3813f4b287e48 Keith Busch 2022-03-03 73
f3813f4b287e48 Keith Busch 2022-03-03 74 BUG_ON(err);
f3813f4b287e48 Keith Busch 2022-03-03 75
f3813f4b287e48 Keith Busch 2022-03-03 76 return desc.crc;
f3813f4b287e48 Keith Busch 2022-03-03 77 }
f3813f4b287e48 Keith Busch 2022-03-03 78 EXPORT_SYMBOL_GPL(crc64_rocksoft_update);
f3813f4b287e48 Keith Busch 2022-03-03 79

:::::: The code at line 69 was first introduced by commit
:::::: f3813f4b287e480b1fcd62ca798d8556644b8278 crypto: add rocksoft 64b crc guard tag framework

:::::: TO: Keith Busch <kbusch@xxxxxxxxxx>
:::::: CC: Jens Axboe <axboe@xxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki