All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "Lars-Peter Clausen" <lars@metafoo.de>,
	"Cai Huoqing" <cai.huoqing@linux.dev>,
	"Alexandru Ardelean" <ardeleanalex@gmail.com>,
	linux-iio@vger.kernel.org,
	"Mauro Carvalho Chehab" <mchehab+huawei@kernel.org>,
	"Andy Shevchenko" <andy.shevchenko@gmail.com>,
	"Gwendal Grignou" <gwendal@chromium.org>,
	"Matt Ranostay" <matt.ranostay@konsulko.com>,
	"Paul Cercueil" <paul@crapouillou.net>,
	"Nuno Sá" <nuno.sa@analog.com>,
	kernel@pengutronix.de
Subject: [PATCH 0/8] iio: Improve error reporting for problems during .remove for various i2c drivers
Date: Sun, 15 May 2022 17:59:21 +0200	[thread overview]
Message-ID: <20220515155929.338656-1-u.kleine-koenig@pengutronix.de> (raw)

Hello,

the goal of this series is to improve the error messages emitted by
remove callbacks by several i2c drivers. The status quo is that these
might return an error code silently to the i2c core on remove. The
effect is a very unhelpful message:

	$bus $device: remove failed (EIO), will be ignored

. Note there is no further error handling and the device will be
removed, all devm cleanups are called.

With the patches from this series applied the emitted message better
tells what actually failed and the remove callback returns zero
unconditionally.

The motivation for this change is to make i2c remove callbacks return
void. The ability to return a value is misleading as driver authors
might expect some kind of error handling from the i2c core.

Best regards
Uwe

Uwe Kleine-König (8):
  iio:adc:ina2xx: Improve error reporting for problems during .remove()
  iio:adc:ti-ads1015: Improve error reporting for problems during
    .remove()
  iio:chemical:atlas: Improve error reporting for problems during
    .remove()
  iio:chemical:ccs811: Improve error reporting for problems during
    .remove()
  iio:light:pa12203001: Improve error reporting for problems during
    .remove()
  iio:light:us5182d: Improve error reporting for problems during
    .remove()
  iio:light:vcnl4000: Improve error reporting for problems during
    .remove()
  iio:light:vcnl4035: Improve error reporting for problems during
    .remove()

 drivers/iio/adc/ina2xx-adc.c        | 10 ++++++++--
 drivers/iio/adc/ti-ads1015.c        |  8 +++++++-
 drivers/iio/chemical/atlas-sensor.c |  8 +++++++-
 drivers/iio/chemical/ccs811.c       | 10 ++++++++--
 drivers/iio/light/pa12203001.c      |  8 +++++++-
 drivers/iio/light/us5182d.c         |  8 +++++++-
 drivers/iio/light/vcnl4000.c        |  8 +++++++-
 drivers/iio/light/vcnl4035.c        | 10 ++++++++--
 8 files changed, 59 insertions(+), 11 deletions(-)


base-commit: 3123109284176b1532874591f7c81f3837bbdc17
-- 
2.35.1


             reply	other threads:[~2022-05-15 16:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-15 15:59 Uwe Kleine-König [this message]
2022-05-15 15:59 ` [PATCH 1/8] iio:adc:ina2xx: Improve error reporting for problems during .remove() Uwe Kleine-König
2022-05-15 15:59 ` [PATCH 2/8] iio:adc:ti-ads1015: " Uwe Kleine-König
2022-05-15 15:59 ` [PATCH 3/8] iio:chemical:atlas: " Uwe Kleine-König
2022-05-15 15:59 ` [PATCH 4/8] iio:chemical:ccs811: " Uwe Kleine-König
2022-05-15 15:59 ` [PATCH 5/8] iio:light:pa12203001: " Uwe Kleine-König
2022-05-15 15:59 ` [PATCH 6/8] iio:light:us5182d: " Uwe Kleine-König
2022-05-15 15:59 ` [PATCH 7/8] iio:light:vcnl4000: " Uwe Kleine-König
2022-05-15 15:59 ` [PATCH 8/8] iio:light:vcnl4035: " Uwe Kleine-König
2022-05-15 17:05 ` [PATCH 0/8] iio: Improve error reporting for problems during .remove for various i2c drivers Jonathan Cameron
2022-05-22 10:52   ` 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=20220515155929.338656-1-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=andy.shevchenko@gmail.com \
    --cc=ardeleanalex@gmail.com \
    --cc=cai.huoqing@linux.dev \
    --cc=gwendal@chromium.org \
    --cc=jic23@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=matt.ranostay@konsulko.com \
    --cc=mchehab+huawei@kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=paul@crapouillou.net \
    /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.