[PATCH] lib/crc: arm64: Fix const keyword in asm prototypes
Eric Biggers
ebiggers at kernel.org
Thu Sep 3 12:26:57 PDT 2026
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 at 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
More information about the linux-arm-kernel
mailing list