Commit d8f1c477 authored by George Spelvin's avatar George Spelvin Committed by David S. Miller

lib: crc32: Add some additional __pure annotations

In case they help the compiler.
Signed-off-by: default avatarGeorge Spelvin <linux@horizon.com>
Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4fa8e03b
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/bitrev.h> #include <linux/bitrev.h>
extern u32 crc32_le(u32 crc, unsigned char const *p, size_t len); u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len);
extern u32 crc32_be(u32 crc, unsigned char const *p, size_t len); u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len);
/** /**
* crc32_le_combine - Combine two crc32 check values into one. For two * crc32_le_combine - Combine two crc32 check values into one. For two
...@@ -36,7 +36,7 @@ static inline u32 crc32_le_combine(u32 crc1, u32 crc2, size_t len2) ...@@ -36,7 +36,7 @@ static inline u32 crc32_le_combine(u32 crc1, u32 crc2, size_t len2)
return crc32_le_shift(crc1, len2) ^ crc2; return crc32_le_shift(crc1, len2) ^ crc2;
} }
extern u32 __crc32c_le(u32 crc, unsigned char const *p, size_t len); u32 __pure __crc32c_le(u32 crc, unsigned char const *p, size_t len);
/** /**
* __crc32c_le_combine - Combine two crc32c check values into one. For two * __crc32c_le_combine - Combine two crc32c check values into one. For two
......
...@@ -53,7 +53,7 @@ MODULE_LICENSE("GPL"); ...@@ -53,7 +53,7 @@ MODULE_LICENSE("GPL");
#if CRC_LE_BITS > 8 || CRC_BE_BITS > 8 #if CRC_LE_BITS > 8 || CRC_BE_BITS > 8
/* implements slicing-by-4 or slicing-by-8 algorithm */ /* implements slicing-by-4 or slicing-by-8 algorithm */
static inline u32 static inline u32 __pure
crc32_body(u32 crc, unsigned char const *buf, size_t len, const u32 (*tab)[256]) crc32_body(u32 crc, unsigned char const *buf, size_t len, const u32 (*tab)[256])
{ {
# ifdef __LITTLE_ENDIAN # ifdef __LITTLE_ENDIAN
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment