From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BF2572 for ; Tue, 6 Jul 2021 18:08:23 +0000 (UTC) Received: by mail-ot1-f53.google.com with SMTP id h24-20020a9d64180000b029036edcf8f9a6so22483444otl.3 for ; Tue, 06 Jul 2021 11:08:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=rFh4HQBpaw9ewOD7eKuJ7KI9YAzHhN8tlxJ6LopMKHs=; b=Sz6rE6fIxKghlltcLCE+UXPsQefAUgPvTMscjeRzq2kl6NTGV49umux5xM0XcDuF3f KuSKKfkZ8nSISGEXHz3w1v+CP9bxuRJkim+LBmkXAMBhskBSVWy4R8UYC7L1pwY+g7hz Zg3WKG3mRVhsusU5VFmdXh5UPocqhZf4lahEU95r9tDGNbsVfHF1Q4HkA+YZfm/i81fd v0xNi9dJEaEvf856OdG6fjSc31APYItT+IUiPzbg0w9QbfcYoXqLRo58SwLlUHuXr/Qb gjgu5RAVRwk/bKL57rYJjqGIxVt7qPeDusZUEamQ36NdV7/ZYwdc/uo7wSJkJLcpf0tD jOXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=rFh4HQBpaw9ewOD7eKuJ7KI9YAzHhN8tlxJ6LopMKHs=; b=IB9Ing2rQjs9QnzH1/jnkJXgTw0RVXJ5wzpcB3pJDjXAwK+Jsw2/gY92D+yrG+zzUA nI/f9mNV7bHI77wKJ+ZysxYeRVhGx1cSfWePO62bL3c0NAn3ceUiJanGV9uRDNW4ojDO aW1teiOJhae8MAcPqblKDl1tb+7jMCBi7UPxTdyapxaqXO5BY/wiVNKx3JxXNXdZjxFR 11sjqYI6D06yDT6K9iSt9D5fJnWls3gKfo7Tyv2wbF6DNroc1rKH0CKsY9wYSw0a48T9 1U3iaoWOuHcDkQ+ryX0Z59H4ZsXhue9GmkymTvaoCUkIXad8tJzZIrYBFsQgTB+IN/R9 rOeA== X-Gm-Message-State: AOAM533QSPcR01hncA1kFAHml7yJSmDNszmDNxiOqkQf5fR49i0CI3gS Jo5gO2Q5QdywYP54la0Yd2UJCw== X-Google-Smtp-Source: ABdhPJwwC8pa+wbm0v5SSaX+DFJoQ7jJmXTjdD3iH0933Y2rw8Y2+zYlxp2w0qjcBNkHXGnjSvRJ6w== X-Received: by 2002:a9d:3d3:: with SMTP id f77mr16276146otf.43.1625594902170; Tue, 06 Jul 2021 11:08:22 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id 68sm497113otd.74.2021.07.06.11.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 11:08:21 -0700 (PDT) Date: Tue, 6 Jul 2021 13:08:18 -0500 From: Bjorn Andersson To: Uwe Kleine-K?nig Cc: kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-wireless@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev, dmaengine@vger.kernel.org, linux1394-devel@lists.sourceforge.net, linux-fpga@vger.kernel.org, linux-input@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-i2c@vger.kernel.org, linux-i3c@lists.infradead.org, industrypack-devel@lists.sourceforge.net, linux-media@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-ntb@googlegroups.com, linux-pci@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-scsi@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-spi@vger.kernel.org, linux-staging@lists.linux.dev, greybus-dev@lists.linaro.org, target-devel@vger.kernel.org, linux-usb@vger.kernel.org, linux-serial@vger.kernel.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org Subject: Re: [PATCH v2 4/4] bus: Make remove callback return void Message-ID: References: <20210706154803.1631813-1-u.kleine-koenig@pengutronix.de> <20210706154803.1631813-5-u.kleine-koenig@pengutronix.de> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210706154803.1631813-5-u.kleine-koenig@pengutronix.de> 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 (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 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 X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE8B1C07E96 for ; Thu, 8 Jul 2021 10:15:48 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6079361C17 for ; Thu, 8 Jul 2021 10:15:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6079361C17 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id ED3471691; Thu, 8 Jul 2021 12:14:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz ED3471691 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1625739347; bh=NU8g0Ar28yIHIe9k+acEs9s3ICgVOy0+R+xZGw0Ig6Q=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=NM4V620cxbp67ejX0hMj0wl/+s+jgMcOpgYGPPD5KUvY7/x0Tg6k4i54em4fa5buw dPenwfywzh158dNdb8tvr1gK/e/jcD/DN3uaVumPUa6kiGubTX45NZ09OhcTgULckb RX5hJJIukhBA/99NCpwUbL/+YHlnO9cyep/MH9jE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5BDC9F805B2; Thu, 8 Jul 2021 12:04:50 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C2A43F80249; Tue, 6 Jul 2021 20:08:33 +0200 (CEST) Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9B335F80134 for ; Tue, 6 Jul 2021 20:08:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9B335F80134 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Sz6rE6fI" Received: by mail-ot1-x336.google.com with SMTP id d27-20020a05683018fbb02904ae64d1b56bso1741760otf.9 for ; Tue, 06 Jul 2021 11:08:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=rFh4HQBpaw9ewOD7eKuJ7KI9YAzHhN8tlxJ6LopMKHs=; b=Sz6rE6fIxKghlltcLCE+UXPsQefAUgPvTMscjeRzq2kl6NTGV49umux5xM0XcDuF3f KuSKKfkZ8nSISGEXHz3w1v+CP9bxuRJkim+LBmkXAMBhskBSVWy4R8UYC7L1pwY+g7hz Zg3WKG3mRVhsusU5VFmdXh5UPocqhZf4lahEU95r9tDGNbsVfHF1Q4HkA+YZfm/i81fd v0xNi9dJEaEvf856OdG6fjSc31APYItT+IUiPzbg0w9QbfcYoXqLRo58SwLlUHuXr/Qb gjgu5RAVRwk/bKL57rYJjqGIxVt7qPeDusZUEamQ36NdV7/ZYwdc/uo7wSJkJLcpf0tD jOXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=rFh4HQBpaw9ewOD7eKuJ7KI9YAzHhN8tlxJ6LopMKHs=; b=IU+zkltxw05ETvglGsrndPor/0Ry19QhRYZKsQnm13JYyWMiE2kBEycNoPoJQ0Tsiq zZ1dkq6xd4oQsYwPqoHhxoe+v4z7pL6ZdzMkvXkdunCmqUWnziFWW0xYHx4cmuVMgiwN oX8uR7xrr0e6M49O8CWfqi06cclG9VwxvrNvcNHLqniRLsmSaiA4n3FxPvaq9zmFgast oZe6eRnUq+WiHDDCMseluB6r0xebOKwsk4O6dyjPy9+TVHQ7pWWDYhx2bnRKbNBj+/Vp VWsHlcB5Ly6nfqrDuBWq915FapyfS5uCknQJxaDnqly17vtybPqZH+A+aLtWFqGPzuYu kFww== X-Gm-Message-State: AOAM530bzEkbok7ti66kFvdPfbHk678HIbUF40mU3p9jDVNtB5+5R8ck Rg4LnhutKVUfxWZ0Fhd7OIHvZw== X-Google-Smtp-Source: ABdhPJwwC8pa+wbm0v5SSaX+DFJoQ7jJmXTjdD3iH0933Y2rw8Y2+zYlxp2w0qjcBNkHXGnjSvRJ6w== X-Received: by 2002:a9d:3d3:: with SMTP id f77mr16276146otf.43.1625594902170; Tue, 06 Jul 2021 11:08:22 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id 68sm497113otd.74.2021.07.06.11.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 11:08:21 -0700 (PDT) Date: Tue, 6 Jul 2021 13:08:18 -0500 From: Bjorn Andersson To: Uwe Kleine-K?nig Subject: Re: [PATCH v2 4/4] bus: Make remove callback return void Message-ID: References: <20210706154803.1631813-1-u.kleine-koenig@pengutronix.de> <20210706154803.1631813-5-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210706154803.1631813-5-u.kleine-koenig@pengutronix.de> X-Mailman-Approved-At: Thu, 08 Jul 2021 12:04:25 +0200 Cc: nvdimm@lists.linux.dev, linux-hyperv@vger.kernel.org, kvm@vger.kernel.org, linux-wireless@vger.kernel.org, linux-fpga@vger.kernel.org, linux-pci@vger.kernel.org, alsa-devel@alsa-project.org, linux-cxl@vger.kernel.org, platform-driver-x86@vger.kernel.org, target-devel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-i3c@lists.infradead.org, linux1394-devel@lists.sourceforge.net, linux-scsi@vger.kernel.org, linux-staging@lists.linux.dev, linux-acpi@vger.kernel.org, industrypack-devel@lists.sourceforge.net, linux-input@vger.kernel.org, xen-devel@lists.xenproject.org, linux-sunxi@lists.linux.dev, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org, linux-remoteproc@vger.kernel.org, greybus-dev@lists.linaro.org, virtualization@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-parisc@vger.kernel.org, netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mips@vger.kernel.org, linux-spi@vger.kernel.org, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-ntb@googlegroups.com, linuxppc-dev@lists.ozlabs.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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 (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 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 X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 101F8C11F67 for ; Tue, 6 Jul 2021 18:08:28 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9A86661076 for ; Tue, 6 Jul 2021 18:08:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A86661076 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 5BBF440591; Tue, 6 Jul 2021 18:08:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id S-RBBc1udS55; Tue, 6 Jul 2021 18:08:26 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id 91E6A4038B; Tue, 6 Jul 2021 18:08:25 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6091EC001A; Tue, 6 Jul 2021 18:08:25 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5111AC000E for ; Tue, 6 Jul 2021 18:08:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 3A82340111 for ; Tue, 6 Jul 2021 18:08:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=linaro.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mlISAwRlK-nq for ; Tue, 6 Jul 2021 18:08:23 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) by smtp2.osuosl.org (Postfix) with ESMTPS id 2CA934010D for ; Tue, 6 Jul 2021 18:08:23 +0000 (UTC) Received: by mail-ot1-x334.google.com with SMTP id l17-20020a9d6a910000b029048a51f0bc3cso10702446otq.13 for ; Tue, 06 Jul 2021 11:08:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=rFh4HQBpaw9ewOD7eKuJ7KI9YAzHhN8tlxJ6LopMKHs=; b=Sz6rE6fIxKghlltcLCE+UXPsQefAUgPvTMscjeRzq2kl6NTGV49umux5xM0XcDuF3f KuSKKfkZ8nSISGEXHz3w1v+CP9bxuRJkim+LBmkXAMBhskBSVWy4R8UYC7L1pwY+g7hz Zg3WKG3mRVhsusU5VFmdXh5UPocqhZf4lahEU95r9tDGNbsVfHF1Q4HkA+YZfm/i81fd v0xNi9dJEaEvf856OdG6fjSc31APYItT+IUiPzbg0w9QbfcYoXqLRo58SwLlUHuXr/Qb gjgu5RAVRwk/bKL57rYJjqGIxVt7qPeDusZUEamQ36NdV7/ZYwdc/uo7wSJkJLcpf0tD jOXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=rFh4HQBpaw9ewOD7eKuJ7KI9YAzHhN8tlxJ6LopMKHs=; b=mSZSeLzvx8qybQX6eFyoXqoCMHLiQ+QIigyKhoFoNcFwlN8wBTgK7gSpkBRYjWOyqc qBw8ltKNHa6KI3DQMu4xhZ0oFPW6t+eQwzEMDcySB54VkcDwa0GsqGy7UJK6dW6wSoTf SJMcTDF1lp6h2bKEj9rAqNx2VYqMK3ZjqOgMsF9OR6YJMzY9IEIe0SaEQCw5gDx40uin FCBEX6TbyBQuhEd1hHha+uSPUcPkTRFcbygMifV2FUcoV5/ZcS3ufL1fRUqM263juDpP 9YCQUPz66qiFfPGlcCdZMTbkEHdwoeSNutWeZD9VRnpRHB4FS+2k7D/Biz7RomkiLkmX IzLw== X-Gm-Message-State: AOAM530cCKWn3ToSSadH6EXV12K4lw/X3MkLCoH4MXpjI5J3p0MDbpLb gMNyavxdIgyI+EuLqqY1q3A4Ew== X-Google-Smtp-Source: ABdhPJwwC8pa+wbm0v5SSaX+DFJoQ7jJmXTjdD3iH0933Y2rw8Y2+zYlxp2w0qjcBNkHXGnjSvRJ6w== X-Received: by 2002:a9d:3d3:: with SMTP id f77mr16276146otf.43.1625594902170; Tue, 06 Jul 2021 11:08:22 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id 68sm497113otd.74.2021.07.06.11.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 11:08:21 -0700 (PDT) Date: Tue, 6 Jul 2021 13:08:18 -0500 From: Bjorn Andersson To: Uwe Kleine-K?nig Subject: Re: [PATCH v2 4/4] bus: Make remove callback return void Message-ID: References: <20210706154803.1631813-1-u.kleine-koenig@pengutronix.de> <20210706154803.1631813-5-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210706154803.1631813-5-u.kleine-koenig@pengutronix.de> Cc: nvdimm@lists.linux.dev, linux-hyperv@vger.kernel.org, kvm@vger.kernel.org, linux-wireless@vger.kernel.org, linux-fpga@vger.kernel.org, linux-pci@vger.kernel.org, alsa-devel@alsa-project.org, linux-cxl@vger.kernel.org, platform-driver-x86@vger.kernel.org, target-devel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-i3c@lists.infradead.org, linux1394-devel@lists.sourceforge.net, linux-scsi@vger.kernel.org, linux-staging@lists.linux.dev, linux-acpi@vger.kernel.org, industrypack-devel@lists.sourceforge.net, linux-input@vger.kernel.org, xen-devel@lists.xenproject.org, linux-sunxi@lists.linux.dev, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org, linux-remoteproc@vger.kernel.org, greybus-dev@lists.linaro.org, virtualization@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-parisc@vger.kernel.org, netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mips@vger.kernel.org, linux-spi@vger.kernel.org, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-ntb@googlegroups.com, linuxppc-dev@lists.ozlabs.org X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" 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 (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 _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization 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 X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEB16C07E96 for ; Tue, 6 Jul 2021 18:10:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B77D461C5B for ; Tue, 6 Jul 2021 18:10:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B77D461C5B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tom9MqINTqre29PjHeCGmKoHOKD6ezOfVPNONEkHoSM=; b=kN8SbXFc3vc/MK CvEWDRLm2OPMZ7mDjUUUC4g0XCRoeNtSZPLzbj17aa/FEP/oOklKfoIeVTesjX5nociFmaQ8s8Duh SeuiK3NS5eU9XtT+35xe4zVvMwD4WvcVOXFNDJMAFgNvTffjcnfu4BVHAsK/SGuYm8Y8Tl27s2A4M 68yJkUkSdABvWdnU9DXVv59kSf+DluMpFxmuwSjnxQ8fx9JycSyfvWBBMG2yKWsUztf+ycDEJHw4b zU2GCuVIt+FUHh80w7nMsf1UrREX/nFCL6/fjnKJtAWe1F7Wp1tYp9sbGE8ZGWirwgoQXfyxCvvWN Ml46mkNAHDkBqcTDRIFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0pUh-00CXXv-PN; Tue, 06 Jul 2021 18:08:27 +0000 Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0pUd-00CXWj-U2 for linux-arm-kernel@lists.infradead.org; Tue, 06 Jul 2021 18:08:25 +0000 Received: by mail-ot1-x333.google.com with SMTP id d27-20020a05683018fbb02904ae64d1b56bso1741754otf.9 for ; Tue, 06 Jul 2021 11:08:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=rFh4HQBpaw9ewOD7eKuJ7KI9YAzHhN8tlxJ6LopMKHs=; b=Sz6rE6fIxKghlltcLCE+UXPsQefAUgPvTMscjeRzq2kl6NTGV49umux5xM0XcDuF3f KuSKKfkZ8nSISGEXHz3w1v+CP9bxuRJkim+LBmkXAMBhskBSVWy4R8UYC7L1pwY+g7hz Zg3WKG3mRVhsusU5VFmdXh5UPocqhZf4lahEU95r9tDGNbsVfHF1Q4HkA+YZfm/i81fd v0xNi9dJEaEvf856OdG6fjSc31APYItT+IUiPzbg0w9QbfcYoXqLRo58SwLlUHuXr/Qb gjgu5RAVRwk/bKL57rYJjqGIxVt7qPeDusZUEamQ36NdV7/ZYwdc/uo7wSJkJLcpf0tD jOXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=rFh4HQBpaw9ewOD7eKuJ7KI9YAzHhN8tlxJ6LopMKHs=; b=ewjHAEpKYjRcId5pI9tHCtbeyUwYgoLhEabkwUc2F/CmUxzz5LrIGCu7NvlpQ+mky0 qJ08cOie56cl5LoxTULJike32FU1R8Jq5Q30Ncn1mbQ1xWsUba2zj+LAGiAjMGG/knyF qRHrlGaodMJdH/0Yb56xeaLHMjDHz20pMdU4cGM+ZCeAe3X5/ehFLpLuqasai4iyHF+G mVx9E5umEeXWRgDNx0n+oRwAFQkbsppC67pUzc5JN/hlX6+01UymdSTEV+DkxKw1t4Hd 6QI1+sNqQPe5kBwozdlvIkNeN6RkAVHxrHA3hzRwmoGs8b086W+lqQIDvIVh6AzzKOKB rjrQ== X-Gm-Message-State: AOAM531X8msWxfn5FNzruxIBm/PzxLIY0Qlp5AI5UqwNml5XWuXQh9jv lGs/zfZpJneJk6RLD0TF+f12yA== X-Google-Smtp-Source: ABdhPJwwC8pa+wbm0v5SSaX+DFJoQ7jJmXTjdD3iH0933Y2rw8Y2+zYlxp2w0qjcBNkHXGnjSvRJ6w== X-Received: by 2002:a9d:3d3:: with SMTP id f77mr16276146otf.43.1625594902170; Tue, 06 Jul 2021 11:08:22 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id 68sm497113otd.74.2021.07.06.11.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 11:08:21 -0700 (PDT) Date: Tue, 6 Jul 2021 13:08:18 -0500 From: Bjorn Andersson To: Uwe Kleine-K?nig Cc: kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-wireless@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev, dmaengine@vger.kernel.org, linux1394-devel@lists.sourceforge.net, linux-fpga@vger.kernel.org, linux-input@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-i2c@vger.kernel.org, linux-i3c@lists.infradead.org, industrypack-devel@lists.sourceforge.net, linux-media@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-ntb@googlegroups.com, linux-pci@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-scsi@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-spi@vger.kernel.org, linux-staging@lists.linux.dev, greybus-dev@lists.linaro.org, target-devel@vger.kernel.org, linux-usb@vger.kernel.org, linux-serial@vger.kernel.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org Subject: Re: [PATCH v2 4/4] bus: Make remove callback return void Message-ID: References: <20210706154803.1631813-1-u.kleine-koenig@pengutronix.de> <20210706154803.1631813-5-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210706154803.1631813-5-u.kleine-koenig@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210706_110824_020484_79D8BF57 X-CRM114-Status: GOOD ( 21.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 (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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CED0C07E96 for ; Tue, 6 Jul 2021 18:08:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C1C3861C5B for ; Tue, 6 Jul 2021 18:08:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1C3861C5B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OwtsBLwh8Ux/i06hoN3cmMZEcnWjWIS5QoE4/t/mqlI=; b=qAKudX0B8OXy5v +NkQwOi1AMCBM1C2mMEiE3YEtHXItFPNdbuYp1elwUhRl3NaRnBB/jYlCI8+8kCYRD7Qajs/VPJys Fz0C2Mfketur8y9o+HfBUDcMN9E5bhMNXDNyZU5haCujg8vx8RNs0QgyXG4BE2qoVW35RHGJfTCaV iIZpfD8UMVE/VUnJ/tGxWAy6B5rsHt2YovboO//kjS89DrVc4Mia77RvQbz4Td9Y9WsWFeiKFwlBl rnBDYkLQ3Vk1z0is6A0070Uk9mbunXdtnOdJOtVoYilJNLCXcpFbEs4ptNIwsVLIcU+0sNcqGEjVF gm3Q4Ca88TizV7nnXqsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0pUr-00CXaA-2w; Tue, 06 Jul 2021 18:08:37 +0000 Received: from mail-ot1-x32a.google.com ([2607:f8b0:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0pUd-00CXWk-TI for linux-i3c@lists.infradead.org; Tue, 06 Jul 2021 18:08:25 +0000 Received: by mail-ot1-x32a.google.com with SMTP id w15-20020a056830144fb02904af2a0d96f3so1369650otp.6 for ; Tue, 06 Jul 2021 11:08:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=rFh4HQBpaw9ewOD7eKuJ7KI9YAzHhN8tlxJ6LopMKHs=; b=Sz6rE6fIxKghlltcLCE+UXPsQefAUgPvTMscjeRzq2kl6NTGV49umux5xM0XcDuF3f KuSKKfkZ8nSISGEXHz3w1v+CP9bxuRJkim+LBmkXAMBhskBSVWy4R8UYC7L1pwY+g7hz Zg3WKG3mRVhsusU5VFmdXh5UPocqhZf4lahEU95r9tDGNbsVfHF1Q4HkA+YZfm/i81fd v0xNi9dJEaEvf856OdG6fjSc31APYItT+IUiPzbg0w9QbfcYoXqLRo58SwLlUHuXr/Qb gjgu5RAVRwk/bKL57rYJjqGIxVt7qPeDusZUEamQ36NdV7/ZYwdc/uo7wSJkJLcpf0tD jOXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=rFh4HQBpaw9ewOD7eKuJ7KI9YAzHhN8tlxJ6LopMKHs=; b=XXZI2ezV+lXjdni+OdmZHNraiJ2jsylgXoo96qZWLkFPNVQLy9wJAlfRoD7Rein4rz CLHBY85zAufTYgDDnQl0k9F1CSATOSEMCfXzRGqIK+ZLF/kU3oJAeoOeMLAaVcySlcHI NerKmrvHUeGxBAGD3WINtCKNUxXQNTbiavKRQCwsXrvUfmrfKFR5aM6fftnPauinKLkQ CqUQXItimuVeQenJMRqxydJkoKMk//AXeWEOlc9Sw29lnVTJ+db4P97XRiLhBnsEmjTr N0ifNnOyp8LIdOBmA/Ab1S4D7oivP8CpltFSf7HhGS7nP9hA4i8GlvdJGtE6s/4iXt8W vChg== X-Gm-Message-State: AOAM533RvV+pVhorZgmBxbrZLtcHedSqA555NLRniJHrPX6Ua/yF789r lLEHqBLZUyDHsUAGhRBcDtkh/g== X-Google-Smtp-Source: ABdhPJwwC8pa+wbm0v5SSaX+DFJoQ7jJmXTjdD3iH0933Y2rw8Y2+zYlxp2w0qjcBNkHXGnjSvRJ6w== X-Received: by 2002:a9d:3d3:: with SMTP id f77mr16276146otf.43.1625594902170; Tue, 06 Jul 2021 11:08:22 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id 68sm497113otd.74.2021.07.06.11.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 11:08:21 -0700 (PDT) Date: Tue, 6 Jul 2021 13:08:18 -0500 From: Bjorn Andersson To: Uwe Kleine-K?nig Cc: kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-wireless@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev, dmaengine@vger.kernel.org, linux1394-devel@lists.sourceforge.net, linux-fpga@vger.kernel.org, linux-input@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-i2c@vger.kernel.org, linux-i3c@lists.infradead.org, industrypack-devel@lists.sourceforge.net, linux-media@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-ntb@googlegroups.com, linux-pci@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-scsi@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-spi@vger.kernel.org, linux-staging@lists.linux.dev, greybus-dev@lists.linaro.org, target-devel@vger.kernel.org, linux-usb@vger.kernel.org, linux-serial@vger.kernel.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org Subject: Re: [PATCH v2 4/4] bus: Make remove callback return void Message-ID: References: <20210706154803.1631813-1-u.kleine-koenig@pengutronix.de> <20210706154803.1631813-5-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210706154803.1631813-5-u.kleine-koenig@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210706_110824_020833_8D53C6CD X-CRM114-Status: GOOD ( 20.06 ) X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org 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 (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 -- linux-i3c mailing list linux-i3c@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-i3c