aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/riscv/lib
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2025-02-07 18:49:08 -0800
committerEric Biggers <ebiggers@google.com>2025-02-08 20:06:30 -0800
commitbc2736fe7e0b03866b4cb2da320b1aa705b193c0 (patch)
treef2fee556f49c364aa2c9f3da92485ccc34324535 /arch/riscv/lib
parentlib/crc32: use void pointer for data (diff)
downloadwireguard-linux-bc2736fe7e0b03866b4cb2da320b1aa705b193c0.tar.xz
wireguard-linux-bc2736fe7e0b03866b4cb2da320b1aa705b193c0.zip
lib/crc32: don't bother with pure and const function attributes
Drop the use of __pure and __attribute_const__ from the CRC32 library functions that had them. Both of these are unusual optimizations that don't help properly written code. They seem more likely to cause problems than have any real benefit. Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20250208024911.14936-4-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'arch/riscv/lib')
-rw-r--r--arch/riscv/lib/crc32-riscv.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/riscv/lib/crc32-riscv.c b/arch/riscv/lib/crc32-riscv.c
index 53d56ab422c7..a50f8e010417 100644
--- a/arch/riscv/lib/crc32-riscv.c
+++ b/arch/riscv/lib/crc32-riscv.c
@@ -175,10 +175,9 @@ static inline u32 crc32_le_unaligned(u32 crc, unsigned char const *p,
return crc;
}
-static inline u32 __pure crc32_le_generic(u32 crc, unsigned char const *p,
- size_t len, u32 poly,
- unsigned long poly_qt,
- fallback crc_fb)
+static inline u32 crc32_le_generic(u32 crc, unsigned char const *p, size_t len,
+ u32 poly, unsigned long poly_qt,
+ fallback crc_fb)
{
size_t offset, head_len, tail_len;
unsigned long const *p_ul;
@@ -218,14 +217,14 @@ legacy:
return crc_fb(crc, p, len);
}
-u32 __pure crc32_le_arch(u32 crc, const u8 *p, size_t len)
+u32 crc32_le_arch(u32 crc, const u8 *p, size_t len)
{
return crc32_le_generic(crc, p, len, CRC32_POLY_LE, CRC32_POLY_QT_LE,
crc32_le_base);
}
EXPORT_SYMBOL(crc32_le_arch);
-u32 __pure crc32c_le_arch(u32 crc, const u8 *p, size_t len)
+u32 crc32c_le_arch(u32 crc, const u8 *p, size_t len)
{
return crc32_le_generic(crc, p, len, CRC32C_POLY_LE,
CRC32C_POLY_QT_LE, crc32c_le_base);
@@ -256,7 +255,7 @@ static inline u32 crc32_be_unaligned(u32 crc, unsigned char const *p,
return crc;
}
-u32 __pure crc32_be_arch(u32 crc, const u8 *p, size_t len)
+u32 crc32_be_arch(u32 crc, const u8 *p, size_t len)
{
size_t offset, head_len, tail_len;
unsigned long const *p_ul;