[PATCH v2 0/3] mmc: Handle errors from optional IRQ lookup

phucduc.bui@gmail.com posted 3 patches 1 month, 2 weeks ago
drivers/mmc/host/davinci_mmc.c  | 6 +++++-
drivers/mmc/host/meson-gx-mmc.c | 9 +++++++--
2 files changed, 12 insertions(+), 3 deletions(-)
[PATCH v2 0/3] mmc: Handle errors from optional IRQ lookup
Posted by phucduc.bui@gmail.com 1 month, 2 weeks ago
From: bui duc phuc <phucduc.bui@gmail.com>

Hi all,

This series improves error handling for optional IRQ lookups in several
MMC drivers.

I noticed that mmc: litex_mmc handles the return value from
platform_get_irq_optional() correctly, distinguishing the case where an
optional IRQ is not available from other errors. This series follows the
same approach in the affected drivers.

Changes in v2:
 - Use parse_fail for proper cleanup on IRQ lookup errors.
 - Initialize cd_irq to -ENXIO.

Best regards,
Phuc

bui duc phuc (3):
  mmc: meson-gx: Handle errors from optional IRQ lookup
  mmc: davinci: Handle errors from optional IRQ lookup
  mmc: davinci: Handle optional IRQ return value correctly

 drivers/mmc/host/davinci_mmc.c  | 6 +++++-
 drivers/mmc/host/meson-gx-mmc.c | 9 +++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

-- 
2.43.0
Re: [PATCH v2 0/3] mmc: Handle errors from optional IRQ lookup
Posted by Ulf Hansson 2 weeks, 6 days ago
On Thu, Aug 13, 2026 at 7:34 AM <phucduc.bui@gmail.com> wrote:
>
> From: bui duc phuc <phucduc.bui@gmail.com>
>
> Hi all,
>
> This series improves error handling for optional IRQ lookups in several
> MMC drivers.
>
> I noticed that mmc: litex_mmc handles the return value from
> platform_get_irq_optional() correctly, distinguishing the case where an
> optional IRQ is not available from other errors. This series follows the
> same approach in the affected drivers.

The series looks correct to me, but someone should really look into
improving/replacing the platform_get_irq_optional() API. Callers
should not have to check for specific error codes as that is just
prone to problems.

>
> Changes in v2:
>  - Use parse_fail for proper cleanup on IRQ lookup errors.
>  - Initialize cd_irq to -ENXIO.
>
> Best regards,
> Phuc
>
> bui duc phuc (3):
>   mmc: meson-gx: Handle errors from optional IRQ lookup
>   mmc: davinci: Handle errors from optional IRQ lookup
>   mmc: davinci: Handle optional IRQ return value correctly
>
>  drivers/mmc/host/davinci_mmc.c  | 6 +++++-
>  drivers/mmc/host/meson-gx-mmc.c | 9 +++++++--
>  2 files changed, 12 insertions(+), 3 deletions(-)
>
> --
> 2.43.0
>

Applied for next, thanks!

Kind regards
Uffe