Re: [PATCH] net: sh_irda: fixup build error on v3.1

9 messages, 3 authors, 2011-08-11 · open the first message on its own page

Re: [PATCH] net: sh_irda: fixup build error on v3.1

From: David Miller <davem@davemloft.net>
Date: 2011-08-11 06:16:01

From: Kuninori Morimoto <redacted>
Date: Wed, 10 Aug 2011 22:49:01 -0700 (PDT)
quoted hunk
@@ -171,7 +173,7 @@ static void sh_irda_write(struct sh_irda_self *self, u32 offset, u16 data)
 	unsigned long flags;
 
 	spin_lock_irqsave(&self->lock, flags);
-	iowrite16(data, self->membase + offset);
+	__raw_writew(data, self->membase + offset);
 	spin_unlock_irqrestore(&self->lock, flags);
Every platform, including "sh", provides ioread16() and iowrite16().

So changing this is not part of "fixup build error" as your commit
message states.

If this change is needed, it should be in a seperate commit and with
a proper explanation in the commit message.

Re: [PATCH] net: sh_irda: fixup build error on v3.1

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: 2011-08-11 09:02:08

Hi David

Thank you for your reply
quoted
 	spin_lock_irqsave(&self->lock, flags);
-	iowrite16(data, self->membase + offset);
+	__raw_writew(data, self->membase + offset);
 	spin_unlock_irqrestore(&self->lock, flags);
Every platform, including "sh", provides ioread16() and iowrite16().

So changing this is not part of "fixup build error" as your commit
message states.
Thank you I understand.
I send v2 patch

Best regards
---
Kuninori Morimoto

Re: [PATCH v2] net: sh_irda: fixup build error on v3.1

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: 2011-08-11 09:19:46

Hi David

These are v2 of sh_irda/sh_sir patches

Kuninori Morimoto (3):
      net/irda: sh_irda: add missing header
      net/irda: sh_sir: add missing header
      net/irda: sh_sir: tidyup compile warning

#1, #2 are v2 of
    [PATCH] net: sh_irda: fixup build error on v3.1
    [PATCH] net: sh_sir: fixup build error on v3.1

#3 is new patch

Best regards
---
Kuninori Morimoto

[PATCH 1/3 v2] net/irda: sh_irda: add missing header

From: <hidden>
Date: 2011-08-11 09:25:43

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

This patch fixup below build error on sh_irda

sh_irda.c: In function 'sh_irda_write':
sh_irda.c:174: error: implicit declaration of function 'iowrite16'
sh_irda.c: In function 'sh_irda_read':
sh_irda.c:184: error: implicit declaration of function 'ioread16'
sh_irda.c: At top level:
sh_irda.c:492: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sh_irda_irq'
sh_irda.c: In function 'sh_irda_probe':
sh_irda.c:776: error: implicit declaration of function 'ioremap_nocache'
sh_irda.c:776: warning: assignment makes pointer from integer without a cast
sh_irda.c:811: error: implicit declaration of function 'request_irq'
sh_irda.c:811: error: 'sh_irda_irq' undeclared (first use in this function)
sh_irda.c:811: error: (Each undeclared identifier is reported only once
sh_irda.c:811: error: for each function it appears in.)
sh_irda.c:811: error: 'IRQF_DISABLED' undeclared (first use in this function)
sh_irda.c:825: error: implicit declaration of function 'iounmap'

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v1 -> v2

- just add missing header
- change email subject

 drivers/net/irda/sh_irda.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/irda/sh_irda.c b/drivers/net/irda/sh_irda.c
index 4488bd5..8266067 100644
--- a/drivers/net/irda/sh_irda.c
+++ b/drivers/net/irda/sh_irda.c
@@ -22,6 +22,8 @@
  *  - DMA transfer support
  *  - FIFO mode support
  */
+#include <linux/io.h>
+#include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
-- 
1.7.4.1

[PATCH 2/3 v2] net/irda: sh_sir: add missing header

From: <hidden>
Date: 2011-08-11 09:26:10

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

This patch fixup below build error on sh_sir

sh_sir.c: In function 'sh_sir_write':
sh_sir.c:127:2: error: implicit declaration of function 'iowrite16'
sh_sir.c: In function 'sh_sir_read':
sh_sir.c:132:2: error: implicit declaration of function 'ioread16'
sh_sir.c: At top level:
sh_sir.c:561:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sh_sir_irq'
sh_sir.c: In function 'sh_sir_probe':
sh_sir.c:727:2: error: implicit declaration of function 'ioremap_nocache'
sh_sir.c:727:16: warning: assignment makes pointer from integer without a cast
sh_sir.c:762:2: error: implicit declaration of function 'request_irq'
sh_sir.c:762:23: error: 'sh_sir_irq' undeclared (first use in this function)
sh_sir.c:762:23: note: each undeclared identifier is reported only once for each function it appears in
sh_sir.c:762:35: error: 'IRQF_DISABLED' undeclared (first use in this function)
sh_sir.c:776:2: error: implicit declaration of function 'iounmap'
sh_sir.c: At top level:
sh_sir.c:436:13: warning: 'sh_sir_clear_all_err' defined but not used
sh_sir.c:474:12: warning: 'sh_sir_is_which_phase' defined but not used
sh_sir.c:490:13: warning: 'sh_sir_tx' defined but not used
sh_sir.c:540:13: warning: 'sh_sir_rx' defined but not used

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v1 -> v2

