Random PARISC patches
Subsystems (2)
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
PATCH 1/2 parisc: fix compile without CONFIG_PCI
Quoted 1 line
From
f49bd6e33a3b6f499a6039a5980af21893524e86Mon 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
@@ -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
Re: [PATCH 1/2] parisc: fix compile without CONFIG_PCI
Quoted 32 lines
From
f49bd6e33a3b6f499a6039a5980af21893524e86Mon 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 withoutCONFIG_PCIThis function is already defined as a noop in
include/asm-generic/iomap.h.Signed-off-by Rolf Eike Beer <[email protected]>--- arch/parisc/lib/iomap.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)arch/parisc/lib/iomap.c +2
-0@@ -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?
PATCH 2/2 HIL: remove one goto
In reply to Rolf Eike BeerQuoted 1 line
From
71de9e0407870c980e57335a5bc555f24d90683bMon 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
@@ -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
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]