All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cal Peake <cp@absolutedigital.net>
To: Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: NetDev Mailing List <netdev@oss.sgi.com>,
	proski@gnu.org, hermes@gibson.dropbear.id.au
Subject: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h
Date: Mon, 11 Oct 2004 07:34:00 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.61.0410110702590.7899@linaeum.absolutedigital.net> (raw)

Hi,

This patch fixes several dozen warnings spit out when compiling the hermes 
wireless driver.

In file included from drivers/net/wireless/orinoco.c:448:
drivers/net/wireless/hermes.h: In function `hermes_present':
drivers/net/wireless/hermes.h:398: warning: passing arg 1 of `readw' makes pointer from integer without a cast
drivers/net/wireless/hermes.h: In function `hermes_set_irqmask':
drivers/net/wireless/hermes.h:404: warning: passing arg 2 of `writew' makes pointer from integer without a cast
...

thanks,

-- Cal


Signed-off-by: Cal Peake <cp@absolutedigital.net>


diff -Nru linux-2.6.9-rc4/drivers/net/wireless/hermes.h linux-2.6.9-rc4-1/drivers/net/wireless/hermes.h
--- linux-2.6.9-rc4/drivers/net/wireless/hermes.h	2004-10-11 02:38:38.000000000 -0400
+++ linux-2.6.9-rc4-1/drivers/net/wireless/hermes.h	2004-10-11 06:56:01.000000000 -0400
@@ -364,12 +364,12 @@
 /* Register access convenience macros */
 #define hermes_read_reg(hw, off) ((hw)->io_space ? \
 	inw((hw)->iobase + ( (off) << (hw)->reg_spacing )) : \
-	readw((hw)->iobase + ( (off) << (hw)->reg_spacing )))
+	readw((void __iomem *)(hw)->iobase + ( (off) << (hw)->reg_spacing )))
 #define hermes_write_reg(hw, off, val) do { \
 	if ((hw)->io_space) \
 		outw_p((val), (hw)->iobase + ((off) << (hw)->reg_spacing)); \
 	else \
-		writew((val), (hw)->iobase + ((off) << (hw)->reg_spacing)); \
+		writew((val), (void __iomem *)(hw)->iobase + ((off) << (hw)->reg_spacing)); \
 	} while (0)
 #define hermes_read_regn(hw, name) hermes_read_reg((hw), HERMES_##name)
 #define hermes_write_regn(hw, name, val) hermes_write_reg((hw), HERMES_##name, (val))
@@ -442,7 +442,7 @@
 		 * gcc is smart enough to fold away the two swaps on
 		 * big-endian platforms. */
 		for (i = 0, p = buf; i < count; i++) {
-			*p++ = cpu_to_le16(readw(hw->iobase + off));
+			*p++ = cpu_to_le16(readw((void __iomem *)hw->iobase + off));
 		}
 	}
 }
@@ -462,7 +462,7 @@
 		 * hope gcc is smart enough to fold away the two swaps
 		 * on big-endian platforms. */
 		for (i = 0, p = buf; i < count; i++) {
-			writew(le16_to_cpu(*p++), hw->iobase + off);
+			writew(le16_to_cpu(*p++), (void __iomem *)hw->iobase + off);
 		}
 	}
 }
@@ -478,7 +478,7 @@
 			outw(0, hw->iobase + off);
 	} else {
 		for (i = 0; i < count; i++)
-			writew(0, hw->iobase + off);
+			writew(0, (void __iomem *)hw->iobase + off);
 	}
 }
 

             reply	other threads:[~2004-10-11 11:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-11 11:34 Cal Peake [this message]
2004-10-11 11:54 ` [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h Jan Dittmer
2004-10-11 12:04   ` Ricky lloyd
2004-10-11 12:31     ` David Gibson
2004-10-11 12:42       ` Cal Peake
2004-10-11 13:18       ` Borislav Petkov
2004-10-11 13:33         ` viro
2004-10-11 12:23   ` Cal Peake
2004-10-11 12:29     ` Jan Dittmer
2004-10-11 12:32       ` David Gibson
2004-10-11 12:39         ` Jan Dittmer
2004-10-11 12:49           ` Ben Dooks
2004-10-11 13:16     ` viro
2004-10-11 14:16       ` Cal Peake
2004-10-11 13:12 ` Pavel Roskin
2004-10-11 14:04   ` viro

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=Pine.LNX.4.61.0410110702590.7899@linaeum.absolutedigital.net \
    --to=cp@absolutedigital.net \
    --cc=hermes@gibson.dropbear.id.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=proski@gnu.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.