From patchwork Mon Dec 5 15:36:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dawei Li X-Patchwork-Id: 13064703 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 44FF5C4708D for ; Mon, 5 Dec 2022 15:38:34 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.453894.711507 (Exim 4.92) (envelope-from ) id 1p2DXo-0006Ku-Bi; Mon, 05 Dec 2022 15:38:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 453894.711507; Mon, 05 Dec 2022 15:38:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p2DXo-0006K3-6G; Mon, 05 Dec 2022 15:38:12 +0000 Received: by outflank-mailman (input) for mailman id 453894; Mon, 05 Dec 2022 15:37:10 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p2DWo-0006Dh-DX for xen-devel@lists.xenproject.org; Mon, 05 Dec 2022 15:37:10 +0000 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01olkn20812.outbound.protection.outlook.com [2a01:111:f403:700c::812]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id adcd5a26-74b2-11ed-91b6-6bf2151ebd3b; Mon, 05 Dec 2022 16:37:09 +0100 (CET) Received: from TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:152::9) by TYYP286MB1787.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:f9::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Mon, 5 Dec 2022 15:37:04 +0000 Received: from TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM ([fe80::ff96:9cb6:e047:c605]) by TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM ([fe80::ff96:9cb6:e047:c605%5]) with mapi id 15.20.5880.014; Mon, 5 Dec 2022 15:37:04 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: adcd5a26-74b2-11ed-91b6-6bf2151ebd3b ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KBziAVoR2WC+9GvuA6QynHhoz5hN4+Y8XFu8MxX4WZPDQtqzsrOFiYzEaPsPsraFoRUSBxBkrOtqwdsLGUik0FyVSSu2k+A9G6yKTjRjYXGZAt0TncIE1C82KpYo9g+XPH5Uxkn3dpKxCRP3MjpYeaQO4cYUW3ZT2cacvw5HDyvFIPl91bAbDtwVFD5BpeeedDrhGkYnwTDo8JXieW5GoqWTfdnKtfUDGQWrlxTgAqWmNreJgIxgvx7MbJx2v7UGZLBCaMvY1aGPw7ShclqmvLtg2YBg6kWKT/hCHYJ3DgUWEwXvYYDjOnHU0h9MCpH48Z/QHsI378S9J0gcjBcwTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ae8lwIsssZlGnbFvce9EsnokVk2I1hNmGTfRw32yF8U=; b=B7XNc9P15NIrxeyAKyuiUDtsbVfsKCCytnTjSYPvnqj2nISsGfTnbVf58B5GF9e2I4ZXDwnhq69aku/mKj+IyeWsFLKLwrSMMdL7jbMRqcz1owy7qlWsvLj/3D/Y3P3fVxHW2DIP/Dej+dTYcKMmynMJoLvSamNVTOwgvqM+rIa9eHI1IYxLRuVWn3qNH+fVDah3OUGvDUcmszRR3/U9x9k1X23O/JqjPHtS1iX0NAx9buyPzzs4ShF/RhAaJk44OjqhyRR/x4Tm+PtzASjsFmrMDmlC6YCsl564cxqgzCbNVzy31kfJ1SHsFpK7o742Il9VuDRhxucxC01plBGrOw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ae8lwIsssZlGnbFvce9EsnokVk2I1hNmGTfRw32yF8U=; b=QSwuYPPeMUD2346RRtHUm7fbS75ximiKxVhdRykiY59UHGNbqZ40sMMmqOhZ/rExLp8XId50SW4LMs+Bi0OliaAqCkzFlxc4se6t9DRONHlfdYev0ULWxTu4hqaM3WlLiAl3lvwH1CKZLx2YsQy59nu38R44u1W1qODQWhqLsmv+4BVcnVd1A52n7mBTYc49iQyL9mWOmebk9qy+uxY9ZMu5U3lt0y988iKqz2/k/Y1YUOxGptyRgNlvROe9Y6oWiHO/dYfL9027ifuHAFK7ctS7/Vaj5/D4Xn4vUi7y22PWvI8kT+VQq2ust4JqOT8d8xYtLizOXQprqf2YG9JotA== From: Dawei Li To: gregkh@linuxfoundation.org Cc: johannes@sipsolutions.net, robert.jarzmik@free.fr, jgross@suse.com, sstabellini@kernel.org, oleksandr_tyshchenko@epam.com, roger.pau@citrix.com, srinivas.kandagatla@linaro.org, bgoswami@quicinc.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, xen-devel@lists.xenproject.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, Dawei Li Subject: [PATCH 1/6] hyperv: Make remove callback of hyperv driver void returned Date: Mon, 5 Dec 2022 23:36:39 +0800 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221205153644.60909-1-set_pte_at@outlook.com> References: <20221205153644.60909-1-set_pte_at@outlook.com> X-TMN: [WnNGDx12n1r1x93HO6MhsKT0plQVIEpL] X-ClientProxiedBy: SG2PR02CA0046.apcprd02.prod.outlook.com (2603:1096:3:18::34) To TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:152::9) X-Microsoft-Original-Message-ID: <20221205153644.60909-2-set_pte_at@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCP286MB2323:EE_|TYYP286MB1787:EE_ X-MS-Office365-Filtering-Correlation-Id: 71dbcf0a-5c3c-484a-620c-08dad6d68f0c X-MS-Exchange-SLBlob-MailProps: /OoUGmN/RpVKD6y7RJd2fRTadJ6Pq1otARSEbI97kVQ9z76jX14Tr7C5cCQtdf4M5XZP85xv443qKM8XJUUTY9vplACCtPV+01OWzWKqwEm2iHlIDyrUO2h0lX6vTsyGepk5inxHYSodPTq30yKGZCb1oU+MHA2jx2qwhzlFKJBjkvxRpXA66ICv3kBmsl/+CQkHPhlPySD0ss+9W2g+WZlGMm0yCUy32sd0q9YuypSmYJcPPXKXkJvNb0S6glt419b1MAQZ3edZnwWaqE2AX303XUrMGxNnL8mOY5ryp0KzO2VFc+drS0hf90EA15Gmf25f/ND2x302N3Ii4VwxJq6ywsdSvxBWFHXEx/8KwcRBINa9VqLaKeOWvLCe70XDh7+AXswzdLkkmlFRXIOx4g2sTZKzNdYaPfLdSXvYruRvY/wU6njOsTCDal9mSonQ/riFf5RehgwNzIsyydi7eqdnltxxkTf2EJ76QSl8BqH7QqE6YW48n/40JIZksnCx1ZMXbwFg6wO/ZbtNoZ8PNCSAOtRp1gpbiZ7j6Rnfl8e170ilDIVmZJUv6Z0c8B6pL0JpHm/cDQ4Meo5Jin7f+pqTvK37/9zROsfFAfDKvdgfadFemeJlSgnPC2LnDCjiWsiioc3KOdQ8V9hT81vpVikTB7r3gfcBKv8qAoXIa/FLeI+IevS/AbHLlhHLz34yPIVr2/SM6MRp970oINzuXfwF6xsFnaDtwEzwrWtQ7ervgOig9iOvwN3x8GrX0fi0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: B81qwk0qSoOZYJrtBfcT47Xt44jYLh/VKFX+E3kMqQYmfFk8SXM+8vExypNHMKIHQRT/zJMka4Er/K5f2P3NV15gVEMGgZsddBhEOYvuoQJFBnTT+eFhdEVqhhSSBVQRII6Fg1YsKgqtYoxtlj/4y9Bzh8ucSSHA+9TIbe9zQeHWhAM/PNQjttwG1RtFsGUvf/ofrbsDGcpq5xZALhbMMynXEZDqNrH6FwBiw0q/rUMEoUjomv3xyLonHh37yRgMMpZTbOOg7p3F5ouFUNilzcml3W2ytrKmI4RwD0xmKRvKUWA2+veZ9uYryabLOHMlkzOcUnRlHGAprOvRElfd+RPvytsT20SEsxI01F7C9g1hlAMmXYCRD8E7x++TEy12CRZxKwNWB0vDtUrEgSmqTlx5Zy0U9YASgSJoZs7Vj2WDRggJZuFkiLxvN4tp1or0Kc9iuKf5u5rtVEewhWlPaPMGyXLtCiI9VGBELA4a7bXJsU6eP0yQg6B6cnZgrJeH9jhGjAsKaL6jbESfVQaNOHzB05pkr5hLy5I36GsXT4ws9/AoAVF2WJntTF/uh+A0fX+MvcCspw5mrjeXtjU5W5trzILnWpssLIlSir9r8lI2blmOURidgALv8igds8PQZK0s18MN9vyvhdVnDuKlvQ== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: n522cQ1GcV1UrEICbjb1j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Hzj47tXVODhJYUfjHGV8RVokJNnilNt1X/Uin5HYRGuf5JpyQq9sowMV9A/V4+/dsApi3EVrtxGmnLkI5+zCUAKFYRN1BaDttA4mXqSKP0eNuzIlhV0MiCmeMZcjrLSLkML7PpDFNy6PxJ09OZjOfszzoue64UTwi658sIGyLvVSy1u2akAKATiYbm2iHssmNVQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 71dbcf0a-5c3c-484a-620c-08dad6d68f0c X-MS-Exchange-CrossTenant-AuthSource: TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2022 15:37:04.0145 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYYP286MB1787 Since commit fc7a6209d571 ("bus: Make remove callback return void") forces bus_type::remove be void-returned, it doesn't make much sense for any bus based driver implementing remove callbalk to return non-void to its caller. This change is for hyperv bus based drivers. Signed-off-by: Dawei Li --- drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 4 +--- drivers/hid/hid-hyperv.c | 4 +--- drivers/hv/hv_balloon.c | 5 +---- drivers/hv/hv_util.c | 4 +--- drivers/input/serio/hyperv-keyboard.c | 4 +--- drivers/net/hyperv/netvsc_drv.c | 4 +--- drivers/pci/controller/pci-hyperv.c | 3 +-- drivers/scsi/storvsc_drv.c | 4 +--- drivers/uio/uio_hv_generic.c | 5 ++--- drivers/video/fbdev/hyperv_fb.c | 5 +---- include/linux/hyperv.h | 2 +- net/vmw_vsock/hyperv_transport.c | 4 +--- 12 files changed, 13 insertions(+), 35 deletions(-) diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c index ca127ff797f7..d117fff26d99 100644 --- a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c +++ b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c @@ -165,7 +165,7 @@ static int hyperv_vmbus_probe(struct hv_device *hdev, return ret; } -static int hyperv_vmbus_remove(struct hv_device *hdev) +static void hyperv_vmbus_remove(struct hv_device *hdev) { struct drm_device *dev = hv_get_drvdata(hdev); struct hyperv_drm_device *hv = to_hv(dev); @@ -176,8 +176,6 @@ static int hyperv_vmbus_remove(struct hv_device *hdev) hv_set_drvdata(hdev, NULL); vmbus_free_mmio(hv->mem->start, hv->fb_size); - - return 0; } static int hyperv_vmbus_suspend(struct hv_device *hdev) diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c index ab57b49a44ed..ef16c2a54362 100644 --- a/drivers/hid/hid-hyperv.c +++ b/drivers/hid/hid-hyperv.c @@ -535,7 +535,7 @@ static int mousevsc_probe(struct hv_device *device, } -static int mousevsc_remove(struct hv_device *dev) +static void mousevsc_remove(struct hv_device *dev) { struct mousevsc_dev *input_dev = hv_get_drvdata(dev); @@ -544,8 +544,6 @@ static int mousevsc_remove(struct hv_device *dev) hid_hw_stop(input_dev->hid_device); hid_destroy_device(input_dev->hid_device); mousevsc_free_device(input_dev); - - return 0; } static int mousevsc_suspend(struct hv_device *dev) diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index 6c127f061f06..6bbd2e6fa3d4 100644 --- a/drivers/hv/hv_balloon.c +++ b/drivers/hv/hv_balloon.c @@ -1990,7 +1990,7 @@ static int balloon_probe(struct hv_device *dev, return ret; } -static int balloon_remove(struct hv_device *dev) +static void balloon_remove(struct hv_device *dev) { struct hv_dynmem_device *dm = hv_get_drvdata(dev); struct hv_hotadd_state *has, *tmp; @@ -2031,8 +2031,6 @@ static int balloon_remove(struct hv_device *dev) kfree(has); } spin_unlock_irqrestore(&dm_device.ha_lock, flags); - - return 0; } static int balloon_suspend(struct hv_device *hv_dev) @@ -2112,7 +2110,6 @@ static struct hv_driver balloon_drv = { static int __init init_balloon_drv(void) { - return vmbus_driver_register(&balloon_drv); } diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c index 835e6039c186..24995ac41c86 100644 --- a/drivers/hv/hv_util.c +++ b/drivers/hv/hv_util.c @@ -602,7 +602,7 @@ static int util_probe(struct hv_device *dev, return ret; } -static int util_remove(struct hv_device *dev) +static void util_remove(struct hv_device *dev) { struct hv_util_service *srv = hv_get_drvdata(dev); @@ -610,8 +610,6 @@ static int util_remove(struct hv_device *dev) srv->util_deinit(); vmbus_close(dev->channel); kfree(srv->recv_buffer); - - return 0; } /* diff --git a/drivers/input/serio/hyperv-keyboard.c b/drivers/input/serio/hyperv-keyboard.c index d62aefb2e245..31def6ce5157 100644 --- a/drivers/input/serio/hyperv-keyboard.c +++ b/drivers/input/serio/hyperv-keyboard.c @@ -369,7 +369,7 @@ static int hv_kbd_probe(struct hv_device *hv_dev, return error; } -static int hv_kbd_remove(struct hv_device *hv_dev) +static void hv_kbd_remove(struct hv_device *hv_dev) { struct hv_kbd_dev *kbd_dev = hv_get_drvdata(hv_dev); @@ -378,8 +378,6 @@ static int hv_kbd_remove(struct hv_device *hv_dev) kfree(kbd_dev); hv_set_drvdata(hv_dev, NULL); - - return 0; } static int hv_kbd_suspend(struct hv_device *hv_dev) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 89eb4f179a3c..50c20e4d4147 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -2594,7 +2594,7 @@ static int netvsc_probe(struct hv_device *dev, return ret; } -static int netvsc_remove(struct hv_device *dev) +static void netvsc_remove(struct hv_device *dev) { struct net_device_context *ndev_ctx; struct net_device *vf_netdev, *net; @@ -2603,7 +2603,6 @@ static int netvsc_remove(struct hv_device *dev) net = hv_get_drvdata(dev); if (net == NULL) { dev_err(&dev->device, "No net device to remove\n"); - return 0; } ndev_ctx = netdev_priv(net); @@ -2637,7 +2636,6 @@ static int netvsc_remove(struct hv_device *dev) free_percpu(ndev_ctx->vf_stats); free_netdev(net); - return 0; } static int netvsc_suspend(struct hv_device *dev) diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c index ba64284eaf9f..3a09de70d6ea 100644 --- a/drivers/pci/controller/pci-hyperv.c +++ b/drivers/pci/controller/pci-hyperv.c @@ -3756,7 +3756,7 @@ static int hv_pci_bus_exit(struct hv_device *hdev, bool keep_devs) * * Return: 0 on success, -errno on failure */ -static int hv_pci_remove(struct hv_device *hdev) +static void hv_pci_remove(struct hv_device *hdev) { struct hv_pcibus_device *hbus; int ret; @@ -3795,7 +3795,6 @@ static int hv_pci_remove(struct hv_device *hdev) hv_put_dom_num(hbus->bridge->domain_nr); kfree(hbus); - return ret; } static int hv_pci_suspend(struct hv_device *hdev) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index bc46721aa01c..d253e7d5959d 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -2093,7 +2093,7 @@ static int storvsc_change_queue_depth(struct scsi_device *sdev, int queue_depth) return scsi_change_queue_depth(sdev, queue_depth); } -static int storvsc_remove(struct hv_device *dev) +static void storvsc_remove(struct hv_device *dev) { struct storvsc_device *stor_device = hv_get_drvdata(dev); struct Scsi_Host *host = stor_device->host; @@ -2109,8 +2109,6 @@ static int storvsc_remove(struct hv_device *dev) scsi_remove_host(host); storvsc_dev_remove(dev); scsi_host_put(host); - - return 0; } static int storvsc_suspend(struct hv_device *hv_dev) diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c index c08a6cfd119f..20d9762331bd 100644 --- a/drivers/uio/uio_hv_generic.c +++ b/drivers/uio/uio_hv_generic.c @@ -355,20 +355,19 @@ hv_uio_probe(struct hv_device *dev, return ret; } -static int +static void hv_uio_remove(struct hv_device *dev) { struct hv_uio_private_data *pdata = hv_get_drvdata(dev); if (!pdata) - return 0; + return; sysfs_remove_bin_file(&dev->channel->kobj, &ring_buffer_bin_attr); uio_unregister_device(&pdata->info); hv_uio_cleanup(dev, pdata); vmbus_free_ring(dev->channel); - return 0; } static struct hv_driver hv_uio_drv = { diff --git a/drivers/video/fbdev/hyperv_fb.c b/drivers/video/fbdev/hyperv_fb.c index 072ce07ba9e0..721b7c34a99e 100644 --- a/drivers/video/fbdev/hyperv_fb.c +++ b/drivers/video/fbdev/hyperv_fb.c @@ -1226,8 +1226,7 @@ static int hvfb_probe(struct hv_device *hdev, return ret; } - -static int hvfb_remove(struct hv_device *hdev) +static void hvfb_remove(struct hv_device *hdev) { struct fb_info *info = hv_get_drvdata(hdev); struct hvfb_par *par = info->par; @@ -1248,8 +1247,6 @@ static int hvfb_remove(struct hv_device *hdev) hvfb_putmem(hdev, info); framebuffer_release(info); - - return 0; } static int hvfb_suspend(struct hv_device *hdev) diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 3b42264333ef..1f128f28a487 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -1273,7 +1273,7 @@ struct hv_driver { } dynids; int (*probe)(struct hv_device *, const struct hv_vmbus_device_id *); - int (*remove)(struct hv_device *); + void (*remove)(struct hv_device *dev); void (*shutdown)(struct hv_device *); int (*suspend)(struct hv_device *); diff --git a/net/vmw_vsock/hyperv_transport.c b/net/vmw_vsock/hyperv_transport.c index 59c3e2697069..7cb1a9d2cdb4 100644 --- a/net/vmw_vsock/hyperv_transport.c +++ b/net/vmw_vsock/hyperv_transport.c @@ -879,13 +879,11 @@ static int hvs_probe(struct hv_device *hdev, return 0; } -static int hvs_remove(struct hv_device *hdev) +static void hvs_remove(struct hv_device *hdev) { struct vmbus_channel *chan = hdev->channel; vmbus_close(chan); - - return 0; } /* hv_sock connections can not persist across hibernation, and all the hv_sock From patchwork Mon Dec 5 15:36:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dawei Li X-Patchwork-Id: 13064701 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C6261C47090 for ; Mon, 5 Dec 2022 15:38:33 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.453897.711511 (Exim 4.92) (envelope-from ) id 1p2DXo-0006OM-J3; Mon, 05 Dec 2022 15:38:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 453897.711511; Mon, 05 Dec 2022 15:38:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p2DXo-0006MH-Do; Mon, 05 Dec 2022 15:38:12 +0000 Received: by outflank-mailman (input) for mailman id 453897; Mon, 05 Dec 2022 15:37:16 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p2DWt-0006Dh-U8 for xen-devel@lists.xenproject.org; Mon, 05 Dec 2022 15:37:16 +0000 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01olkn2082e.outbound.protection.outlook.com [2a01:111:f403:700c::82e]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id b0408edb-74b2-11ed-91b6-6bf2151ebd3b; Mon, 05 Dec 2022 16:37:14 +0100 (CET) Received: from TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:152::9) by TYYP286MB1787.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:f9::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Mon, 5 Dec 2022 15:37:07 +0000 Received: from TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM ([fe80::ff96:9cb6:e047:c605]) by TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM ([fe80::ff96:9cb6:e047:c605%5]) with mapi id 15.20.5880.014; Mon, 5 Dec 2022 15:37:07 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b0408edb-74b2-11ed-91b6-6bf2151ebd3b ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lG8uj8NBjE5PUuzn6Ic/I2wJdxn5/mJzy48ndim6z1trD8Lmi4GBfKgXXDLmxuIs/4g1fCKUSa2ZuqeQU4jHE1Xinpr3CwIlEHiihlpmErHywIrvyFCBIlFohjSjNSd3nGmEUGwm9Ou5pygtvweNiQQ9aFl2hBudTdnoYtPbAI/Ec6dkNQDW4dpRABX+zhrb6zygJQJJU/QDdtZGcHbXzBiKQPkH6C6oaTsYvB6DzVg7qsraTIWISBfl01hKdq8w108YjJKpwgiAWLeWuMFxZ0oZwgHSIQbVMiTpdsW0bo/e7/v/bQCZJVFUQjGmeaubgUUJYhNEq1QUct6VMRNprA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wE0/eQ+6q+25iqD5ZenU2/gHmtgukmMINoE3za9MCQE=; b=JD9x2ZO7WGaw9uDcFTbKoNqcSNJbIMdCHH1TMgTgpnyYslO345m8Fjutjy2Zn1DKFpjUTZ9wioL2uATH7+F6oMEuDkzEcDvOCkqDxhsbGfW1urFOQZMppq7lTdu/jBK6HDq7gobGAp3HFSQ/8/DSj6I9Spmh7bthg5a55BUapM2RKjv+YPgJ2wbV2L+bnQM2tkTiZtDMmj4bc590+GoOA5l3ZPzklGsghyzIsXmKor2QDZej9YE/yFCw35AePw4nK+qcz2/5dhw6Ff6Q6+WPIUaK6uqA4mCWtS8X60fr0oNvgsu8A1SEbR+Pw/hfAVPfCgqJ33wNfNljG/d/WLhAwQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wE0/eQ+6q+25iqD5ZenU2/gHmtgukmMINoE3za9MCQE=; b=dx3eJWRaBTBpNwCoHkYi2RXXcegnG2VYD8lU60lzx5bw1EOyNycZqgb/9eatsqH8hdTlupt1L0Et3uB4zfm87Dm8tZPMAFSluMDbDeQip6DWY6laPJSHk61AmrNy0yvc9uC5YtjmZWULZf4Igy2+48D1A9bjK+e4soZ2AV8if1GyuP++c4uDx+0GNhgCcTsif/w1z3gtKkPoeOUGEGCdZxxxSc8QkETrTgeyBosfKu686VbZsjccfjoLNd32GJC1BvvwkxwxyXcSpTCS4R5r5Ll4DEIuA8v4uS9Blf44Lx+/+iwKf2MHcmydM5VyBa16rXTMJOK5z0nK6PP/aglmMg== From: Dawei Li To: gregkh@linuxfoundation.org Cc: johannes@sipsolutions.net, robert.jarzmik@free.fr, jgross@suse.com, sstabellini@kernel.org, oleksandr_tyshchenko@epam.com, roger.pau@citrix.com, srinivas.kandagatla@linaro.org, bgoswami@quicinc.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, xen-devel@lists.xenproject.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, Dawei Li Subject: [PATCH 2/6] macio: Make remove callback of macio driver void returned Date: Mon, 5 Dec 2022 23:36:40 +0800 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221205153644.60909-1-set_pte_at@outlook.com> References: <20221205153644.60909-1-set_pte_at@outlook.com> X-TMN: [xkiGoP8CYtlHfMaNN+v2tHJgza4DLRGN] X-ClientProxiedBy: SG2PR02CA0046.apcprd02.prod.outlook.com (2603:1096:3:18::34) To TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:152::9) X-Microsoft-Original-Message-ID: <20221205153644.60909-3-set_pte_at@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCP286MB2323:EE_|TYYP286MB1787:EE_ X-MS-Office365-Filtering-Correlation-Id: 192953c7-e272-4eaf-ac9c-08dad6d69148 X-MS-Exchange-SLBlob-MailProps: /OoUGmN/RpVKD6y7RJd2fRTadJ6Pq1otARSEbI97kVRmQMivREdx/fj4xvoyz2Zq9680D287XvcJfvbpYLWgzmmRjngDq0kGxb/k5K6aOfp2gz1qD+4htLUHYy4q0uG6RtozbuMbhaPV54ULJjuqx0X/uqMnZEyOUq1/s2fYGDtf/3uVSMEisii35FvUzi12oL4x/WSREC0moS45NWFGeif8HLP0FMgivzl1phxJQV6Xiy54UqsasQPza7cAhpw0Yi45OnLh7EtTtBo4qfqktDg4rpH++FaEBWI+mKxMZYziAiASW4Rqx6JlQE+0qKNuF/cODHfxLAYMTR/arsAlFcUKKjVyC6szIaq6q5TF+06W9CT5D2y9G6DcypuHbgq8KenMt7CIqt7y1NH20Rhg0wDQh/ULFvd487BWo1st6EUra7IyKKRRga+Gf226dSPsmwl7yyXLWfkHR6hsqgE+4II6VnVGnJ3bhXisgVHKWOPC296OcJipkalvfT7ulyR6M1YObXLAGxGROXlc02+XLIUAYZTA1zNPlQnFN1zSAY9kPcLd4YOx1Pzx2nU7obCOarZJikcBhVBRby2lLi0eWnEeTa0rt047HMEzgbwsn905UGRUJKyiIg/PEn8Cfh3/raGhf11h3VadG4Oe6+I+e6i/YY6bXFgRdCtJyDXIVZ4TzYE2lm7vRgyPl/2HyLDZtF+xKwZyn+R7hfCiRcNlqsTsjr5zCWw5VrwxxiV6Op9OjJkFj/CrZBzoJ+z/E251 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mBT40HvRhGQ0coBwCX43Ch3gb9SuzktfgyO0+BO0iqhKuEqM7S+gZlMSg51OAZiGMv5x7EbrqhtDJZUhP8fgVj6BBSW2UcSvpwwTnBo4E59dw9dgPHb8G0dzDRzCA55U177yvnf6BuHb9wyHIigIkNMn2bei193EVo15Gi7DbCYfdHaztrI3OyqThhvDWV75dPuLmdHjZWu2xjiR5wvNF48pv7uNJgxwlgZXsCPKqqpmMWHcUYp+AGZ8B9K/vX5vsERqC9QQOUfud8YFUHmYaoMwgIA4awKCBrtTzR/MzbJLuOWkTRcCgBCV7Cn5+OA2qPCeDXFfalVpuEYT6BH4bYofviJolpe1X9O/iyix6sz2G1nprpxQbiruGyDXAWSlK591weGFhsdUH5a+iINRjAPBFwV1L6a8E+zm2Vj9WggBQz1Bqdpb9Y7h/M1mao1njsrTjK5VuBHVEy9lMEXn4wYxawE1E1LEzqEm11mD6sZgPAlPJ9dUhx/n8PFH2SqYuAFzU+rgRkVcQnI1xdIyOXaHajS7wQ4aU24mmrnsGmfQL4vSKCLgyYO9VLJqgtLXTBbQN5YgszMIU692viVQ4AVlbXD+qA4UM2vvqrWLOLHMaAvr7DnNi1GUwXZbJQiAsURY9XMAyR/FeJnAf1ftYQ== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rQg4ccoCdqEz63snTfCGUwVdDcppMyb7YVU/lhVPvlUYjOatj8zx6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6kR5V9tTqsFSA4K5iwHBqtj+uBhMpXgXRVBFgWVoHgL5ZjMJ8rM11XhkHfsit4293mcBfYmx7nvAh7dF79tMGy97eIgn3rgJuQuyxYhTxcxx2xwp2qFYuVKomuKD4GMxkcE8D4NT8vvglovbn0srcEcODNX8raPQbdK42TzCKEErQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 192953c7-e272-4eaf-ac9c-08dad6d69148 X-MS-Exchange-CrossTenant-AuthSource: TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2022 15:37:07.7806 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYYP286MB1787 Commit fc7a6209d571 ("bus: Make remove callback return void") forces bus_type::remove be void-returned, it doesn't make much sense for any bus based driver implementing remove callbalk to return non-void to its caller. This change is for macio bus based drivers. Signed-off-by: Dawei Li --- arch/powerpc/include/asm/macio.h | 12 ++++++------ drivers/ata/pata_macio.c | 4 +--- drivers/macintosh/rack-meter.c | 4 +--- drivers/net/ethernet/apple/bmac.c | 4 +--- drivers/net/ethernet/apple/mace.c | 4 +--- drivers/net/wireless/intersil/orinoco/airport.c | 4 +--- drivers/scsi/mac53c94.c | 5 +---- drivers/scsi/mesh.c | 5 +---- drivers/tty/serial/pmac_zilog.c | 7 ++----- sound/aoa/soundbus/i2sbus/core.c | 4 +--- 10 files changed, 16 insertions(+), 37 deletions(-) diff --git a/arch/powerpc/include/asm/macio.h b/arch/powerpc/include/asm/macio.h index ff5fd82d9ff0..f641c730c3b7 100644 --- a/arch/powerpc/include/asm/macio.h +++ b/arch/powerpc/include/asm/macio.h @@ -124,15 +124,15 @@ static inline struct pci_dev *macio_get_pci_dev(struct macio_dev *mdev) */ struct macio_driver { - int (*probe)(struct macio_dev* dev, const struct of_device_id *match); - int (*remove)(struct macio_dev* dev); + int (*probe)(struct macio_dev *dev, const struct of_device_id *match); + void (*remove)(struct macio_dev *dev); - int (*suspend)(struct macio_dev* dev, pm_message_t state); - int (*resume)(struct macio_dev* dev); - int (*shutdown)(struct macio_dev* dev); + int (*suspend)(struct macio_dev *dev, pm_message_t state); + int (*resume)(struct macio_dev *dev); + int (*shutdown)(struct macio_dev *dev); #ifdef CONFIG_PMAC_MEDIABAY - void (*mediabay_event)(struct macio_dev* dev, int mb_state); + void (*mediabay_event)(struct macio_dev *dev, int mb_state); #endif struct device_driver driver; }; diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c index 9ccaac9e2bc3..653106716a4b 100644 --- a/drivers/ata/pata_macio.c +++ b/drivers/ata/pata_macio.c @@ -1187,7 +1187,7 @@ static int pata_macio_attach(struct macio_dev *mdev, return rc; } -static int pata_macio_detach(struct macio_dev *mdev) +static void pata_macio_detach(struct macio_dev *mdev) { struct ata_host *host = macio_get_drvdata(mdev); struct pata_macio_priv *priv = host->private_data; @@ -1202,8 +1202,6 @@ static int pata_macio_detach(struct macio_dev *mdev) ata_host_detach(host); unlock_media_bay(priv->mdev->media_bay); - - return 0; } #ifdef CONFIG_PM_SLEEP diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index c28893e41a8b..f2f83c4f3af5 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c @@ -523,7 +523,7 @@ static int rackmeter_probe(struct macio_dev* mdev, return rc; } -static int rackmeter_remove(struct macio_dev* mdev) +static void rackmeter_remove(struct macio_dev *mdev) { struct rackmeter *rm = dev_get_drvdata(&mdev->ofdev.dev); @@ -558,8 +558,6 @@ static int rackmeter_remove(struct macio_dev* mdev) /* Get rid of me */ kfree(rm); - - return 0; } static int rackmeter_shutdown(struct macio_dev* mdev) diff --git a/drivers/net/ethernet/apple/bmac.c b/drivers/net/ethernet/apple/bmac.c index 334de0d93c89..8b37ac1cc3d1 100644 --- a/drivers/net/ethernet/apple/bmac.c +++ b/drivers/net/ethernet/apple/bmac.c @@ -1591,7 +1591,7 @@ bmac_proc_info(char *buffer, char **start, off_t offset, int length) } #endif -static int bmac_remove(struct macio_dev *mdev) +static void bmac_remove(struct macio_dev *mdev) { struct net_device *dev = macio_get_drvdata(mdev); struct bmac_data *bp = netdev_priv(dev); @@ -1609,8 +1609,6 @@ static int bmac_remove(struct macio_dev *mdev) macio_release_resources(mdev); free_netdev(dev); - - return 0; } static const struct of_device_id bmac_match[] = diff --git a/drivers/net/ethernet/apple/mace.c b/drivers/net/ethernet/apple/mace.c index d0a771b65e88..b214524a5964 100644 --- a/drivers/net/ethernet/apple/mace.c +++ b/drivers/net/ethernet/apple/mace.c @@ -272,7 +272,7 @@ static int mace_probe(struct macio_dev *mdev, const struct of_device_id *match) return rc; } -static int mace_remove(struct macio_dev *mdev) +static void mace_remove(struct macio_dev *mdev) { struct net_device *dev = macio_get_drvdata(mdev); struct mace_data *mp; @@ -296,8 +296,6 @@ static int mace_remove(struct macio_dev *mdev) free_netdev(dev); macio_release_resources(mdev); - - return 0; } static void dbdma_reset(volatile struct dbdma_regs __iomem *dma) diff --git a/drivers/net/wireless/intersil/orinoco/airport.c b/drivers/net/wireless/intersil/orinoco/airport.c index a890bfa0d5cc..276a06cdd1f5 100644 --- a/drivers/net/wireless/intersil/orinoco/airport.c +++ b/drivers/net/wireless/intersil/orinoco/airport.c @@ -85,7 +85,7 @@ airport_resume(struct macio_dev *mdev) return err; } -static int +static void airport_detach(struct macio_dev *mdev) { struct orinoco_private *priv = dev_get_drvdata(&mdev->ofdev.dev); @@ -111,8 +111,6 @@ airport_detach(struct macio_dev *mdev) macio_set_drvdata(mdev, NULL); free_orinocodev(priv); - - return 0; } static int airport_hard_reset(struct orinoco_private *priv) diff --git a/drivers/scsi/mac53c94.c b/drivers/scsi/mac53c94.c index f75928f7773e..42648ca9b8ed 100644 --- a/drivers/scsi/mac53c94.c +++ b/drivers/scsi/mac53c94.c @@ -508,7 +508,7 @@ static int mac53c94_probe(struct macio_dev *mdev, const struct of_device_id *mat return rc; } -static int mac53c94_remove(struct macio_dev *mdev) +static void mac53c94_remove(struct macio_dev *mdev) { struct fsc_state *fp = (struct fsc_state *)macio_get_drvdata(mdev); struct Scsi_Host *host = fp->host; @@ -526,11 +526,8 @@ static int mac53c94_remove(struct macio_dev *mdev) scsi_host_put(host); macio_release_resources(mdev); - - return 0; } - static struct of_device_id mac53c94_match[] = { { diff --git a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c index 84b541a57b7b..cd2575b88c85 100644 --- a/drivers/scsi/mesh.c +++ b/drivers/scsi/mesh.c @@ -1986,7 +1986,7 @@ static int mesh_probe(struct macio_dev *mdev, const struct of_device_id *match) return -ENODEV; } -static int mesh_remove(struct macio_dev *mdev) +static void mesh_remove(struct macio_dev *mdev) { struct mesh_state *ms = (struct mesh_state *)macio_get_drvdata(mdev); struct Scsi_Host *mesh_host = ms->host; @@ -2013,11 +2013,8 @@ static int mesh_remove(struct macio_dev *mdev) macio_release_resources(mdev); scsi_host_put(mesh_host); - - return 0; } - static struct of_device_id mesh_match[] = { { diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c index fe2e4ec423f7..b8e2279cf60c 100644 --- a/drivers/tty/serial/pmac_zilog.c +++ b/drivers/tty/serial/pmac_zilog.c @@ -1509,12 +1509,12 @@ static int pmz_attach(struct macio_dev *mdev, const struct of_device_id *match) * That one should not be called, macio isn't really a hotswap device, * we don't expect one of those serial ports to go away... */ -static int pmz_detach(struct macio_dev *mdev) +static void pmz_detach(struct macio_dev *mdev) { struct uart_pmac_port *uap = dev_get_drvdata(&mdev->ofdev.dev); if (!uap) - return -ENODEV; + return; uart_remove_one_port(&pmz_uart_reg, &uap->port); @@ -1525,11 +1525,8 @@ static int pmz_detach(struct macio_dev *mdev) dev_set_drvdata(&mdev->ofdev.dev, NULL); uap->dev = NULL; uap->port.dev = NULL; - - return 0; } - static int pmz_suspend(struct macio_dev *mdev, pm_message_t pm_state) { struct uart_pmac_port *uap = dev_get_drvdata(&mdev->ofdev.dev); diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c index 51ed2f34b276..35f39727994d 100644 --- a/sound/aoa/soundbus/i2sbus/core.c +++ b/sound/aoa/soundbus/i2sbus/core.c @@ -364,15 +364,13 @@ static int i2sbus_probe(struct macio_dev* dev, const struct of_device_id *match) return 0; } -static int i2sbus_remove(struct macio_dev* dev) +static void i2sbus_remove(struct macio_dev *dev) { struct i2sbus_control *control = dev_get_drvdata(&dev->ofdev.dev); struct i2sbus_dev *i2sdev, *tmp; list_for_each_entry_safe(i2sdev, tmp, &control->list, item) soundbus_remove_one(&i2sdev->sound); - - return 0; } #ifdef CONFIG_PM From patchwork Mon Dec 5 15:36:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dawei Li X-Patchwork-Id: 13064702 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 094D8C4332F for ; Mon, 5 Dec 2022 15:38:35 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.453898.711518 (Exim 4.92) (envelope-from ) id 1p2DXo-0006YS-Tc; Mon, 05 Dec 2022 15:38:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 453898.711518; Mon, 05 Dec 2022 15:38:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p2DXo-0006XM-Om; Mon, 05 Dec 2022 15:38:12 +0000 Received: by outflank-mailman (input) for mailman id 453898; Mon, 05 Dec 2022 15:37:17 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p2DWu-0006Dh-UA for xen-devel@lists.xenproject.org; Mon, 05 Dec 2022 15:37:17 +0000 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01olkn2082e.outbound.protection.outlook.com [2a01:111:f403:700c::82e]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id b2007d28-74b2-11ed-91b6-6bf2151ebd3b; Mon, 05 Dec 2022 16:37:16 +0100 (CET) Received: from TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:152::9) by TYYP286MB1787.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:f9::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Mon, 5 Dec 2022 15:37:11 +0000 Received: from TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM ([fe80::ff96:9cb6:e047:c605]) by TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM ([fe80::ff96:9cb6:e047:c605%5]) with mapi id 15.20.5880.014; Mon, 5 Dec 2022 15:37:11 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b2007d28-74b2-11ed-91b6-6bf2151ebd3b ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IfU52xENsK/eGoxr26Dl7mVnudaTTOEbzczINgjQSLby8bJrEamE12FZRQXoWN4wmujJ9CUdorHT4/IMc3A2XgtgRWaYEZ4ftq6wz7aaibdvXGUuM9qd61eF/YIeM+3UWzoVu+OoLQSeJtmtROMG4v2rN8l8pUds0wET3rjBgkgI0tOK8IQylOpGGc4zeILtlF4nDLl6wWw0EsMMthhkIOor/auJHgNUpvmfAcbJuk7furgTGnn+rBUTr0EqWvqVuPkF6uXqdAg8owqMeAVfhImkM9BqLaoVJQn/de6yIvDPOBanJMiTw6RoFedT1SKrtpScuzEObz3P/HRmy0ds/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0iPM31kHRQF4aOShKwTu6rsQv7lE4UX1YT/WZYMS6xw=; b=WptfS67OFK97N/z+zyMVWsq0Co8va/7GFod+fn2Aemw2hBOzjVpbGH/LpJg8v8bFsgJN6hO6IhOiNwrr8Fiz+89PEL6yMRNqEZDYHgtUbbwF/w+esDOgfXb1BrmCv6IXjrz2sZhpFVUeJuLzVILxYB1fyMaWeFHT4mt3p6bVhJ7ADvjV0Wl+tPBRNJKGSR0Neoj4lxAZFvLyMdrJHP3NJjNhhKdUqm32GLxMD+elrTkBmph1I4Eq0a/wxUGczNx8zVZzuzyJqf+r324ukPzL5HNhhxf/EJ3qRxfg3bswxsFKSJ+NmUskpR7TMeXrNO06QN5nxoTr4pDFdkr7Kdij6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0iPM31kHRQF4aOShKwTu6rsQv7lE4UX1YT/WZYMS6xw=; b=ZFVihflyqyex2iZV58qrHhHts7l/bPLYgMSYjNy2RX6GDC12YZCkNA1nPXREKaKmMk3T+pZC74k4aR8vd+sKU32afXtAiAippD/6ikvqAKnHBHsPt25AqPa00VLj5EjEomJUqFnYGEtQ+YC2DKFmZ9/SFqdutL1QXGKdZ997o3hII6Snp2+UWd2rl3spFtib58lPM2J9GOfvuUMb5zhVxCeSweVaymIQVzMbS2hcTLw2AlFQsV4h8VSAbqu6ESjBUKtW9ya/NJcwVBZ9hFmO0dkENO9FIA/MDHbiVAC5gOdIlQnQAspDEASfTQvqDFsgTN3wK5qhO11gxPfz2gaHBQ== From: Dawei Li To: gregkh@linuxfoundation.org Cc: johannes@sipsolutions.net, robert.jarzmik@free.fr, jgross@suse.com, sstabellini@kernel.org, oleksandr_tyshchenko@epam.com, roger.pau@citrix.com, srinivas.kandagatla@linaro.org, bgoswami@quicinc.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, xen-devel@lists.xenproject.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, Dawei Li Subject: [PATCH 3/6] apr: make remove callback of apr driver void returned Date: Mon, 5 Dec 2022 23:36:41 +0800 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221205153644.60909-1-set_pte_at@outlook.com> References: <20221205153644.60909-1-set_pte_at@outlook.com> X-TMN: [KQ6Iu1DlV9BM4en0T0h6pGIzaDkslhnW] X-ClientProxiedBy: SG2PR02CA0046.apcprd02.prod.outlook.com (2603:1096:3:18::34) To TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:152::9) X-Microsoft-Original-Message-ID: <20221205153644.60909-4-set_pte_at@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCP286MB2323:EE_|TYYP286MB1787:EE_ X-MS-Office365-Filtering-Correlation-Id: a13fb080-54be-4566-c675-08dad6d69389 X-MS-Exchange-SLBlob-MailProps: i0w2f8qhTbr6OkeYxPWJvHH8J+DLRu5yohmcQaqGGfrlnPL7m1GYjqVxL/OSoNG54e076UYL2JyWZ2Vpknv4nFCLMqkYeCQTNbN3S+hlFgJXUSF9yLcaSmFOUA1lRwrbTJzQz6CEIotKtgEqK58h9JVdbYO5v4+JKS/PkI/Bs17Uxw6pNfe8DC8xu0iZT7mssf0DyzIgIue/e4S10Il7X3vhphF7VtOztTk+avMRv38LKuDRDj5/iIcqUspAb9BUcpRWImWYeAFsuYdJ5EalX73HrQioL7F/KkNlQjM4UVr1MOHjqgJhefFCKa6iwptu1eZClaCgAwkQ3m6bYDE4jIxfb3wEUaGIE6tmroepaCC9DeyuWmv3ILXPg+1dC6mHm+sxTO7eAkH28hbfHa13/bIy8+u9WjJL1aVNOvEJL+6m+FrQavQwAnSqPPLq6t/YrgEAqgwyafL7BuZybUfTMRUCvp+MSEulKJOuX67kx7VGMaL2rWcrgRMN3TcFnSGl7avmAV2hiJBu0IyqoDfp6BO9ZG/xu2+0QdUo4M4Y0nn1d9muamGnxwhM4Pony0rit9/DEhFQQMAXSPs3UN79d5sKkWCrsw3V2NMQTgqY18gVOw41buDAhRquTE1saYy+Hkip5XO+EvpxCynAPeUtZtguAgyNdGdTOVxMyh6//LfFv0xDKRZwuJXKwGNXPQ4L/bOSe9QK21ZfJS4ZROykObndS5JNuZR4 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UNIHCTi5RWgBmG1UV4+mnMKCqTf51IU2TVW/+uu0Ma9yTQfsclgqnV+C2IFoJcDpfhRTWexoftXw1O4Rvsagc0qjYix2kFU37Fr2Jtgjy7bLc8fMD3EE4UJ0KLuNCKw1ituoOpKYUJR4X5/UEyjtgR/Ieaoss9vjpr5EjBpeKzAk9rgqy41vhsUIwXEGsROsc/RSWbvUjJltm+1176mjEDMJoibixKYxSaPxIPFu4OJKWHFCNoQzib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qw38x08OSwVx/UG3Ty25XeapBLU4p4G7czx8hlnGU+tknUCKxzAU+RrpjCaNMhaZQd0HvXFqgPUDJBnYi2i+BzaaZiAdDt+yBsydwXi0aE88S01xnR7BCvGLs5s2pJKKdpTzTLuz8/nOYWjbKBnY8i9i1JKo+m4RcwUSxfI9iOEePYz9KaFT3Bnqd7lzoKmIqHLgbKdy5c9q8QxLXtvtDicnEQKgJjjIdRFZKQUYE511nvHz3wlsAVpLDzXBV3ZG4qj0Xwg5GBJy4J6qoSxFW9a/wMROOSPv+KUM0GmeVpV1MfHlVGv0bsIn2TbB4171iFaTVcx+OW9Ji07rhg+fRxSFnL3/F4nSo+xKUgM3ZuDiC8+AjcqLT5hfi/t9/eS6Ge6tGMygqfMfPXn3NnUkt8qc0be2Mfb8x99powNjUwYvZUAQA/UlzWl2in36lObaesXu1KiszvE3caMC56idC5fOHXcs0gP1/triSNaxffKtlSfit/PfKxvcVK7YFh4LlLEPs3xyo3xrOrbzoAuKAWSOnsqeAtwEAv6nBVKE974LnWX98B1U1BCXImx2nyGJkQOoxnvgdmQKI0o3Sw7METDfvPYo3WurRpsV70GYVN6fflOZuKOJewHBL4aSj0FkJhR3rHuTweXvGs6L7s2OC21OFpeZhiZdFma5/Bx2HidWX9AA/86WohISOiqfYRA58g== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a13fb080-54be-4566-c675-08dad6d69389 X-MS-Exchange-CrossTenant-AuthSource: TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2022 15:37:11.5471 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYYP286MB1787 Since commit fc7a6209d571 ("bus: Make remove callback return void") forces bus_type::remove be void-returned, it doesn't make much sense for any bus based driver implementing remove callbalk to return non-void to its caller. This change is for apr bus based drivers. Signed-off-by: Dawei Li --- include/linux/soc/qcom/apr.h | 2 +- sound/soc/qcom/qdsp6/q6core.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/linux/soc/qcom/apr.h b/include/linux/soc/qcom/apr.h index 23c5b30f3511..be98aebcb3e1 100644 --- a/include/linux/soc/qcom/apr.h +++ b/include/linux/soc/qcom/apr.h @@ -153,7 +153,7 @@ typedef struct apr_device gpr_device_t; struct apr_driver { int (*probe)(struct apr_device *sl); - int (*remove)(struct apr_device *sl); + void (*remove)(struct apr_device *sl); int (*callback)(struct apr_device *a, struct apr_resp_pkt *d); int (*gpr_callback)(struct gpr_resp_pkt *d, void *data, int op); diff --git a/sound/soc/qcom/qdsp6/q6core.c b/sound/soc/qcom/qdsp6/q6core.c index 5358fefd4210..49cfb32cd209 100644 --- a/sound/soc/qcom/qdsp6/q6core.c +++ b/sound/soc/qcom/qdsp6/q6core.c @@ -339,7 +339,7 @@ static int q6core_probe(struct apr_device *adev) return 0; } -static int q6core_exit(struct apr_device *adev) +static void q6core_exit(struct apr_device *adev) { struct q6core *core = dev_get_drvdata(&adev->dev); @@ -350,8 +350,6 @@ static int q6core_exit(struct apr_device *adev) g_core = NULL; kfree(core); - - return 0; } #ifdef CONFIG_OF From patchwork Mon Dec 5 15:36:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dawei Li X-Patchwork-Id: 13064704 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E6113C47089 for ; Mon, 5 Dec 2022 15:38:32 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.453901.711529 (Exim 4.92) (envelope-from ) id 1p2DXp-0006fq-Be; Mon, 05 Dec 2022 15:38:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 453901.711529; Mon, 05 Dec 2022 15:38:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p2DXp-0006d9-2o; Mon, 05 Dec 2022 15:38:13 +0000 Received: by outflank-mailman (input) for mailman id 453901; Mon, 05 Dec 2022 15:37:24 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p2DX2-0006Dh-0s for xen-devel@lists.xenproject.org; Mon, 05 Dec 2022 15:37:24 +0000 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01olkn2080d.outbound.protection.outlook.com [2a01:111:f403:700c::80d]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id b4fdb7af-74b2-11ed-91b6-6bf2151ebd3b; Mon, 05 Dec 2022 16:37:22 +0100 (CET) Received: from TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:152::9) by TYYP286MB1787.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:f9::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Mon, 5 Dec 2022 15:37:15 +0000 Received: from TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM ([fe80::ff96:9cb6:e047:c605]) by TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM ([fe80::ff96:9cb6:e047:c605%5]) with mapi id 15.20.5880.014; Mon, 5 Dec 2022 15:37:15 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b4fdb7af-74b2-11ed-91b6-6bf2151ebd3b ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q7jTjDzWGZuJWXp2Xf0AG8HahNOVOKnoEVsFB2rutv88BZM2c3xaXsz5C4fRwEFYb0Y0l8I3/v09pOe7xGheEc+3XKBDokUtRYf4d6TIAl1FBAXFQIp97ZKvkwM4XpG0cRI141tZw27/1glLmBRfRZlBadlg6b76Yt+gkNp36zEk3KRfdtezordshJbabUPS7m+x/U9DMblzEdnlyyBXNURfPkmvaAky5OW8OGVdHR4RaBQRmgaX8CXHPBJQ/0TYH5lhyeRMu0VYtq94jNEQbiQ3SKS4EApVilfLHuEzkCJJuPNSMdcn0VjWCfB0q9K9yHVPX9J2mqnnR3w/VyL58w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PUFfM58njfsAKB3lQ0oHWT+h/J46/EawXHZuEUQQcI8=; b=n+MVvpy1u7yw4FJFeLq6wmbp8Aiikb+XmfFP4Un4v43+NaTH6P6AGD8bff+tNXus4QBKR8KlsP6pHHquOzR661db/kTuhd7ODd5OfP98hSRqt3fkrMsyTF1FvfHaKCyzfWnxaOPeUe9YNAS9RP9gG2CLs2tQARU5yAQW3aUntwuy1qbVML3RoKw0EveyIxoAHAoStS73r6uTIKAOK9ItbA8lMrM4jIMi7PxZMADt6YZ9YYu8YRf97J8quAn9PTtRYjuXXXGQ2V4WrpXltnNp2YVvJnfKWiXwxX3xwz+gqt2rFmRIEci2Mrnz96NWlOT4JZjb271n3laTVc1i05eQUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PUFfM58njfsAKB3lQ0oHWT+h/J46/EawXHZuEUQQcI8=; b=TuOHIawJY1syipkEbNxq7xdl7eJkeRS4C2XwjghtApYQnL+OyWh3N13djfiAvpTblddOpb/RGECDEFcq/OMT6RkoEy7RhelxSRM9yMfGcSFrZWVR+o9DDP3+FavJWDDyH/5UsYJTP+dfgHmOWrO9nUxXmbwU2Y1hyeK0k/uS6qXKWvStLatYuS3me5fVW2zI/UhcUgm4WorpQ1GBeUki2k8MY2Gz3et9JpVYlMPPqrmoqCxX+keIKFOpIjL+T1pp0v7fu1mQ3xlSWZkjb/YhEs1bh3YCbhuFRGmu4hcqTQ9FBUAdY+t1bOPsVrIfdN6MF5ev5gGfJFCtrd1slydJiw== From: Dawei Li To: gregkh@linuxfoundation.org Cc: johannes@sipsolutions.net, robert.jarzmik@free.fr, jgross@suse.com, sstabellini@kernel.org, oleksandr_tyshchenko@epam.com, roger.pau@citrix.com, srinivas.kandagatla@linaro.org, bgoswami@quicinc.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, xen-devel@lists.xenproject.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, Dawei Li Subject: [PATCH 4/6] xen: make remove callback of xen driver void returned Date: Mon, 5 Dec 2022 23:36:42 +0800 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221205153644.60909-1-set_pte_at@outlook.com> References: <20221205153644.60909-1-set_pte_at@outlook.com> X-TMN: [pYL2ZN+CnnrmRvnvOClobKI4LpYOn9kj] X-ClientProxiedBy: SG2PR02CA0046.apcprd02.prod.outlook.com (2603:1096:3:18::34) To TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:152::9) X-Microsoft-Original-Message-ID: <20221205153644.60909-5-set_pte_at@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCP286MB2323:EE_|TYYP286MB1787:EE_ X-MS-Office365-Filtering-Correlation-Id: 98a76953-4a83-48a8-80d2-08dad6d695c8 X-MS-Exchange-SLBlob-MailProps: /OoUGmN/RpVKD6y7RJd2fRTadJ6Pq1otO0hXGE1Fkgli6QWdSXYMunSFX5pBjBN7ezKQeOV8KmNDGlFsM9QYDTvrVubKOUSRgjPFSd7fgVUt+R6alylE3Bq8Rzwp73dqfBU4V5uRSQqV/EucAcyogXSo97nG24RKNZYSZALSqTJRJmmeulUIBj6PfyTXQQo8z+I+PLm28x4LwHw2+SgbhGXZ1j+VviI2U/9lh9tYCeK/Odhk9DjR/lLUr0ZkqTsDQ/LYHZBz4i1homzrzwv9DPRQs8WPswEjAt25J86Hi1eQ1+UKeNBrCbjM6Vxey2UQ7WpPXdKHO45/RG5Wi1nn1tuQ3JwKrsJaz/OfKQQCzm96CIYpyDZcpupHWKvUHu2d5ztELB61IFxF+VHN91M0J2/a/MPW1piQs7x+xLxM+S5ClZ4IJJO1vqFE3z/oYymjBKDWgUmsD5DsPCZK7kjBOJMOakQN79HkVMHPRjbXfVYhp6N6qQnajV0D18cNm8dSQmzcU4TV9W3zHDe46LnW3ob/LRb/zYL1lu+DusPi6heXq9KIkR4SzW0KDVIPDP3Xkn8VKUc70RdDiMVEqFWAqdHKadztU19RkEAJuQGKF77Z9cxeOicaCCkXhtQLEDa0vuoqU0oHAAphIr7XJ8wshNQN9OZxdhTNhnQSojNki2EvFDyfLeuKkOYhJc+8/e2Culd4DHWXuzMqbK/pmzpPhu26Ik4SW4RIi33eRK2/73hcACfDYCLLQyQJ1EMS2GYp X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MDy9nSYZ5SidjtlSfxVwaH49UfrCtlA6Hp+5YkHMXi7a5Qbh70gNbqz/04MqTs0V0mDBN0cH6jFdHbOnYbTfHn6eYD1vXwKocP56wKrfiW+VJ4GC7y+nQU0KuiSmCJslPnii1E8EI34P+ZaaXhOv0Q1cepu3llbRHYHThj6yPG+VRib0JTEsgfQ33q5CtiznXQT4L984ilEkdNeIEutKJFpwjPxJAmLScCWzOBaa4N0GsnZLw8LukhGLRWPNr6tXpqvxCSDf5Oq884kSap9G9w8gX6h7rqEXsZoL7d+LHVxVfNq/0kBVGAld0VI98qyG3xMd/n5KSH0OHF4FxTMTLh+PjcLQekdaQ3UU/kYOxFxEpoYa9uhfIHgiz9DnCIMOOXmp/0BYG67fou17Gtw3leVDaMjxVvu992hiObXWRKzWir8HQcba+St0T7AnN4yFfsg162vMM1SYitV3j3AKU1gHKSSQJ4K9oWayKzaS8DjE3DIOchYA5t/8liH48hP+OZhk0+Ax9qN+OvTAkb4Y9KJKY+HxjACEooS0QBC6tZwyRhQ4IASyvh3J0TdBCcuW9CAM4gvYm1eMWwpn9X0i/Z+pBtNtBqjLQCNkEucpOl0JAycTsxCraShZfAhY/GyASqAphl7UbstovpOcjPnqJg== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 41yWUbTb+6oMhLkvyBM6Vf9d8NgDMAqc1TiVPJzUIyaQse0kv2xpc4+NqCKCzkr26/pVNLH/S1tEpXo4MJ4EIz0cKfwWFmdTC6ws6IJMwb19S15N01dY9WyEAJPgv6XUdd8lCR9a9446mrDepICxxzGJzNdUKchhnddoqMIyzonQw3LQ/zley6qqxaHsqN8iiNda48ik56V7kI6t5K+k08hPDtmKwpEaXETwSyoL0qN3R83zw18zbuhT8KUOhlTI9aFn35qf2x/DjNYbJ+samuje9guHxYyPjBKAm0hdqcgsjlTblwZxqf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-CrossTenant-AuthSource: TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2022 15:37:15.2981 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYYP286MB1787 Since commit fc7a6209d571 ("bus: Make remove callback return void") forces bus_type::remove be void-returned, it doesn't make much sense for any bus based driver implementing remove callbalk to return non-void to its caller. This change is for xen bus based drivers. Signed-off-by: Dawei Li Acked-by: Juergen Gross --- drivers/block/xen-blkback/xenbus.c | 4 +--- drivers/block/xen-blkfront.c | 3 +-- drivers/char/tpm/xen-tpmfront.c | 3 +-- drivers/gpu/drm/xen/xen_drm_front.c | 3 +-- drivers/input/misc/xen-kbdfront.c | 5 ++--- drivers/net/xen-netback/xenbus.c | 3 +-- drivers/net/xen-netfront.c | 4 +--- drivers/pci/xen-pcifront.c | 4 +--- drivers/scsi/xen-scsifront.c | 4 +--- drivers/tty/hvc/hvc_xen.c | 4 ++-- drivers/usb/host/xen-hcd.c | 4 +--- drivers/video/fbdev/xen-fbfront.c | 6 ++---- drivers/xen/pvcalls-back.c | 3 +-- drivers/xen/pvcalls-front.c | 3 +-- drivers/xen/xen-pciback/xenbus.c | 4 +--- drivers/xen/xen-scsiback.c | 4 +--- include/xen/xenbus.h | 2 +- net/9p/trans_xen.c | 3 +-- sound/xen/xen_snd_front.c | 3 +-- 19 files changed, 22 insertions(+), 47 deletions(-) diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c index c0227dfa4688..4807af1d5805 100644 --- a/drivers/block/xen-blkback/xenbus.c +++ b/drivers/block/xen-blkback/xenbus.c @@ -524,7 +524,7 @@ static int xen_vbd_create(struct xen_blkif *blkif, blkif_vdev_t handle, return 0; } -static int xen_blkbk_remove(struct xenbus_device *dev) +static void xen_blkbk_remove(struct xenbus_device *dev) { struct backend_info *be = dev_get_drvdata(&dev->dev); @@ -547,8 +547,6 @@ static int xen_blkbk_remove(struct xenbus_device *dev) /* Put the reference we set in xen_blkif_alloc(). */ xen_blkif_put(be->blkif); } - - return 0; } int xen_blkbk_flush_diskcache(struct xenbus_transaction xbt, diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 35b9bcad9db9..e68576ded7cb 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -2468,7 +2468,7 @@ static void blkback_changed(struct xenbus_device *dev, } } -static int blkfront_remove(struct xenbus_device *xbdev) +static void blkfront_remove(struct xenbus_device *xbdev) { struct blkfront_info *info = dev_get_drvdata(&xbdev->dev); @@ -2489,7 +2489,6 @@ static int blkfront_remove(struct xenbus_device *xbdev) } kfree(info); - return 0; } static int blkfront_is_ready(struct xenbus_device *dev) diff --git a/drivers/char/tpm/xen-tpmfront.c b/drivers/char/tpm/xen-tpmfront.c index 379291826261..80cca3b83b22 100644 --- a/drivers/char/tpm/xen-tpmfront.c +++ b/drivers/char/tpm/xen-tpmfront.c @@ -360,14 +360,13 @@ static int tpmfront_probe(struct xenbus_device *dev, return tpm_chip_register(priv->chip); } -static int tpmfront_remove(struct xenbus_device *dev) +static void tpmfront_remove(struct xenbus_device *dev) { struct tpm_chip *chip = dev_get_drvdata(&dev->dev); struct tpm_private *priv = dev_get_drvdata(&chip->dev); tpm_chip_unregister(chip); ring_free(priv); dev_set_drvdata(&chip->dev, NULL); - return 0; } static int tpmfront_resume(struct xenbus_device *dev) diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c index 0d8e6bd1ccbf..90996c108146 100644 --- a/drivers/gpu/drm/xen/xen_drm_front.c +++ b/drivers/gpu/drm/xen/xen_drm_front.c @@ -717,7 +717,7 @@ static int xen_drv_probe(struct xenbus_device *xb_dev, return xenbus_switch_state(xb_dev, XenbusStateInitialising); } -static int xen_drv_remove(struct xenbus_device *dev) +static void xen_drv_remove(struct xenbus_device *dev) { struct xen_drm_front_info *front_info = dev_get_drvdata(&dev->dev); int to = 100; @@ -751,7 +751,6 @@ static int xen_drv_remove(struct xenbus_device *dev) xen_drm_drv_fini(front_info); xenbus_frontend_closed(dev); - return 0; } static const struct xenbus_device_id xen_driver_ids[] = { diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c index 8d8ebdc2039b..67f1c7364c95 100644 --- a/drivers/input/misc/xen-kbdfront.c +++ b/drivers/input/misc/xen-kbdfront.c @@ -51,7 +51,7 @@ module_param_array(ptr_size, int, NULL, 0444); MODULE_PARM_DESC(ptr_size, "Pointing device width, height in pixels (default 800,600)"); -static int xenkbd_remove(struct xenbus_device *); +static void xenkbd_remove(struct xenbus_device *); static int xenkbd_connect_backend(struct xenbus_device *, struct xenkbd_info *); static void xenkbd_disconnect_backend(struct xenkbd_info *); @@ -404,7 +404,7 @@ static int xenkbd_resume(struct xenbus_device *dev) return xenkbd_connect_backend(dev, info); } -static int xenkbd_remove(struct xenbus_device *dev) +static void xenkbd_remove(struct xenbus_device *dev) { struct xenkbd_info *info = dev_get_drvdata(&dev->dev); @@ -417,7 +417,6 @@ static int xenkbd_remove(struct xenbus_device *dev) input_unregister_device(info->mtouch); free_page((unsigned long)info->page); kfree(info); - return 0; } static int xenkbd_connect_backend(struct xenbus_device *dev, diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c index c1ba4294f364..001636901dda 100644 --- a/drivers/net/xen-netback/xenbus.c +++ b/drivers/net/xen-netback/xenbus.c @@ -977,7 +977,7 @@ static int read_xenbus_vif_flags(struct backend_info *be) return 0; } -static int netback_remove(struct xenbus_device *dev) +static void netback_remove(struct xenbus_device *dev) { struct backend_info *be = dev_get_drvdata(&dev->dev); @@ -992,7 +992,6 @@ static int netback_remove(struct xenbus_device *dev) kfree(be->hotplug_script); kfree(be); dev_set_drvdata(&dev->dev, NULL); - return 0; } /* diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index 9af2b027c19c..bc17f5391b1a 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -2640,7 +2640,7 @@ static void xennet_bus_close(struct xenbus_device *dev) } while (!ret); } -static int xennet_remove(struct xenbus_device *dev) +static void xennet_remove(struct xenbus_device *dev) { struct netfront_info *info = dev_get_drvdata(&dev->dev); @@ -2656,8 +2656,6 @@ static int xennet_remove(struct xenbus_device *dev) rtnl_unlock(); } xennet_free_netdev(info->netdev); - - return 0; } static const struct xenbus_device_id netfront_ids[] = { diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c index 7378e2f3e525..fcd029ca2eb1 100644 --- a/drivers/pci/xen-pcifront.c +++ b/drivers/pci/xen-pcifront.c @@ -1055,14 +1055,12 @@ static int pcifront_xenbus_probe(struct xenbus_device *xdev, return err; } -static int pcifront_xenbus_remove(struct xenbus_device *xdev) +static void pcifront_xenbus_remove(struct xenbus_device *xdev) { struct pcifront_device *pdev = dev_get_drvdata(&xdev->dev); if (pdev) free_pdev(pdev); - - return 0; } static const struct xenbus_device_id xenpci_ids[] = { diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c index 66b316d173b0..71a3bb83984c 100644 --- a/drivers/scsi/xen-scsifront.c +++ b/drivers/scsi/xen-scsifront.c @@ -995,7 +995,7 @@ static int scsifront_suspend(struct xenbus_device *dev) return err; } -static int scsifront_remove(struct xenbus_device *dev) +static void scsifront_remove(struct xenbus_device *dev) { struct vscsifrnt_info *info = dev_get_drvdata(&dev->dev); @@ -1011,8 +1011,6 @@ static int scsifront_remove(struct xenbus_device *dev) scsifront_free_ring(info); scsi_host_put(info->host); - - return 0; } static void scsifront_disconnect(struct vscsifrnt_info *info) diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index 7c23112dc923..c879f922c716 100644 --- a/drivers/tty/hvc/hvc_xen.c +++ b/drivers/tty/hvc/hvc_xen.c @@ -394,9 +394,9 @@ static int xen_console_remove(struct xencons_info *info) return 0; } -static int xencons_remove(struct xenbus_device *dev) +static void xencons_remove(struct xenbus_device *dev) { - return xen_console_remove(dev_get_drvdata(&dev->dev)); + xen_console_remove(dev_get_drvdata(&dev->dev)); } static int xencons_connect_backend(struct xenbus_device *dev, diff --git a/drivers/usb/host/xen-hcd.c b/drivers/usb/host/xen-hcd.c index de1b09158318..46fdab940092 100644 --- a/drivers/usb/host/xen-hcd.c +++ b/drivers/usb/host/xen-hcd.c @@ -1530,15 +1530,13 @@ static void xenhcd_backend_changed(struct xenbus_device *dev, } } -static int xenhcd_remove(struct xenbus_device *dev) +static void xenhcd_remove(struct xenbus_device *dev) { struct xenhcd_info *info = dev_get_drvdata(&dev->dev); struct usb_hcd *hcd = xenhcd_info_to_hcd(info); xenhcd_destroy_rings(info); usb_put_hcd(hcd); - - return 0; } static int xenhcd_probe(struct xenbus_device *dev, diff --git a/drivers/video/fbdev/xen-fbfront.c b/drivers/video/fbdev/xen-fbfront.c index 4d2694d904aa..ae8a50ecdbd3 100644 --- a/drivers/video/fbdev/xen-fbfront.c +++ b/drivers/video/fbdev/xen-fbfront.c @@ -67,7 +67,7 @@ MODULE_PARM_DESC(video, "Video memory size in MB, width, height in pixels (default 2,800,600)"); static void xenfb_make_preferred_console(void); -static int xenfb_remove(struct xenbus_device *); +static void xenfb_remove(struct xenbus_device *); static void xenfb_init_shared_page(struct xenfb_info *, struct fb_info *); static int xenfb_connect_backend(struct xenbus_device *, struct xenfb_info *); static void xenfb_disconnect_backend(struct xenfb_info *); @@ -527,7 +527,7 @@ static int xenfb_resume(struct xenbus_device *dev) return xenfb_connect_backend(dev, info); } -static int xenfb_remove(struct xenbus_device *dev) +static void xenfb_remove(struct xenbus_device *dev) { struct xenfb_info *info = dev_get_drvdata(&dev->dev); @@ -542,8 +542,6 @@ static int xenfb_remove(struct xenbus_device *dev) vfree(info->gfns); vfree(info->fb); kfree(info); - - return 0; } static unsigned long vmalloc_to_gfn(void *address) diff --git a/drivers/xen/pvcalls-back.c b/drivers/xen/pvcalls-back.c index d6f945fd4147..ea52a2092bb8 100644 --- a/drivers/xen/pvcalls-back.c +++ b/drivers/xen/pvcalls-back.c @@ -1181,9 +1181,8 @@ static void pvcalls_back_changed(struct xenbus_device *dev, } } -static int pvcalls_back_remove(struct xenbus_device *dev) +static void pvcalls_back_remove(struct xenbus_device *dev) { - return 0; } static int pvcalls_back_uevent(struct xenbus_device *xdev, diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c index 1826e8e67125..5328f4d35f25 100644 --- a/drivers/xen/pvcalls-front.c +++ b/drivers/xen/pvcalls-front.c @@ -1085,7 +1085,7 @@ static const struct xenbus_device_id pvcalls_front_ids[] = { { "" } }; -static int pvcalls_front_remove(struct xenbus_device *dev) +static void pvcalls_front_remove(struct xenbus_device *dev) { struct pvcalls_bedata *bedata; struct sock_mapping *map = NULL, *n; @@ -1121,7 +1121,6 @@ static int pvcalls_front_remove(struct xenbus_device *dev) kfree(bedata->ring.sring); kfree(bedata); xenbus_switch_state(dev, XenbusStateClosed); - return 0; } static int pvcalls_front_probe(struct xenbus_device *dev, diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback/xenbus.c index d171091eec12..b11e401f1b1e 100644 --- a/drivers/xen/xen-pciback/xenbus.c +++ b/drivers/xen/xen-pciback/xenbus.c @@ -716,14 +716,12 @@ static int xen_pcibk_xenbus_probe(struct xenbus_device *dev, return err; } -static int xen_pcibk_xenbus_remove(struct xenbus_device *dev) +static void xen_pcibk_xenbus_remove(struct xenbus_device *dev) { struct xen_pcibk_device *pdev = dev_get_drvdata(&dev->dev); if (pdev != NULL) free_pdev(pdev); - - return 0; } static const struct xenbus_device_id xen_pcibk_ids[] = { diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c index 6106ed93817d..954188b0b858 100644 --- a/drivers/xen/xen-scsiback.c +++ b/drivers/xen/xen-scsiback.c @@ -1249,7 +1249,7 @@ static void scsiback_release_translation_entry(struct vscsibk_info *info) spin_unlock_irqrestore(&info->v2p_lock, flags); } -static int scsiback_remove(struct xenbus_device *dev) +static void scsiback_remove(struct xenbus_device *dev) { struct vscsibk_info *info = dev_get_drvdata(&dev->dev); @@ -1261,8 +1261,6 @@ static int scsiback_remove(struct xenbus_device *dev) gnttab_page_cache_shrink(&info->free_pages, 0); dev_set_drvdata(&dev->dev, NULL); - - return 0; } static int scsiback_probe(struct xenbus_device *dev, diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h index eaa932b99d8a..ad4fb4eab753 100644 --- a/include/xen/xenbus.h +++ b/include/xen/xenbus.h @@ -117,7 +117,7 @@ struct xenbus_driver { const struct xenbus_device_id *id); void (*otherend_changed)(struct xenbus_device *dev, enum xenbus_state backend_state); - int (*remove)(struct xenbus_device *dev); + void (*remove)(struct xenbus_device *dev); int (*suspend)(struct xenbus_device *dev); int (*resume)(struct xenbus_device *dev); int (*uevent)(struct xenbus_device *, struct kobj_uevent_env *); diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c index b15c64128c3e..4387990b9b41 100644 --- a/net/9p/trans_xen.c +++ b/net/9p/trans_xen.c @@ -294,13 +294,12 @@ static void xen_9pfs_front_free(struct xen_9pfs_front_priv *priv) kfree(priv); } -static int xen_9pfs_front_remove(struct xenbus_device *dev) +static void xen_9pfs_front_remove(struct xenbus_device *dev) { struct xen_9pfs_front_priv *priv = dev_get_drvdata(&dev->dev); dev_set_drvdata(&dev->dev, NULL); xen_9pfs_front_free(priv); - return 0; } static int xen_9pfs_front_alloc_dataring(struct xenbus_device *dev, diff --git a/sound/xen/xen_snd_front.c b/sound/xen/xen_snd_front.c index 4041748c12e5..b66e037710d0 100644 --- a/sound/xen/xen_snd_front.c +++ b/sound/xen/xen_snd_front.c @@ -311,7 +311,7 @@ static int xen_drv_probe(struct xenbus_device *xb_dev, return xenbus_switch_state(xb_dev, XenbusStateInitialising); } -static int xen_drv_remove(struct xenbus_device *dev) +static void xen_drv_remove(struct xenbus_device *dev) { struct xen_snd_front_info *front_info = dev_get_drvdata(&dev->dev); int to = 100; @@ -345,7 +345,6 @@ static int xen_drv_remove(struct xenbus_device *dev) xen_snd_drv_fini(front_info); xenbus_frontend_closed(dev); - return 0; } static const struct xenbus_device_id xen_drv_ids[] = { From patchwork Mon Dec 5 15:36:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dawei Li X-Patchwork-Id: 13064698 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A1F4FC4332F for ; Mon, 5 Dec 2022 15:38:32 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.453902.711535 (Exim 4.92) (envelope-from ) id 1p2DXp-0006qz-Qb; Mon, 05 Dec 2022 15:38:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 453902.711535; Mon, 05 Dec 2022 15:38:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p2DXp-0006o2-EV; Mon, 05 Dec 2022 15:38:13 +0000 Received: by outflank-mailman (input) for mailman id 453902; Mon, 05 Dec 2022 15:37:25 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p2DX3-0006Dh-0u for xen-devel@lists.xenproject.org; Mon, 05 Dec 2022 15:37:25 +0000 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01olkn2080d.outbound.protection.outlook.com [2a01:111:f403:700c::80d]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id b6d392af-74b2-11ed-91b6-6bf2151ebd3b; Mon, 05 Dec 2022 16:37:24 +0100 (CET) Received: from TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:152::9) by TYYP286MB1787.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:f9::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Mon, 5 Dec 2022 15:37:19 +0000 Received: from TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM ([fe80::ff96:9cb6:e047:c605]) by TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM ([fe80::ff96:9cb6:e047:c605%5]) with mapi id 15.20.5880.014; Mon, 5 Dec 2022 15:37:19 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b6d392af-74b2-11ed-91b6-6bf2151ebd3b ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fVFuG8KEV06Q9/bUKNS94klVApzADe8K2amMONTpCNpCEKlpHBoHWO8ufYHoiiUw4iugyXFYztUUApnnkqJkfdx9o02X4enaaGGg4ebmM5kZ7rSz8lB0vqv5o9/HcBv/ku3JmplzlSpSr9t1DVesPdIkwOnMsPfeMH4fKBzivJEkbX6Bc88Ip8920xCd9NwrstUCl7zp7z67l1k+3gec8FdnSl3dckU5xGrdk4YGvcN0s1zBVb8VU0rbMPzTrk4cBIeS/7ajwkvRJ0bKvY88wPITxQJiAm1Bf40jhhjW9yXbp2fzJZ1J69WKTsZyN3GsbUF9Vh3B1wYil4MQUvWK/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ef9m7v0KqeWEipkEBUhacHcNHd3dIeyAM4W2j/cgC88=; b=BO+VBkEHU4K/JhS1QBgqQ+vKgeINVwd//PlsVt2pSd0rMNxDeH44NbuMmHD3dA6ql5feyDNeDTxks9fq6eSu6qPgWymUoYKS9GHaPm9T6/1x9qYXkrSBesUvg4yCXPr/Hb6VTIg1RhhVnhBnFR6A9w5umzM972s1Z0mutQaoXL5OYPAoWwz12WOGmyhaCMuPGxYEDcjIkFhgTDMh8R7VnTu4ho58WVPafeWuWTFdpTVX1GH3g47UcAUoGvjwy+Mu61wowC6c5365GLxvmfifLKPFpJpss7jVzf1NEL2sSUc5wy0Iz92Edbe9vnrAFmhjgO7ZUWnlFCyXBCmquIddEg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ef9m7v0KqeWEipkEBUhacHcNHd3dIeyAM4W2j/cgC88=; b=XIb65QYpPUxtuHrWdAaTVsmisxE7ZK66EtaL7DFQu7WQYYx12FCL8PlustnwXQXvJDC8oAl/vhcHRnBxbX+luFKcUTh6SwokpWwttmfCMHL7XFmX93ck/u3BFf7OL26gPp2qoijVPmVUczzUEzGojxH00DAv1p2KpXAjTEt0PDHhYZm6JAjmaRJH1IwA71owid2EHu+P+cAs8FgdQsxxzbag/l41abXPke8dhEwjEeTMGxDI4ypM2BfUUhbyBX65/nBvPm0y1B3hy4E6sLUosuLr4JSuNLBeWR2jaoeXh3trnLs0QI0fckXLBhYMBI32wFwAsuDIXzv/ePfIyWMSvw== From: Dawei Li To: gregkh@linuxfoundation.org Cc: johannes@sipsolutions.net, robert.jarzmik@free.fr, jgross@suse.com, sstabellini@kernel.org, oleksandr_tyshchenko@epam.com, roger.pau@citrix.com, srinivas.kandagatla@linaro.org, bgoswami@quicinc.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, xen-devel@lists.xenproject.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, Dawei Li Subject: [PATCH 5/6] ac97: make remove callback of ac97 driver void returned Date: Mon, 5 Dec 2022 23:36:43 +0800 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221205153644.60909-1-set_pte_at@outlook.com> References: <20221205153644.60909-1-set_pte_at@outlook.com> X-TMN: [eT6UZtVbikemNKsMQYsxpGdTloi1/Wuv] X-ClientProxiedBy: SG2PR02CA0046.apcprd02.prod.outlook.com (2603:1096:3:18::34) To TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:152::9) X-Microsoft-Original-Message-ID: <20221205153644.60909-6-set_pte_at@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCP286MB2323:EE_|TYYP286MB1787:EE_ X-MS-Office365-Filtering-Correlation-Id: f06a4cf5-cbb3-4a5a-a430-08dad6d69804 X-MS-Exchange-SLBlob-MailProps: /OoUGmN/RpVKD6y7RJd2fRTadJ6Pq1ot2iys40AI0qYlu8Rnx0ofoD/I1pH32T+1L2pz3NVWO8fqqVhxKi6WLWu7Gs1R5ep4Fa4CkDLgQtUQyojJERaA+Z7VKh0ucvIaG2AjU2H+tSfil3cpIYJbFulYrzkUNmBaq8jaE0f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X+zWmwFc5giR1wCXFOz4cXwuxJcuo9090aljaYunIocLplvjIBWJVzLNxlVODP+QHTa6Oo6GjBp3DYccsIR7LV1M/btNpln2q9W1Ih9w+f3osyA0nVSDpZVatbXHxxO1aYSj936yX0Hp6esKHGlYIXvQInHFI91yKYGwZdD+vTtbdMp9z8xJnOgeKr/YGHGio7MFABNwQjIx/iNg5Wpzkxh9OsGh0TpJsyGwlLKQ7HQbwuq60i8D7E9BcgwPkvUnvAAF9z7EfoA4jgpiJzN7gAXRTnXe2DtwJPCpWTyu+0REV2b6YQnvuQSb8Lebgcz8YYGJVDe8GmRglN62qZJL5ufXuS423k4kOdmd0uAL1zlY8CXOgNeMCYALRL4HQYprhSHr/J5ikG/PF5JpJm6aceuAu40NbKuzzVNAcz23wRQioK+Lc/Xf16hyUFZyHs8QZCrJvahN6dsilHOCyaP4YBhKLZ6665BFkc/Sn7pbPZ+GyjRnVRlckDiZ9p1hvh06g== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f06a4cf5-cbb3-4a5a-a430-08dad6d69804 X-MS-Exchange-CrossTenant-AuthSource: TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2022 15:37:19.0632 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYYP286MB1787 Since commit fc7a6209d571 ("bus: Make remove callback return void") forces bus_type::remove be void-returned, it doesn't make much sense for any bus based driver implementing remove callbalk to return non-void to its caller. This change is for ac97 bus based drivers. Signed-off-by: Dawei Li --- drivers/mfd/wm97xx-core.c | 4 +--- include/sound/ac97/codec.h | 6 +++--- sound/ac97/bus.c | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/mfd/wm97xx-core.c b/drivers/mfd/wm97xx-core.c index 9a2331eb1bfa..663acbb1854c 100644 --- a/drivers/mfd/wm97xx-core.c +++ b/drivers/mfd/wm97xx-core.c @@ -319,13 +319,11 @@ static int wm97xx_ac97_probe(struct ac97_codec_device *adev) return ret; } -static int wm97xx_ac97_remove(struct ac97_codec_device *adev) +static void wm97xx_ac97_remove(struct ac97_codec_device *adev) { struct wm97xx_priv *wm97xx = ac97_get_drvdata(adev); snd_ac97_compat_release(wm97xx->ac97); - - return 0; } static const struct ac97_id wm97xx_ac97_ids[] = { diff --git a/include/sound/ac97/codec.h b/include/sound/ac97/codec.h index 9792d25fa369..a26e9e0082f6 100644 --- a/include/sound/ac97/codec.h +++ b/include/sound/ac97/codec.h @@ -62,9 +62,9 @@ struct ac97_codec_device { */ struct ac97_codec_driver { struct device_driver driver; - int (*probe)(struct ac97_codec_device *); - int (*remove)(struct ac97_codec_device *); - void (*shutdown)(struct ac97_codec_device *); + int (*probe)(struct ac97_codec_device *dev); + void (*remove)(struct ac97_codec_device *dev); + void (*shutdown)(struct ac97_codec_device *dev); const struct ac97_id *id_table; }; diff --git a/sound/ac97/bus.c b/sound/ac97/bus.c index 045330883a96..6067c04ce4c0 100644 --- a/sound/ac97/bus.c +++ b/sound/ac97/bus.c @@ -524,10 +524,9 @@ static void ac97_bus_remove(struct device *dev) if (ret < 0) return; - ret = adrv->remove(adev); + adrv->remove(adev); pm_runtime_put_noidle(dev); - if (ret == 0) - ac97_put_disable_clk(adev); + ac97_put_disable_clk(adev); pm_runtime_disable(dev); } From patchwork Mon Dec 5 15:36:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dawei Li X-Patchwork-Id: 13064700 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9EA7FC4708E for ; Mon, 5 Dec 2022 15:38:33 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.453905.711541 (Exim 4.92) (envelope-from ) id 1p2DXq-0006ya-2S; Mon, 05 Dec 2022 15:38:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 453905.711541; Mon, 05 Dec 2022 15:38:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p2DXp-0006vi-RY; Mon, 05 Dec 2022 15:38:13 +0000 Received: by outflank-mailman (input) for mailman id 453905; Mon, 05 Dec 2022 15:37:30 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p2DX8-0006H8-O1 for xen-devel@lists.xenproject.org; Mon, 05 Dec 2022 15:37:30 +0000 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01olkn2082d.outbound.protection.outlook.com [2a01:111:f403:700c::82d]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b9418bb8-74b2-11ed-8fd2-01056ac49cbb; Mon, 05 Dec 2022 16:37:29 +0100 (CET) Received: from TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:152::9) by TYYP286MB1787.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:f9::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Mon, 5 Dec 2022 15:37:22 +0000 Received: from TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM ([fe80::ff96:9cb6:e047:c605]) by TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM ([fe80::ff96:9cb6:e047:c605%5]) with mapi id 15.20.5880.014; Mon, 5 Dec 2022 15:37:22 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b9418bb8-74b2-11ed-8fd2-01056ac49cbb ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g4qbe3q5GUm3+djFxGLY0FHhc1fl94A/l/I18KWxQS6c5a7kO2tpTyGpSuie1zbjsCQNn9dbs9uVCDgPdyDRtrHBT48xOFmFULzB1Qc9MfzUMJkxMp7o+Lqz3/LHrrkp7lymZSVecOjeMEHb98xgQBYeeGsqDpECIFDY92iLZi5ypPKyF7w0DZIOrwWhAest8gN6Xf5p7fK7MSNJVAMT2nXGsBpQricxVYTvq4V7zt3II+puSDAHPigVsDKWQfJlNr3SCWIKUw3QeNVoNC5pJaBhC7Un6kKmWhw1pueqR2djj4K6NNsOud6KyMjwv5Q/ZCpDGqYNZqAqmtYcRY2zyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=C8XYQmGsFxifbE4krxLLsTBSxb5z+JZd35HhshTCv/A=; b=PVbUPuKlXpU8REE3ZpCaUjuZ3sBGMksG2vWr0nZGL5vng74+f1al3/NJnthVtJQH4ErDvVCcCFdulvDhhvtIzYqyokZlyOJPJT6C8l4NNiXs+7vhqjLRLAl1HDCzPMS+vlJMs6sU4+2/or7kU48KLVJrEEOxN4LVvE8pJyeWjlIq3boBxodptcvcHM2xw/6/XGVRaNnCilHUUSDhF88k6xR6PdX+CLixqd4syZu47HCz7cAKGexnIUqV+rcHGpvd/XHt4CuLT5xc84+m4NqtbvHacQhb5zXSwKgPSPWChHS//jX5EbTPQEiQXi7cJUjka0CPd5zwH53chDLTeNB0ww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C8XYQmGsFxifbE4krxLLsTBSxb5z+JZd35HhshTCv/A=; b=goRXTvDYD25aH8m7HwC2u7COsS9oiRP7W8ZY6/pyNbXG1qxHyqFZQwXHuW9vCqxYezW91VzZ3LjTmPMOxBsD7Ojn18A0wfTrpiETCol9gT+xBDNiC/lWBeklU50P4qKYWXA8wjFpvQ0eCY9agiB/mr6uTf6dJ9h6y8TeEKHwmbe7ZfB3Z9lia5TSzgICj/PX9WXukyPMrabJs+2zVk1uCfav3TIr2k/yuKa7Y6Y+ERPaECEWYU8LIRnXz09J0f0c2JRMKMy6edQv71wUvf2am/5gh+OgUCaqS/ynTQNr2tvWZugwLZLjAbi8oDCkGoy9lXof5+JzIbDEIULQhux2Wg== From: Dawei Li To: gregkh@linuxfoundation.org Cc: johannes@sipsolutions.net, robert.jarzmik@free.fr, jgross@suse.com, sstabellini@kernel.org, oleksandr_tyshchenko@epam.com, roger.pau@citrix.com, srinivas.kandagatla@linaro.org, bgoswami@quicinc.com, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, xen-devel@lists.xenproject.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, Dawei Li Subject: [PATCH 6/6] soundbus: make remove callback of soundbus driver void returned Date: Mon, 5 Dec 2022 23:36:44 +0800 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221205153644.60909-1-set_pte_at@outlook.com> References: <20221205153644.60909-1-set_pte_at@outlook.com> X-TMN: [WWyl4X8Xy2TdiUTL3/a5BJJAkOeQUgge] X-ClientProxiedBy: SG2PR02CA0046.apcprd02.prod.outlook.com (2603:1096:3:18::34) To TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:152::9) X-Microsoft-Original-Message-ID: <20221205153644.60909-7-set_pte_at@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCP286MB2323:EE_|TYYP286MB1787:EE_ X-MS-Office365-Filtering-Correlation-Id: 54577305-65dd-4f2f-4d1a-08dad6d69a41 X-MS-Exchange-SLBlob-MailProps: /OoUGmN/RpVKD6y7RJd2fRTadJ6Pq1ot8vlKKmA/hNHf/9uXSEfxNcy1cE9dsFBTSU4rE2OHL/YSf/94pMqv/IC1U95CqFfOvuXoXCzOFsq1S8gJM/GNIgTLxNY8CXbn/hAfm9S8eI+3vaesaIP+Rv2/iB3t3j786KjU5NDoaNXNpP2SfqwiA0VTUzZS9wqefozxmQa1Qfnx/DdA/NqHMzcmb4WkUbWC9wk5Un/UBg4FPZE0RI1leoxhJbyN7vLubLcR9pyi54bq2f0Qx+1nngufqtBcAQWC/XEFeyFrm9j90ixn9rsoofeIhdDAU3WJ3GQ8aGvm2E2lkO37uImtIraQ+SF9JEr45aybi5nuw6je2FgKr0F1u1G5B66PNid6IknTKzvgmHpynLEfl8JgMwOPFymajtHhhrHaDSkSjZSlmgZaI8i4yWBN+5ZNYSW6jlkD2+LtkfwY729x7PCuEDY2sY+b8E7bF/Pbahq5EQtQua8gutUhKL+8ScpGXqtTUvpC2RIm2SWzS3GwqcoPr16SkxnoxAq4cPCQd2/qToH496Br1VWVRnL2YH954QA8uY/qJED2TaQBDuB2WEzI1Gh4LAGBHuBZep9fMGcSvM/KNwkX68Yu4iW/+3gBQ3ItHzIS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JHI50/Mb+LGZGpcseB9SNY7nW6fPpSlk/WGTKzAg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54577305-65dd-4f2f-4d1a-08dad6d69a41 X-MS-Exchange-CrossTenant-AuthSource: TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2022 15:37:22.8631 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYYP286MB1787 Since commit fc7a6209d571 ("bus: Make remove callback return void") forces bus_type::remove be void-returned, it doesn't make much sense for any bus based driver implementing remove callbalk to return non-void to its caller. This change is for soundbus based drivers. Signed-off-by: Dawei Li --- sound/aoa/fabrics/layout.c | 3 +-- sound/aoa/soundbus/soundbus.h | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c index ec4ef18555bc..850dc8c53e9b 100644 --- a/sound/aoa/fabrics/layout.c +++ b/sound/aoa/fabrics/layout.c @@ -1094,7 +1094,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev) return -ENODEV; } -static int aoa_fabric_layout_remove(struct soundbus_dev *sdev) +static void aoa_fabric_layout_remove(struct soundbus_dev *sdev) { struct layout_dev *ldev = dev_get_drvdata(&sdev->ofdev.dev); int i; @@ -1123,7 +1123,6 @@ static int aoa_fabric_layout_remove(struct soundbus_dev *sdev) kfree(ldev); sdev->pcmid = -1; sdev->pcmname = NULL; - return 0; } #ifdef CONFIG_PM_SLEEP diff --git a/sound/aoa/soundbus/soundbus.h b/sound/aoa/soundbus/soundbus.h index 3a99c1f1a3ca..230dfa1ba270 100644 --- a/sound/aoa/soundbus/soundbus.h +++ b/sound/aoa/soundbus/soundbus.h @@ -184,10 +184,10 @@ struct soundbus_driver { /* we don't implement any matching at all */ - int (*probe)(struct soundbus_dev* dev); - int (*remove)(struct soundbus_dev* dev); + int (*probe)(struct soundbus_dev *dev); + void (*remove)(struct soundbus_dev *dev); - int (*shutdown)(struct soundbus_dev* dev); + int (*shutdown)(struct soundbus_dev *dev); struct device_driver driver; };