[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YaUJ2EfU6kYFfjWn@sirena.org.uk>
Date: Mon, 29 Nov 2021 17:11:52 +0000
From: Mark Brown <broonie@...nel.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Cc: Tang Bin <tangbin@...s.chinamobile.com>, cezary.rojewski@...el.com,
liam.r.girdwood@...ux.intel.com, yang.jie@...ux.intel.com,
perex@...ex.cz, tiwai@...e.com,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: Intel: atom: Remove redundant check to simplify
the code
On Mon, Nov 29, 2021 at 10:22:41AM -0600, Pierre-Louis Bossart wrote:
> On 11/25/21 1:50 AM, Tang Bin wrote:
> > In the function sst_platform_get_resources(), if platform_get_irq()
> > failed, the return should not be zero, as the example in
> > platform.c is
> > * int irq = platform_get_irq(pdev, 0)
> > * if (irq < 0)
> > * return irq;
> > So remove the redundant check to simplify the code.
> Humm, it's a bit of a gray area.
> the comments for platform_get_irq and platform_get_irq_optional say:
> * Return: non-zero IRQ number on success, negative error number on failure.
> but if you look at platform_get_irq_optional, there are two references
> to zero being a possible return value:
Zero is (or was, people were working on changing it partly due to
confusion and partly due to moving to newer infrastructure which
doesn't use it) a valid IRQ on some architectures. x86 wasn't one of
those though, at least AFAIR.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists