* [PATCH v2 2/2] ARM: OMAP4+: PRM: fix of_irq_get() result checks
@ 2017-08-06 15:14 Sergei Shtylyov
2017-08-06 15:19 ` Sergei Shtylyov
0 siblings, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2017-08-06 15:14 UTC (permalink / raw)
To: linux-arm-kernel
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;
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] ARM: OMAP4+: PRM: fix of_irq_get() result checks
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-09 22:02 ` Tony Lindgren
0 siblings, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2017-08-06 15:19 UTC (permalink / raw)
To: linux-arm-kernel
On 08/06/2017 06:14 PM, Sergei Shtylyov wrote:
> of_irq_get() may return 0 as well as a nagative error number on failure,
Oops, forgot to kill comma...
> (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>
[...]
MBR, Sergei
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] ARM: OMAP4+: PRM: fix of_irq_get() result checks
2017-08-06 15:19 ` Sergei Shtylyov
@ 2017-08-09 22:02 ` Tony Lindgren
2017-08-14 11:44 ` Sergei Shtylyov
0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2017-08-09 22:02 UTC (permalink / raw)
To: linux-arm-kernel
* Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> [170806 08:20]:
> On 08/06/2017 06:14 PM, Sergei Shtylyov wrote:
>
> > of_irq_get() may return 0 as well as a nagative error number on failure,
>
> Oops, forgot to kill comma...
I can fix that while applying.
> > (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>
> [...]
Seems these both should be safe to apply into fixes-not-urgent for
v4.14 merge window as we have not seen any issues with this? Or
are there some known bugs related to this?
Regards,
Tony
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] ARM: OMAP4+: PRM: fix of_irq_get() result checks
2017-08-09 22:02 ` Tony Lindgren
@ 2017-08-14 11:44 ` Sergei Shtylyov
2017-08-14 17:17 ` Tony Lindgren
0 siblings, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2017-08-14 11:44 UTC (permalink / raw)
To: linux-arm-kernel
On 08/10/2017 01:02 AM, Tony Lindgren wrote:
>>> of_irq_get() may return 0 as well as a nagative error number on failure,
>>
>> Oops, forgot to kill comma...
>
> I can fix that while applying.
Thanks!
>>> (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>
>> [...]
> Seems these both should be safe to apply into fixes-not-urgent for
> v4.14 merge window as we have not seen any issues with this? Or
Yes, probably.
> are there some known bugs related to this?
Dunno, I was just auditing the call sites of of_irq_get[_byname]()...
> Regards,
>
> Tony
MBR, Sergei
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] ARM: OMAP4+: PRM: fix of_irq_get() result checks
2017-08-14 11:44 ` Sergei Shtylyov
@ 2017-08-14 17:17 ` Tony Lindgren
0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2017-08-14 17:17 UTC (permalink / raw)
To: linux-arm-kernel
* Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> [170814 04:44]:
> On 08/10/2017 01:02 AM, Tony Lindgren wrote:
>
> > > > of_irq_get() may return 0 as well as a nagative error number on failure,
> > >
> > > Oops, forgot to kill comma...
> >
> > I can fix that while applying.
>
> Thanks!
>
> > > > (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>
> > > [...]
>
> > Seems these both should be safe to apply into fixes-not-urgent for
> > v4.14 merge window as we have not seen any issues with this? Or
>
> Yes, probably.
>
> > are there some known bugs related to this?
>
> Dunno, I was just auditing the call sites of of_irq_get[_byname]()...
OK thanks I'll apply both into omap-for-v4.14/fixes-not-urgent.
Tony
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-08-14 17:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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-09 22:02 ` Tony Lindgren
2017-08-14 11:44 ` Sergei Shtylyov
2017-08-14 17:17 ` Tony Lindgren
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).