All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SH: Convert out[bwl] macros to inline functions
@ 2012-07-09 20:35 ` minyard
  0 siblings, 0 replies; 4+ messages in thread
From: minyard @ 2012-07-09 20:35 UTC (permalink / raw)
  To: linux-kernel, lethal, linux-sh; +Cc: Corey Minyard

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] SH: Convert out[bwl] macros to inline functions
@ 2012-07-09 20:35 ` minyard
  0 siblings, 0 replies; 4+ messages in thread
From: minyard @ 2012-07-09 20:35 UTC (permalink / raw)
  To: linux-kernel, lethal, linux-sh; +Cc: Corey Minyard

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] SH: Convert out[bwl] macros to inline functions
  2012-07-09 20:35 ` minyard
@ 2012-07-12  4:15   ` Paul Mundt
  -1 siblings, 0 replies; 4+ messages in thread
From: Paul Mundt @ 2012-07-12  4:15 UTC (permalink / raw)
  To: minyard; +Cc: linux-kernel, linux-sh, Corey Minyard

On Mon, Jul 09, 2012 at 03:35:20PM -0500, minyard@acm.org wrote:
> 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>

Builds fine, I've switched the port type to unsigned long, but it looks
good otherwise. Will queue it up for -rc7, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] SH: Convert out[bwl] macros to inline functions
@ 2012-07-12  4:15   ` Paul Mundt
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Mundt @ 2012-07-12  4:15 UTC (permalink / raw)
  To: minyard; +Cc: linux-kernel, linux-sh, Corey Minyard

On Mon, Jul 09, 2012 at 03:35:20PM -0500, minyard@acm.org wrote:
> 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>

Builds fine, I've switched the port type to unsigned long, but it looks
good otherwise. Will queue it up for -rc7, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-12  4:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-09 20:35 [PATCH] SH: Convert out[bwl] macros to inline functions minyard
2012-07-09 20:35 ` minyard
2012-07-12  4:15 ` Paul Mundt
2012-07-12  4:15   ` Paul Mundt

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.