Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Prashant Rahul" <prashantrahul23@gmail.com>,
	linux-iio@vger.kernel.org,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Petr Mladek" <pmladek@suse.com>,
	"Oleg Nesterov" <oleg@redhat.com>,
	"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
	"John Ogness" <john.ogness@linutronix.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/5] iio: adc: ti-adc161s626: log buffer setup failure in probe
Date: Thu, 25 Jun 2026 12:09:52 +0100	[thread overview]
Message-ID: <20260625120952.471ec21a@jic23-huawei> (raw)
In-Reply-To: <aju-_HSz6jNkR_NM@ashevche-desk.local>

On Wed, 24 Jun 2026 14:26:52 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Wed, Jun 24, 2026 at 03:43:44PM +0530, Prashant Rahul wrote:
> > On Wed Jun 24, 2026 at 1:06 AM IST, Jonathan Cameron wrote:  
> > > Why this particular one but not the devm_iio_device_register() below it?
> > > Both pretty much only fail on driver bugs.  Or out of memory for
> > > which dev_err_probe() doesn't print anything anyway (on basis that
> > > is normally pretty noisy).  
> > 
> > My apologies, I wasnt aware that dev_err_probe simply ignores `-ENOMEM`.
> > Looking at drivers/base/core.c:5096, it is pretty evident that it does.
> > 
> > My goal with the patch series was to change dev_err into dev_err_probe,
> > as my understanding of dev_err_probe was that it's a specialization of
> > dev_err for probe contexts.  
> 
> Jonathan, actually the triggered buffer setup might return not -ENOMEM error
> code for the surprise. After all this series does add not a dead code, but
> a quite rare to be used one.
> 
> https://elixir.bootlin.com/linux/v7.1.1/source/drivers/iio/buffer/industrialio-triggered-buffer.c#L57
> 
> 

Agreed and I'm not even sure why that is there (lost to the mists of time
/ my failing memory ;)  However I think it's an obvious driver bug case
that should be trivial to see in basic tests so to me it's marginal on
whether a print on these is useful.

Maybe given that one is so rare we should just add a print in the core?
I'm not particularly keen on mass patches to print errors from the core
code but this one is perhaps a reasonable trade off vs series like this
one adding prints to drivers for something we don't think realistically
ever happens.

Jonathan
 

  reply	other threads:[~2026-06-25 11:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-20 17:40 [PATCH v2 0/5] Using dev_err_probe as it simplifies error handling and ensures consistent error reporting Prashant Rahul
2026-06-20 17:40 ` [PATCH v2 1/5] iio: adc: ti-adc081c: use dev_err_probe for probe time error Prashant Rahul
2026-06-20 17:40 ` [PATCH v2 2/5] iio: adc: ti-adc084s021: " Prashant Rahul
2026-06-23 10:37   ` Andy Shevchenko
2026-06-20 17:40 ` [PATCH v2 3/5] iio: adc: ti-adc108s102: log buffer setup failure in probe Prashant Rahul
2026-06-20 17:40 ` [PATCH v2 4/5] iio: adc: ti-adc161s626: " Prashant Rahul
2026-06-23 19:36   ` Jonathan Cameron
2026-06-23 19:55     ` Andy Shevchenko
2026-06-24 10:13     ` Prashant Rahul
2026-06-24 11:26       ` Andy Shevchenko
2026-06-25 11:09         ` Jonathan Cameron [this message]
2026-06-25 14:03           ` Andy Shevchenko
2026-07-03  0:39             ` Jonathan Cameron
2026-07-04 15:50               ` Prashant Rahul
2026-07-04 17:00                 ` Andy Shevchenko
2026-07-04 17:28                   ` Prashant Rahul
2026-07-04 18:57                     ` Andy Shevchenko
2026-07-16 10:43                       ` Prashant Rahul
2026-06-20 17:40 ` [PATCH v2 5/5] iio: adc: ti-adc0832: " Prashant Rahul
2026-06-23 10:39   ` Andy Shevchenko
2026-06-23 10:35 ` [PATCH v2 0/5] Using dev_err_probe as it simplifies error handling and ensures consistent error reporting Andy Shevchenko

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=20260625120952.471ec21a@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=dlechner@baylibre.com \
    --cc=john.ogness@linutronix.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=oleg@redhat.com \
    --cc=pmladek@suse.com \
    --cc=prashantrahul23@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