Skip to contentSkip to conversation

crypto: testmgr - drop unused static const arrays

PATCH In review Arnd Bergmann 2 participants 2 messages Feb 5, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: testmgr - drop unused static const arrays

From: Arnd Bergmann <[email protected]>

The ones[] and zeroes[] definitions were previously used by the rocksoft tests that are now gone. With extra warnings enabled, gcc now complains about these:

crypto/testmgr.h:6021:17: error: 'ones' defined but not used [-Werror=unused-const-variable=]
6021 | static const u8 ones[4096] = { [0 ... 4095] = 0xff };
| ^~~~
crypto/testmgr.h:6020:17: error: 'zeroes' defined but not used [-Werror=unused-const-variable=]

 6020 | static const u8 zeroes[4096] = { [0 ... 4095] = 0 };
      |                 ^~~~~~

Drop them as well.

Fixes dad9cb81bc30 ("crypto: crc64-rocksoft - remove from crypto API")
---
 crypto/testmgr.h | 3 ---
 1 file changed, 3 deletions(-)
crypto/testmgr.h +0 -3
index 4ab05046b734..61c7ae731052 100644
@@ -6017,9 +6017,6 @@ static const struct hash_testvec rmd160_tv_template[] = {
 	}
 };
 
-static const u8 zeroes[4096] = { [0 ... 4095] = 0 };
-static const u8 ones[4096] = { [0 ... 4095] = 0xff };
-
 static const struct hash_testvec crct10dif_tv_template[] = {
 	{
 		.plaintext	= "abc",
Signature · 1 line
2.39.5
#1 lore raw
Quoted 13 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The ones[] and zeroes[] definitions were previously used by the rocksoft tests that are now gone. With extra warnings enabled, gcc now complains about these:

crypto/testmgr.h:6021:17: error: 'ones' defined but not used [-Werror=unused-const-variable=]
6021 | static const u8 ones[4096] = { [0 ... 4095] = 0xff };
| ^~~~
crypto/testmgr.h:6020:17: error: 'zeroes' defined but not used [-Werror=unused-const-variable=]

 6020 | static const u8 zeroes[4096] = { [0 ... 4095] = 0 };
      |                 ^~~~~~
Quoted 8 lines

Drop them as well.

Fixes dad9cb81bc30 ("crypto: crc64-rocksoft - remove from crypto API")
---
 crypto/testmgr.h | 3 ---
 1 file changed, 3 deletions(-)

Thanks! You must have tested today's linux-next. The fixed commit is from one of the patches of the series
https://lore.kernel.org/r/[email protected] which I applied to the crc tree yesterday. I've folded in this fix, so it should be fixed in tomorrow's linux-next.

Would be nice if these warnings were just on by default.

- Eric