From: Roel Kluin <roel.kluin@gmail.com>
To: netdev@vger.kernel.org
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] net: fix SONIC_READ definition
Date: Sat, 03 Jan 2009 19:43:24 +0100 [thread overview]
Message-ID: <495FB1CC.5090506@gmail.com> (raw)
drivers/net/jazzsonic.c:56:
#define SONIC_READ(reg) (*((volatile unsigned int *)dev->base_addr+reg))
drivers/net/sonic.h:53:
#define SONIC_CAP0 0x24
so drivers/net/jazzsonic.c:143:
val = SONIC_READ(SONIC_CAP0-i);
becomes
val = (*((volatile unsigned int *)dev->base_addr+0x24-i));
That is wrong, isn't it?
------------->8---------8<------------------
Fix SONIC_READ definition
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c
index 334ff9e..b872f23 100644
--- a/drivers/net/jazzsonic.c
+++ b/drivers/net/jazzsonic.c
@@ -53,7 +53,7 @@ static char jazz_sonic_string[] = "jazzsonic";
/*
* Macros to access SONIC registers
*/
-#define SONIC_READ(reg) (*((volatile unsigned int *)dev->base_addr+reg))
+#define SONIC_READ(reg) (*((volatile unsigned int *)dev->base_addr+(reg)))
#define SONIC_WRITE(reg,val) \
do { \
next reply other threads:[~2009-01-03 18:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-03 18:43 Roel Kluin [this message]
2009-01-05 6:42 ` [PATCH] net: fix SONIC_READ definition David Miller
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=495FB1CC.5090506@gmail.com \
--to=roel.kluin@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).