Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1477422 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2016-09-06 16:00 +0200 |
| Last post | 2016-09-06 16:20 +0200 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 1/4] ARM: common/sa1111: remove NO_IRQ check Arnd Bergmann <arnd@arndb.de> - 2016-09-06 16:00 +0200
[PATCH 3/4] mfd: ucb1x00: remove NO_IRQ check Arnd Bergmann <arnd@arndb.de> - 2016-09-06 16:00 +0200
Re: [PATCH 3/4] mfd: ucb1x00: remove NO_IRQ check Lee Jones <lee.jones@linaro.org> - 2016-09-07 13:30 +0200
[PATCH 4/4] pcmcia: soc-common: remove incorrect NO_IRQ use Arnd Bergmann <arnd@arndb.de> - 2016-09-06 16:00 +0200
Re: [PATCH 1/4] ARM: common/sa1111: remove NO_IRQ check Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-09-06 16:20 +0200
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-09-06 16:00 +0200 |
| Subject | [PATCH 1/4] ARM: common/sa1111: remove NO_IRQ check |
| Message-ID | <sep4R-2HY-19@gated-at.bofh.it> |
Since commit 489447380a29 ("[PATCH] handle errors returned by
platform_get_irq*()") ten years ago, the sa1111 driver refuses to
work without an interrupt line passed in its resources, so the
check for NO_IRQ is unnecessary.
I have also checked that all four machines files that register
an sa1111 device (lubbock, badge4, journada720, and neponset)
do set an interrupt line.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/common/sa1111.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index fb0a0a4dfea4..64d8cf08b7d0 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -751,11 +751,9 @@ static int __sa1111_probe(struct device *me, struct resource *mem, int irq)
* The interrupt controller must be initialised before any
* other device to ensure that the interrupts are available.
*/
- if (sachip->irq != NO_IRQ) {
- ret = sa1111_setup_irq(sachip, pd->irq_base);
- if (ret)
- goto err_unmap;
- }
+ ret = sa1111_setup_irq(sachip, pd->irq_base);
+ if (ret)
+ goto err_unmap;
#ifdef CONFIG_ARCH_SA1100
{
@@ -834,12 +832,10 @@ static void __sa1111_remove(struct sa1111 *sachip)
clk_disable(sachip->clk);
clk_unprepare(sachip->clk);
- if (sachip->irq != NO_IRQ) {
- irq_set_chained_handler_and_data(sachip->irq, NULL, NULL);
- irq_free_descs(sachip->irq_base, SA1111_IRQ_NR);
+ irq_set_chained_handler_and_data(sachip->irq, NULL, NULL);
+ irq_free_descs(sachip->irq_base, SA1111_IRQ_NR);
- release_mem_region(sachip->phys + SA1111_INTC, 512);
- }
+ release_mem_region(sachip->phys + SA1111_INTC, 512);
iounmap(sachip->base);
clk_put(sachip->clk);
--
2.9.0
[toc] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-09-06 16:00 +0200 |
| Subject | [PATCH 3/4] mfd: ucb1x00: remove NO_IRQ check |
| Message-ID | <sep4S-2HY-31@gated-at.bofh.it> |
| In reply to | #1477422 |
probe_irq_off() returns '0' on failure, not NO_IRQ, so the check
in this driver is clearly wrong. This replaces it with the
regular '!irq' check used in other drivers.
The sa1100 platform that this driver is used on originally numbered
all its interrupts starting at '0', which would have conflicted with
this change, but as of commit 18f3aec ("ARM: 8230/1: sa1100: shift
IRQs by one"), this is not a problem any more.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/mfd/ucb1x00-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
index 48bea5038654..d6fb2e1a759a 100644
--- a/drivers/mfd/ucb1x00-core.c
+++ b/drivers/mfd/ucb1x00-core.c
@@ -537,7 +537,7 @@ static int ucb1x00_probe(struct mcp *mcp)
ucb1x00_enable(ucb);
ucb->irq = ucb1x00_detect_irq(ucb);
ucb1x00_disable(ucb);
- if (ucb->irq == NO_IRQ) {
+ if (!ucb->irq) {
dev_err(&ucb->dev, "IRQ probe failed\n");
ret = -ENODEV;
goto err_no_irq;
--
2.9.0
[toc] | [prev] | [next] | [standalone]
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Date | 2016-09-07 13:30 +0200 |
| Subject | Re: [PATCH 3/4] mfd: ucb1x00: remove NO_IRQ check |
| Message-ID | <seJdf-7vS-5@gated-at.bofh.it> |
| In reply to | #1477423 |
On Tue, 06 Sep 2016, Arnd Bergmann wrote:
> probe_irq_off() returns '0' on failure, not NO_IRQ, so the check
> in this driver is clearly wrong. This replaces it with the
> regular '!irq' check used in other drivers.
>
> The sa1100 platform that this driver is used on originally numbered
> all its interrupts starting at '0', which would have conflicted with
> this change, but as of commit 18f3aec ("ARM: 8230/1: sa1100: shift
> IRQs by one"), this is not a problem any more.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/mfd/ucb1x00-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
I'm going to leave this in MFD 'as is' at them moment. This will
break bisectability of course, but it's better we get this in -next
now in order to match it up with the other half of the fix.
The plan is probably to squash the two patches together, keeping
Russell's authorship (first come, first served) and give creds to Arnd
for this part of the patch.
Unless anyone has any complaints, I also plan to keep both of your
SoBs.
> diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
> index 48bea5038654..d6fb2e1a759a 100644
> --- a/drivers/mfd/ucb1x00-core.c
> +++ b/drivers/mfd/ucb1x00-core.c
> @@ -537,7 +537,7 @@ static int ucb1x00_probe(struct mcp *mcp)
> ucb1x00_enable(ucb);
> ucb->irq = ucb1x00_detect_irq(ucb);
> ucb1x00_disable(ucb);
> - if (ucb->irq == NO_IRQ) {
> + if (!ucb->irq) {
> dev_err(&ucb->dev, "IRQ probe failed\n");
> ret = -ENODEV;
> goto err_no_irq;
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-09-06 16:00 +0200 |
| Subject | [PATCH 4/4] pcmcia: soc-common: remove incorrect NO_IRQ use |
| Message-ID | <sep4S-2HY-41@gated-at.bofh.it> |
| In reply to | #1477422 |
The soc_common driver (used on ARM sa1100 and pxa) initializes the socket->pci_irq member to NO_IRQ by default to signify an invalid interrupt, and normally overrides this with a proper interrupt later. However, the code that checks socked->pci_irq for validity compares it to zero instead of NO_IRQ, as most drivers do, so this cannot work right. While zero is a valid interrupt number on PXA (and in the past also on sa1100), it is the interrupt line for the 'ssp' serial port, so there is no possible conflict in practice and we can simply change the default to zero. Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/pcmcia/soc_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c index eed5e9c05353..339ce29fa97b 100644 --- a/drivers/pcmcia/soc_common.c +++ b/drivers/pcmcia/soc_common.c @@ -691,7 +691,7 @@ void soc_pcmcia_init_one(struct soc_pcmcia_socket *skt, skt->ops = ops; skt->socket.owner = ops->owner; skt->socket.dev.parent = dev; - skt->socket.pci_irq = NO_IRQ; + skt->socket.pci_irq = 0; for (i = 0; i < ARRAY_SIZE(skt->stat); i++) skt->stat[i].gpio = -EINVAL; -- 2.9.0
[toc] | [prev] | [next] | [standalone]
| From | Russell King - ARM Linux <linux@armlinux.org.uk> |
|---|---|
| Date | 2016-09-06 16:20 +0200 |
| Message-ID | <sepod-36Y-9@gated-at.bofh.it> |
| In reply to | #1477422 |
Please check other patches previously sent - these conflict with the
patch series I sent last week. This use is already gone.
On Tue, Sep 06, 2016 at 03:53:27PM +0200, Arnd Bergmann wrote:
> Since commit 489447380a29 ("[PATCH] handle errors returned by
> platform_get_irq*()") ten years ago, the sa1111 driver refuses to
> work without an interrupt line passed in its resources, so the
> check for NO_IRQ is unnecessary.
>
> I have also checked that all four machines files that register
> an sa1111 device (lubbock, badge4, journada720, and neponset)
> do set an interrupt line.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/arm/common/sa1111.c | 16 ++++++----------
> 1 file changed, 6 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
> index fb0a0a4dfea4..64d8cf08b7d0 100644
> --- a/arch/arm/common/sa1111.c
> +++ b/arch/arm/common/sa1111.c
> @@ -751,11 +751,9 @@ static int __sa1111_probe(struct device *me, struct resource *mem, int irq)
> * The interrupt controller must be initialised before any
> * other device to ensure that the interrupts are available.
> */
> - if (sachip->irq != NO_IRQ) {
> - ret = sa1111_setup_irq(sachip, pd->irq_base);
> - if (ret)
> - goto err_unmap;
> - }
> + ret = sa1111_setup_irq(sachip, pd->irq_base);
> + if (ret)
> + goto err_unmap;
>
> #ifdef CONFIG_ARCH_SA1100
> {
> @@ -834,12 +832,10 @@ static void __sa1111_remove(struct sa1111 *sachip)
> clk_disable(sachip->clk);
> clk_unprepare(sachip->clk);
>
> - if (sachip->irq != NO_IRQ) {
> - irq_set_chained_handler_and_data(sachip->irq, NULL, NULL);
> - irq_free_descs(sachip->irq_base, SA1111_IRQ_NR);
> + irq_set_chained_handler_and_data(sachip->irq, NULL, NULL);
> + irq_free_descs(sachip->irq_base, SA1111_IRQ_NR);
>
> - release_mem_region(sachip->phys + SA1111_INTC, 512);
> - }
> + release_mem_region(sachip->phys + SA1111_INTC, 512);
>
> iounmap(sachip->base);
> clk_put(sachip->clk);
> --
> 2.9.0
>
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web