From: "Németh Márton" <nm127@freemail.hu>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>,
David Newall <davidn@davidnewall.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
netdev@vger.kernel.org, Trivial Patch Monkey <trivial@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] 8139too: some style cleanups
Date: Sun, 15 Jun 2008 09:52:30 +0200 [thread overview]
Message-ID: <4854CA3E.60208@freemail.hu> (raw)
In-Reply-To: <4854C9BF.8040900@freemail.hu>
From: Márton Németh <nm127@freemail.hu>
Clean up the following errors and warnings reported by checkpatch.pl:
+ ERROR: Macros with complex values should be enclosed in parenthesis
+ WARNING: __func__ should be used instead of gcc specific __FUNCTION__
+ WARNING: plain inline is preferred over __inline__
+ WARNING: Use #include <linux/io.h> instead of <asm/io.h>
+ WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
The changes were verified with by comparing the "objdump -d 8139too.ko"
output which is exactly the same for the old and new version in case of
config CONFIG_8139TOO=m, CONFIG_8139TOO_PIO=n, CONFIG_8139TOO_TUNE_TWISTER=n,
CONFIG_8139TOO_8129=n, CONFIG_8139_OLD_RX_RESET=n.
Software versions used: gcc 4.2.3, objdump 2.18.0.20080103, on elf32-i386.
Signed-off-by: Márton Németh <nm127@freemail.hu>
---
--- a/drivers/net/8139too.c 2008-06-14 00:20:47.000000000 +0200
+++ b/drivers/net/8139too.c 2008-06-15 09:10:14.000000000 +0200
@@ -107,8 +107,8 @@
#include <linux/mii.h>
#include <linux/completion.h>
#include <linux/crc32.h>
-#include <asm/io.h>
-#include <asm/uaccess.h>
+#include <linux/io.h>
+#include <linux/uaccess.h>
#include <asm/irq.h>
#define RTL8139_DRIVER_NAME DRV_NAME " Fast Ethernet driver " DRV_VERSION
@@ -134,7 +134,7 @@
#if RTL8139_DEBUG
/* note: prints function name for you */
-# define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
+# define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __func__ , ## args)
#else
# define DPRINTK(fmt, args...)
#endif
@@ -145,7 +145,7 @@
# define assert(expr) \
if(unlikely(!(expr))) { \
printk(KERN_ERR "Assertion failed! %s,%s,%s,line=%d\n", \
- #expr,__FILE__,__FUNCTION__,__LINE__); \
+ #expr, __FILE__, __func__, __LINE__); \
}
#endif
@@ -219,7 +219,7 @@ enum {
#define RTL8139B_IO_SIZE 256
#define RTL8129_CAPS HAS_MII_XCVR
-#define RTL8139_CAPS HAS_CHIP_XCVR|HAS_LNK_CHNG
+#define RTL8139_CAPS (HAS_CHIP_XCVR|HAS_LNK_CHNG)
typedef enum {
RTL8139 = 0,
@@ -1890,7 +1890,7 @@ static void rtl8139_rx_err (u32 rx_statu
}
#if RX_BUF_IDX == 3
-static __inline__ void wrap_copy(struct sk_buff *skb, const unsigned char *ring,
+static inline void wrap_copy(struct sk_buff *skb, const unsigned char *ring,
u32 offset, unsigned int size)
{
u32 left = RX_BUF_LEN - offset;
next prev parent reply other threads:[~2008-06-15 7:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-14 12:36 [PATCH 1/2] 8139too: clean up spaces and TABs Németh Márton
2008-06-14 13:33 ` Stefan Richter
2008-06-14 18:43 ` Németh Márton
2008-06-14 19:53 ` Stefan Richter
2008-06-14 21:21 ` Ondrej Zary
2008-06-14 21:39 ` Francois Romieu
2008-06-15 7:50 ` Németh Márton
2008-06-15 7:52 ` Németh Márton [this message]
2008-06-27 6:09 ` [PATCH] 8139too: some style cleanups Jeff Garzik
2008-06-16 15:07 ` [PATCH 1/2] 8139too: clean up spaces and TABs Stefan Richter
2008-06-16 16:31 ` Stephen Hemminger
2008-06-15 6:21 ` David Newall
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=4854CA3E.60208@freemail.hu \
--to=nm127@freemail.hu \
--cc=davidn@davidnewall.com \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stefanr@s5r6.in-berlin.de \
--cc=trivial@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.