All of lore.kernel.org
 help / color / mirror / Atom feed
From: Corey Minyard <corey@minyard.net>
To: Bui Duc Phuc <phucduc.bui@gmail.com>
Cc: openipmi-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] ipmi: bt-bmc: Handle -ENXIO from optional IRQ lookup
Date: Mon, 17 Aug 2026 12:35:09 -0500	[thread overview]
Message-ID: <aoNGTezyKumgo6f-@mail.minyard.net> (raw)
In-Reply-To: <CAABR9nEOdKR-NXKzAe9y+0zAhuzAQmMaUH5i20SC443PTXdVqw@mail.gmail.com>

On Mon, Aug 17, 2026 at 09:28:50PM +0700, Bui Duc Phuc wrote:
> On Mon, Aug 17, 2026 at 6:40 PM Corey Minyard <corey@minyard.net> wrote:
> >
> > On Mon, Aug 17, 2026 at 05:50:39PM +0700, phucduc.bui@gmail.com wrote:
> > > From: bui duc phuc <phucduc.bui@gmail.com>
> > >
> > > platform_get_irq_optional() can return -ENXIO when no IRQ resource is
> > > available, as well as other negative error codes.
> > >
> > > The probe path supports running without an IRQ by falling back to
> > > the timer. Treat -ENXIO as the no-IRQ case while propagating other
> > > errors to the caller.
> >
> > This is obviously wrong, it will pass -ENXIO into devm_request_irq()
> > if returned.
> >
> 
> 
> No. This is addressed in the following patch:
> [PATCH 3/4] ipmi: bt-bmc: Request IRQ only when available
> 
> https://lore.kernel.org/all/20260817105041.63224-3-phucduc.bui@gmail.com/
> 
> Please take a look at the subsequent patches in the series as well.

You cannot add patches that introduce bugs then fix them later.
Occassionally it might be necessary, but it should be avoided if
possible, and it's certainly possible here.

And as I said earlier, this function should return an error/interrupt,
not set the value inside the function.  The function has issues,
and you are right to work on it, but it needs to be consistent with
everything else in the kernel.

This would also be better as a single patch.  There's no reason to split
it up to this fine a level of detail, it makes it hard to follow.

And it must work if no interrupt is available for any reason.

-corey

> 
> Best regards,
> Phuc

  reply	other threads:[~2026-08-17 17:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17 10:50 [PATCH 1/4] ipmi: bt-bmc: Propagate errors from IRQ configuration phucduc.bui
2026-08-17 10:50 ` [PATCH 2/4] ipmi: bt-bmc: Handle -ENXIO from optional IRQ lookup phucduc.bui
2026-08-17 11:40   ` Corey Minyard
2026-08-17 14:28     ` Bui Duc Phuc
2026-08-17 17:35       ` Corey Minyard [this message]
2026-08-17 10:50 ` [PATCH 3/4] ipmi: bt-bmc: Request IRQ only when available phucduc.bui
2026-08-17 10:50 ` [PATCH 4/4] ipmi: bt-bmc: Check IRQ number correctly phucduc.bui
2026-08-17 11:37 ` [PATCH 1/4] ipmi: bt-bmc: Propagate errors from IRQ configuration Corey Minyard
2026-08-17 14:22   ` Bui Duc Phuc

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=aoNGTezyKumgo6f-@mail.minyard.net \
    --to=corey@minyard.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    --cc=phucduc.bui@gmail.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 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.