linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: "Wolfram Sang" <wsa@kernel.org>,
	"Johannes Holland" <johannes.holland@infineon.com>,
	"Amir Mizinski" <amirmizi6@gmail.com>,
	"Alexander Steffen" <Alexander.Steffen@infineon.com>,
	"Jarkko Sakkinen" <jarkko@kernel.org>,
	"Christopher Vollo" <chris@renewoutreach.org>,
	"Robert Foss" <robert.foss@linaro.org>,
	"Jagan Teki" <jagan@amarulasolutions.com>,
	"Krzysztof Hałasa" <khalasa@piap.pl>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Cosmin Tanislav" <cosmin.tanislav@analog.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Heikki Krogerus" <heikki.krogerus@linux.intel.com>,
	"Xin Ji" <xji@analogixsemi.com>,
	"Fabrice Gasnier" <fabrice.gasnier@foss.st.com>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Jonathan Cameron" <Jonathan.Cameron@huawei.com>
Cc: linux-integrity@vger.kernel.org, linux-i2c@vger.kernel.org,
	kernel@pengutronix.de, Andrey Ryabinin <ryabinin.a.a@gmail.com>,
	Matt Johnston <matt@codeconstruct.com.au>
Subject: Re: [PATCH 0/6] i2c: Make remove callback return void
Date: Thu, 11 Aug 2022 14:40:29 +0200	[thread overview]
Message-ID: <20220811124029.usxahk5nvfgqsm42@pengutronix.de> (raw)
In-Reply-To: <20220716151527.u5vh4lz6ubpqq2tv@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 8173 bytes --]

Hello,

just a heads up a few days before I expect -rc1 to be tagged when I will
send the next version of the remove prototype conversion with the goal
to get this into next soon.

For those who are new to this thread: The series discussed here probably
conflicts with one of the patches recently merged into the mainline.
There is no action expected from your side, but you might have a look at
my series.

On Sat, Jul 16, 2022 at 05:15:27PM +0200, Uwe Kleine-König wrote:
> On Mon, Jul 04, 2022 at 10:39:47AM +0200, Uwe Kleine-König wrote:
> > On Tue, Jun 28, 2022 at 04:03:06PM +0200, Uwe Kleine-König wrote:
> > > as announced in
> > > https://lore.kernel.org/linux-i2c/20220609091018.q52fhowlsdbdkct5@pengutronix.de
> > > I intend to change the remove prototype for i2c drivers to remove void.
> > > 
> > > As this touches quite some drivers, the plan is to submit this change
> > > for inclusion after the next merge window and get it quickly into next
> > > that other subsystems have enough time to adapt.
> > > 
> > > Still to give the opportunity to comment I send the patch set out based
> > > on v5.19-rc4. There are still a few patches in next that are required,
> > > namely:
> > > 
> > > 	d04d46dd82ad iio:magnetometer:mbc150: Make bmc150_magn_remove() return void
> > > 	7576bc05b360 iio:light:vcnl4035: Improve error reporting for problems during .remove()
> > > 	ab91da2f2574 iio:light:vcnl4000: Improve error reporting for problems during .remove()
> > > 	5049646718d7 iio:light:us5182d: Improve error reporting for problems during .remove()
> > > 	be9f6004be88 iio:light:pa12203001: Improve error reporting for problems during .remove()
> > > 	730cd2f54eba iio:chemical:ccs811: Improve error reporting for problems during .remove()
> > > 	a76209246d9f iio:chemical:atlas: Improve error reporting for problems during .remove()
> > > 	8f760ce7affd iio:adc:ti-ads1015: Improve error reporting for problems during .remove()
> > > 	ffa952e95d8c iio:adc:ina2xx: Improve error reporting for problems during .remove()
> > > 	48d1ae774099 iio: health: afe4404: Remove duplicated error reporting in .remove()
> > > 	8dc0a72795e4 iio:light:tsl2583: Remove duplicated error reporting in .remove()
> > > 	58a6df5580bb iio:light:stk3310: Remove duplicated error reporting in .remove()
> > > 	44ceb791182a iio:light:opt3001: Remove duplicated error reporting in .remove()
> > > 	f0e34d262567 iio:light:jsa1212: Remove duplicated error reporting in .remove()
> > > 	8d3d6baa4990 iio:light:isl29028: Remove duplicated error reporting in .remove()
> > > 	5004e24a466c iio:light:bh1780: Remove duplicated error reporting in .remove()
> > > 	1db6926d611d iio:accel:stk8ba50: Remove duplicated error reporting in .remove()
> > > 	1aec857d50ce iio:accel:stk8312: Remove duplicated error reporting in .remove()
> > > 	aae59bdf2585 iio:accel:mc3230: Remove duplicated error reporting in .remove()
> > > 	7df7563b16aa crypto: atmel-ecc - Remove duplicated error reporting in .remove()
> > > 	99ad11e06be8 i2c: dummy: Drop no-op remove function
> > > 	84965cc60e64 ASoC: cs35l45: Make cs35l45_remove() return void
> > > 	fb68cb963bb7 ASoC: da732x: Drop no-op remove function
> > > 	3cce931a5e44 ASoC: lm49453: Drop no-op remove function
> > > 	8a291eebeb63 ASoC: da7219: Drop no-op remove function
> > > 	60391d788a22 ASoC: ak4642: Drop no-op remove function
> > > 	51bd0abd873d extcon: fsa9480: Drop no-op remove function
> > >
> > > I hope and assume they will all be included in v5.20-rc1.

These are all in Linus' tree now.

> > > There are 5 more patches required that didn't made it into next
> > > yet (i.e. patches #1 - #5 of this series).

This didn't change. These are still not in next so I will most probabaly
include them in the next round. Good news is that no new drivers needed
a preparing adaption.

I pushed the current version of the series to

	https://git.pengutronix.de/git/ukl/linux i2c-remove-void

based on current Linus' master
(ffcf9c5700e49c0aee42dcba9a12ba21338e8136). Build tests are running, I
don't expect surprises (and will silently update above tree if
necessary.)

Looking at the range-diff since I submitted v1, the following happend
since then:

 - Several acks and Reviewed-by's added

 - A few drivers don't need adaption any more because they were removed
   or their remove callback war dropped:
    - arch/arm/mach-davinci/board-dm644x-evm.c (dropped in 7dd33764486d)
    - arch/arm/mach-davinci/board-dm646x-evm.c (dropped in b4aed01de486)
    - drivers/gpu/drm/bridge/parade-ps8640.c (.remove dropped in 10e619f1f31c)
    - drivers/hwmon/mcp3021.c (.remove dropped in 03508eea5385)
    - drivers/iio/accel/bma400_i2c.c (.remove dropped in 12c99f859fd3)
    - drivers/leds/leds-is31fl319x.c (.remove dropped in e1af5c815586)
    - sound/soc/codecs/nau8821.c (.remove dropped in 2d86cef353b8)

 - A few new drivers:
    - drivers/char/tpm/tpm_tis_i2c.c (bbc23a07b072)
    - drivers/gpu/drm/bridge/ti-dlpc3433.c (6352cd451ddb)
    - drivers/media/i2c/ar0521.c (852b50aeed15)
    - drivers/tty/serial/max310x.c (Added i2c support, 2e1f2d9a9bdb)
    - drivers/usb/typec/anx7411.c (fe6d8a9c8e64)
    - drivers/usb/typec/ucsi/ucsi_stm32g0.c (72849d4fcee7)

 - A few changes due to (mostly trivial) conflicts with upstream changes
    - drivers/gpu/drm/bridge/ti-sn65dsi83.c (fc8adb13d844)
    - drivers/iio/adc/ad799x.c (078d37b73f05)
    - drivers/iio/gyro/itg3200_core.c (fa55750642d0)
    - drivers/iio/light/bh1750.c (7eff2dcec69c)
    - drivers/iio/light/gp2ap002.c (7b79cda9e297)
    - drivers/iio/light/tsl2563.c (76faa32077b0)
    - drivers/iio/light/us5182d.c (a79163d19ef7)
    - drivers/iio/light/vcnl4000.c (cd4d10b134c2)
    - drivers/iio/light/vcnl4035.c (b904854e14bb)
    - drivers/iio/magnetometer/ak8974.c (74f4595ab7f8)
    - drivers/iio/magnetometer/yamaha-yas530.c (e5933cf48779)
    - sound/soc/codecs/sgtl5000.c (bf2aebccddef)

 - Remove a comment form drivers/net/mctp/mctp-i2c.c that doesn't match
   any more.  (Noticed by Matt Johnston)
 - Removed a stray change to lib/Kconfig.kasan that I needed for build
   testing but that wasn't ment to be included. (Noticed by Andrey
   Ryabinin).

Currently this series conflicts with changes to
drivers/input/keyboard/adp5588-keys.c that are waiting in next to reach
Linus' tree. The conflict resolution looks as follows:

diff --cc drivers/input/keyboard/adp5588-keys.c
index b5666d650994,1a1a05d7cd42..000000000000
--- a/drivers/input/keyboard/adp5588-keys.c
+++ b/drivers/input/keyboard/adp5588-keys.c
@@@ -584,43 -590,21 +590,20 @@@ static int adp5588_probe(struct i2c_cli
  
  	dev_info(&client->dev, "Rev.%d keypad, irq %d\n", revid, client->irq);
  	return 0;
- 
-  err_free_irq:
- 	free_irq(client->irq, kpad);
- 	cancel_delayed_work_sync(&kpad->work);
-  err_unreg_dev:
- 	input_unregister_device(input);
- 	input = NULL;
-  err_free_mem:
- 	input_free_device(input);
- 	kfree(kpad);
- 
- 	return error;
  }
  
 -static int adp5588_remove(struct i2c_client *client)
 +static void adp5588_remove(struct i2c_client *client)
  {
- 	struct adp5588_kpad *kpad = i2c_get_clientdata(client);
- 
  	adp5588_write(client, CFG, 0);
- 	free_irq(client->irq, kpad);
- 	cancel_delayed_work_sync(&kpad->work);
- 	input_unregister_device(kpad->input);
- 	adp5588_gpio_remove(kpad);
- 	kfree(kpad);
+ 
+ 	/* all resources will be freed by devm */
 -	return 0;
  }
  
- #ifdef CONFIG_PM
- static int adp5588_suspend(struct device *dev)
+ static int __maybe_unused adp5588_suspend(struct device *dev)
  {
- 	struct adp5588_kpad *kpad = dev_get_drvdata(dev);
- 	struct i2c_client *client = kpad->client;
+ 	struct i2c_client *client = to_i2c_client(dev);
  
  	disable_irq(client->irq);
- 	cancel_delayed_work_sync(&kpad->work);
- 
- 	if (device_may_wakeup(&client->dev))
- 		enable_irq_wake(client->irq);
  
  	return 0;
  }

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

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

  parent reply	other threads:[~2022-08-11 12:41 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220628140313.74984-1-u.kleine-koenig@pengutronix.de>
2022-06-28 14:03 ` [PATCH 1/6] drm/i2c/sil164: Drop no-op remove function Uwe Kleine-König
2022-06-28 14:03 ` [PATCH 2/6] leds: lm3697: Remove duplicated error reporting in .remove() Uwe Kleine-König
2022-06-28 14:03 ` [PATCH 3/6] leds: lm3601x: Don't use mutex after it was destroyed Uwe Kleine-König
2022-06-28 14:03 ` [PATCH 4/6] leds: lm3601x: Improve error reporting for problems during .remove() Uwe Kleine-König
2022-06-28 14:03 ` [PATCH 5/6] gpio: pca953x: Make platform teardown callback return void Uwe Kleine-König
2022-06-28 19:09   ` Andy Shevchenko
2022-06-28 20:15     ` Uwe Kleine-König
2022-07-04  8:39 ` [PATCH 0/6] i2c: Make remove " Uwe Kleine-König
2022-07-16 15:15   ` Uwe Kleine-König
2022-07-18  4:18     ` Krzysztof Hałasa
2022-08-11 12:40     ` Uwe Kleine-König [this message]
     [not found] ` <20220628140313.74984-7-u.kleine-koenig@pengutronix.de>
     [not found]   ` <60cc6796236f23c028a9ae76dbe00d1917df82a5.camel@codeconstruct.com.au>
2022-06-29  7:23     ` [PATCH 6/6] " Uwe Kleine-König
2022-06-29  7:37       ` Javier Martinez Canillas
2022-06-29  7:55       ` Christophe Leroy
2022-06-29  8:09         ` Javier Martinez Canillas
2022-06-29  7:40   ` Heikki Krogerus
2022-06-29 10:40   ` Andy Shevchenko
2022-06-29 10:53   ` Petr Machata
     [not found]   ` <CAPAsAGwP4Mw_CJfsi7oapABdTBwO1HfiQux6X4UahspU74VjtQ@mail.gmail.com>
2022-06-29 13:35     ` Uwe Kleine-König
2022-06-29 14:25   ` Maximilian Luz
2022-06-29 21:20   ` Luca Ceresoli
2022-07-05 10:08   ` Jean Delvare
2022-07-05 10:36     ` Uwe Kleine-König
2022-07-06  9:13   ` Vladimir Oltean
2022-07-06  9:31     ` Uwe Kleine-König

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=20220811124029.usxahk5nvfgqsm42@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=Alexander.Steffen@infineon.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=amirmizi6@gmail.com \
    --cc=chris@renewoutreach.org \
    --cc=cosmin.tanislav@analog.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=fabrice.gasnier@foss.st.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=jagan@amarulasolutions.com \
    --cc=jarkko@kernel.org \
    --cc=johannes.holland@infineon.com \
    --cc=kernel@pengutronix.de \
    --cc=khalasa@piap.pl \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=matt@codeconstruct.com.au \
    --cc=mchehab@kernel.org \
    --cc=robert.foss@linaro.org \
    --cc=ryabinin.a.a@gmail.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=wsa@kernel.org \
    --cc=xji@analogixsemi.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;
as well as URLs for NNTP newsgroup(s).