[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210126175652.3caoqfnsky2es42f@pengutronix.de>
Date: Tue, 26 Jan 2021 18:56:52 +0100
From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To: Suzuki K Poulose <suzuki.poulose@....com>,
Arnd Bergmann <arnd@...db.de>
Cc: Russell King <linux@...linux.org.uk>,
Matt Mackall <mpm@...enic.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Vinod Koul <vkoul@...nel.org>,
Dan Williams <dan.j.williams@...el.com>,
Eric Anholt <eric@...olt.net>, David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...com>,
Linus Walleij <linus.walleij@...aro.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Vladimir Zapolskiy <vz@...ia.com>,
Krzysztof Kozlowski <krzk@...nel.org>,
Ulf Hansson <ulf.hansson@...aro.org>,
Alessandro Zummo <a.zummo@...ertech.it>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Mark Brown <broonie@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
Eric Auger <eric.auger@...hat.com>,
Alex Williamson <alex.williamson@...hat.com>,
Cornelia Huck <cohuck@...hat.com>,
Wim Van Sebroeck <wim@...ux-watchdog.org>,
Guenter Roeck <linux@...ck-us.net>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, linux-rtc@...r.kernel.org,
kvm@...r.kernel.org, linux-fbdev@...r.kernel.org,
linux-serial@...r.kernel.org, coresight@...ts.linaro.org,
linux-input@...r.kernel.org, linux-mmc@...r.kernel.org,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-spi@...r.kernel.org, linux-i2c@...r.kernel.org,
alsa-devel@...a-project.org, linux-crypto@...r.kernel.org,
kernel@...gutronix.de, Leo Yan <leo.yan@...aro.org>,
dmaengine@...r.kernel.org, linux-watchdog@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org,
Mike Leach <mike.leach@...aro.org>
Subject: Re: [PATCH v3 4/5] amba: Make the remove callback return void
Hello,
On Tue, Jan 26, 2021 at 05:08:40PM +0000, Suzuki K Poulose wrote:
> On 1/26/21 4:58 PM, Uwe Kleine-König wrote:
> > All amba drivers return 0 in their remove callback. Together with the
> > driver core ignoring the return value anyhow, it doesn't make sense to
> > return a value here.
> >
> > Change the remove prototype to return void, which makes it explicit that
> > returning an error value doesn't work as expected. This simplifies changing
> > the core remove callback to return void, too.
> >
> > Reviewed-by: Ulf Hansson <ulf.hansson@...aro.org>
> > Reviewed-by: Arnd Bergmann <arnd@...db.de>
> > Acked-by: Alexandre Belloni <alexandre.belloni@...tlin.com>
> > Acked-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
> > Acked-by: Krzysztof Kozlowski <krzk@...nel.org> # for drivers/memory
> > Acked-by: Mark Brown <broonie@...nel.org>
> > Acked-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
> > Acked-by: Linus Walleij <linus.walleij@...aro.org>
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
>
>
> > drivers/hwtracing/coresight/coresight-etm4x-core.c | 4 +---
>
> You are most likely to have a conflict for the above file, with what is
> in coresight/next. It should be easy to resolve.
I'm surprised to see that the remove callback introduced in 2952ecf5df33
("coresight: etm4x: Refactor probing routine") has an __exit annotation.
With .suppress_bind_attrs = true you don't need a remove callback at
all. (And without .suppress_bind_attrs = true the remove callback must
have no __exit annotation.)
This make me looking at commit 45fe7befe0db ("coresight: remove broken
__exit annotations") by Arnd. Unless I miss something the better change
would have been to remove the unused remove callbacks instead of dropping
their __exit annotation?!
Anyhow, my conflict resolution looks as follows:
diff --cc drivers/hwtracing/coresight/coresight-etm4x-core.c
index 82787cba537d,473ab7480a36..000000000000
--- a/drivers/hwtracing/coresight/coresight-etm4x-core.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c
@@@ -1703,6 -1903,28 +1903,27 @@@ static int __exit etm4_remove_dev(struc
cpus_read_unlock();
coresight_unregister(drvdata->csdev);
+
+ return 0;
+ }
+
-static int __exit etm4_remove_amba(struct amba_device *adev)
++static void __exit etm4_remove_amba(struct amba_device *adev)
+ {
+ struct etmv4_drvdata *drvdata = dev_get_drvdata(&adev->dev);
+
+ if (drvdata)
- return etm4_remove_dev(drvdata);
- return 0;
++ etm4_remove_dev(drvdata);
+ }
+
+ static int __exit etm4_remove_platform_dev(struct platform_device *pdev)
+ {
+ int ret = 0;
+ struct etmv4_drvdata *drvdata = dev_get_drvdata(&pdev->dev);
+
+ if (drvdata)
+ ret = etm4_remove_dev(drvdata);
+ pm_runtime_disable(&pdev->dev);
+ return ret;
}
static const struct amba_id etm4_ids[] = {
If this series should make it in for 5.12 we probably need an immutable
branch between hwtracing and amba.
> Otherwise, the changes look good for the drivers/hwtracing/coresight/*
>
> Acked-by: Suzuki K Poulose <suzuki.poulose@....com>
Thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists