All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonio Borneo <antonio.borneo@foss.st.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Marc Zyngier <maz@kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <linux-stm32@st-md-mailman.stormreply.com>
Subject: Re: [PATCH] genirq: Don't return error on missing optional irq_request_resources()
Date: Mon, 4 Jul 2022 14:53:36 +0200	[thread overview]
Message-ID: <4a57677268ac356a006ee35f73ceacdf49ae4221.camel@foss.st.com> (raw)
In-Reply-To: <20220512160544.13561-1-antonio.borneo@foss.st.com>

On Thu, 2022-05-12 at 18:05 +0200, Antonio Borneo wrote:
> Function irq_chip::irq_request_resources() is reported as optional
> in the declaration of struct irq_chip.
> If the parent irq_chip does not implement it, we should ignore it
> and return.
> 
> Don't return error if the functions is missing.
> 
> Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com>
> ---
> 
> As follow-up of discussion in
> https://lore.kernel.org/lkml/875ymd6xdu.wl-maz@kernel.org/
> here is a proposal for changing the returned value.
> 
> A similar issue is present for the optional function
> irq_set_vcpu_affinity(), to be covered separately, if needed.

Gentle ping for this patch.
Does it match the expected behaviour for an optional function?

Thanks,
Antonio


> 
> ---
>  kernel/irq/chip.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
> index 54af0deb239b..eb921485930f 100644
> --- a/kernel/irq/chip.c
> +++ b/kernel/irq/chip.c
> @@ -1513,7 +1513,8 @@ int irq_chip_request_resources_parent(struct
> irq_data *data)
>         if (data->chip->irq_request_resources)
>                 return data->chip->irq_request_resources(data);
>  
> -       return -ENOSYS;
> +       /* no error on missing optional
> irq_chip::irq_request_resources */
> +       return 0;
>  }
>  EXPORT_SYMBOL_GPL(irq_chip_request_resources_parent);
>  
> 
> base-commit: c5eb0a61238dd6faf37f58c9ce61c9980aaffd7a


  reply	other threads:[~2022-07-04 12:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 16:05 [PATCH] genirq: Don't return error on missing optional irq_request_resources() Antonio Borneo
2022-07-04 12:53 ` Antonio Borneo [this message]
2022-07-07  8:15 ` [irqchip: irq/irqchip-next] " irqchip-bot for Antonio Borneo

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=4a57677268ac356a006ee35f73ceacdf49ae4221.camel@foss.st.com \
    --to=antonio.borneo@foss.st.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=maz@kernel.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.