From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Rajendra Nayak <rnayak@codeaurora.org>,
Paul Walmsley <paul@pwsan.com>, Tony Lindgren <tony@atomide.com>,
linux-omap@vger.kernel.org
Cc: Russell King <linux@arm.linux.org.uk>,
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] ARM: OMAP4+: PRM: fix of_irq_get() result checks
Date: Sun, 06 Aug 2017 18:14:22 +0300 [thread overview]
Message-ID: <20170806151714.108596802@cogentembedded.com> (raw)
[-- Attachment #1: ARM-OMAP4-PRM-fix-of_irq_get-result-checks-v2.patch --]
[-- Type: text/plain, Size: 1494 bytes --]
of_irq_get() may return 0 as well as a nagative error number on failure,
(and never on success), however omap44xx_prm_late_init() regards 0 as a
valid IRQ -- fix this.
Fixes: a8f83aefcd5a ("ARM: OMAP4+: PRM: register interrupt information from DT")
Fixes: c5b3955828ba ("ARM: OMAP4: Fix legacy code clean-up regression")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
Changes ion version 2:
- added the "Fixes:" tag for the commit introducing of_irq_get() call;
- rebased to the 'omap-for-v4.13/fixes' branch;
- fixed Rajendra Nayak's email;
- added + to OMAP4 in the patch subject.
arch/arm/mach-omap2/prm44xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-omap/arch/arm/mach-omap2/prm44xx.c
===================================================================
--- linux-omap.orig/arch/arm/mach-omap2/prm44xx.c
+++ linux-omap/arch/arm/mach-omap2/prm44xx.c
@@ -747,7 +747,7 @@ static int omap44xx_prm_late_init(void)
* Already have OMAP4 IRQ num. For all other platforms, we need
* IRQ numbers from DT
*/
- if (irq_num < 0 && !(prm_init_data->flags & PRM_IRQ_DEFAULT)) {
+ if (irq_num <= 0 && !(prm_init_data->flags & PRM_IRQ_DEFAULT)) {
if (irq_num == -EPROBE_DEFER)
return irq_num;
@@ -756,7 +756,7 @@ static int omap44xx_prm_late_init(void)
}
/* Once OMAP4 DT is filled as well */
- if (irq_num >= 0) {
+ if (irq_num > 0) {
omap4_prcm_irq_setup.irq = irq_num;
omap4_prcm_irq_setup.xlate_irq = NULL;
}
WARNING: multiple messages have this Message-ID (diff)
From: sergei.shtylyov@cogentembedded.com (Sergei Shtylyov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] ARM: OMAP4+: PRM: fix of_irq_get() result checks
Date: Sun, 06 Aug 2017 18:14:22 +0300 [thread overview]
Message-ID: <20170806151714.108596802@cogentembedded.com> (raw)
of_irq_get() may return 0 as well as a nagative error number on failure,
(and never on success), however omap44xx_prm_late_init() regards 0 as a
valid IRQ -- fix this.
Fixes: a8f83aefcd5a ("ARM: OMAP4+: PRM: register interrupt information from DT")
Fixes: c5b3955828ba ("ARM: OMAP4: Fix legacy code clean-up regression")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
Changes ion version 2:
- added the "Fixes:" tag for the commit introducing of_irq_get() call;
- rebased to the 'omap-for-v4.13/fixes' branch;
- fixed Rajendra Nayak's email;
- added + to OMAP4 in the patch subject.
arch/arm/mach-omap2/prm44xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-omap/arch/arm/mach-omap2/prm44xx.c
===================================================================
--- linux-omap.orig/arch/arm/mach-omap2/prm44xx.c
+++ linux-omap/arch/arm/mach-omap2/prm44xx.c
@@ -747,7 +747,7 @@ static int omap44xx_prm_late_init(void)
* Already have OMAP4 IRQ num. For all other platforms, we need
* IRQ numbers from DT
*/
- if (irq_num < 0 && !(prm_init_data->flags & PRM_IRQ_DEFAULT)) {
+ if (irq_num <= 0 && !(prm_init_data->flags & PRM_IRQ_DEFAULT)) {
if (irq_num == -EPROBE_DEFER)
return irq_num;
@@ -756,7 +756,7 @@ static int omap44xx_prm_late_init(void)
}
/* Once OMAP4 DT is filled as well */
- if (irq_num >= 0) {
+ if (irq_num > 0) {
omap4_prcm_irq_setup.irq = irq_num;
omap4_prcm_irq_setup.xlate_irq = NULL;
}
next reply other threads:[~2017-08-06 15:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-06 15:14 Sergei Shtylyov [this message]
2017-08-06 15:14 ` [PATCH v2 2/2] ARM: OMAP4+: PRM: fix of_irq_get() result checks Sergei Shtylyov
2017-08-06 15:19 ` Sergei Shtylyov
2017-08-06 15:19 ` Sergei Shtylyov
2017-08-09 22:02 ` Tony Lindgren
2017-08-09 22:02 ` Tony Lindgren
2017-08-14 11:44 ` Sergei Shtylyov
2017-08-14 11:44 ` Sergei Shtylyov
2017-08-14 17:17 ` Tony Lindgren
2017-08-14 17:17 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170806151714.108596802@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=paul@pwsan.com \
--cc=rnayak@codeaurora.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.