From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from intranet.asianux.com (intranet.asianux.com [58.214.24.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8D15D2C00AA for ; Mon, 23 Sep 2013 13:36:21 +1000 (EST) Message-ID: <523FB6F4.60803@asianux.com> Date: Mon, 23 Sep 2013 11:35:16 +0800 From: Chen Gang MIME-Version: 1.0 To: lgirdwood@gmail.com, Mark Brown , perex@perex.cz, Takashi Iwai Subject: Re: [PATCH] sound/soc/fsl/fsl_ssi.c: let checking none-zero instead of checking NO_IRQ References: <523FB47C.8010800@asianux.com> In-Reply-To: <523FB47C.8010800@asianux.com> Content-Type: text/plain; charset=ISO-8859-1 Cc: alsa-devel@alsa-project.org, "linuxppc-dev@lists.ozlabs.org" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 09/23/2013 11:24 AM, Chen Gang wrote: > 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. > Oh, sorry, the subject and comment are incorrect, need use "zero" instead of "none-zero". I will send patch v2 for it. > > Signed-off-by: Chen Gang > --- > sound/soc/fsl/fsl_ssi.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c > index 6ac8730..6c17d3e 100644 > --- a/sound/soc/fsl/fsl_ssi.c > +++ b/sound/soc/fsl/fsl_ssi.c > @@ -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; > } > -- Chen Gang