Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5597666pxv; Wed, 7 Jul 2021 07:27:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTvAxu82vYc7+KBv8rNtxbjIAT9Lzo55ZShjUs8iFVAsAYBddcWK3SWcvagPBY9XpwVb6g X-Received: by 2002:a05:6e02:1b85:: with SMTP id h5mr18674461ili.99.1625668075395; Wed, 07 Jul 2021 07:27:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625668075; cv=none; d=google.com; s=arc-20160816; b=n2PWDznj9ZnZ/zN6wY1tUUiJgmWb2uxeaOVk4aUIQqEW583mlakrkanujzDjopU2qm VvlLeDR/IbT8OxpN4sO1BSs5GCMhKGvxtlWfbHaZcfk1iFxIIob/Ufe2qFBkZghYMmEW OvBH888yWecLYNClnsB5tORfNhXkyvWw8mA8LUGnoxRa7RUXU+4kKBvcV8LsgOg+ToS6 +GdAdmaGQiEbdyVCr4Lbe2F76LbZgnxRMCi0jCdP2fj6O2qTLWhOEbLFieIPureuailB BdfU3a6Q4jfPHlTRXRBM/AiXfDh/G6yhkRXpTI1h8ggXQJEKwZQQ0qvZGeTErsKVCUAC 4XAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=R1b1MmqRg+JjTb9SqE3N1oUES1jMyS6VpEEII2IWGuk=; b=bX8XlE7MPl3/62KqZ7xYaPEd93kbrKjec26A2QPzQJIs5cQcF3/DeHjS4cM3ky2UT2 d5krPCHr3JQNEfDcQXixdWGBK+/qczxc5n6aVk8+1hpJ3wwdYG6gZ92DmedjhBq6ztmS LwLl+U84SMHl2flJ4avxdFIyIwn+5oG1MbNoYuZFAk4I2bRJVhv2v1l59Mg6WXi+V3bU BHyGA4nvlOugCvqachzUAPMs9TcoDp3c7Q836ZdCHJfE6DEfsaVi0qE2agKqLMAJ3cJU xlzfRkCGxsMFvgqn6Hy4jNpzdUIfcN4tX9UKeLpW/H2La5UuE0aRTzOAIienfA6QeA0w 6Kmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Iwo14BH0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r9si8711072ill.121.2021.07.07.07.27.42; Wed, 07 Jul 2021 07:27:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Iwo14BH0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232031AbhGGO2O (ORCPT + 99 others); Wed, 7 Jul 2021 10:28:14 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:36463 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232010AbhGGO2J (ORCPT ); Wed, 7 Jul 2021 10:28:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625667928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R1b1MmqRg+JjTb9SqE3N1oUES1jMyS6VpEEII2IWGuk=; b=Iwo14BH06W//MgUJ/Dx5+0ggoObpPt3GMxyyQBWF8d1IHUVhouEMvKgsOvmGIh2+GywzJi +s4nM2c/4yUcqqIk/5/D8RDL/iiZIxBG4fJxpGSUR0LCGQna8mc/ItGR3dWtwxL87y5tK5 gUfjwMS7Yp9iKOYkVjxwYcPjJSPj38k= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-248-3QQwLlOoP9Ouo1dOX0QIzg-1; Wed, 07 Jul 2021 10:25:27 -0400 X-MC-Unique: 3QQwLlOoP9Ouo1dOX0QIzg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E5AAE9F93C; Wed, 7 Jul 2021 14:25:20 +0000 (UTC) Received: from [10.36.112.61] (ovpn-112-61.ams2.redhat.com [10.36.112.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id E4E3919C66; Wed, 7 Jul 2021 14:24:39 +0000 (UTC) Subject: Re: [PATCH v2 4/4] bus: Make remove callback return void To: =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= , Greg Kroah-Hartman Cc: kernel@pengutronix.de, Cornelia Huck , linux-kernel@vger.kernel.org, Russell King , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Geoff Levand , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , "Rafael J. Wysocki" , Len Brown , William Breathitt Gray , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Alison Schofield , Vishal Verma , Ira Weiny , Ben Widawsky , Dan Williams , Dave Jiang , Vinod Koul , Stefan Richter , Sudeep Holla , Cristian Marussi , Wu Hao , Tom Rix , Moritz Fischer , Jiri Kosina , Srinivas Pandruvada , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , Alexander Shishkin , Wolfram Sang , Alexandre Belloni , Dmitry Torokhov , Samuel Iglesias Gonsalvez , Jens Taprogge , Johannes Thumshirn , Mauro Carvalho Chehab , Maxim Levitsky , Alex Dubov , Ulf Hansson , Lee Jones , Tomas Winkler , Arnd Bergmann , Jakub Kicinski , "David S. Miller" , Jon Mason , Allen Hubbe , Kishon Vijay Abraham I , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=c5=84ski?= , Bjorn Helgaas , Dominik Brodowski , Maximilian Luz , Hans de Goede , Mark Gross , Matt Porter , Alexandre Bounine , Ohad Ben-Cohen , Bjorn Andersson , Mathieu Poirier , "Martin K. Petersen" , Thorsten Scherer , Srinivas Kandagatla , Andy Gross , Mark Brown , Stephen Boyd , Michael Buesch , Sven Van Asbroeck , Johan Hovold , Alex Elder , Andreas Noever , Michael Jamet , Mika Westerberg , Yehezkel Bernat , Rob Herring , Jiri Slaby , Heikki Krogerus , "Michael S. Tsirkin" , Jason Wang , Kirti Wankhede , Alex Williamson , Martyn Welch , Manohar Vanga , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Johannes Berg , Jaroslav Kysela , Takashi Iwai , Marc Zyngier , Tyrel Datwyler , Vladimir Zapolskiy , Samuel Holland , Qinglang Miao , Alexey Kardashevskiy , Kai-Heng Feng , Joey Pabalan , =?UTF-8?Q?Pali_Roh=c3=a1r?= , Adrian Hunter , Frank Li , Mike Christie , Bodo Stroesser , Hannes Reinecke , David Woodhouse , SeongJae Park , Julien Grall , 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, Russell King , Johannes Thumshirn References: <20210706154803.1631813-1-u.kleine-koenig@pengutronix.de> <20210706154803.1631813-5-u.kleine-koenig@pengutronix.de> From: Benjamin Tissoires Message-ID: <5d3bf56e-285f-ecc1-ec64-384409645353@redhat.com> Date: Wed, 7 Jul 2021 16:24:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210706154803.1631813-5-u.kleine-koenig@pengutronix.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/6/21 5:48 PM, 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. > > Acked-by: Russell King (Oracle) (For ARM, Amba and related parts) > Acked-by: Mark Brown > Acked-by: Chen-Yu Tsai (for drivers/bus/sunxi-rsb.c) > Acked-by: Pali Rohár > Acked-by: Mauro Carvalho Chehab (for drivers/media) > Acked-by: Hans de Goede (For drivers/platform) > Acked-by: Alexandre Belloni > Acked-By: Vinod Koul > Acked-by: Juergen Gross (For Xen) > Acked-by: Lee Jones (For drivers/mfd) > Acked-by: Johannes Thumshirn (For drivers/mcb) > Acked-by: Johan Hovold > Acked-by: Srinivas Kandagatla (For drivers/slimbus) > Acked-by: Kirti Wankhede (For drivers/vfio) > Acked-by: Maximilian Luz > Acked-by: Heikki Krogerus (For ulpi and typec) > Acked-by: Samuel Iglesias Gonsálvez (For ipack) > Reviewed-by: Tom Rix (For fpga) > Acked-by: Geoff Levand (For ps3) > Signed-off-by: Uwe Kleine-König > --- > [...] > drivers/hid/hid-core.c | 4 +--- > drivers/hid/intel-ish-hid/ishtp/bus.c | 4 +--- [...] > diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c > index 7db332139f7d..dbed2524fd47 100644 > --- a/drivers/hid/hid-core.c > +++ b/drivers/hid/hid-core.c > @@ -2302,7 +2302,7 @@ static int hid_device_probe(struct device *dev) > return ret; > } > > -static int hid_device_remove(struct device *dev) > +static void hid_device_remove(struct device *dev) > { > struct hid_device *hdev = to_hid_device(dev); > struct hid_driver *hdrv; > @@ -2322,8 +2322,6 @@ static int hid_device_remove(struct device *dev) > > if (!hdev->io_started) > up(&hdev->driver_input_lock); > - > - return 0; > } > > static ssize_t modalias_show(struct device *dev, struct device_attribute *a, > diff --git a/drivers/hid/intel-ish-hid/ishtp/bus.c b/drivers/hid/intel-ish-hid/ishtp/bus.c > index f0802b047ed8..8a51bd9cd093 100644 > --- a/drivers/hid/intel-ish-hid/ishtp/bus.c > +++ b/drivers/hid/intel-ish-hid/ishtp/bus.c > @@ -255,7 +255,7 @@ static int ishtp_cl_bus_match(struct device *dev, struct device_driver *drv) > * > * Return: Return value from driver remove() call. > */ > -static int ishtp_cl_device_remove(struct device *dev) > +static void ishtp_cl_device_remove(struct device *dev) > { > struct ishtp_cl_device *device = to_ishtp_cl_device(dev); > struct ishtp_cl_driver *driver = to_ishtp_cl_driver(dev->driver); > @@ -267,8 +267,6 @@ static int ishtp_cl_device_remove(struct device *dev) > > if (driver->remove) > driver->remove(device); > - > - return 0; > } > > /** For the HID part: Acked-by: Benjamin Tissoires Cheers, Benjamin