* [PATCH] lib/crc: arm64: Fix const keyword in asm prototypes
@ 2026-09-03 12:03 Geert Uytterhoeven
2026-09-03 19:26 ` Eric Biggers
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2026-09-03 12:03 UTC (permalink / raw)
To: Eric Biggers, Ard Biesheuvel, Catalin Marinas, Will Deacon,
Mark Rutland
Cc: linux-crypto, linux-arm-kernel, linux-kernel, Geert Uytterhoeven
Commit d36cebe03c3ae4ea ("lib/crc32: improve support for arch-specific
overrides") corrected the position of the "const" keyword in the
arch-specific funcions, and replaced "unsigned char" by "u8" for
consistency.
Make the same change to the forward declarations for the asm
implementations.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
lib/crc/arm64/crc32.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/crc/arm64/crc32.h b/lib/crc/arm64/crc32.h
index 1939a5dee4772972..332d9092ba2f3875 100644
--- a/lib/crc/arm64/crc32.h
+++ b/lib/crc/arm64/crc32.h
@@ -7,13 +7,13 @@
// The minimum input length to consider the 4-way interleaved code path
static const size_t min_len = 1024;
-asmlinkage u32 crc32_le_arm64(u32 crc, unsigned char const *p, size_t len);
-asmlinkage u32 crc32c_le_arm64(u32 crc, unsigned char const *p, size_t len);
-asmlinkage u32 crc32_be_arm64(u32 crc, unsigned char const *p, size_t len);
+asmlinkage u32 crc32_le_arm64(u32 crc, const u8 *p, size_t len);
+asmlinkage u32 crc32c_le_arm64(u32 crc, const u8 *p, size_t len);
+asmlinkage u32 crc32_be_arm64(u32 crc, const u8 *p, size_t len);
-asmlinkage u32 crc32_le_arm64_4way(u32 crc, unsigned char const *p, size_t len);
-asmlinkage u32 crc32c_le_arm64_4way(u32 crc, unsigned char const *p, size_t len);
-asmlinkage u32 crc32_be_arm64_4way(u32 crc, unsigned char const *p, size_t len);
+asmlinkage u32 crc32_le_arm64_4way(u32 crc, const u8 *p, size_t len);
+asmlinkage u32 crc32c_le_arm64_4way(u32 crc, const u8 *p, size_t len);
+asmlinkage u32 crc32_be_arm64_4way(u32 crc, const u8 *p, size_t len);
static inline u32 crc32_le_arch(u32 crc, const u8 *p, size_t len)
{
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] lib/crc: arm64: Fix const keyword in asm prototypes
2026-09-03 12:03 [PATCH] lib/crc: arm64: Fix const keyword in asm prototypes Geert Uytterhoeven
@ 2026-09-03 19:26 ` Eric Biggers
0 siblings, 0 replies; 2+ messages in thread
From: Eric Biggers @ 2026-09-03 19:26 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Ard Biesheuvel, Catalin Marinas, Will Deacon, Mark Rutland,
linux-crypto, linux-arm-kernel, linux-kernel
On Thu, Sep 03, 2026 at 02:03:50PM +0200, Geert Uytterhoeven wrote:
> Commit d36cebe03c3ae4ea ("lib/crc32: improve support for arch-specific
> overrides") corrected the position of the "const" keyword in the
> arch-specific funcions, and replaced "unsigned char" by "u8" for
> consistency.
>
> Make the same change to the forward declarations for the asm
> implementations.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> lib/crc/arm64/crc32.h | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/lib/crc/arm64/crc32.h b/lib/crc/arm64/crc32.h
> index 1939a5dee4772972..332d9092ba2f3875 100644
> --- a/lib/crc/arm64/crc32.h
> +++ b/lib/crc/arm64/crc32.h
> @@ -7,13 +7,13 @@
> // The minimum input length to consider the 4-way interleaved code path
> static const size_t min_len = 1024;
>
> -asmlinkage u32 crc32_le_arm64(u32 crc, unsigned char const *p, size_t len);
> -asmlinkage u32 crc32c_le_arm64(u32 crc, unsigned char const *p, size_t len);
> -asmlinkage u32 crc32_be_arm64(u32 crc, unsigned char const *p, size_t len);
> +asmlinkage u32 crc32_le_arm64(u32 crc, const u8 *p, size_t len);
> +asmlinkage u32 crc32c_le_arm64(u32 crc, const u8 *p, size_t len);
> +asmlinkage u32 crc32_be_arm64(u32 crc, const u8 *p, size_t len);
>
> -asmlinkage u32 crc32_le_arm64_4way(u32 crc, unsigned char const *p, size_t len);
> -asmlinkage u32 crc32c_le_arm64_4way(u32 crc, unsigned char const *p, size_t len);
> -asmlinkage u32 crc32_be_arm64_4way(u32 crc, unsigned char const *p, size_t len);
> +asmlinkage u32 crc32_le_arm64_4way(u32 crc, const u8 *p, size_t len);
> +asmlinkage u32 crc32c_le_arm64_4way(u32 crc, const u8 *p, size_t len);
> +asmlinkage u32 crc32_be_arm64_4way(u32 crc, const u8 *p, size_t len);
It's worth cleaning this up to use the usual convention, but we
shouldn't claim that this is a "fix".
- Eric
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-03 19:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 12:03 [PATCH] lib/crc: arm64: Fix const keyword in asm prototypes Geert Uytterhoeven
2026-09-03 19:26 ` Eric Biggers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox