From patchwork Fri Jan 6 15:13:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dawei Li X-Patchwork-Id: 40165 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp877160wrt; Fri, 6 Jan 2023 07:20:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXsWbpL3ZBGL86iwTVB66K1Vzcs0jFJWVyKYj51PnKgIYGx/22c0Wz1l0ayCairfdxcap9h1 X-Received: by 2002:a05:6a20:1586:b0:9d:efd3:66c1 with SMTP id h6-20020a056a20158600b0009defd366c1mr80624511pzj.8.1673018408677; Fri, 06 Jan 2023 07:20:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673018408; cv=pass; d=google.com; s=arc-20160816; b=y9tme78uvZ2DU56wl0QGvbCdbt/A3nm6mjjdMwZoXKP/fVNX9FHvM4EIe5QYvMtUvc hSTzZyLzjUFflZyNvt7OgqKFWxTMfx6KEwtR4KRFfYKJjcNBWYfyE4OyPVi+PG61oahZ n8FpXj+eIai6uKy51y31YVLQsPpoM+c14rVWQhvj3WL7IdgnsAbkXFwO/xYZtNI2u5+i 4KydybgtUGE+EBgaMaFCkErmvc5gSJ7WfklwwgYRcD3JuLC6xldyLbgC6TApE11Fh2Mn Ogi6RZyw8560BT6fv4/iU2xUtP6/WIoLk12fFkdZzhLyn0/tNcQf4qxeBnQOGGIsHBT+ Zejw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=LZyinIY6P3e7c7+/GT7rnKK06YMeQErfch6qNK8tu8Q=; b=gdz9W6kfaJimQIMChKGwl1PiXPILtwyhe+jI5MHb1Y3tkGMrr44bo7EhrZSkaZTQ6B neATYP4iah8y49/fXFkFTteCypmJZZQVLPaUfygzgjIPb0xyk5YAdpEkp//XCs3tNEOw nPO6KMSewftKeDejxHYT5VKeBb/CBfBLM+XRAPI0F0swweyB6KjntUJnUQlpVvW55dM9 RtaJgLgN/N1gBRxpm5udXCwhQhVSgexiQ6gBHs2DXOhBmKKo3PtuKkmZtLRgGCrQa81S Dpr3/fLp3w4V6TDC//fuWjsECBV3xe8Em4B+VELQzRApXPGnCR4jsh/pfGzb/Z63Yyd6 6bbQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b="qI/l1XLt"; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w8-20020a63f508000000b004a2d9640cd1si1748520pgh.168.2023.01.06.07.19.55; Fri, 06 Jan 2023 07:20:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b="qI/l1XLt"; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233714AbjAFPPM (ORCPT + 99 others); Fri, 6 Jan 2023 10:15:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235021AbjAFPOx (ORCPT ); Fri, 6 Jan 2023 10:14:53 -0500 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01olkn2083.outbound.protection.outlook.com [40.92.98.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C107A8B747 for ; Fri, 6 Jan 2023 07:14:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GXjIVyeYTeaklJUI9FGZbPSJY6UI5Oi4ZJv70lOQ0dTLnw+ovKibiLpEXMqI5JyM3TbOvDrWcxYee5fScgModKMmIfw8Hpx+ZAzWN8nk3yP7ZhTcMEvn8oB0m6pMVtKU1U/9xGrNP9ksEKnn/QmZkQCcwRcH9sT5tXv62wXjvXpGJRqYbF8Od++PUtuEQLj5mE2BQbU+Ii+6cm6RRhDRaRyCXoXGZ1IBZ08Lhct5b96sEPvyuAuQou/dsExa1T5JrIFmlc016n4Udf5d2eSSgOHJjJPT0Kctv+ecf9wIKrPB3qtsqia1E8+mOKB0ymUFv8IJ7TKVpw1ps5evUIIZbg== 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=LZyinIY6P3e7c7+/GT7rnKK06YMeQErfch6qNK8tu8Q=; b=EmhGVtPon8jLMU3kdvrz//qe67FOKm6dbSanNnVldLo/w5OUaMkHZnTOzinJdhWLNgTfpMuqU9Clq5ckotUARmYBkO0IJK0vLl60Yle7Gp3HfoVS3ijqzMRrcRlVg30Qqk0KufR9b/K8ftyIoLZ4Kfc4ifu6/N0/YJKP02vBpfxxoMMActZ3lOeNjwbb+GWDK9YFlG8M88rCZUUBGTaZDCHwRmLBh7/zLOHb8AO2VweNGbdmmhvypomIIwwRj4osEz4o96ijRTJy2ynnY1LYPnykMpFGWTCs5ysrZS++hY92/U6r2/19xml4pH9yA30igrLXwP/vyjuFz+wp4fHoRw== 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=LZyinIY6P3e7c7+/GT7rnKK06YMeQErfch6qNK8tu8Q=; b=qI/l1XLtFPJrpbh4MnwnC3cMI7UsUQwS6m89MDOhiKZaCZgh3PvB7huquSj5XjpVblziM2AOnE9I3nxn30g1DjGOAFB2Qx2ctdhnkkNYsTvBdtas9LAs369HJ2nk2xGSgfrs0Sh86g3xQU2tsIJiVHrZHmwm8JLxfJKwSp2xDxTSfGM0Z+luuPYkp0m6jWaj0Q+GrED7jmsy99+bLw5s8OM6VpTUNys2yLiO89sLbA99I97htkkcInMmNu0mt4Dq2CAG47FFCcSEg6beWa0e9b2lxvm4TzeqyRSZ9kFzH9kJVnRN8SCjWIFYGrHjXDbaYWvNmst1cMQtBC/zMb+Nxw== Received: from TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:152::9) by OSZP286MB2411.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:15e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Fri, 6 Jan 2023 15:14:49 +0000 Received: from TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM ([fe80::ff96:9cb6:e047:c605]) by TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM ([fe80::ff96:9cb6:e047:c605%4]) with mapi id 15.20.5944.019; Fri, 6 Jan 2023 15:14:49 +0000 From: Dawei Li To: perex@perex.cz, tiwai@suse.com Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Dawei Li Subject: [PATCH v2] ALSA: ac97: make remove callback of ac97 driver void returned Date: Fri, 6 Jan 2023 23:13:49 +0800 Message-ID: X-Mailer: git-send-email 2.25.1 X-TMN: [XHa1wxZfbOIGG+aMij2sS61NNMVt0io+] X-ClientProxiedBy: TYCP286CA0125.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b6::7) To TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:152::9) X-Microsoft-Original-Message-ID: <20230106151349.27702-1-set_pte_at@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCP286MB2323:EE_|OSZP286MB2411:EE_ X-MS-Office365-Filtering-Correlation-Id: f239cf0d-2a06-45db-360b-08daeff8c095 X-MS-Exchange-SLBlob-MailProps: ymJijV9pwJnUONNRvQZ2/TrCTdctBj73VVlaYy1TRJ0J4JrwBWfHpVv01sRojAH1CmBSWp/OLMGhISjA5W5f+BBxKMlZQkkLTKLmvCREfXzAEqc55fnz8pfm1RPYridcY7dTsxdbKqkITF9n0lkussyLH6rX1m5NvZdZJYArKUUTVso4zIq+Mio2MFGW5volxe070GYltVA5GK2d/TRCbg1E2F9GPOCzdVl4gUo5CEfEbi3b0GBdxynT/7zTl0NabjvPqi2/qw7EwmBWmTM297R/1Jmqo9+OFghLnD/G3kMyZHMFmRmggSZyZPp+jMYurzuoFPpWdiC371/q9/G3kZ4t93aGDenwty+euvylwRat/heuWAVkUW6XhWWr/80JDEfr08Il110SyMoUKSSwdZ/NMfwnc/JhQ65Z7uZWPwFR2aAgRfdfT6JoYl1Ck6sBympJ7yhC0j1bcdwFgCrhnn0Ev23gKN72S9o7kuxfQQ2HrHb4LCo/I6F+QYvCM9dotWtLFtHHS1MlxuDrWTzVWaZFikcBJlEE91MI2p/tTE96FASd2tvLXP/7ZcyG006dQ2uV87Xa3UfZR6wNNNqjdk3R8t8gkXtKTyeimudIAgTylVfx2EXEWiUV6jmZT2a/u2SoUVA2D3q0kW1ivY5TEv74Axmvd1LSRKbIX7dKfeM/SWFeS/8iSIa8Io0eTQVbQzhTPNtQ/sJw4z83DW9kQ+phFXHIOdqWKbLgxmt7hzovV7ChItytH7W/yFHs8RC/dSNZDKbWhpKeNaqIrCZt5KI9e/vm84KFiCjuXM3B+d4bKdam8sdW6cZtXRIud9+y X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5MWo6scNi8warzM5nCk5DqTTFdPRjfPhMbcQ4xSFf4gtKDHJ4CzM9+l/3QH6OiMyvATDBvwR2Fpww56VV9lcfGqBnUD9TNv4/CM78wH1nQjb5T6L1JlAjH61GaU7nursytzL3M0ycMZr493JHUpUULGmjapCAoyNYGK69wa51U7SxRLy78mrDxijPcs/EZvMTobDXxXoIvlROH69r6SZhns0HFF6PzqGmp42JGpsUHQxTl1OfNiHvD8P6TcQBix3FCQTZx4kPHO8bkFNHXwnn+Hy3ksBS+i+NON42jukWxP8ZeepXrGWVts+wJkdz3fc0cBWuagoxf97V1Ht4xGza+8x3PbaY7m1XkpuoiFkZb0fsrqPtJHgXxCU6GGX2nfYhxCkjB8jRc+UR9GYscyeT4b48q0nd+z2wmaEmsBTKNsE6703/olEnsuA+Pet/eqFox3CPiBYFeq9+AC2S4Kmg013jADthCAV6areXvXRKBe8ijG5XdU2cD3xjE21KjxDn8pScSPlm05xoArt9mi6KsbadQUwhrgEVeCwAZV7GsYMXqvO9NSSDK3VdXNq23aOUcWZcqTi+fhdAb6xkk5CKDL1RvVsF6MnEqq1zrZpq10pj8NMyOA3mZAfL1UsZkX34OxWv4YWvVOXckttCX3NCA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XEHr4cxtjpHnJW4Z/M3yfNhPtDK1w2WtkHWWSfW8nDD7X814qNXpWgUuSsLSKmuwpANn/SwnQFuo4pHghfVwAVkITL5dFwJEjOVsvQ46rmhLRzAufTCjFfjgvdIVjgGS1dMynPxPvTxmhebiH4Ztm/qOUdCqtJBqknk7eU8r0rnJPKhuSl9KzW1nuCa+ISfWRfUA2HN+hq+9/vPSbu+FuxwncBqc14253DuW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-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f239cf0d-2a06-45db-360b-08daeff8c095 X-MS-Exchange-CrossTenant-AuthSource: TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jan 2023 15:14:49.1246 (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: OSZP286MB2411 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754286951026180022?= X-GMAIL-MSGID: =?utf-8?q?1754286951026180022?= 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. As such, change the remove function for ac97 based drivers to return void. Signed-off-by: Dawei Li --- v1 -> v2 - Update commit message. - Rebased to latest sound/for-next. v1 - https://lore.kernel.org/all/TYCP286MB2323207367F2D39D0D725828CA189@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM/ --- drivers/mfd/wm97xx-core.c | 4 +--- include/sound/ac97/codec.h | 2 +- sound/ac97/bus.c | 5 ++--- 3 files changed, 4 insertions(+), 7 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..2fc641cb1982 100644 --- a/include/sound/ac97/codec.h +++ b/include/sound/ac97/codec.h @@ -63,7 +63,7 @@ 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 (*remove)(struct ac97_codec_device *dev); void (*shutdown)(struct ac97_codec_device *); 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); }