sound/soc/fsl/fsl_ssi.c: let checking none-zero instead of checking NO_IRQ
Subsystems (3)
PATCH 1/1 sound/soc/fsl/fsl_ssi.c: let checking none-zero instead of checking NO_IRQ
NO_IRQ may be defined as '(unsigned int) -1' in some architectures (arm, sh ...), and either may not be defined in some architectures which can enable SND_SOC_FSL_SSI (e.g. allmodconfig for arc).
When irq_of_parse_and_map() fails, it will always return 0, so need let checking none-zero instead of checking NO_IRQ, or will cause compiling issue or run time bug in some architectures.
--- sound/soc/fsl/fsl_ssi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/fsl/fsl_ssi.c +1 -1
@@ -936,7 +936,7 @@ static int fsl_ssi_probe(struct platform_device *pdev) ssi_private->ssi_phys = res.start; ssi_private->irq =irq_of_parse_and_map (np,0 ); -if (ssi_private->irq ==NO_IRQ ) { +if (!ssi_private->irq) {dev_err (&pdev->dev,"no irq for node %s\n" , np->full_name);return -ENXIO ; }
Signature · 1 line
1.7.7.6
Quoted 8 lines · Chen Gang
NO_IRQmay be defined as '(unsigned int) -1' in some architectures (arm, sh ...), and either may not be defined in some architectures which can enableSND_SOC_FSL_SSI(e.g. allmodconfig for arc).When
irq_of_parse_and_map()fails, it will always return 0, so need let checking none-zero instead of checkingNO_IRQ, or will cause compiling issue or run time bug in some architectures.
Oh, sorry, the subject and comment are incorrect, need use "zero" instead of "none-zero".
I will send patch v2 for it.
Quoted 20 lines
Signed-off-by Chen Gang <[email protected]>--- sound/soc/fsl/fsl_ssi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)sound/soc/fsl/fsl_ssi.c +1
-1@@ -936,7 +936,7 @@ static int fsl_ssi_probe(struct platform_device *pdev) ssi_private->ssi_phys = res.start; ssi_private->irq =irq_of_parse_and_map (np,0 ); -if (ssi_private->irq ==NO_IRQ ) { +if (!ssi_private->irq) {dev_err (&pdev->dev,"no irq for node %s\n" , np->full_name);return -ENXIO ; }
Signature · 1 line
Chen Gang
PATCH v2 1/1 sound/soc/fsl/fsl_ssi.c: let check zero instead of check NO_IRQ
NO_IRQ may be defined as '(unsigned int) -1' in some architectures (arm, sh ...), and either may not be defined in some architectures which can enable SND_SOC_FSL_SSI (e.g. allmodconfig for arc).
When irq_of_parse_and_map() fails, it will always return 0, so need check zero instead of NO_IRQ, or will cause compiling issue or run time bug in some architectures.
--- sound/soc/fsl/fsl_ssi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/fsl/fsl_ssi.c +1 -1
@@ -936,7 +936,7 @@ static int fsl_ssi_probe(struct platform_device *pdev) ssi_private->ssi_phys = res.start; ssi_private->irq =irq_of_parse_and_map (np,0 ); -if (ssi_private->irq ==NO_IRQ ) { +if (!ssi_private->irq) {dev_err (&pdev->dev,"no irq for node %s\n" , np->full_name);return -ENXIO ; }
Signature · 1 line
1.7.7.6
Re: [PATCH v2] sound/soc/fsl/fsl_ssi.c: let check zero instead of check NO_IRQ
Quoted 3 lines · Chen Gang
NO_IRQmay be defined as '(unsigned int) -1' in some architectures (arm, sh ...), and either may not be defined in some architectures which can enableSND_SOC_FSL_SSI(e.g. allmodconfig for arc).
Applied, thanks.
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2] sound/soc/fsl/fsl_ssi.c: let check zero instead of check NO_IRQ
Quoted 7 lines · Mark Brown
Quoted 3 lines · Chen Gang
NO_IRQmay be defined as '(unsigned int) -1' in some architectures (arm, sh ...), and either may not be defined in some architectures which can enableSND_SOC_FSL_SSI(e.g. allmodconfig for arc).Applied, thanks.
Thank you too. :-)
Signature · 1 line
Chen Gang