Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
7cf5ff20
Commit
7cf5ff20
authored
Apr 27, 2004
by
Clay Haapala
Committed by
David S. Miller
Apr 27, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[LIB]: Use compiler.h's pure attribute macros in crc32.c.
parent
37574f10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
lib/crc32.c
lib/crc32.c
+5
-11
No files found.
lib/crc32.c
View file @
7cf5ff20
...
...
@@ -23,6 +23,7 @@
#include <linux/crc32.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/compiler.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/init.h>
...
...
@@ -37,13 +38,6 @@
#endif
#include "crc32table.h"
#if __GNUC__ >= 3
/* 2.x has "attribute", but only 3.0 has "pure */
#define attribute(x) __attribute__(x)
#else
#define attribute(x)
#endif
MODULE_AUTHOR
(
"Matt Domsch <Matt_Domsch@dell.com>"
);
MODULE_DESCRIPTION
(
"Ethernet CRC32 calculations"
);
MODULE_LICENSE
(
"GPL"
);
...
...
@@ -62,7 +56,7 @@ MODULE_LICENSE("GPL");
* @len - length of buffer @p
*
*/
u32
attribute
((
pure
))
crc32_le
(
u32
crc
,
unsigned
char
const
*
p
,
size_t
len
)
u32
__attribute_pure__
crc32_le
(
u32
crc
,
unsigned
char
const
*
p
,
size_t
len
)
{
int
i
;
while
(
len
--
)
{
...
...
@@ -82,7 +76,7 @@ u32 attribute((pure)) crc32_le(u32 crc, unsigned char const *p, size_t len)
* @len - length of buffer @p
*
*/
u32
attribute
((
pure
))
crc32_le
(
u32
crc
,
unsigned
char
const
*
p
,
size_t
len
)
u32
__attribute_pure__
crc32_le
(
u32
crc
,
unsigned
char
const
*
p
,
size_t
len
)
{
# if CRC_LE_BITS == 8
const
u32
*
b
=
(
u32
*
)
p
;
...
...
@@ -165,7 +159,7 @@ u32 attribute((pure)) crc32_le(u32 crc, unsigned char const *p, size_t len)
* @len - length of buffer @p
*
*/
u32
attribute
((
pure
))
crc32_be
(
u32
crc
,
unsigned
char
const
*
p
,
size_t
len
)
u32
__attribute_pure__
crc32_be
(
u32
crc
,
unsigned
char
const
*
p
,
size_t
len
)
{
int
i
;
while
(
len
--
)
{
...
...
@@ -187,7 +181,7 @@ u32 attribute((pure)) crc32_be(u32 crc, unsigned char const *p, size_t len)
* @len - length of buffer @p
*
*/
u32
attribute
((
pure
))
crc32_be
(
u32
crc
,
unsigned
char
const
*
p
,
size_t
len
)
u32
__attribute_pure__
crc32_be
(
u32
crc
,
unsigned
char
const
*
p
,
size_t
len
)
{
# if CRC_BE_BITS == 8
const
u32
*
b
=
(
u32
*
)
p
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment