diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/crc32.c | 12 | ||||
-rw-r--r-- | lib/libcrc32c.c | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/crc32.c b/lib/crc32.c index bfc33314c720..d2c2f257bedd 100644 --- a/lib/crc32.c +++ b/lib/crc32.c | |||
@@ -49,7 +49,7 @@ MODULE_LICENSE("GPL"); | |||
49 | * @p: pointer to buffer over which CRC is run | 49 | * @p: pointer to buffer over which CRC is run |
50 | * @len: length of buffer @p | 50 | * @len: length of buffer @p |
51 | */ | 51 | */ |
52 | u32 __attribute_pure__ crc32_le(u32 crc, unsigned char const *p, size_t len); | 52 | u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len); |
53 | 53 | ||
54 | #if CRC_LE_BITS == 1 | 54 | #if CRC_LE_BITS == 1 |
55 | /* | 55 | /* |
@@ -57,7 +57,7 @@ u32 __attribute_pure__ crc32_le(u32 crc, unsigned char const *p, size_t len); | |||
57 | * simplified by inlining the table in ?: form. | 57 | * simplified by inlining the table in ?: form. |
58 | */ | 58 | */ |
59 | 59 | ||
60 | u32 __attribute_pure__ crc32_le(u32 crc, unsigned char const *p, size_t len) | 60 | u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len) |
61 | { | 61 | { |
62 | int i; | 62 | int i; |
63 | while (len--) { | 63 | while (len--) { |
@@ -69,7 +69,7 @@ u32 __attribute_pure__ crc32_le(u32 crc, unsigned char const *p, size_t len) | |||
69 | } | 69 | } |
70 | #else /* Table-based approach */ | 70 | #else /* Table-based approach */ |
71 | 71 | ||
72 | u32 __attribute_pure__ crc32_le(u32 crc, unsigned char const *p, size_t len) | 72 | u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len) |
73 | { | 73 | { |
74 | # if CRC_LE_BITS == 8 | 74 | # if CRC_LE_BITS == 8 |
75 | const u32 *b =(u32 *)p; | 75 | const u32 *b =(u32 *)p; |
@@ -145,7 +145,7 @@ u32 __attribute_pure__ crc32_le(u32 crc, unsigned char const *p, size_t len) | |||
145 | * @p: pointer to buffer over which CRC is run | 145 | * @p: pointer to buffer over which CRC is run |
146 | * @len: length of buffer @p | 146 | * @len: length of buffer @p |
147 | */ | 147 | */ |
148 | u32 __attribute_pure__ crc32_be(u32 crc, unsigned char const *p, size_t len); | 148 | u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len); |
149 | 149 | ||
150 | #if CRC_BE_BITS == 1 | 150 | #if CRC_BE_BITS == 1 |
151 | /* | 151 | /* |
@@ -153,7 +153,7 @@ u32 __attribute_pure__ crc32_be(u32 crc, unsigned char const *p, size_t len); | |||
153 | * simplified by inlining the table in ?: form. | 153 | * simplified by inlining the table in ?: form. |
154 | */ | 154 | */ |
155 | 155 | ||
156 | u32 __attribute_pure__ crc32_be(u32 crc, unsigned char const *p, size_t len) | 156 | u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len) |
157 | { | 157 | { |
158 | int i; | 158 | int i; |
159 | while (len--) { | 159 | while (len--) { |
@@ -167,7 +167,7 @@ u32 __attribute_pure__ crc32_be(u32 crc, unsigned char const *p, size_t len) | |||
167 | } | 167 | } |
168 | 168 | ||
169 | #else /* Table-based approach */ | 169 | #else /* Table-based approach */ |
170 | u32 __attribute_pure__ crc32_be(u32 crc, unsigned char const *p, size_t len) | 170 | u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len) |
171 | { | 171 | { |
172 | # if CRC_BE_BITS == 8 | 172 | # if CRC_BE_BITS == 8 |
173 | const u32 *b =(u32 *)p; | 173 | const u32 *b =(u32 *)p; |
diff --git a/lib/libcrc32c.c b/lib/libcrc32c.c index 60f46803af3f..802f11f0bf5b 100644 --- a/lib/libcrc32c.c +++ b/lib/libcrc32c.c | |||
@@ -66,7 +66,7 @@ EXPORT_SYMBOL(crc32c_le); | |||
66 | * loop below with crc32 and vary the POLY if we don't find value in terms | 66 | * loop below with crc32 and vary the POLY if we don't find value in terms |
67 | * of space and maintainability in keeping the two modules separate. | 67 | * of space and maintainability in keeping the two modules separate. |
68 | */ | 68 | */ |
69 | u32 __attribute_pure__ | 69 | u32 __pure |
70 | crc32c_le(u32 crc, unsigned char const *p, size_t len) | 70 | crc32c_le(u32 crc, unsigned char const *p, size_t len) |
71 | { | 71 | { |
72 | int i; | 72 | int i; |
@@ -160,7 +160,7 @@ static const u32 crc32c_table[256] = { | |||
160 | * crc using table. | 160 | * crc using table. |
161 | */ | 161 | */ |
162 | 162 | ||
163 | u32 __attribute_pure__ | 163 | u32 __pure |
164 | crc32c_le(u32 seed, unsigned char const *data, size_t length) | 164 | crc32c_le(u32 seed, unsigned char const *data, size_t length) |
165 | { | 165 | { |
166 | u32 crc = __cpu_to_le32(seed); | 166 | u32 crc = __cpu_to_le32(seed); |
@@ -177,7 +177,7 @@ crc32c_le(u32 seed, unsigned char const *data, size_t length) | |||
177 | EXPORT_SYMBOL(crc32c_be); | 177 | EXPORT_SYMBOL(crc32c_be); |
178 | 178 | ||
179 | #if CRC_BE_BITS == 1 | 179 | #if CRC_BE_BITS == 1 |
180 | u32 __attribute_pure__ | 180 | u32 __pure |
181 | crc32c_be(u32 crc, unsigned char const *p, size_t len) | 181 | crc32c_be(u32 crc, unsigned char const *p, size_t len) |
182 | { | 182 | { |
183 | int i; | 183 | int i; |