summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Spelvin <linux@horizon.com>2014-06-23 17:11:56 +0400
committerDavid S. Miller <davem@davemloft.net>2014-06-26 03:04:00 +0400
commitd8f1c4778e957273c3b5b6e045d8d3af38484ca8 (patch)
tree734ab1bfada593301e315a18b01ad39e68a9730e
parent4fa8e03b22df9b34f87906fa29de788bfa628bff (diff)
downloadlinux-d8f1c4778e957273c3b5b6e045d8d3af38484ca8.tar.xz
lib: crc32: Add some additional __pure annotations
In case they help the compiler. Signed-off-by: George Spelvin <linux@horizon.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/crc32.h6
-rw-r--r--lib/crc32.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/crc32.h b/include/linux/crc32.h
index edf34e876e40..9e8a032c1788 100644
--- a/include/linux/crc32.h
+++ b/include/linux/crc32.h
@@ -8,8 +8,8 @@
#include <linux/types.h>
#include <linux/bitrev.h>
-extern u32 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_le(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
@@ -36,7 +36,7 @@ static inline u32 crc32_le_combine(u32 crc1, u32 crc2, size_t len2)
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
diff --git a/lib/crc32.c b/lib/crc32.c
index af938ab12468..9a907d489d95 100644
--- a/lib/crc32.c
+++ b/lib/crc32.c
@@ -53,7 +53,7 @@ MODULE_LICENSE("GPL");
#if CRC_LE_BITS > 8 || CRC_BE_BITS > 8
/* 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])
{
# ifdef __LITTLE_ENDIAN