linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Some cleanups after making bus_type::remove return void
@ 2021-07-27  8:08 Uwe Kleine-König
  2021-07-27  8:08 ` [PATCH 3/5] sh: superhyway: Simplify check in remove callback Uwe Kleine-König
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2021-07-27  8:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, kernel, Finn Thain, linux-m68k, David S. Miller,
	Jakub Kicinski, Zhang Qilong, Christophe JAILLET, netdev,
	Yoshinori Sato, Rich Felker, Samuel Iglesias Gonsálvez,
	Dmitry Torokhov, Chen-Yu Tsai, Pali Rohár, linux-sh,
	Geert Uytterhoeven

Hello,

while working on the patch set that made bus_type::remove return void I
noticed a few things that could be improved. This series addresses
these. Apart from a simple conflict between the two zorro patches there
are no interdependencies between these patches. I created them on top of
Greg's bus_remove_return_void-5.15 tag[1]. There might be further
(probably simple) conflicts if they are applied based on an earlier
commit.

So it should be easily possible to let these patches go in through their
usual maintainer trees. So please if you're a maintainer state if you
prefer to take the patches yourself or if you prefer that Greg takes
them together.

Best regards
Uwe

[1] available at

	git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git tags/bus_remove_return_void-5.15

    see https://lore.kernel.org/lkml/YPkwQwf0dUKnGA7L@kroah.com

Uwe Kleine-König (5):
  nubus: Simplify check in remove callback
  nubus: Make struct nubus_driver::remove return void
  sh: superhyway: Simplify check in remove callback
  zorro: Simplify remove callback
  zorro: Drop useless (and hardly used) .driver member in struct
    zorro_dev

 drivers/net/ethernet/8390/mac8390.c     |  3 +--
 drivers/net/ethernet/natsemi/macsonic.c |  4 +---
 drivers/nubus/bus.c                     |  2 +-
 drivers/sh/superhyway/superhyway.c      |  2 +-
 drivers/zorro/zorro-driver.c            | 13 ++++---------
 include/linux/nubus.h                   |  2 +-
 include/linux/zorro.h                   |  1 -
 7 files changed, 9 insertions(+), 18 deletions(-)


base-commit: fc7a6209d5710618eb4f72a77cd81b8d694ecf89
-- 
2.30.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 3/5] sh: superhyway: Simplify check in remove callback
  2021-07-27  8:08 [PATCH 0/5] Some cleanups after making bus_type::remove return void Uwe Kleine-König
@ 2021-07-27  8:08 ` Uwe Kleine-König
  0 siblings, 0 replies; 2+ messages in thread
From: Uwe Kleine-König @ 2021-07-27  8:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, kernel, Yoshinori Sato, Rich Felker,
	Samuel Iglesias Gonsálvez, Dmitry Torokhov, Chen-Yu Tsai,
	Pali Rohár, linux-sh

The driver core only calls a remove callback when the device was
successfully bound (aka probed) before. So dev->driver is never NULL.

(And even if it was NULL, to_superhyway_driver(NULL) isn't ...)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/sh/superhyway/superhyway.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/sh/superhyway/superhyway.c b/drivers/sh/superhyway/superhyway.c
index c0ab904c76ec..44324abe21da 100644
--- a/drivers/sh/superhyway/superhyway.c
+++ b/drivers/sh/superhyway/superhyway.c
@@ -155,7 +155,7 @@ static void superhyway_device_remove(struct device *dev)
 	struct superhyway_device *shyway_dev = to_superhyway_device(dev);
 	struct superhyway_driver *shyway_drv = to_superhyway_driver(dev->driver);
 
-	if (shyway_drv && shyway_drv->remove)
+	if (shyway_drv->remove)
 		shyway_drv->remove(shyway_dev);
 }
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-27  8:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27  8:08 [PATCH 0/5] Some cleanups after making bus_type::remove return void Uwe Kleine-König
2021-07-27  8:08 ` [PATCH 3/5] sh: superhyway: Simplify check in remove callback Uwe Kleine-König

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).