lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 6 Jul 2021 13:08:18 -0500
From:   Bjorn Andersson <bjorn.andersson@...aro.org>
To:     Uwe Kleine-K?nig <u.kleine-koenig@...gutronix.de>
Cc:     kernel@...gutronix.de, linux-arm-kernel@...ts.infradead.org,
        linux-mips@...r.kernel.org, linux-parisc@...r.kernel.org,
        linuxppc-dev@...ts.ozlabs.org, linux-acpi@...r.kernel.org,
        linux-wireless@...r.kernel.org, linux-sunxi@...ts.linux.dev,
        linux-cxl@...r.kernel.org, nvdimm@...ts.linux.dev,
        dmaengine@...r.kernel.org, linux1394-devel@...ts.sourceforge.net,
        linux-fpga@...r.kernel.org, linux-input@...r.kernel.org,
        linux-hyperv@...r.kernel.org, linux-i2c@...r.kernel.org,
        linux-i3c@...ts.infradead.org,
        industrypack-devel@...ts.sourceforge.net,
        linux-media@...r.kernel.org, linux-mmc@...r.kernel.org,
        netdev@...r.kernel.org, linux-ntb@...glegroups.com,
        linux-pci@...r.kernel.org, platform-driver-x86@...r.kernel.org,
        linux-remoteproc@...r.kernel.org, linux-scsi@...r.kernel.org,
        alsa-devel@...a-project.org, linux-arm-msm@...r.kernel.org,
        linux-spi@...r.kernel.org, linux-staging@...ts.linux.dev,
        greybus-dev@...ts.linaro.org, target-devel@...r.kernel.org,
        linux-usb@...r.kernel.org, linux-serial@...r.kernel.org,
        virtualization@...ts.linux-foundation.org, kvm@...r.kernel.org,
        xen-devel@...ts.xenproject.org
Subject: Re: [PATCH v2 4/4] bus: Make remove callback return void

On Tue 06 Jul 10:48 CDT 2021, Uwe Kleine-K?nig wrote:

> The driver core ignores the return value of this callback because there
> is only little it can do when a device disappears.
> 
> This is the final bit of a long lasting cleanup quest where several
> buses were converted to also return void from their remove callback.
> Additionally some resource leaks were fixed that were caused by drivers
> returning an error code in the expectation that the driver won't go
> away.
> 
> With struct bus_type::remove returning void it's prevented that newly
> implemented buses return an ignored error code and so don't anticipate
> wrong expectations for driver authors.
> 

Thanks for doing this!

Acked-by: Bjorn Andersson <bjorn.andersson@...aro.org> (rpmsg and apr)

[..]
> diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c
> index c1404d3dae2c..7f6fac618ab2 100644
> --- a/drivers/rpmsg/rpmsg_core.c
> +++ b/drivers/rpmsg/rpmsg_core.c
> @@ -530,7 +530,7 @@ static int rpmsg_dev_probe(struct device *dev)
>  	return err;
>  }
>  
> -static int rpmsg_dev_remove(struct device *dev)
> +static void rpmsg_dev_remove(struct device *dev)
>  {
>  	struct rpmsg_device *rpdev = to_rpmsg_device(dev);
>  	struct rpmsg_driver *rpdrv = to_rpmsg_driver(rpdev->dev.driver);
> @@ -546,8 +546,6 @@ static int rpmsg_dev_remove(struct device *dev)
>  
>  	if (rpdev->ept)
>  		rpmsg_destroy_ept(rpdev->ept);
> -
> -	return err;

This leaves err assigned but never used, but I don't mind following up
with a patch cleaning that up after this has landed.

>  }
>  
>  static struct bus_type rpmsg_bus = {

Regards,
Bjorn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