Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: Simon Trimmer <simont@opensource.cirrus.com>,
	'Mark Brown' <broonie@kernel.org>
Cc: <linux-sound@vger.kernel.org>, <alsa-devel@alsa-project.org>,
	<linux-kernel@vger.kernel.org>, <patches@opensource.cirrus.com>
Subject: Re: [PATCH] ASoC: cs35l56: Accept values greater than 0 as IRQ numbers
Date: Mon, 17 Jun 2024 15:54:04 +0100	[thread overview]
Message-ID: <f04958f0-b9e9-4f80-8a83-af9740fa83a0@opensource.cirrus.com> (raw)
In-Reply-To: <007b01dac0c5$7807ac30$68170490$@opensource.cirrus.com>

On 17/06/2024 15:48, Simon Trimmer wrote:
>> From: Richard Fitzgerald <rf@opensource.cirrus.com>
>> Sent: Monday, June 17, 2024 3:34 PM
>> On 17/06/2024 15:04, Mark Brown wrote:
>>> On Mon, Jun 17, 2024 at 02:53:38PM +0100, Simon Trimmer wrote:
>>>> IRQ lookup functions such as those in ACPI can return error values when
>>>> an IRQ is not defined. The i2c core driver converts the error codes to
> a
>>>> value of 0 and the SPI bus driver passes them unaltered to client
> device
>>>> drivers.
>>>>
>>>> The cs35l56 driver should only accept positive non-zero values as IRQ
>>>> numbers.
>>>
>>> Have all architectures removed 0 as a valid IRQ?
>>
>>   From discussion threads we can find 0 might still used on x86 for a
>> legacy device.
>> But the conversations we can find on this don't seem to exclude passing
>> a negative error number, just that 0 can normally be assumed invalid.
>>
>> The kerneldoc for SPI says:
>>
>>    * @irq: Negative, or the number passed to request_irq() to receive
>>    *	interrupts from this device.
> 
> Yes and the threads of these lore links in these commits are rather feisty
> 
> ce753ad1549c platform: finally disallow IRQ0 in platform_get_irq() and its
> ilk
> a85a6c86c25b driver core: platform: Clarify that IRQ 0 is invalid
> 
> 
So 0 is invalid. Question is: is it also valid to pass -ve errors, or is
0 the _only_ invalid value?

  reply	other threads:[~2024-06-17 14:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17 13:53 [PATCH] ASoC: cs35l56: Accept values greater than 0 as IRQ numbers Simon Trimmer
2024-06-17 14:04 ` Mark Brown
2024-06-17 14:33   ` Richard Fitzgerald
2024-06-17 14:48     ` Simon Trimmer
2024-06-17 14:54       ` Richard Fitzgerald [this message]
2024-06-18 16:00         ` Mark Brown
2024-06-18 16:06           ` Richard Fitzgerald
2024-06-18 15:58     ` Mark Brown
2024-06-18 16:07       ` Richard Fitzgerald
2024-06-19  9:44 ` Richard Fitzgerald
2024-06-19 10:22   ` Mark Brown
2024-06-19 10:24     ` Richard Fitzgerald
2024-06-19 11:48       ` Mark Brown
2024-06-19 13:50 ` Mark Brown

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=f04958f0-b9e9-4f80-8a83-af9740fa83a0@opensource.cirrus.com \
    --to=rf@opensource.cirrus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=simont@opensource.cirrus.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox