From: Clay Haapala <chaapala@cisco.com>
To: "David S. Miller" <davem@redhat.com>
Cc: jmorris@redhat.com, Matt_Domsch@dell.com,
B.Zolnierkiewicz@elka.pw.edu.pl, linux-kernel@vger.kernel.org
Subject: [PATCH] lib/crc32.c: uses (and includes) compiler.h
Date: Wed, 28 Apr 2004 10:19:02 -0500 [thread overview]
Message-ID: <yqujd65sku55.fsf_-_@chaapala-lnx2.cisco.com> (raw)
In-Reply-To: <yqujk7019ox2.fsf_-_@chaapala-lnx2.cisco.com> (Clay Haapala's message of "Tue, 27 Apr 2004 14:55:05 -0500")
Here is the crc32.c patch to remove attribute((pure)), with compiler.h
included.
--
Clay Haapala (chaapala@cisco.com) Cisco Systems SRBU +1 763-398-1056
6450 Wedgwood Rd, Suite 130 Maple Grove MN 55311 PGP: C89240AD
"Oh, *that* Physics Prize. Well, I just substituted 'stupidity' for
'dark matter' in the equations, and it all came together."
--- linux-2.6.5.orig/lib/crc32.c Sat Apr 3 21:36:14 2004
+++ linux-2.6.5/lib/crc32.c Wed Apr 28 10:07:20 2004
@@ -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 @@
* @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 @@
* @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 @@
* @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 @@
* @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;
next prev parent reply other threads:[~2004-04-28 15:19 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-06 18:46 Crypto API and keyed non-HMAC digest algorithms / Michael MIC Jouni Malinen
2004-03-08 14:45 ` James Morris
2004-03-09 3:37 ` Jouni Malinen
2004-03-09 5:55 ` James Morris
2004-03-09 17:30 ` Clay Haapala
2004-03-09 20:32 ` James Morris
2004-03-10 3:40 ` Jouni Malinen
2004-03-10 4:02 ` [PATCH] Crypto API and " Jouni Malinen
2004-03-10 4:21 ` Crypto API and keyed non-HMAC digest algorithms / " James Morris
2004-03-10 5:34 ` Jouni Malinen
2004-03-10 15:45 ` James Morris
2004-03-11 3:00 ` Jouni Malinen
2004-03-11 4:06 ` James Morris
2004-03-11 6:08 ` Jouni Malinen
2004-03-11 16:34 ` Clay Haapala
2004-03-11 20:14 ` James Morris
2004-03-18 23:05 ` Clay Haapala
2004-03-21 15:08 ` James Morris
2004-03-22 16:49 ` [PATCH] lib/libcrc32c implementation Clay Haapala
2004-03-22 17:00 ` Jeff Garzik
2004-03-22 17:27 ` Clay Haapala
2004-03-22 17:36 ` Jeff Garzik
2004-03-26 16:36 ` James Morris
2004-03-26 16:59 ` Clay Haapala
2004-03-26 18:16 ` James Morris
2004-03-30 17:32 ` [PATCH] lib/libcrc32c Clay Haapala
2004-03-30 18:43 ` Bartlomiej Zolnierkiewicz
2004-03-30 19:11 ` Clay Haapala
2004-03-30 19:23 ` Matt Domsch
2004-03-30 19:33 ` Clay Haapala
2004-03-31 21:03 ` [PATCH] lib/libcrc32c, revised 040331 Clay Haapala
2004-04-19 21:37 ` [PATCH] lib/libcrc32c, revised 040419 Clay Haapala
2004-04-23 23:42 ` David S. Miller
2004-04-27 19:46 ` [PATCH] lib/libcrc32c, revised 040427 Clay Haapala
2004-04-27 19:49 ` David S. Miller
2004-04-27 20:00 ` Clay Haapala
2004-04-27 21:49 ` Clay Haapala
2004-04-27 21:50 ` David S. Miller
2004-04-28 15:14 ` [PATCH] lib/libcrc32c, revised 040428, with compiler.h included Clay Haapala
2004-04-28 19:29 ` David S. Miller
2004-04-27 19:55 ` [PATCH] lib/crc32.c: to use compiler.h defines Clay Haapala
2004-04-28 15:19 ` Clay Haapala [this message]
2004-04-28 19:30 ` [PATCH] lib/crc32.c: uses (and includes) compiler.h David S. Miller
2004-03-30 19:49 ` [PATCH] lib/libcrc32c Bartlomiej Zolnierkiewicz
2004-03-31 15:28 ` Clay Haapala
2004-03-30 17:40 ` [PATCH] crypto/crc32c implementation Clay Haapala
2004-04-19 21:31 ` [PATCH] crypto/crc32c implementation, updated 040419 Clay Haapala
2004-04-19 23:36 ` David S. Miller
2004-04-20 13:20 ` James Morris
2004-03-22 16:56 ` [PATCH] crypto/crc32c support Clay Haapala
2004-03-11 6:11 ` Crypto API and keyed non-HMAC digest algorithms / Michael MIC Jouni Malinen
2004-03-10 16:04 ` Clay Haapala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yqujd65sku55.fsf_-_@chaapala-lnx2.cisco.com \
--to=chaapala@cisco.com \
--cc=B.Zolnierkiewicz@elka.pw.edu.pl \
--cc=Matt_Domsch@dell.com \
--cc=davem@redhat.com \
--cc=jmorris@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®