- just add missing header
- change email subject

 drivers/net/irda/sh_sir.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/irda/sh_sir.c b/drivers/net/irda/sh_sir.c
index 52a7c86..10b13ea 100644
--- a/drivers/net/irda/sh_sir.c
+++ b/drivers/net/irda/sh_sir.c
@@ -12,6 +12,8 @@
  * published by the Free Software Foundation.
  */
 
+#include <linux/io.h>
+#include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
-- 
1.7.4.1

[PATCH 3/3] net/irda: sh_sir: tidyup compile warning

From: <hidden>
Date: 2011-08-11 09:26:39

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

This patch tidyup below warning

${LINUX}/drivers/net/irda/sh_sir.c:514:6: warning:
 'val' may be used uninitialized in this function

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 drivers/net/irda/sh_sir.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/irda/sh_sir.c b/drivers/net/irda/sh_sir.c
index 10b13ea..ed7d7d6 100644
--- a/drivers/net/irda/sh_sir.c
+++ b/drivers/net/irda/sh_sir.c
@@ -513,7 +513,7 @@ static void sh_sir_tx(struct sh_sir_self *self, int phase)
 
 static int sh_sir_read_data(struct sh_sir_self *self)
 {
-	u16 val;
+	u16 val = 0;
 	int timeout = 1024;
 
 	while (timeout--) {
-- 
1.7.4.1

Re: [PATCH 1/3 v2] net/irda: sh_irda: add missing header

From: David Miller <davem@davemloft.net>
Date: 2011-08-11 12:53:57

From: kuninori.morimoto.gx@gmail.com
Date: Thu, 11 Aug 2011 02:25:42 -0700 (PDT)
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

This patch fixup below build error on sh_irda

sh_irda.c: In function 'sh_irda_write':
sh_irda.c:174: error: implicit declaration of function 'iowrite16'
sh_irda.c: In function 'sh_irda_read':
sh_irda.c:184: error: implicit declaration of function 'ioread16'
sh_irda.c: At top level:
sh_irda.c:492: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sh_irda_irq'
sh_irda.c: In function 'sh_irda_probe':
sh_irda.c:776: error: implicit declaration of function 'ioremap_nocache'
sh_irda.c:776: warning: assignment makes pointer from integer without a cast
sh_irda.c:811: error: implicit declaration of function 'request_irq'
sh_irda.c:811: error: 'sh_irda_irq' undeclared (first use in this function)
sh_irda.c:811: error: (Each undeclared identifier is reported only once
sh_irda.c:811: error: for each function it appears in.)
sh_irda.c:811: error: 'IRQF_DISABLED' undeclared (first use in this function)
sh_irda.c:825: error: implicit declaration of function 'iounmap'

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Applied.

Re: [PATCH 2/3 v2] net/irda: sh_sir: add missing header

From: David Miller <davem@davemloft.net>
Date: 2011-08-11 12:54:02

From: kuninori.morimoto.gx@gmail.com
Date: Thu, 11 Aug 2011 02:26:09 -0700 (PDT)
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

This patch fixup below build error on sh_sir

sh_sir.c: In function 'sh_sir_write':
sh_sir.c:127:2: error: implicit declaration of function 'iowrite16'
sh_sir.c: In function 'sh_sir_read':
sh_sir.c:132:2: error: implicit declaration of function 'ioread16'
sh_sir.c: At top level:
sh_sir.c:561:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sh_sir_irq'
sh_sir.c: In function 'sh_sir_probe':
sh_sir.c:727:2: error: implicit declaration of function 'ioremap_nocache'
sh_sir.c:727:16: warning: assignment makes pointer from integer without a cast
sh_sir.c:762:2: error: implicit declaration of function 'request_irq'
sh_sir.c:762:23: error: 'sh_sir_irq' undeclared (first use in this function)
sh_sir.c:762:23: note: each undeclared identifier is reported only once for each function it appears in
sh_sir.c:762:35: error: 'IRQF_DISABLED' undeclared (first use in this function)
sh_sir.c:776:2: error: implicit declaration of function 'iounmap'
sh_sir.c: At top level:
sh_sir.c:436:13: warning: 'sh_sir_clear_all_err' defined but not used
sh_sir.c:474:12: warning: 'sh_sir_is_which_phase' defined but not used
sh_sir.c:490:13: warning: 'sh_sir_tx' defined but not used
sh_sir.c:540:13: warning: 'sh_sir_rx' defined but not used

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Applied.

Re: [PATCH 3/3] net/irda: sh_sir: tidyup compile warning

From: David Miller <davem@davemloft.net>
Date: 2011-08-11 12:54:07

From: kuninori.morimoto.gx@gmail.com
Date: Thu, 11 Aug 2011 02:26:37 -0700 (PDT)
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

This patch tidyup below warning

${LINUX}/drivers/net/irda/sh_sir.c:514:6: warning:
 'val' may be used uninitialized in this function

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help