linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Random PARISC patches
@ 2012-01-16 19:12 Rolf Eike Beer
  2012-01-16 19:13 ` [PATCH 1/2] parisc: fix compile without CONFIG_PCI Rolf Eike Beer
  2012-01-16 19:13 ` [PATCH 2/2] HIL: remove one goto Rolf Eike Beer
  0 siblings, 2 replies; 5+ messages in thread
From: Rolf Eike Beer @ 2012-01-16 19:12 UTC (permalink / raw)
  To: linux-parisc List

[-- Attachment #1: Type: text/plain, Size: 425 bytes --]

This little series has 2 patches that have nothing to do with each other 
beyond the point that I stumbled over both of these things today.

The first one fixes a compile error if CONFIG_PCI is not set, e.g. for the 
Apollo 705 I have. This is also needed in 3.2, although it covers also 
pci_iomap() in this case which was moved to lib/ by a recent patch.

The other one is just a minor code cleanup in the HIL driver.

Eike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* [PATCH 1/2] parisc: fix compile without CONFIG_PCI
  2012-01-16 19:12 [PATCH 0/2] Random PARISC patches Rolf Eike Beer
@ 2012-01-16 19:13 ` Rolf Eike Beer
  2012-01-30 10:13   ` Rolf Eike Beer
  2012-01-16 19:13 ` [PATCH 2/2] HIL: remove one goto Rolf Eike Beer
  1 sibling, 1 reply; 5+ messages in thread
From: Rolf Eike Beer @ 2012-01-16 19:13 UTC (permalink / raw)
  To: linux-parisc List

>From f49bd6e33a3b6f499a6039a5980af21893524e86 Mon Sep 17 00:00:00 2001
From: Rolf Eike Beer <eike-kernel@sf-tec.de>
Date: Mon, 16 Jan 2012 18:59:29 +0100
Subject: [PATCH 1/2] parisc: fix compile without CONFIG_PCI

This function is already defined as a noop in include/asm-generic/iomap.h.

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
---
 arch/parisc/lib/iomap.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/parisc/lib/iomap.c b/arch/parisc/lib/iomap.c
index fb8e10a..b2b0408 100644
--- a/arch/parisc/lib/iomap.c
+++ b/arch/parisc/lib/iomap.c
@@ -436,12 +436,14 @@ void ioport_unmap(void __iomem *addr)
 	}
 }
 
+#ifdef CONFIG_PCI
 void pci_iounmap(struct pci_dev *dev, void __iomem * addr)
 {
 	if (!INDIRECT_ADDR(addr)) {
 		iounmap(addr);
 	}
 }
+#endif /* CONFIG_PCI */
 
 EXPORT_SYMBOL(ioread8);
 EXPORT_SYMBOL(ioread16);
@@ -461,4 +463,6 @@ EXPORT_SYMBOL(iowrite16_rep);
 EXPORT_SYMBOL(iowrite32_rep);
 EXPORT_SYMBOL(ioport_map);
 EXPORT_SYMBOL(ioport_unmap);
+#ifdef CONFIG_PCI
 EXPORT_SYMBOL(pci_iounmap);
+#endif /* CONFIG_PCI */
-- 
1.7.7



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

* [PATCH 2/2] HIL: remove one goto
  2012-01-16 19:12 [PATCH 0/2] Random PARISC patches Rolf Eike Beer
  2012-01-16 19:13 ` [PATCH 1/2] parisc: fix compile without CONFIG_PCI Rolf Eike Beer
@ 2012-01-16 19:13 ` Rolf Eike Beer
  2012-01-16 19:38   ` John David Anglin
  1 sibling, 1 reply; 5+ messages in thread
From: Rolf Eike Beer @ 2012-01-16 19:13 UTC (permalink / raw)
  To: linux-parisc List

>From 71de9e0407870c980e57335a5bc555f24d90683b Mon Sep 17 00:00:00 2001
From: Rolf Eike Beer <eike-kernel@sf-tec.de>
Date: Mon, 16 Jan 2012 19:44:01 +0100
Subject: [PATCH 2/2] HIL: remove one goto

This goto is only used to skip the next instruction, which can easily be done
without a goto.

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
---
 drivers/input/serio/hil_mlc.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c
index bfd3865..0280167 100644
--- a/drivers/input/serio/hil_mlc.c
+++ b/drivers/input/serio/hil_mlc.c
@@ -686,13 +686,12 @@ static int hilse_donode(hil_mlc *mlc)
 		write_lock_irqsave(&mlc->lock, flags);
 		pack = node->object.packet;
 	out:
-		if (mlc->istarted)
-			goto out2;
-		/* Prepare to receive input */
-		if ((node + 1)->act & HILSE_IN)
-			hilse_setup_input(mlc, node + 1);
+		if (!mlc->istarted) {
+			/* Prepare to receive input */
+			if ((node + 1)->act & HILSE_IN)
+				hilse_setup_input(mlc, node + 1);
+		}
 
-	out2:
 		write_unlock_irqrestore(&mlc->lock, flags);
 
 		if (down_trylock(&mlc->osem)) {
-- 
1.7.7



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

* Re: [PATCH 2/2] HIL: remove one goto
  2012-01-16 19:13 ` [PATCH 2/2] HIL: remove one goto Rolf Eike Beer
@ 2012-01-16 19:38   ` John David Anglin
  0 siblings, 0 replies; 5+ messages in thread
From: John David Anglin @ 2012-01-16 19:38 UTC (permalink / raw)
  To: Rolf Eike Beer; +Cc: linux-parisc List

On 1/16/2012 2:13 PM, Rolf Eike Beer wrote:
> +		if (!mlc->istarted) {
> +			/* Prepare to receive input */
> +			if ((node + 1)->act&  HILSE_IN)
> +				hilse_setup_input(mlc, node + 1);
> +		}
It looks to me like this could be further simplified with an &&.

Dave

-- 
John David Anglin    dave.anglin@bell.net


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

* Re: [PATCH 1/2] parisc: fix compile without CONFIG_PCI
  2012-01-16 19:13 ` [PATCH 1/2] parisc: fix compile without CONFIG_PCI Rolf Eike Beer
@ 2012-01-30 10:13   ` Rolf Eike Beer
  0 siblings, 0 replies; 5+ messages in thread
From: Rolf Eike Beer @ 2012-01-30 10:13 UTC (permalink / raw)
  To: linux-parisc List

> From f49bd6e33a3b6f499a6039a5980af21893524e86 Mon Sep 17 00:00:00 2001
> From: Rolf Eike Beer <eike-kernel@sf-tec.de>
> Date: Mon, 16 Jan 2012 18:59:29 +0100
> Subject: [PATCH 1/2] parisc: fix compile without CONFIG_PCI
>
> This function is already defined as a noop in include/asm-generic/iomap.h.
>
> Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
> ---
>  arch/parisc/lib/iomap.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/arch/parisc/lib/iomap.c b/arch/parisc/lib/iomap.c
> index fb8e10a..b2b0408 100644
> --- a/arch/parisc/lib/iomap.c
> +++ b/arch/parisc/lib/iomap.c
> @@ -436,12 +436,14 @@ void ioport_unmap(void __iomem *addr)
>  	}
>  }
>
> +#ifdef CONFIG_PCI
>  void pci_iounmap(struct pci_dev *dev, void __iomem * addr)
>  {
>  	if (!INDIRECT_ADDR(addr)) {
>  		iounmap(addr);
>  	}
>  }
> +#endif /* CONFIG_PCI */
>
>  EXPORT_SYMBOL(ioread8);
>  EXPORT_SYMBOL(ioread16);
> @@ -461,4 +463,6 @@ EXPORT_SYMBOL(iowrite16_rep);
>  EXPORT_SYMBOL(iowrite32_rep);
>  EXPORT_SYMBOL(ioport_map);
>  EXPORT_SYMBOL(ioport_unmap);
> +#ifdef CONFIG_PCI
>  EXPORT_SYMBOL(pci_iounmap);
> +#endif /* CONFIG_PCI */

James?

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

end of thread, other threads:[~2012-01-30 10:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-16 19:12 [PATCH 0/2] Random PARISC patches Rolf Eike Beer
2012-01-16 19:13 ` [PATCH 1/2] parisc: fix compile without CONFIG_PCI Rolf Eike Beer
2012-01-30 10:13   ` Rolf Eike Beer
2012-01-16 19:13 ` [PATCH 2/2] HIL: remove one goto Rolf Eike Beer
2012-01-16 19:38   ` John David Anglin

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).