From: Michal Rokos <michal@rokos.info>
To: thockin@hockin.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2.6] Natsemi - remove compilation warnings
Date: Thu, 23 Sep 2004 09:58:31 +0200 [thread overview]
Message-ID: <200409230958.31758.michal@rokos.info> (raw)
Hi Tim,
natsemi driver emits a lot of warnings.
This patch make compilation calm again.
Code taken from drivers/net/pci-skeleton.c. Thanks Jeff.
Michal
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/09/23 09:43:08+02:00 michal@nb-rokos.nx.cz
# [PATCH 2.6] Natsemi - remove compilation warnings
#
# drivers/net/natsemi.c
# 2004/09/23 09:42:50+02:00 michal@nb-rokos.nx.cz +13 -0
# Remove zillion of
# drivers/net/natsemi.c:806: warning: passing arg 2 of `writew' makes
pointer from integer without a cast
# drivers/net/natsemi.c:807: warning: passing arg 1 of `readw' makes
pointer from integer without a cast
#
diff -Nru a/drivers/net/natsemi.c b/drivers/net/natsemi.c
--- a/drivers/net/natsemi.c 2004-09-23 09:44:14 +02:00
+++ b/drivers/net/natsemi.c 2004-09-23 09:44:14 +02:00
@@ -769,6 +769,19 @@
static int netdev_get_regs(struct net_device *dev, u8 *buf);
static int netdev_get_eeprom(struct net_device *dev, u8 *buf);
+#undef readb
+#undef readw
+#undef readl
+#undef writeb
+#undef writew
+#undef writel
+#define readb(addr) inb((unsigned long)(addr))
+#define readw(addr) inw((unsigned long)(addr))
+#define readl(addr) inl((unsigned long)(addr))
+#define writeb(val,addr) outb((val), (unsigned long)(addr))
+#define writew(val,addr) outw((val), (unsigned long)(addr))
+#define writel(val,addr) outl((val), (unsigned long)(addr))
+
static void move_int_phy(struct net_device *dev, int addr)
{
struct netdev_private *np = netdev_priv(dev);
next reply other threads:[~2004-09-23 7:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-23 7:58 Michal Rokos [this message]
2004-09-23 14:18 ` Michal Rokos
2004-09-30 16:44 ` Franz Pletz
2004-09-30 17:24 ` Linus Torvalds
2004-09-30 18:09 ` Andrey S. Klochko
2004-09-30 18:22 ` Linus Torvalds
2004-09-30 18:16 ` Franz Pletz
2004-09-30 18:21 ` Jeff Garzik
2004-09-30 18:33 ` Linus Torvalds
2004-09-30 18:40 ` Tim Hockin
2004-09-30 19:53 ` David S. Miller
2004-09-30 20:08 ` Jeff Garzik
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=200409230958.31758.michal@rokos.info \
--to=michal@rokos.info \
--cc=linux-kernel@vger.kernel.org \
--cc=thockin@hockin.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®