* [PATCH] crypto: testmgr - drop unused static const arrays
@ 2025-02-05 12:13 Arnd Bergmann
2025-02-05 15:34 ` Eric Biggers
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2025-02-05 12:13 UTC (permalink / raw)
To: Herbert Xu, David S. Miller
Cc: Arnd Bergmann, Maxime Coquelin, Lukas Wunner, Eric Biggers,
Ard Biesheuvel, Stefan Berger, Martin K. Petersen, Keith Busch,
linux-crypto, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
crypto/testmgr.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/crypto/testmgr.h b/crypto/testmgr.h
index 4ab05046b734..61c7ae731052 100644
--- a/crypto/testmgr.h
+++ b/crypto/testmgr.h
@@ -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",
--
2.39.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] crypto: testmgr - drop unused static const arrays
2025-02-05 12:13 [PATCH] crypto: testmgr - drop unused static const arrays Arnd Bergmann
@ 2025-02-05 15:34 ` Eric Biggers
0 siblings, 0 replies; 2+ messages in thread
From: Eric Biggers @ 2025-02-05 15:34 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Herbert Xu, David S. Miller, Arnd Bergmann, Maxime Coquelin,
Lukas Wunner, Ard Biesheuvel, Stefan Berger, Martin K. Petersen,
Keith Busch, linux-crypto, linux-kernel
On Wed, Feb 05, 2025 at 01:13:15PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> 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/20250204195456.GA1385@sol.localdomain 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-05 15:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-05 12:13 [PATCH] crypto: testmgr - drop unused static const arrays Arnd Bergmann
2025-02-05 15:34 ` Eric Biggers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox