From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CAC9C43334 for ; Tue, 5 Jul 2022 10:37:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231310AbiGEKhP (ORCPT ); Tue, 5 Jul 2022 06:37:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231680AbiGEKhO (ORCPT ); Tue, 5 Jul 2022 06:37:14 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 017C8AE5A for ; Tue, 5 Jul 2022 03:37:10 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8fuq-0001LC-19; Tue, 05 Jul 2022 12:36:24 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1o8fue-004XxA-J7; Tue, 05 Jul 2022 12:36:16 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1o8fuh-0038F6-8t; Tue, 05 Jul 2022 12:36:15 +0200 Date: Tue, 5 Jul 2022 12:36:15 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Jean Delvare Cc: Wolfram Sang , Guenter Roeck , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, openipmi-developer@lists.sourceforge.net, linux-integrity@vger.kernel.org, linux-clk@vger.kernel.org, linux-crypto@vger.kernel.org, linux-gpio@vger.kernel.org, dri-devel@lists.freedesktop.org, chrome-platform@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-input@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-iio@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-leds@vger.kernel.org, linux-media@vger.kernel.org, patches@opensource.cirrus.com, alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, platform-driver-x86@vger.kernel.org, acpi4asus-user@lists.sourceforge.net, linux-pm@vger.kernel.org, linux-pwm@vger.kernel.org, linux-rtc@vger.kernel.org, linux-staging@lists.linux.dev, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-watchdog@vger.kernel.org, kasan-dev@googlegroups.com, linux-mediatek@lists.infradead.org Subject: Re: [PATCH 6/6] i2c: Make remove callback return void Message-ID: <20220705103615.ceeq7rku53x743ps@pengutronix.de> References: <20220628140313.74984-1-u.kleine-koenig@pengutronix.de> <20220628140313.74984-7-u.kleine-koenig@pengutronix.de> <20220705120852.049dc235@endymion.delvare> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gut2agzhpaayxotv" Content-Disposition: inline In-Reply-To: <20220705120852.049dc235@endymion.delvare> X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-iio@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org --gut2agzhpaayxotv Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 05, 2022 at 12:08:52PM +0200, Jean Delvare wrote: > On Tue, 28 Jun 2022 16:03:12 +0200, Uwe Kleine-K=F6nig wrote: > > From: Uwe Kleine-K=F6nig > >=20 > > The value returned by an i2c driver's remove function is mostly ignored. > > (Only an error message is printed if the value is non-zero that the > > error is ignored.) > >=20 > > So change the prototype of the remove function to return no value. This > > way driver authors are not tempted to assume that passing an error to > > the upper layer is a good idea. All drivers are adapted accordingly. > > There is no intended change of behaviour, all callbacks were prepared to > > return 0 before. > >=20 > > Signed-off-by: Uwe Kleine-K=F6nig > > --- >=20 > That's a huge change for a relatively small benefit, but if this is > approved by the I2C core maintainer then fine with me. For: Agreed, it's huge. The benefit isn't really measureable, the motivation is to improve the situation for driver authors who with the change cannot make wrong assumptions about what to return in .remove(). During the preparation this uncovered a few bugs. See for example bbc126ae381cf0a27822c1f822d0aeed74cc40d9. > > drivers/hwmon/adc128d818.c | 4 +--- > > drivers/hwmon/adt7470.c | 3 +-- > > drivers/hwmon/asb100.c | 6 ++---- > > drivers/hwmon/asc7621.c | 4 +--- > > drivers/hwmon/dme1737.c | 4 +--- > > drivers/hwmon/f75375s.c | 5 ++--- > > drivers/hwmon/fschmd.c | 6 ++---- > > drivers/hwmon/ftsteutates.c | 3 +-- > > drivers/hwmon/ina209.c | 4 +--- > > drivers/hwmon/ina3221.c | 4 +--- > > drivers/hwmon/jc42.c | 3 +-- > > drivers/hwmon/mcp3021.c | 4 +--- > > drivers/hwmon/occ/p8_i2c.c | 4 +--- > > drivers/hwmon/pcf8591.c | 3 +-- > > drivers/hwmon/smm665.c | 3 +-- > > drivers/hwmon/tps23861.c | 4 +--- > > drivers/hwmon/w83781d.c | 4 +--- > > drivers/hwmon/w83791d.c | 6 ++---- > > drivers/hwmon/w83792d.c | 6 ++---- > > drivers/hwmon/w83793.c | 6 ++---- > > drivers/hwmon/w83795.c | 4 +--- > > drivers/hwmon/w83l785ts.c | 6 ++---- > > drivers/i2c/i2c-core-base.c | 6 +----- > > drivers/i2c/i2c-slave-eeprom.c | 4 +--- > > drivers/i2c/i2c-slave-testunit.c | 3 +-- > > drivers/i2c/i2c-smbus.c | 3 +-- > > drivers/i2c/muxes/i2c-mux-ltc4306.c | 4 +--- > > drivers/i2c/muxes/i2c-mux-pca9541.c | 3 +-- > > drivers/i2c/muxes/i2c-mux-pca954x.c | 3 +-- >=20 > Reviewed-by: Jean Delvare Thanks Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --gut2agzhpaayxotv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmLEFBwACgkQwfwUeK3K 7AkavggAgLmynakXX/rOF4Jwy2OuBXH29kecKqPd6xj4yHsu3ggy8kd/hlU4jJib vV0H9ioq69hhMqjme5AHJJsueLFi/t/iwuQwuWUKluCBBlx0RXBsVx8qxV7A0uWa mdKU3ApPaN7y0cS1jccdN7ydsL3H2ayzIwfQuNqx1G3P/uqXfkusV0fjwQ/rQct3 qs4t2/QiHUd0tStlGw2eSKxp1z5KRrDMstK17fiZSsw/SYoMyldV8Ame6+gaxx0X e93FqM5jj67ovjD3jJanfOwI5vesu4+szu4GK6vHRWvpsieHsSeyS+GNgfM5oLA7 iguZ0rauzy0je3hrHuKgp1maJ59ibQ== =fYiS -----END PGP SIGNATURE----- --gut2agzhpaayxotv--