Re: [PATCH 1/2] mailbox: qcom-ipcc: amend qcom_ipcc_domain_map() to report errors
From: Brian Masney
Date: Mon Mar 16 2026 - 07:05:38 EST
On Mon, Mar 16, 2026 at 11:26:17AM +0100, Gabriele Paoloni wrote:
> Currently qcom_ipcc_domain_map() ignores errors returned by
> irq_set_chip_data() and invokes irq_set_chip_and_handler()
> that in turn ignores errors returned by irq_set_chip().
> This patch fixes both issues; no other functional changes
> are implemented.
>
> Signed-off-by: Gabriele Paoloni <gpaoloni@xxxxxxxxxx>
> ---
> drivers/mailbox/qcom-ipcc.c | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mailbox/qcom-ipcc.c b/drivers/mailbox/qcom-ipcc.c
> index d957d989c0ce..c23efaaa64a1 100644
> --- a/drivers/mailbox/qcom-ipcc.c
> +++ b/drivers/mailbox/qcom-ipcc.c
> @@ -116,12 +116,20 @@ static struct irq_chip qcom_ipcc_irq_chip = {
> static int qcom_ipcc_domain_map(struct irq_domain *d, unsigned int irq,
> irq_hw_number_t hw)
> {
> + int ret;
> struct qcom_ipcc *ipcc = d->host_data;
Put variables in reverse Christmas tree order.
>
> - irq_set_chip_and_handler(irq, &qcom_ipcc_irq_chip, handle_level_irq);
Should irq_set_chip_and_handler() and irq_set_chip_and_handler_name() be
updated to return an int to reduce boiler plate code?
> - irq_set_chip_data(irq, ipcc);
> - irq_set_noprobe(irq);
> + ret = irq_set_chip(irq, &qcom_ipcc_irq_chip);
> + if (ret)
> + return ret;
> +
> + irq_set_handler(irq, handle_level_irq);
>
> + ret = irq_set_chip_data(irq, ipcc);
> + if (ret)
> + return ret;
> +
> + irq_set_noprobe(irq);
> return 0;
The newline before the return 0 is removed. That should also remove the
irq_set_noprobe() change from the diffstat.
Brian