mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Bui Duc Phuc <phucduc.bui@gmail.com>
Cc: Adrian Ng <adrianhoyin.ng@altera.com>,
	Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] gpio: realtek-otto: Handle errors from optional IRQ lookup
Date: Sun, 4 Oct 2026 11:20:13 +0300	[thread overview]
Message-ID: <asIMPd-Kat3Zo978@ashevche-desk.local> (raw)
In-Reply-To: <CAABR9nEmXm2UwOWHDR2=A_62LuFxjgN4En=8Jcn2r_on0XmROA@mail.gmail.com>

On Sun, Oct 04, 2026 at 08:08:18AM +0700, Bui Duc Phuc wrote:

...

> Thank you for pointing me to the discussion.

> > Have you read the discussion [1]?
> > It would be better to make platform_get_irq_optional() to be actually optional.
> >
> > [1]: https://lore.kernel.org/lkml/20220212201631.12648-1-s.shtylyov@omp.ru/
> 
> However, Regardless of how the API might be redesigned in the future
> to return 0
> or negative error codes, the fundamental requirement at the driver
> level remains
> the same: real errors must be propagated properly.
> 
> This patch isn't concerned with the API style discussion, but rather
> with ensuring
> that driver probe doesn't silently swallow genuine errors like ⁠-EPROBE_DEFER⁠.
> Proper error reporting is necessary under any reasonable API design.

Yes, but doing specific error handling is usually not a good idea as it adds
ambiguity. Like -EINVAL was used to check if the device property is present or
not at the time of trying to parse it. This was specifically clarified in the
documentation [2]. This is just an example of why the checking over a certain
error code is not good.

[2]: 70fa0c308aa2 ("device property: Document how to check for the property presence")

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2026-10-04  8:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14  4:30 phucduc.bui
2026-08-14  4:30 ` [PATCH 2/4] gpio: mlxbf3: " phucduc.bui
2026-08-14  4:30 ` [PATCH 3/4] gpio: mlxbf2: " phucduc.bui
2026-08-14  4:30 ` [PATCH 4/4] gpio: altera: " phucduc.bui
2026-09-01 15:55 ` [PATCH 1/4] gpio: realtek-otto: " Bartosz Golaszewski
2026-09-14 11:56 ` Linus Walleij
2026-09-28  9:57 ` Andy Shevchenko
2026-10-04  1:08   ` Bui Duc Phuc
2026-10-04  8:20     ` Andy Shevchenko [this message]

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=asIMPd-Kat3Zo978@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=adrianhoyin.ng@altera.com \
    --cc=brgl@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®