linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: minyard@acm.org
To: linux-kernel@vger.kernel.org, lethal@linux-sh.org,
	linux-sh@vger.kernel.org
Cc: Corey Minyard <cminyard@mvista.com>
Subject: [PATCH] SH: Convert out[bwl] macros to inline functions
Date: Mon, 09 Jul 2012 20:35:20 +0000	[thread overview]
Message-ID: <1341866120-18640-1-git-send-email-minyard@acm.org> (raw)

From: Corey Minyard <cminyard@mvista.com>

The macros just called BUG(), but that results in unused variable
warnings all over the place, like in the IPMI driver.  The build
regression emails were annoying me, so here's the fix.  I have
not even compile tested this, but it's rather obvious.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
---
 arch/sh/include/asm/io_noioport.h |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/arch/sh/include/asm/io_noioport.h b/arch/sh/include/asm/io_noioport.h
index e136d28..8cf7084 100644
--- a/arch/sh/include/asm/io_noioport.h
+++ b/arch/sh/include/asm/io_noioport.h
@@ -19,9 +19,20 @@ static inline u32 inl(unsigned long addr)
 	return -1;
 }
 
-#define outb(x, y)	BUG()
-#define outw(x, y)	BUG()
-#define outl(x, y)	BUG()
+static inline void outb(unsigned char x, unsigned int port)
+{
+	BUG();
+}
+
+static inline void outw(unsigned short x, unsigned int port)
+{
+	BUG();
+}
+
+static inline void outl(unsigned int x, unsigned int port)
+{
+	BUG();
+}
 
 #define inb_p(addr)	inb(addr)
 #define inw_p(addr)	inw(addr)
-- 
1.7.4.1


             reply	other threads:[~2012-07-09 20:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-09 20:35 minyard [this message]
2012-07-12  4:15 ` [PATCH] SH: Convert out[bwl] macros to inline functions Paul Mundt

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=1341866120-18640-1-git-send-email-minyard@acm.org \
    --to=minyard@acm.org \
    --cc=cminyard@mvista.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@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).