public inbox for linux-arm-msm@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Masney <bmasney@redhat.com>
To: Gabriele Paoloni <gpaoloni@redhat.com>
Cc: mani@kernel.org, jassisinghbrar@gmail.com,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	mpapini@redhat.com, dnita@qti.qualcomm.com,
	rballati@qti.qualcomm.com, bijothom@qti.qualcomm.com,
	wchadwic@redhat.com
Subject: Re: [PATCH 2/2] mailbox: qcom-ipcc: amend qcom_ipcc_irq_fn() to report errors
Date: Mon, 16 Mar 2026 07:05:36 -0400	[thread overview]
Message-ID: <abfkAFIheKCuLRKk@redhat.com> (raw)
In-Reply-To: <20260316102618.7953-3-gpaoloni@redhat.com>

On Mon, Mar 16, 2026 at 11:26:18AM +0100, Gabriele Paoloni wrote:
> check the virq value returned by irq_find_mapping(), also
> check the return value of generic_handle_irq(); return IRQ_NONE
> if either of the checks fails.
> 
> Signed-off-by: Gabriele Paoloni <gpaoloni@redhat.com>
> ---
>  drivers/mailbox/qcom-ipcc.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mailbox/qcom-ipcc.c b/drivers/mailbox/qcom-ipcc.c
> index c23efaaa64a1..0795184591f0 100644
> --- a/drivers/mailbox/qcom-ipcc.c
> +++ b/drivers/mailbox/qcom-ipcc.c
> @@ -75,7 +75,7 @@ static irqreturn_t qcom_ipcc_irq_fn(int irq, void *data)
>  {
>  	struct qcom_ipcc *ipcc = data;
>  	u32 hwirq;
> -	int virq;
> +	int virq, ret;

Put variables in reverse Christmas tree order.

Brian


>  
>  	for (;;) {
>  		hwirq = readl(ipcc->base + IPCC_REG_RECV_ID);
> @@ -83,8 +83,14 @@ static irqreturn_t qcom_ipcc_irq_fn(int irq, void *data)
>  			break;
>  
>  		virq = irq_find_mapping(ipcc->irq_domain, hwirq);
> +		if (unlikely(!virq))
> +			return IRQ_NONE;
> +
>  		writel(hwirq, ipcc->base + IPCC_REG_RECV_SIGNAL_CLEAR);
> -		generic_handle_irq(virq);
> +
> +		ret = generic_handle_irq(virq);
> +		if (unlikely(ret))
> +			return IRQ_NONE;
>  	}
>  
>  	return IRQ_HANDLED;
> -- 
> 2.48.1
> 


  reply	other threads:[~2026-03-16 11:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 10:26 [PATCH 0/2] mailbox: qcom-ipcc: fix error reporting paths Gabriele Paoloni
2026-03-16 10:26 ` [PATCH 1/2] mailbox: qcom-ipcc: amend qcom_ipcc_domain_map() to report errors Gabriele Paoloni
2026-03-16 11:04   ` Brian Masney
2026-03-20 11:30     ` Gabriele Paoloni
2026-03-16 10:26 ` [PATCH 2/2] mailbox: qcom-ipcc: amend qcom_ipcc_irq_fn() " Gabriele Paoloni
2026-03-16 11:05   ` Brian Masney [this message]
2026-03-20 11:25     ` Gabriele Paoloni
2026-03-17  9:13   ` Konrad Dybcio
2026-03-20 11:24     ` Gabriele Paoloni
2026-03-23 16:26       ` Konrad Dybcio

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=abfkAFIheKCuLRKk@redhat.com \
    --to=bmasney@redhat.com \
    --cc=bijothom@qti.qualcomm.com \
    --cc=dnita@qti.qualcomm.com \
    --cc=gpaoloni@redhat.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=mpapini@redhat.com \
    --cc=rballati@qti.qualcomm.com \
    --cc=wchadwic@redhat.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