lib/crc/arm64/crc32.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
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
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
© 2016 - 2026 Red Hat, Inc.