Skip to contentSkip to conversation

Random PARISC patches

PATCH New Rolf Eike Beer 3 participants 5 messages Jan 16, 2012 – Jan 30, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Random PARISC patches

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

#1 lore raw

PATCH 1/2 parisc: fix compile without CONFIG_PCI

Quoted 1 line

From f49bd6e33a3b6f499a6039a5980af21893524e86 Mon Sep 17 00:00:00 2001

From: Rolf Eike Beer <[email protected]>
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.

---
 arch/parisc/lib/iomap.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
arch/parisc/lib/iomap.c +4 -0
index fb8e10a..b2b0408 100644
@@ -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 */
Signature · 1 line
1.7.7
#2 lore raw

Re: [PATCH 1/2] parisc: fix compile without CONFIG_PCI

Quoted 32 lines

From f49bd6e33a3b6f499a6039a5980af21893524e86 Mon Sep 17 00:00:00 2001
From: Rolf Eike Beer <[email protected]>
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.

---
 arch/parisc/lib/iomap.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
arch/parisc/lib/iomap.c +2 -0
index fb8e10a..b2b0408 100644
@@ -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);

arch/parisc/lib/iomap.c EXPORT_SYMBOL(iowrite16_rep); · line 468

Quoted 6 lines
arch/parisc/lib/iomap.c +2 -0
@@ -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?

#3 lore raw

PATCH 2/2 HIL: remove one goto

In reply to Rolf Eike Beer
Quoted 1 line

From 71de9e0407870c980e57335a5bc555f24d90683b Mon Sep 17 00:00:00 2001

From: Rolf Eike Beer <[email protected]>
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.

---
 drivers/input/serio/hil_mlc.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
drivers/input/serio/hil_mlc.c +5 -6
index bfd3865..0280167 100644
@@ -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)) {
Signature · 1 line
1.7.7
#4 lore raw

Re: [PATCH 2/2] HIL: remove one goto

drivers/input/serio/hil_mlc.c static int hilse_donode(hil_mlc *mlc) · line 693

Quoted 5 lines · Rolf Eike Beer
drivers/input/serio/hil_mlc.c +5 -0
+		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

Signature · 1 line
John David Anglin    [email protected]