Linux IIO development
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <ukleinek@debian.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-iio <linux-iio@vger.kernel.org>,
	Yves-Alexis Perez <corsac@debian.org>
Subject: Re: [PATCH] iio: humidity: dht11: Improve error reporting in .probe()
Date: Thu, 30 Jun 2022 12:14:49 +0200	[thread overview]
Message-ID: <1d4af147-46c3-010e-a9c5-e56044f3b624@debian.org> (raw)
In-Reply-To: <CAHp75VfCwQLApiQQq6FdjoXxdyArBW9e+kkXYsRDwxXT0c17dQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1233 bytes --]

On 6/30/22 09:17, Andy Shevchenko wrote:
> On Thu, Jun 30, 2022 at 8:58 AM Uwe Kleine-König <ukleinek@debian.org> wrote:
>>
>> Don't emit a message for -ENOMEM, the kernel is already loud enough in
>> this case. Add a message if getting the GPIO or registering the iio
>> device fails and use dev_err_probe for improved behaviour on
>> -EPROBE_DEFER.
> 
> Why do we need additional messages?

I don't understand the question. Do you really wonder why there is a 
benefit of an error message if a resource allocation in probe fails?

Current state is that for Yves-Alexis (on Cc:) the driver is silent but 
unbound. I guess that's because gpiod_get fails, but seeing a 
confirmation in the kernel log would be nice.

> They should be split in a separate patch, perhaps, with the explanation.
> 
> Actually the rest I would split to two: converting to dev_err_probe()
> in the case where it's not right now, and dropping ENOMEM message.

So we're at three patches:

  - drop ENOMEM message
  - convert existing messages to dev_err_probe()
  - introduce errors for devm_gpiod_get() and devm_iio_device_register()

I can rework accordingly, but for me this looks a bit over engineered.

Best regards
Uwe

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-06-30 10:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30  6:35 [PATCH] iio: humidity: dht11: Improve error reporting in .probe() Uwe Kleine-König
2022-06-30  7:17 ` Andy Shevchenko
2022-06-30 10:14   ` Uwe Kleine-König [this message]
2022-06-30 10:26     ` Andy Shevchenko
2022-06-30 14:15       ` Uwe Kleine-König
2022-07-16 16:51         ` Jonathan Cameron

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=1d4af147-46c3-010e-a9c5-e56044f3b624@debian.org \
    --to=ukleinek@debian.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=corsac@debian.org \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    /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