Re: [PATCH 2/2] mailbox: qcom-ipcc: amend qcom_ipcc_irq_fn() to report errors

From: Konrad Dybcio

Date: Mon Mar 23 2026 - 13:19:06 EST


On 3/20/26 12:24 PM, Gabriele Paoloni wrote:
> Hi Konrad
>
> On Tue, Mar 17, 2026 at 10:13 AM Konrad Dybcio
> <konrad.dybcio@xxxxxxxxxxxxxxxx> wrote:
>>
>> On 3/16/26 11:26 AM, 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@xxxxxxxxxx>
>>> ---
>>
>> It certainly seems useful to inspect a function's return value, however I
>> noticed that out of 47 in-tree callers of generic_handle_irq() within
>> drivers/, only one other driver (intel_lpe_audio within drm/i915) checks
>> that..
>>
>> Similarly, many other drivers never check if irq_find_mapping() actually
>> succeeded. This makes me wonder how you discovered there's an issue in
>> the first place. Could you please add some details in the commit message?
>
> Code inspection spotted the issue, and I could not find a justification for
> irq_find_mapping() and generic_handle_irq() to always succeed; hence
> I proposed this patch to follow good coding practices.

That's a good enough reason

Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>

Konrad