From patchwork Wed Mar 15 15:04:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176060 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 62485C6FD1D for ; Wed, 15 Mar 2023 15:09:53 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0A6B11268; Wed, 15 Mar 2023 16:09:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0A6B11268 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678892991; bh=NleyZkadgk6QDJ9AqpB9dnDZQQnygS3aIOAaaGjbqlE=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=cklkiB4U28KsalwcX9gXw7t61SCVf/WI1JmfzFwfsXAqYvi6aa0DjE/H3l2eWewIi iULM6+/IQYKz1z6P3A6Yn/sFTM4oCqe0KLnGlHXzG05wggPfQDJHMeVKhC6m1HnOI4 e6MKDNVjYF9Ct8qbyohIIdmMS6PAKOfSw7wIvmSo= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 618F6F80564; Wed, 15 Mar 2023 16:08:13 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2F7ECF8052E; Wed, 15 Mar 2023 16:08:08 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 6927EF80423 for ; Wed, 15 Mar 2023 16:08:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6927EF80423 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjP-00075V-C5; Wed, 15 Mar 2023 16:07:59 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjO-004KTj-Ja; Wed, 15 Mar 2023 16:07:58 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjM-0057bv-Ml; Wed, 15 Mar 2023 16:07:56 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Jaroslav Kysela , Takashi Iwai Subject: [PATCH 001/173] ALSA: sh: aica: Drop if blocks with always false condition Date: Wed, 15 Mar 2023 16:04:53 +0100 Message-Id: <20230315150745.67084-2-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=909; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=NleyZkadgk6QDJ9AqpB9dnDZQQnygS3aIOAaaGjbqlE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd0qs7Vjm/klISlUsENliYlRQVLOL0A39QHid 5PingNhNn6JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdKgAKCRDB/BR4rcrs CfJnB/9IQjPAAdkuu0yHGMPD+CRdj0sddTmcFmUue7wbUH+eLiN+EQ5uuMMrWndABVT6fozG2nL dvpmCrKNAcDYxOTyBbwFSUR6JsqEpRIlvoxYxSe/nIsZiONh2Ov2iTLqRuzjsvXqLuunFShr/kc kWltb8AkX3ouAtCTJFqWVVx4GRMMVJZt14NDlCACjwpZokV4WMa9jYQgYvvf1W3lIxMsDb+Wyv4 rEqqBEWDc6LNa/0PJRifEu4vLjwaAIMm3PazpCPeJ7zqnSm6l4sR+RHfBlA3eLxdpg7ZY0fqh3C Rl0H8RCcC6p6RK2/fetolX8ylsGxPQbj/RH0Vf9RAm3Uf9MD X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: JVP2U2SELQS6WFISLTIRC5YDT7X7MMIK X-Message-ID-Hash: JVP2U2SELQS6WFISLTIRC5YDT7X7MMIK X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: snd_aica_remove() is only called after a successful call to snd_aica_probe(). With the latter it's sure that platform_set_drvdata() was called with a non-NULL argument. So platform_get_drvdata() won't return NULL and the check can be dropped. This prepares converting platform driver remove callbacks to return void. Signed-off-by: Uwe Kleine-König --- sound/sh/aica.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/sh/aica.c b/sound/sh/aica.c index 6e9d6bd67369..459c907655d9 100644 --- a/sound/sh/aica.c +++ b/sound/sh/aica.c @@ -543,8 +543,6 @@ static int snd_aica_remove(struct platform_device *devptr) { struct snd_card_aica *dreamcastcard; dreamcastcard = platform_get_drvdata(devptr); - if (unlikely(!dreamcastcard)) - return -ENODEV; snd_card_free(dreamcastcard->card); kfree(dreamcastcard); return 0; From patchwork Wed Mar 15 15:04:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176067 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5FDF4C6FD1D for ; Wed, 15 Mar 2023 15:11:38 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 14FF41257; Wed, 15 Mar 2023 16:10:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 14FF41257 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893096; bh=r6xsIZu/Gq7EbaOZeM2dEVsYJNMav6MeAEyizfe+kzE=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=E1e/bKUo9qosszq7fw5bgSJuvmfabeF0X3ArvdMtbbYrurtERcS9GvZaRpaFTQ0PE 02Bn7GXYeb6aKSaWBD44gnCPFig5xTaOA9MCyzeuWGA/RtQPv5FNLyH8hifwjfcWgj Tt0rRVkS1m4j9Xevc2LRIP4udtpWmkvBfLy7YkSY= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 350FEF80603; Wed, 15 Mar 2023 16:08:41 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 69D79F805BA; Wed, 15 Mar 2023 16:08:19 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BD1B4F80529 for ; Wed, 15 Mar 2023 16:08:06 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BD1B4F80529 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjP-00075S-C4; Wed, 15 Mar 2023 16:07:59 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjN-004KTW-RY; Wed, 15 Mar 2023 16:07:57 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjM-0057by-Ud; Wed, 15 Mar 2023 16:07:56 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , V sujith kumar Reddy Subject: [PATCH 002/173] ASoC: amd: acp: rembrandt: Drop if blocks with always false condition Date: Wed, 15 Mar 2023 16:04:54 +0100 Message-Id: <20230315150745.67084-3-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1289; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=r6xsIZu/Gq7EbaOZeM2dEVsYJNMav6MeAEyizfe+kzE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd0tEor5Q6i0e36oRLMBFicD/AAa2oZPlSzE3 HwFthG7gCqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdLQAKCRDB/BR4rcrs CbOjCACLIjOHoelEDbJ4EBjzH0vMEHuEwGumI7XpOw38VwGHhfk31haDHkCRYZ8O98GIuoasoWl 7CTo5DC3b8xHZOiqFktq9RHDcHQWhuhz0Fb6h6twrxnfMtA0R7MyDXnI1W5lnOwPkoJhaC8PJxk F/teu/QKtAPi6VJE2w8lQGcIzS+IdoIeq4isb23LchPLCYwWE2vSso7v4Fvkd7GiBGSukCLz3ba op714yn45xO/jrH2ZKZ2JxBxWLebKM105NedEflr6Ns/AHMeAcXaKpqD5w1gxIqWWaOpFbrId4u VKYk/K/0P9c8LgLYwCeD+PbUQcahTMbL08medmAbY5K8iWhB X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: P3ADHFBCYGHF22OVMYCEZVQ7CJGAQMB4 X-Message-ID-Hash: P3ADHFBCYGHF22OVMYCEZVQ7CJGAQMB4 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: rembrandt_audio_remove() is only called after a successful call to rembrandt_audio_probe(). With the latter it's sure that dev_get_platdata() returns a non-NULL value and also that ->base is non-NULL. So the corresponding check can be dropped. While touching these lines join declaration and assignment into a single line and make use of dev = &pdev->dev; This prepares converting platform driver remove callbacks to return void. Signed-off-by: Uwe Kleine-König --- sound/soc/amd/acp/acp-rembrandt.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sound/soc/amd/acp/acp-rembrandt.c b/sound/soc/amd/acp/acp-rembrandt.c index 2b57c0ca4e99..15cd3f8cc82c 100644 --- a/sound/soc/amd/acp/acp-rembrandt.c +++ b/sound/soc/amd/acp/acp-rembrandt.c @@ -370,13 +370,7 @@ static int rembrandt_audio_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct acp_dev_data *adata = dev_get_drvdata(dev); - struct acp_chip_info *chip; - - chip = dev_get_platdata(&pdev->dev); - if (!chip || !chip->base) { - dev_err(&pdev->dev, "ACP chip data is NULL\n"); - return -ENODEV; - } + struct acp_chip_info *chip = dev_get_platdata(dev); rmb_acp_deinit(chip->base); From patchwork Wed Mar 15 15:04:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176066 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DC522C6FD1D for ; Wed, 15 Mar 2023 15:11:26 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 76056126F; Wed, 15 Mar 2023 16:10:34 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 76056126F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893084; bh=IvteXbtnscuLrmgSVcYGsRdoHcND0HPu4daEpu6UlBs=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=unRpluuXPuuuCcLVlvnAnQuxkVnF4bJ8tTMuq2gyvs8usQeqQMFjK4OBUukpu4zBr ZLSzRTw6w8C0crI+aAhN/ojEDtrDqtn18ThfZGyD5ayjfmQZClBt4E1iWjI1NXmrRz ud42SrPR7gRt2IF6H4+eIkkxVcjJl1KR2MFkTZi8= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 59D7CF80548; Wed, 15 Mar 2023 16:08:37 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 846EFF805B0; Wed, 15 Mar 2023 16:08:17 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A86DBF80527 for ; Wed, 15 Mar 2023 16:08:06 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A86DBF80527 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjP-00075U-CU; Wed, 15 Mar 2023 16:07:59 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjO-004KTe-7z; Wed, 15 Mar 2023 16:07:58 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjN-0057c1-61; Wed, 15 Mar 2023 16:07:57 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 003/173] ALSA: pxa2xx: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:04:55 +0100 Message-Id: <20230315150745.67084-4-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1583; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=IvteXbtnscuLrmgSVcYGsRdoHcND0HPu4daEpu6UlBs=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd0wB9ZClaloOs0feuokeJrmOBcQXNF0ASuIZ wksw6bZwteJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdMAAKCRDB/BR4rcrs Cax2B/wLzBRcVBUHljhTL8MHYSU1QKHl/JlvAKUI56P+WPY5r7VItpNUnIrwwfWI59vspUnsA9M zOxqxCgAFh0jLM1CB2UuL88An7VicrsJapmUMStLh9Ap5h3a+IbevCZeszBEdATjFLNNxNpT9jq VopSBEJyJgBGCD9uNxJM3kOkOHcg/c3Cui0Kum9lQRz7aXe5W+WzkzHoQqsBc+xzlRHUcCBAKF5 /GO329amA6fx8/Vc/7Dg06GBusyGVNvBaUmFUSPaPzEu/n/qmnGm+0yhNpIhz8wS8Nq0sNmFGhQ +fgxJPR1GadAHyAYJLsIPoutDD+t8DRJI77dl6FF6vaf+i9D X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: OABXJNTT23CIEDZXKCSJ43YBMTUWAKAA X-Message-ID-Hash: OABXJNTT23CIEDZXKCSJ43YBMTUWAKAA X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/arm/pxa2xx-ac97.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c index c162086455ad..2d83ad91f968 100644 --- a/sound/arm/pxa2xx-ac97.c +++ b/sound/arm/pxa2xx-ac97.c @@ -262,7 +262,7 @@ static int pxa2xx_ac97_probe(struct platform_device *dev) return ret; } -static int pxa2xx_ac97_remove(struct platform_device *dev) +static void pxa2xx_ac97_remove(struct platform_device *dev) { struct snd_card *card = platform_get_drvdata(dev); @@ -270,13 +270,11 @@ static int pxa2xx_ac97_remove(struct platform_device *dev) snd_card_free(card); pxa2xx_ac97_hw_remove(dev); } - - return 0; } static struct platform_driver pxa2xx_ac97_driver = { .probe = pxa2xx_ac97_probe, - .remove = pxa2xx_ac97_remove, + .remove_new = pxa2xx_ac97_remove, .driver = { .name = "pxa2xx-ac97", #ifdef CONFIG_PM_SLEEP From patchwork Wed Mar 15 15:04:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176111 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 19DCCC61DA4 for ; Wed, 15 Mar 2023 15:16:23 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9E322127D; Wed, 15 Mar 2023 16:15:30 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9E322127D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893380; bh=G8+yKaSzuiespvqd5ebrIgBnnjP2K8CL3UaVJMKd6ic=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=GXy0Sdtb8VVwEZzn3ZKkVPDuZLBaUlT7yu5uCl4PDv3adx/Y974Z3f3px0RK+/st9 jc47FB9QdMUNOg6ifsYzkFPOoDl1U6PBJ01FOa0nliJHYzYmhGnXaSwD47sVA9fo7N ICJU5i3Niq23Ba3u/HVUHrqHin+3Xz0Kk2eZ9Hz8= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 6BD67F8051B; Wed, 15 Mar 2023 16:09:59 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D6E32F8060C; Wed, 15 Mar 2023 16:08:43 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5C471F8055C for ; Wed, 15 Mar 2023 16:08:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5C471F8055C Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjP-00075W-QF; Wed, 15 Mar 2023 16:07:59 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjO-004KTl-L6; Wed, 15 Mar 2023 16:07:58 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjN-0057c4-Bk; Wed, 15 Mar 2023 16:07:57 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Jaroslav Kysela , Takashi Iwai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Subject: [PATCH 004/173] ALSA: atmel: ac97: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:04:56 +0100 Message-Id: <20230315150745.67084-5-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1657; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=G8+yKaSzuiespvqd5ebrIgBnnjP2K8CL3UaVJMKd6ic=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd0zRBmY3rSLDDBNUogzxCTU0j81QYyMdwkv9 ECyNCYJlcyJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdMwAKCRDB/BR4rcrs CQODCACN7/vGkaS22Wu00DpozVOJ8A758O948C1CSVBUe+o9kJOq/FmHT//wvDJqlq/qPib7z13 aYTlIRVFAHfBwVHFEC2IICVri0hKSNw+tBiPJMfXF3Z1E2DGg01VPXPVWIHCMTSAMlA3T8HOxl/ Z0MQ++qE90AyPHZCEwj+54niF/hvx/m7XWfL4kDhTeqk89wZRg24B1//+m3q3Z2G0iWX/NiLC9l eozqjEFGw6055BALIY5XYXMszHBwh2yRjPkxk4wvLL5PjgQsnppc8h1kzBXlRYFnMQeVfSAe4NW KjqiNJRvGYdZEJgtPlm7HLrH+YXI7dAYcsttwc7dIGZduo25 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: KXWSCQBI7JA237MQABEKVRXUZL7YNKCO X-Message-ID-Hash: KXWSCQBI7JA237MQABEKVRXUZL7YNKCO X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea --- sound/atmel/ac97c.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index 66ecbd4d034e..c8912b8a1dc5 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c @@ -843,7 +843,7 @@ static SIMPLE_DEV_PM_OPS(atmel_ac97c_pm, atmel_ac97c_suspend, atmel_ac97c_resume #define ATMEL_AC97C_PM_OPS NULL #endif -static int atmel_ac97c_remove(struct platform_device *pdev) +static void atmel_ac97c_remove(struct platform_device *pdev) { struct snd_card *card = platform_get_drvdata(pdev); struct atmel_ac97c *chip = get_chip(card); @@ -858,13 +858,11 @@ static int atmel_ac97c_remove(struct platform_device *pdev) free_irq(chip->irq, chip); snd_card_free(card); - - return 0; } static struct platform_driver atmel_ac97c_driver = { .probe = atmel_ac97c_probe, - .remove = atmel_ac97c_remove, + .remove_new = atmel_ac97c_remove, .driver = { .name = "atmel_ac97c", .pm = ATMEL_AC97C_PM_OPS, From patchwork Wed Mar 15 15:04:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176064 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1D333C61DA4 for ; Wed, 15 Mar 2023 15:10:52 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 165EF126D; Wed, 15 Mar 2023 16:10:00 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 165EF126D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893050; bh=BRbC8gOxQ8E95L+ibyjxl0+h/Z12PHgkrB1DayIMwzM=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=BJYJRkFxbuADW+4TkhQ1k+JUc1+nxCVyTQ5Zw6lfNpJ32XAdIByVPU6x6xTVxaVmm jjPwomXt13YUB1NmyfoWyo0GQZtoUCGd3+enJZIPHcmhnvYrLOm0OuW2Eec6EgbGtc UjEc/Ok3cXNZ5mMMBuO23npCMlzmCJxNYo7sJ9ok= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A2B13F805E6; Wed, 15 Mar 2023 16:08:30 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2F842F8057C; Wed, 15 Mar 2023 16:08:14 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id F3953F804FE for ; Wed, 15 Mar 2023 16:08:04 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F3953F804FE Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjR-00075Y-I8; Wed, 15 Mar 2023 16:08:01 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjO-004KTr-Nq; Wed, 15 Mar 2023 16:07:58 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjN-0057c7-KG; Wed, 15 Mar 2023 16:07:57 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Jaroslav Kysela , Takashi Iwai , Gaosheng Cui Subject: [PATCH 005/173] ALSA: mts64: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:04:57 +0100 Message-Id: <20230315150745.67084-6-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1439; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=BRbC8gOxQ8E95L+ibyjxl0+h/Z12PHgkrB1DayIMwzM=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd03HhCF41r6biBFOJXFdpNN3aK42LVFQuY2i elDWIRv97OJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdNwAKCRDB/BR4rcrs CYaIB/40k531N8KSBpTGmwzYtNpG5bkAP3QRdeGDf3dJZ3Q3vIAXX192PBC6wbQB2QoTbjz6aqV 4eVO/VtvyugvGDvdhLbvtYtD1cypsJ16rOIZfk+66RODwbisb7b7Lrt7RkwAgJlVi8W2qFv+1kS whM9keeecXPW+qcNZB1YAIPNr5grByBrYSIiSO4izWxgJO6ncAiNMud/576QNyzeMzvEVf5iKQX EXq+QTtVJ5GoYi45KLXhgwjGLMZkp2hX05btDLqAP3GH5emKA9ftNa/GPx3BILRY42PoG/p0c1g 7VSH4e8mq1Q2XBaW8FNPHXVW+9xPsUdjpSovNNIvXavSAypC X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: FKD5ZW7LRIL56HJK3A5EFBUEHTEZCG5A X-Message-ID-Hash: FKD5ZW7LRIL56HJK3A5EFBUEHTEZCG5A X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/drivers/mts64.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c index f0d34cf70c3e..5cfd0e99a13f 100644 --- a/sound/drivers/mts64.c +++ b/sound/drivers/mts64.c @@ -999,19 +999,17 @@ static int snd_mts64_probe(struct platform_device *pdev) return err; } -static int snd_mts64_remove(struct platform_device *pdev) +static void snd_mts64_remove(struct platform_device *pdev) { struct snd_card *card = platform_get_drvdata(pdev); if (card) snd_card_free(card); - - return 0; } static struct platform_driver snd_mts64_driver = { .probe = snd_mts64_probe, - .remove = snd_mts64_remove, + .remove_new = snd_mts64_remove, .driver = { .name = PLATFORM_DRIVER, } From patchwork Wed Mar 15 15:04:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176059 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2A954C61DA4 for ; Wed, 15 Mar 2023 15:09:24 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4B9C9125B; Wed, 15 Mar 2023 16:08:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4B9C9125B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678892962; bh=BkYNWOii/aSgu1cgSXnsKX3v2rEwZqQ8wOTwIf7xwoU=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=BnLZQWKMF9XaoT6KXayIDz2E/AVxIJLcNtROE9PXzkC80nHosHmQDxIzPWmZJtCY8 73TGWji1Xlg9RhFG3R3Q5/Ucz+b+j6ijZ55fm+ue+uV6mwFSVjALm/xshE0aHG1OwO TmA/qmn40Ef2z785ttDDsh+nSyPnUabC/f6/TNSQ= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 18ADFF8053D; Wed, 15 Mar 2023 16:08:10 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7BE0FF8016C; Wed, 15 Mar 2023 16:08:06 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DDAAEF8016C for ; Wed, 15 Mar 2023 16:08:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DDAAEF8016C Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjP-00075X-Df; Wed, 15 Mar 2023 16:07:59 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjO-004KTo-N4; Wed, 15 Mar 2023 16:07:58 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjN-0057cA-Qn; Wed, 15 Mar 2023 16:07:57 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Jaroslav Kysela , Takashi Iwai Subject: [PATCH 006/173] ALSA: portman2x4: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:04:58 +0100 Message-Id: <20230315150745.67084-7-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1481; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=BkYNWOii/aSgu1cgSXnsKX3v2rEwZqQ8wOTwIf7xwoU=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd06tvs2NB1EuKqgYoRJLZvrhg3w9QUZ4qGSo YEoKMKzADaJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdOgAKCRDB/BR4rcrs CTRzB/9WQtnzMVowaVMqs9/JoqZz5nB/oVmCn0P+SmY0qTYf4sAyze2uQKtVRmC3ZC68Ib+myLd nsijtaWfcn/R+G1PQJoqRkNinLDpDinDwzLRZL4NipQzrlv5rCD9RQ7x7xqvUM2I7wzlQTASwwp 5x59u2f3QjUd0NZrjbfvkAfEYFjCxI5z0Mxuf3XtbjGoaFRtQxu2hrV7oka3Qo8BU3+fwgiWQlo ee8DYvM7w49nZ8XstI4N9/wDQNV7mKZQlKgKX7iO16Ct7lkvJyWhrhLHPfalgkolmIOjck5odBT LTQN6Y314SbK7rwn8KRlAqIiNyC6aBxDYO34tTAmjiT49Uee X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: I27IESJDVMOD7C2AXNJRM6BQNFU4WUI7 X-Message-ID-Hash: I27IESJDVMOD7C2AXNJRM6BQNFU4WUI7 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/drivers/portman2x4.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c index 52a656735365..a515c13a489f 100644 --- a/sound/drivers/portman2x4.c +++ b/sound/drivers/portman2x4.c @@ -795,20 +795,18 @@ static int snd_portman_probe(struct platform_device *pdev) return err; } -static int snd_portman_remove(struct platform_device *pdev) +static void snd_portman_remove(struct platform_device *pdev) { struct snd_card *card = platform_get_drvdata(pdev); if (card) snd_card_free(card); - - return 0; } static struct platform_driver snd_portman_driver = { .probe = snd_portman_probe, - .remove = snd_portman_remove, + .remove_new = snd_portman_remove, .driver = { .name = PLATFORM_DRIVER, } From patchwork Wed Mar 15 15:04:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176073 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 830E4C61DA4 for ; Wed, 15 Mar 2023 15:13:15 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 33A7D1289; Wed, 15 Mar 2023 16:12:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 33A7D1289 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893193; bh=w4dLN8vnz0yCwrrxTh+pYlgW8ahlVuhDBIx/FCLxdP8=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=kUrME9O7mdaTmdS7yL8bX8OkEOD+ZvSRFaqSwB4d6XP6MUahhLV66PRmaNsVwgf9A UB75tJ0u5q8KST+6od9d+h+xynrbjt2cfgk1H2sZ8c63x5edmliyqidos3yO8YQvKU /8364OPHN4Tf0J+3lPrhnYlJWIeNms6K7HyCCRZE= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 4AFF9F80588; Wed, 15 Mar 2023 16:09:06 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C3C14F805E5; Wed, 15 Mar 2023 16:08:28 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9D4BCF80482 for ; Wed, 15 Mar 2023 16:08:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9D4BCF80482 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjP-00075c-PP; Wed, 15 Mar 2023 16:07:59 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjP-004KTy-3i; Wed, 15 Mar 2023 16:07:59 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjO-0057cF-18; Wed, 15 Mar 2023 16:07:58 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Jaroslav Kysela , Takashi Iwai Subject: [PATCH 007/173] ALSA: mips/hal2: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:04:59 +0100 Message-Id: <20230315150745.67084-8-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1357; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=w4dLN8vnz0yCwrrxTh+pYlgW8ahlVuhDBIx/FCLxdP8=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd09SBHfUjCSVLdffqXVvpqqUTipN8SdjwKpR x3BwH0I2MSJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdPQAKCRDB/BR4rcrs CTtaCACWs4vsGeD5p/wYsFYpwLVXLpnS57bjDFNvj0briuTOfEpDp+wU8fN3DIFpXwH1i5+xvyk pd2gOu+ANwE5ysJdgKhaV0JlPAyd2Wnh0IFdLFodNqeDP2dk0OnJIHBtT/y30002OrHwzPhb/ru LJR0jYKvMHi2H97idHI4povsOV84E4M/sRWuUcAX8steApa88Yy7mR9ZRWhzxvIEJ3EWA1xPiyA S1gwYQm+EY6xtEGLhmLNXPW2dEwc13FzPiV2byfVbUuVZZDdfOixWqM7pPYRnEZEGyEmZi3c7CJ 5psRY2nTmXcvls4oFVukzWv2lKXM9mlzYMt/KWeYXRiAla/8 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: YBXUDU4FPSTWCOTDMEA2JIYNFCMTPLID X-Message-ID-Hash: YBXUDU4FPSTWCOTDMEA2JIYNFCMTPLID X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/mips/hal2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/mips/hal2.c b/sound/mips/hal2.c index 9ac9b58d7c8c..3c26334227bb 100644 --- a/sound/mips/hal2.c +++ b/sound/mips/hal2.c @@ -877,17 +877,16 @@ static int hal2_probe(struct platform_device *pdev) return 0; } -static int hal2_remove(struct platform_device *pdev) +static void hal2_remove(struct platform_device *pdev) { struct snd_card *card = platform_get_drvdata(pdev); snd_card_free(card); - return 0; } static struct platform_driver hal2_driver = { .probe = hal2_probe, - .remove = hal2_remove, + .remove_new = hal2_remove, .driver = { .name = "sgihal2", } From patchwork Wed Mar 15 15:05:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176061 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BE896C7618B for ; Wed, 15 Mar 2023 15:10:01 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 678551278; Wed, 15 Mar 2023 16:09:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 678551278 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678892999; bh=Wy+atFV8omMfaAMjInhKahC3a7wojWFSJ3UR3QPaQeM=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=gsPevm5fWiSaX53Bznxl/WyeJsBrUQ85hBIPGIxmI0Hy5ocwyTTYh0VDsKzsLEDS8 KVXURPfbY8ME8dpt9C+noWo9bRgBzj2J3cf766ab59TAhVa5z3GI1M0NJLVSp6ldUt Cz0P9AsHeFqfWSIito82HqBrFNvJ4hMzyj2JYS10= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E9236F805AA; Wed, 15 Mar 2023 16:08:15 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4FBF7F8053B; Wed, 15 Mar 2023 16:08:09 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 373F5F8032D for ; Wed, 15 Mar 2023 16:08:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 373F5F8032D Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjP-00075r-QJ; Wed, 15 Mar 2023 16:07:59 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjP-004KU0-5O; Wed, 15 Mar 2023 16:07:59 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjO-0057cI-8K; Wed, 15 Mar 2023 16:07:58 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Jaroslav Kysela , Takashi Iwai Subject: [PATCH 008/173] ALSA: mips/sgio2audio: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:00 +0100 Message-Id: <20230315150745.67084-9-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1456; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Wy+atFV8omMfaAMjInhKahC3a7wojWFSJ3UR3QPaQeM=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd1AzLG6h6NXB8BIAsAsVlz2RJKr304GbWIf8 5UCa7vDiNmJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdQAAKCRDB/BR4rcrs Cfc9B/9iU4DNgs0D/ZWhUn6FroP6DuA8noL4+xxQltmf6NT9cOnh3ZGR/y4E6MGe6VPis0d0xVq pd9tvlxE5LV0xCNoMvu0V0dP1bGJFQ+IvoFNnhBBJZLTBMO/D9bnkAiaD8oUAKnTs4PMSj0QADt AUp35tApZHO/YOmB1w/yUmZ/I2uMYsZLvVSkC3kewKJfgWYKRWyPExdT1vpI97C+zIjTDEKRseL SMKXq6aTsj77ee5a+DDHXFkeE6DPoeDEXjsHZC6VkzLI5YVXmxAnfK/JlBSlPc9JU2lzDAWTz8v LHibjGYATrFwb7fHB5ryAp8GVM31cRaOEr3dlpZlIQ90AlaV X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: GYZCXPK6GX6NM2FLZTTSCGWX2564M32C X-Message-ID-Hash: GYZCXPK6GX6NM2FLZTTSCGWX2564M32C X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/mips/sgio2audio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/mips/sgio2audio.c b/sound/mips/sgio2audio.c index 989f656e2de7..a8551ccdd1bf 100644 --- a/sound/mips/sgio2audio.c +++ b/sound/mips/sgio2audio.c @@ -908,17 +908,16 @@ static int snd_sgio2audio_probe(struct platform_device *pdev) return 0; } -static int snd_sgio2audio_remove(struct platform_device *pdev) +static void snd_sgio2audio_remove(struct platform_device *pdev) { struct snd_card *card = platform_get_drvdata(pdev); snd_card_free(card); - return 0; } static struct platform_driver sgio2audio_driver = { .probe = snd_sgio2audio_probe, - .remove = snd_sgio2audio_remove, + .remove_new = snd_sgio2audio_remove, .driver = { .name = "sgio2audio", } From patchwork Wed Mar 15 15:05:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176104 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D42BDC7618B for ; Wed, 15 Mar 2023 15:14:33 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0F5DE1296; Wed, 15 Mar 2023 16:13:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0F5DE1296 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893272; bh=ccbxKj/wVrW1k3p+wz37IPmkCcgaA7P6rLPSrcKu3F0=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=j1gLws8CV6AIfSrmOrHJ93Z2XlHv7iY6KzPfRl0cGC8k9kq23Z4jZ1eQ/bj+d+8W/ kpuWHf9rnHfQlk3PATTY9izpOFZiuiAvxhJjEl3cthi+2+PWQudQI5Of/17+pUD8Ez VlNc3CGkONRvzUTf276cB6MYjdbRrck7NzcfHgnM= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 01431F8065E; Wed, 15 Mar 2023 16:09:28 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 925DDF805ED; Wed, 15 Mar 2023 16:08:35 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 6B758F80552 for ; Wed, 15 Mar 2023 16:08:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6B758F80552 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjQ-00076f-Kj; Wed, 15 Mar 2023 16:08:00 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjP-004KUA-Ma; Wed, 15 Mar 2023 16:07:59 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjO-0057cM-Ep; Wed, 15 Mar 2023 16:07:58 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Mohan Kumar , Geoff Levand , Takashi Sakamoto Subject: [PATCH 009/173] ALSA: hda/tegra: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:01 +0100 Message-Id: <20230315150745.67084-10-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1647; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=ccbxKj/wVrW1k3p+wz37IPmkCcgaA7P6rLPSrcKu3F0=; b=owEBbAGT/pANAwAKAcH8FHityuwJAcsmYgBkEd1DYvVyivyZVtM1lJfkVuZJPFCK+WU9VbX+D U5mXh5bhASJATIEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdQwAKCRDB/BR4rcrs Cbb8B/iw1O2f2Gyx2OcdkGH+Wt6GGyPScEG1op/2RCJQHmkxubaapU/62d+28zhjgeUdd/seE6j JnIJQgUTL0zSDLhbw94f2hlN5KAFySmn/bmxlRkRD4zvRwkU47GsYLUekZJrff9Vek2Rfqj7DHr vWB6vw1Yg8kc3m3qgehv7J7M5RDXEmktnO4HPjyqcrU7iDw91fKQb9Z356EANd3fgjwMD9VfEYM rsQTlN1gMwoNBBFFqZV4iIOJdrTLJocWx36hsdE7kJRwCMNGP+oVeC5Av++dOniI0KXuywYVI9v S0EbIrUrOrBFtYe3aMk46wWIiJwvehmjHbDO/Onbk0Eop7g= X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 3NWSRGOXTKREFISSYEXCZMP3JT4GA6O6 X-Message-ID-Hash: 3NWSRGOXTKREFISSYEXCZMP3JT4GA6O6 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/pci/hda/hda_tegra.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c index c2bf86781894..9d0ab043880b 100644 --- a/sound/pci/hda/hda_tegra.c +++ b/sound/pci/hda/hda_tegra.c @@ -580,12 +580,10 @@ static void hda_tegra_probe_work(struct work_struct *work) return; /* no error return from async probe */ } -static int hda_tegra_remove(struct platform_device *pdev) +static void hda_tegra_remove(struct platform_device *pdev) { snd_card_free(dev_get_drvdata(&pdev->dev)); pm_runtime_disable(&pdev->dev); - - return 0; } static void hda_tegra_shutdown(struct platform_device *pdev) @@ -607,7 +605,7 @@ static struct platform_driver tegra_platform_hda = { .of_match_table = hda_tegra_match, }, .probe = hda_tegra_probe, - .remove = hda_tegra_remove, + .remove_new = hda_tegra_remove, .shutdown = hda_tegra_shutdown, }; module_platform_driver(tegra_platform_hda); From patchwork Wed Mar 15 15:05:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176062 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 890DBC6FD1D for ; Wed, 15 Mar 2023 15:10:16 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3675F1286; Wed, 15 Mar 2023 16:09:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3675F1286 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893014; bh=Nv0fFDdpMsYv/AziGAvneOUwDP6WrEsgaTtZmnVlKCs=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=rVPBXaoP05riC4AuHLDFXK3iSoYlRBrBTtwLgxLpivfWL6+p8eg1sc/wkyO8zbaef 1kC1tHC56AkgXy/5DxSTm0JaTj9DbCYRow+vaAUzn1Wcxk0Hul8e8gzhviE/Ps6vP8 lax++InPNhq8RPGnpbPQU+c9rX6co+7FlAHZCXl0= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 41724F805B2; Wed, 15 Mar 2023 16:08:19 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1DAAEF80551; Wed, 15 Mar 2023 16:08:11 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 20A77F8051B for ; Wed, 15 Mar 2023 16:08:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 20A77F8051B Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjR-00076k-Ax; Wed, 15 Mar 2023 16:08:01 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjP-004KUH-UP; Wed, 15 Mar 2023 16:07:59 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjO-0057cP-L6; Wed, 15 Mar 2023 16:07:58 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Jaroslav Kysela , Takashi Iwai , Michael Ellerman Subject: [PATCH 010/173] ALSA: ppc/powermac: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:02 +0100 Message-Id: <20230315150745.67084-11-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1522; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Nv0fFDdpMsYv/AziGAvneOUwDP6WrEsgaTtZmnVlKCs=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd1Fc2m0HdG8hA2w0W66WSSsQN5kZZ2uuzZom b2v/sqUuJeJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdRQAKCRDB/BR4rcrs CZ0jCACPrpIlHkrSaBq80LSctZcXy1yzAvLgskca4LBO4LBxyHTTfFqyTugrTL1GHnkHXn20Yd3 qNiV7pzR8UaVog2UzIuYKI/Gi1m2RpaEjbKH1DiowL6BhptZtU2lpFdSarRMoTqSQzhB+mRNSlQ 1i4INPcYOTV4qgeWvJ9WF2kVUTWDx97fFyM/EXzloZXvgcZ6naAHbsep49lw9jSyKf0u615E3Hs CO6gHhimXOCTNEWaRcapCulnRlma6ioLO2QYKmyGdY9hg73FWmMcfzbu9caNUa4Xfkvpd4cof8F /fcHSV3XnyjSoJgJXTbPwrfr7wt8waK16GdZ5ZTLI+tbA/mO X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: IQ3ZC3VKT2O4OYXONQT7UIMFGSW7PMHH X-Message-ID-Hash: IQ3ZC3VKT2O4OYXONQT7UIMFGSW7PMHH X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Nicholas Piggin , Christophe Leroy , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/ppc/powermac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c index db414b61157e..e17af46abddd 100644 --- a/sound/ppc/powermac.c +++ b/sound/ppc/powermac.c @@ -130,10 +130,9 @@ static int snd_pmac_probe(struct platform_device *devptr) } -static int snd_pmac_remove(struct platform_device *devptr) +static void snd_pmac_remove(struct platform_device *devptr) { snd_card_free(platform_get_drvdata(devptr)); - return 0; } #ifdef CONFIG_PM_SLEEP @@ -161,7 +160,7 @@ static SIMPLE_DEV_PM_OPS(snd_pmac_pm, snd_pmac_driver_suspend, snd_pmac_driver_r static struct platform_driver snd_pmac_driver = { .probe = snd_pmac_probe, - .remove = snd_pmac_remove, + .remove_new = snd_pmac_remove, .driver = { .name = SND_PMAC_DRIVER, .pm = SND_PMAC_PM_OPS, From patchwork Wed Mar 15 15:05:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176075 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6A495C7618D for ; Wed, 15 Mar 2023 15:13:43 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 026391270; Wed, 15 Mar 2023 16:12:51 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 026391270 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893221; bh=se4ZyQSsnSJa//rrcRfTP0Fogj0JtsTdy6bm/wMabH8=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=nsrooqLnHMeJpZ4c0vyRvQgHVpq1yAXPlNFSWtoJ8oUwKp+/0tsmi71ooZzK8uEGu uxPaUPlasSZEDFlGqG41rQVXE9he6BpZkPqGArbMZIONi4784Cj/XPctgixZ5slegw /UcDve7Yucegg6FvZrkmm8i2dCKKvHf2L5h81bco= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 30760F805B0; Wed, 15 Mar 2023 16:09:16 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 276E6F805E9; Wed, 15 Mar 2023 16:08:31 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 58E87F80425 for ; Wed, 15 Mar 2023 16:08:02 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 58E87F80425 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjQ-00076n-LS; Wed, 15 Mar 2023 16:08:00 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjQ-004KUM-1A; Wed, 15 Mar 2023 16:08:00 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjO-0057cW-RC; Wed, 15 Mar 2023 16:07:58 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Jaroslav Kysela , Takashi Iwai Subject: [PATCH 011/173] ALSA: sh: aica: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:03 +0100 Message-Id: <20230315150745.67084-12-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1614; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=se4ZyQSsnSJa//rrcRfTP0Fogj0JtsTdy6bm/wMabH8=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd1IZhWz34qQDZwvS4w5pILsJnT+SLAPjmTJX O3Np68MQm6JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdSAAKCRDB/BR4rcrs CXbaB/0UPzRj4nUvCYQV9/HTAe0VH/dC0qlT2snbmOAe89dSlueCZcDySQJznZGkvgQw8YqUxpc ykaHEljbW/q1QoIEylWSzNdXwtIch7bco+zBMBy6BH16h4E6J/z40y77DSz+pS5/DYPROC0cBIH 1ltkZUyldu2qynDJUlg6b+4XfkvMGeacnrbXwyzKzU/ZIFGGotldRaZsD4/qNpgs3HDCyFQ5OE7 23djTMQIuQmXSer5A9KrO+3x/m1awwKmPoamAFCBLWCOrOSisy2OUg2kcUHcP7hMHeJd11Aa/FJ umEEMl7tkrxiTBHzmRFmrGBSX2UONgMDiTT9UGQqNa+adGs8 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 3VLPHJFYX6ZG6NQODHYZQRDXMF6LO74Z X-Message-ID-Hash: 3VLPHJFYX6ZG6NQODHYZQRDXMF6LO74Z X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/sh/aica.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/sh/aica.c b/sound/sh/aica.c index 459c907655d9..320ac792c7fe 100644 --- a/sound/sh/aica.c +++ b/sound/sh/aica.c @@ -539,13 +539,12 @@ static int add_aicamixer_controls(struct snd_card_aica *dreamcastcard) return 0; } -static int snd_aica_remove(struct platform_device *devptr) +static void snd_aica_remove(struct platform_device *devptr) { struct snd_card_aica *dreamcastcard; dreamcastcard = platform_get_drvdata(devptr); snd_card_free(dreamcastcard->card); kfree(dreamcastcard); - return 0; } static int snd_aica_probe(struct platform_device *devptr) @@ -592,7 +591,7 @@ static int snd_aica_probe(struct platform_device *devptr) static struct platform_driver snd_aica_driver = { .probe = snd_aica_probe, - .remove = snd_aica_remove, + .remove_new = snd_aica_remove, .driver = { .name = SND_AICA_DRIVER, }, From patchwork Wed Mar 15 15:05:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176072 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9CC2BC61DA4 for ; Wed, 15 Mar 2023 15:12:57 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 83F37125D; Wed, 15 Mar 2023 16:12:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 83F37125D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893175; bh=58pwx6LCcANvd2JiSXBwBOaBRAasufu5xSQZ0gnGNI4=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=dx1fsdKtit8J0PcD0m6c+MZs/7Wi/1qrS5ma8+Nn/iwy+qfoYhxLSiey6gcykYf/h 5aZ30Pslm3qGJzINUFU6Z/jjUlcbTf54tuf6z2DaYSSUNbF2CYVxiO3luNpKKayCTv Nk5psiCRV1J1EbD9w4+HssuQ/tSklLfdfxxY9/uM= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2522BF80580; Wed, 15 Mar 2023 16:09:02 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D8E9BF805E0; Wed, 15 Mar 2023 16:08:27 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C07C8F804B1 for ; Wed, 15 Mar 2023 16:08:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C07C8F804B1 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjQ-00076r-Sk; Wed, 15 Mar 2023 16:08:00 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjQ-004KUR-5D; Wed, 15 Mar 2023 16:08:00 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjP-0057cZ-23; Wed, 15 Mar 2023 16:07:59 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Jaroslav Kysela , Takashi Iwai Subject: [PATCH 012/173] ALSA: sh_dac_audio: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:04 +0100 Message-Id: <20230315150745.67084-13-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1560; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=58pwx6LCcANvd2JiSXBwBOaBRAasufu5xSQZ0gnGNI4=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd1Mag0KQu4LR+fUCnhsNPXIcsRXf/6m7a8oP /426+epKxqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdTAAKCRDB/BR4rcrs CQYtB/9lYDayxVlNUVoQup/O6MFWg2vDH6KQv/+k26HVq5WCb0C4PNHkvUOn/xjI5HZvONDu9hj tqwjzafkrlHViYDB8Co4nPBLBYo/aYQcKZ+0DtGP0uGfG4VPplMBx/rmcYzKQ7UJJ3lwK4O7xYq /i3FBZNYdw8Wy8VLuGeoFsW7m4ELZ2GRg+5aIeA0LN+SIpjKDxdjs+612pbmKlR1ijLZZWVhBRy tLA4Ev+2qNUon5dNAFUvdwlxY7Tz5tynHIegR+aO3XF5pWbC7AfRKczqXN7sDb8LOHIVkGYyAmm HQst8XCwCcMoLtQtNHaejGSeHqVzBFjWDL4Ktx9Bme7nK7F3 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: X76M3XXY5HOT6QZUEN2LHP35TO6DJP3S X-Message-ID-Hash: X76M3XXY5HOT6QZUEN2LHP35TO6DJP3S X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/sh/sh_dac_audio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/sh/sh_dac_audio.c b/sound/sh/sh_dac_audio.c index 8ebd972846ac..8cf571955c9d 100644 --- a/sound/sh/sh_dac_audio.c +++ b/sound/sh/sh_dac_audio.c @@ -257,10 +257,9 @@ static int snd_sh_dac_pcm(struct snd_sh_dac *chip, int device) /* driver .remove -- destructor */ -static int snd_sh_dac_remove(struct platform_device *devptr) +static void snd_sh_dac_remove(struct platform_device *devptr) { snd_card_free(platform_get_drvdata(devptr)); - return 0; } /* free -- it has been defined by create */ @@ -403,7 +402,7 @@ static int snd_sh_dac_probe(struct platform_device *devptr) */ static struct platform_driver sh_dac_driver = { .probe = snd_sh_dac_probe, - .remove = snd_sh_dac_remove, + .remove_new = snd_sh_dac_remove, .driver = { .name = "dac_audio", }, From patchwork Wed Mar 15 15:05:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176071 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F27BC7618B for ; Wed, 15 Mar 2023 15:12:45 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 528A31265; Wed, 15 Mar 2023 16:11:53 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 528A31265 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893163; bh=g4yCYuNhl6LIUMSC0Z8O7b1Q229FupMzuqD0eVQW/GI=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ppc8M51i/+lhwLIsx5/uaP1bKPfRtTN8Nst6Mr3f0IcqdXWh+6AYpo8UZiNskGkBA 06ljFnIGhHoMgUyn9nHmtRqm1dH46ap0qkOmyQWJSUvpclxk5bGrhpjhr1XMNjxbYf 85wzgnR2VkMu7lI0hN1vLyQwtNMdPZZav+iFShWI= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 9B517F8057B; Wed, 15 Mar 2023 16:08:59 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E8162F805DA; Wed, 15 Mar 2023 16:08:26 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 247F0F8052D for ; Wed, 15 Mar 2023 16:08:08 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 247F0F8052D Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjR-00076s-DB; Wed, 15 Mar 2023 16:08:01 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjQ-004KUT-7C; Wed, 15 Mar 2023 16:08:00 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjP-0057cd-8J; Wed, 15 Mar 2023 16:07:59 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax Subject: [PATCH 013/173] ASoC: adi: axi-i2s: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:05 +0100 Message-Id: <20230315150745.67084-14-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1570; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=g4yCYuNhl6LIUMSC0Z8O7b1Q229FupMzuqD0eVQW/GI=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd1OQTdkca8miaku2Zm/O8ZhYYogGmoTLu0sa t1rN16hYzOJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdTgAKCRDB/BR4rcrs CZkPB/9tuSi3mv6PhjKsy86ztFAP1Qb5qUOm5UWIv6sfPGA9I7Ict/mYhb4XV3gnuiWjIxoQ5tR HFuuCELTqmql2mt0/iDyb3KGXvK+xBLZ6U/Y/jtGyEen74YuIaPZRnA7GerJcS/BPr3KtwVaoIQ WfMr3ck8mprZS4+ciyvusjfVDTb/NvvBzndqFSERJ/vZZZ3cI95Odvr5Bn+jvCX0Ca4knHprM+k xW+4Erg3r8WOrf+axNydSjbexQcA2wbUe6SsFF3dksk3FkuySn33Sgf/x9WGb7tAIVucoWRGnlk frqgeZ7/tsEKOr0NxhJ4pX3/Jj8lasuOQamT+2qkWsaKcXIt X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: HWPEGTOUB7GMHJ7ZJADJ32SK7CF73MLM X-Message-ID-Hash: HWPEGTOUB7GMHJ7ZJADJ32SK7CF73MLM X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/adi/axi-i2s.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/adi/axi-i2s.c b/sound/soc/adi/axi-i2s.c index b1342351bff4..d5b6f5187f8e 100644 --- a/sound/soc/adi/axi-i2s.c +++ b/sound/soc/adi/axi-i2s.c @@ -274,13 +274,11 @@ static int axi_i2s_probe(struct platform_device *pdev) return ret; } -static int axi_i2s_dev_remove(struct platform_device *pdev) +static void axi_i2s_dev_remove(struct platform_device *pdev) { struct axi_i2s *i2s = platform_get_drvdata(pdev); clk_disable_unprepare(i2s->clk); - - return 0; } static const struct of_device_id axi_i2s_of_match[] = { @@ -295,7 +293,7 @@ static struct platform_driver axi_i2s_driver = { .of_match_table = axi_i2s_of_match, }, .probe = axi_i2s_probe, - .remove = axi_i2s_dev_remove, + .remove_new = axi_i2s_dev_remove, }; module_platform_driver(axi_i2s_driver); From patchwork Wed Mar 15 15:05:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176069 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 95A40C6FD1D for ; Wed, 15 Mar 2023 15:12:11 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id F07301266; Wed, 15 Mar 2023 16:11:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F07301266 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893129; bh=6zPvsMrcq/da71Hbs0K3EoyDvbKriRqVsR5bhLLAghA=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=TLCKzccNmqHg3OU6r+RNfFtIXgRhChs2U2hG6qqXvJKkq3k3P9DAp2JmWpz9O4kZ+ Qe5IaNLZXc0/6Qb0eh1pQ5Awt3J1m2h7GwPrL3kF1OQY1LOjAXjLxOzilp0rQzuFKS w3PwlxkWAGXCnrvRVj4YSemEt89OY/KqQ0LOH+w4= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 63A59F80649; Wed, 15 Mar 2023 16:08:51 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7C14BF805C3; Wed, 15 Mar 2023 16:08:22 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A981AF80423 for ; Wed, 15 Mar 2023 16:08:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A981AF80423 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjR-00076q-D7; Wed, 15 Mar 2023 16:08:01 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjQ-004KUQ-5J; Wed, 15 Mar 2023 16:08:00 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjP-0057ch-F2; Wed, 15 Mar 2023 16:07:59 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax Subject: [PATCH 014/173] ASoC: adi: axi-spdif: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:06 +0100 Message-Id: <20230315150745.67084-15-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1606; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=6zPvsMrcq/da71Hbs0K3EoyDvbKriRqVsR5bhLLAghA=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd1Rjet2r5whUVY6cIZCKKba/qZqYfbVn4iAL t0qpCFZA+2JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdUQAKCRDB/BR4rcrs Ca2EB/0XysJBXVYKRCpWP8K2jDXo/fMFP0BEN0e6HBZ2nH9iuaeYSOOhkErhrLMhsyBZoFF7k8C lySTgWuPJ3yZr6u7QvxnR6wmp3+PVqqQC4ED6Ywvm4WHvRVsFTB724+vBGxMhGFOdW8ckrPITI5 FE5v7Zm6pTYoYghP/wB0w2RJ5BIlCPwjJ6AWsX/ICO4nd8PoA2FhN0njtuIuCPj3LHGtD9F+Z7z ZOApwWpdG1m5dzEw0jdXxj8pEH2MFvKQVjWqyWY7km89Ab82mf9c9ScdXTU3mh3a3881u7xjodw 62WGzuMooeROxEE2F8B1qapmVpW+7lWgs02GaMGbyX9jTpLu X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: H6Z4WKH6MP7BGT4G5G6VVKPAGCYKYNG3 X-Message-ID-Hash: H6Z4WKH6MP7BGT4G5G6VVKPAGCYKYNG3 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: <> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/adi/axi-spdif.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/adi/axi-spdif.c b/sound/soc/adi/axi-spdif.c index 51b968ea21da..e4c99bbc9cdd 100644 --- a/sound/soc/adi/axi-spdif.c +++ b/sound/soc/adi/axi-spdif.c @@ -239,13 +239,11 @@ static int axi_spdif_probe(struct platform_device *pdev) return ret; } -static int axi_spdif_dev_remove(struct platform_device *pdev) +static void axi_spdif_dev_remove(struct platform_device *pdev) { struct axi_spdif *spdif = platform_get_drvdata(pdev); clk_disable_unprepare(spdif->clk); - - return 0; } static const struct of_device_id axi_spdif_of_match[] = { @@ -260,7 +258,7 @@ static struct platform_driver axi_spdif_driver = { .of_match_table = axi_spdif_of_match, }, .probe = axi_spdif_probe, - .remove = axi_spdif_dev_remove, + .remove_new = axi_spdif_dev_remove, }; module_platform_driver(axi_spdif_driver); From patchwork Wed Mar 15 15:05:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176065 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C2EC8C61DA4 for ; Wed, 15 Mar 2023 15:11:06 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A0B171279; Wed, 15 Mar 2023 16:10:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A0B171279 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893064; bh=l9lrBeE+uxHDHwLvnATNNRJxmkX1G4wZ/xIs4YXCxRM=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=mBxFsVptTwm0/uXn6C+/ka7+QSBp7UHzHf7fSmWIz/F+8Tbm0oFHByapfyWR390Oc 9bgs9SWP//XPTILgadUtak8sCOKn5Xc/eKb6KuHLi+RC1w0+OD88adGFF1UtWFMIGo EBYxO+FbPqLaKmexO7YicCVOVXV5c9MRrQA7WXaA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 84245F80425; Wed, 15 Mar 2023 16:08:34 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8B381F805AF; Wed, 15 Mar 2023 16:08:16 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 948D2F8016C for ; Wed, 15 Mar 2023 16:08:06 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 948D2F8016C Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjQ-00076x-Ul; Wed, 15 Mar 2023 16:08:00 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjQ-004KUZ-9f; Wed, 15 Mar 2023 16:08:00 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjP-0057ck-Ls; Wed, 15 Mar 2023 16:07:59 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Vijendar Mukunda Subject: [PATCH 015/173] ASoC: amd: acp-pcm-dma: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:07 +0100 Message-Id: <20230315150745.67084-16-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1779; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=l9lrBeE+uxHDHwLvnATNNRJxmkX1G4wZ/xIs4YXCxRM=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd1UlFqxUj9YTw2vtRXhSUJcDXWNizlks5Zfn q11UsDPyjKJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdVAAKCRDB/BR4rcrs CdDfB/9+mxgYt6VjXjKD6C5jANBeocaLrDPN7OQiyzO5JaACr0tJWNjM8U7kLdNa/46u38OaK45 bLA50uhqAzhShEsR1jDr5D835RFu+ghWRkBN2DLuWyyt0XaYQzGUGxZWeFuxu/o4rdFdizPoSZD 6LBz2cJAdy0chtbRrR+mdLh1/FpVgS8zfgXvc9EAS3HUXeSddgwayNsb8CEB7QLQEOVCmvCZykl 3kZPIPvV50vXMFjDVitzCl0QMvgZVZpzbzTp9ydkQCYrF9IlnkLmqNkSTgZQSwNebPowqo1msBT VufX3ObNwY3+WaP+i+QWcVQqqE6d0vr0dxI1d9HWc1etj/G0 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 4GSPN4BPZCBYSV7GDV2A6QYICK4SHSUT X-Message-ID-Hash: 4GSPN4BPZCBYSV7GDV2A6QYICK4SHSUT X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/amd/acp-pcm-dma.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index 198358d28ea9..d41df316da58 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c @@ -1323,7 +1323,7 @@ static int acp_audio_probe(struct platform_device *pdev) return status; } -static int acp_audio_remove(struct platform_device *pdev) +static void acp_audio_remove(struct platform_device *pdev) { int status; struct audio_drv_data *adata = dev_get_drvdata(&pdev->dev); @@ -1332,8 +1332,6 @@ static int acp_audio_remove(struct platform_device *pdev) if (status) dev_err(&pdev->dev, "ACP Deinit failed status:%d\n", status); pm_runtime_disable(&pdev->dev); - - return 0; } static int acp_pcm_resume(struct device *dev) @@ -1428,7 +1426,7 @@ static const struct dev_pm_ops acp_pm_ops = { static struct platform_driver acp_dma_driver = { .probe = acp_audio_probe, - .remove = acp_audio_remove, + .remove_new = acp_audio_remove, .driver = { .name = DRV_NAME, .pm = &acp_pm_ops, From patchwork Wed Mar 15 15:05:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176068 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C79E9C6FD1D for ; Wed, 15 Mar 2023 15:11:56 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 78C291282; Wed, 15 Mar 2023 16:11:04 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 78C291282 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893114; bh=ojZJhvg3lC1NvDLBuVBmrNfwZ+MPVa0jn+L9VKCrgsg=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=oBy1nUvR7Nbz4fwBisNR8YWxOokl0lAxL/e/J2PKBrzgqJSN4IftF0eIf9p0xtr2p rzET4KkBJSd6OZnzDlnc7R6/d2gRPO75Uvc25xzml33Ijg8HDXmzmi8nkmVZPzLX2n kWQvAvvveBn90iGYt91Z7IReODWvHpr8M9SB81KQ= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 158D6F80613; Wed, 15 Mar 2023 16:08:45 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B1FB8F805BD; Wed, 15 Mar 2023 16:08:20 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 75B2DF80520 for ; Wed, 15 Mar 2023 16:08:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 75B2DF80520 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjR-00077I-Hi; Wed, 15 Mar 2023 16:08:01 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjQ-004KUe-H8; Wed, 15 Mar 2023 16:08:00 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjP-0057co-Su; Wed, 15 Mar 2023 16:07:59 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , V sujith kumar Reddy Subject: [PATCH 016/173] ASoC: amd: acp: rembrandt: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:08 +0100 Message-Id: <20230315150745.67084-17-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1685; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=ojZJhvg3lC1NvDLBuVBmrNfwZ+MPVa0jn+L9VKCrgsg=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd1ZUZj9+dKmDEkpQC2Jm2mvm/rnKrKN48gzv HV6ew6OInSJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdWQAKCRDB/BR4rcrs CevuB/434mSvIL8DfYzrc53OTy+8uNLd/l9F5NFIjLUdlNt6YwQMy7gHvtKTLgd17eURiQ5sGvX aAEldutS1XNSMei5hNHiOcXi2Bald1Kce7A+p2YsQSFPY8C1mrb5qD9Ou0JyCG+DOdbs4smwejn mAF9WVZSI1XMY2x1hTEwObCgFYzl4lIZGnJE7SHQPOtQC4i7Eq1TY8zPr5pcqufM97DC4GOHy1F hSGFrdhkkf/nH5k8npN1dfe4+h7qb+PzGuA3+dYlLhFJHEjcM0XjuKk1N/joIHg7Iox0HH3H5Of Z48wip6YrOyVzr94YhemnS7WbqEBAJmsftatlPXQhM0ZBffd X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: IQCASWKVWFJPG3CWSGYQFB5VGEW4MXDU X-Message-ID-Hash: IQCASWKVWFJPG3CWSGYQFB5VGEW4MXDU X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/amd/acp/acp-rembrandt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/amd/acp/acp-rembrandt.c b/sound/soc/amd/acp/acp-rembrandt.c index 15cd3f8cc82c..5c455cc04113 100644 --- a/sound/soc/amd/acp/acp-rembrandt.c +++ b/sound/soc/amd/acp/acp-rembrandt.c @@ -366,7 +366,7 @@ static int rembrandt_audio_probe(struct platform_device *pdev) return 0; } -static int rembrandt_audio_remove(struct platform_device *pdev) +static void rembrandt_audio_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct acp_dev_data *adata = dev_get_drvdata(dev); @@ -376,12 +376,11 @@ static int rembrandt_audio_remove(struct platform_device *pdev) acp6x_disable_interrupts(adata); acp_platform_unregister(dev); - return 0; } static struct platform_driver rembrandt_driver = { .probe = rembrandt_audio_probe, - .remove = rembrandt_audio_remove, + .remove_new = rembrandt_audio_remove, .driver = { .name = "acp_asoc_rembrandt", }, From patchwork Wed Mar 15 15:05:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176070 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5A330C61DA4 for ; Wed, 15 Mar 2023 15:12:25 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EE1E51290; Wed, 15 Mar 2023 16:11:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EE1E51290 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893143; bh=FAzKJ1RH6/OpsYurkBq8UEjzmXqX9QCgjiaWeuxtHV0=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=niWpksVA74XzHdoCN/vc6Mr1Kt6n2pXBU5C2K/PRt4ljIW9udcnpB/1EZk9QvJexj RyNtXoJ2t7Xu4Qu+vEDi3e/gATupxnUXisYZ+fbpHVdtWvmFL6iKJht8PU0q+EKk6L BvIR7c9Db63DSATLY4VEbPoP9htXG+brpuQ0avzI= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2D091F80652; Wed, 15 Mar 2023 16:08:55 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7FCF8F805CA; Wed, 15 Mar 2023 16:08:24 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C4D48F8052E for ; Wed, 15 Mar 2023 16:08:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C4D48F8052E Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjR-00078p-NA; Wed, 15 Mar 2023 16:08:01 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjQ-004KUk-Qe; Wed, 15 Mar 2023 16:08:00 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjQ-0057cs-2M; Wed, 15 Mar 2023 16:08:00 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , V sujith kumar Reddy Subject: [PATCH 017/173] ASoC: amd: acp: renoir: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:09 +0100 Message-Id: <20230315150745.67084-18-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1676; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=FAzKJ1RH6/OpsYurkBq8UEjzmXqX9QCgjiaWeuxtHV0=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd1dgRVFb8hz8Tcr5rLjhrv8f6EU4vpsNukE9 y07+gC2NRqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdXQAKCRDB/BR4rcrs CUI9CACHu1oMA3EeUTh38Jp5p1Jy2F0VX+tbzquJ0+zLnQ0awccIdo1bPv3B0EWYnhw9MtYhvn7 V4iDJImfIfpW39RlWKJT734H0Po0boYdE2C0HQsySjeSG/TE09nTBTTUWgkj1xbabkNx1Zl/xC0 DiVHNVwSBRIpOsWJSqq+qb1INPEeA0/w2IOG+WFASP/BqZtNt3gAxGUSUMdroqeF3/kn+oVSKeV E44OI/+FEw9YRp4IQrSU1htx6ooe/5AhAZ4TFeCVlSMPrPtlkyMY6n3ExEDmx+Hx0Fjbvu6V5Tt 0r4rapcDKdWYbMim9UwIbQNqIq6oKrzd3pJH+XZBcnj9elXD X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 2AIZTLOYZP2PX2MF64ROC6UVXBFH7DY6 X-Message-ID-Hash: 2AIZTLOYZP2PX2MF64ROC6UVXBFH7DY6 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/amd/acp/acp-renoir.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/amd/acp/acp-renoir.c b/sound/soc/amd/acp/acp-renoir.c index 2a89a0d2e601..b3cbc7f19ec5 100644 --- a/sound/soc/amd/acp/acp-renoir.c +++ b/sound/soc/amd/acp/acp-renoir.c @@ -313,7 +313,7 @@ static int renoir_audio_probe(struct platform_device *pdev) return 0; } -static int renoir_audio_remove(struct platform_device *pdev) +static void renoir_audio_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct acp_dev_data *adata = dev_get_drvdata(dev); @@ -329,12 +329,11 @@ static int renoir_audio_remove(struct platform_device *pdev) dev_err(&pdev->dev, "ACP de-init Failed (%pe)\n", ERR_PTR(ret)); acp_platform_unregister(dev); - return 0; } static struct platform_driver renoir_driver = { .probe = renoir_audio_probe, - .remove = renoir_audio_remove, + .remove_new = renoir_audio_remove, .driver = { .name = "acp_asoc_renoir", }, From patchwork Wed Mar 15 15:05:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176110 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B343AC61DA4 for ; Wed, 15 Mar 2023 15:16:07 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7E30212A1; Wed, 15 Mar 2023 16:15:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7E30212A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893365; bh=MnXaxKkCZKJmFUczFAQa/YA4NOv1H2uo3XUofyBwtsc=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=DuMzNvwMujGcWIFFqlsUuL+gWtRrhJUp0MoDeC228SO4OFkyRHf2NNgehDeyZX751 UEZQW7k3IqBB44HsCUXhHbdsAHFE0zpXwXEbkCyJz7dD8zSHns+jDiJ2JLxvZ16xZs sGepzZEaeBFvqZNGx00GdTQIyG7ka8OyiZdciguU= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id BA708F805E1; Wed, 15 Mar 2023 16:09:54 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 547BBF8060A; Wed, 15 Mar 2023 16:08:42 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 14F19F80558 for ; Wed, 15 Mar 2023 16:08:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 14F19F80558 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjS-00079R-70; Wed, 15 Mar 2023 16:08:02 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjQ-004KUn-Sr; Wed, 15 Mar 2023 16:08:00 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjQ-0057cy-8d; Wed, 15 Mar 2023 16:08:00 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , syed saba kareem , Vijendar Mukunda , Mario Limonciello Subject: [PATCH 018/173] ASoC: amd: ps: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:10 +0100 Message-Id: <20230315150745.67084-19-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1616; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=MnXaxKkCZKJmFUczFAQa/YA4NOv1H2uo3XUofyBwtsc=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd1gm06nWk2kQWYZTF1tpg9h7VlDYzDDn+0dS 83Oq3JBtjeJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdYAAKCRDB/BR4rcrs CU+oB/4wLfNYLWtjNhnqgBig7Fw8MbGM6SeDwme4LUQx+2s/PrDruaS6uTtcrM6KpSZnOUyMZha paRpVuC9RtP/KgXwc1KLwh0jG556eo8Upob04gYg7xWjn4dxXzaIe5ij3ypMQ6kOYxMkJ8gvsPf dVHvWQnVXHzeJfODomcQ/EUwEyqH0bQi5/IYZeRFQKcs46XcMIMD6tv+VNfCrGuxvzCK9I+MDz+ BEd3GWXZu6FkPJUOtCYg+3jFxF7KxrDY10X75oNeOQpZFTF6qNbWia+bRLjYw181BZ+/nUNz2d8 TBTZwgjGKjmc5JjwJXewhOqq6fU2RpqgPwlmaRh11Ckt511U X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: EF7M7YCNERKBZPWTDEH5GIMJHXPXZDBS X-Message-ID-Hash: EF7M7YCNERKBZPWTDEH5GIMJHXPXZDBS X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/amd/ps/ps-pdm-dma.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/amd/ps/ps-pdm-dma.c b/sound/soc/amd/ps/ps-pdm-dma.c index 454dab062e4f..46b91327168f 100644 --- a/sound/soc/amd/ps/ps-pdm-dma.c +++ b/sound/soc/amd/ps/ps-pdm-dma.c @@ -399,10 +399,9 @@ static int acp63_pdm_audio_probe(struct platform_device *pdev) return 0; } -static int acp63_pdm_audio_remove(struct platform_device *pdev) +static void acp63_pdm_audio_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - return 0; } static int __maybe_unused acp63_pdm_resume(struct device *dev) @@ -451,7 +450,7 @@ static const struct dev_pm_ops acp63_pdm_pm_ops = { static struct platform_driver acp63_pdm_dma_driver = { .probe = acp63_pdm_audio_probe, - .remove = acp63_pdm_audio_remove, + .remove_new = acp63_pdm_audio_remove, .driver = { .name = "acp_ps_pdm_dma", .pm = &acp63_pdm_pm_ops, From patchwork Wed Mar 15 15:05:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176063 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 763FFC6FD1D for ; Wed, 15 Mar 2023 15:10:42 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3A1AA126B; Wed, 15 Mar 2023 16:09:50 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3A1AA126B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893040; bh=0bdC0HPEDaphbT9vhOwP+aVxHoOUfBvyiV+L3DS/sgs=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Y14ftQ6MlHDRM5mRXXqTfajMrA1TFwBq6IjsKHTp2cJWXQYEJ+5x6rXCKuaMc5xkF 3I2lXpl1th911K7qs0PVyMzIhGqN7kX4QOSBmEYpt7TbNGQCaS9H4scGaTDeT39k1w nuWylrKmobpm2WbPsgb5WbPoOGIDQuZqBY41bDYY= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 3ABAFF805D6; Wed, 15 Mar 2023 16:08:27 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 927E4F80557; Wed, 15 Mar 2023 16:08:12 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 68105F800C9 for ; Wed, 15 Mar 2023 16:08:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 68105F800C9 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjS-0007Be-MH; Wed, 15 Mar 2023 16:08:02 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjR-004KUt-7b; Wed, 15 Mar 2023 16:08:01 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjQ-0057d3-Fl; Wed, 15 Mar 2023 16:08:00 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 019/173] ASoC: amd: raven: acp3x-pcm-dma: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:11 +0100 Message-Id: <20230315150745.67084-20-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1593; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=0bdC0HPEDaphbT9vhOwP+aVxHoOUfBvyiV+L3DS/sgs=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd1iV3SineXZRz9A8Ywe7uXh1YO66LlR+iRNq PO6Al3hydWJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdYgAKCRDB/BR4rcrs Cd2DB/9d+kb1ktGpFX2ahWgqnvGkUqeLpTRPNNujN9cB8E8aJcGY+cE3BYNjVahwd7DIk+Rvc26 2/dNbEAUs+lN6O1ByTI3MJ+NGpI3YecklRHucpVSiY9kgk2yMXPqBqROCgceOVFpeff5RbRGKvs su8VHfryKkyyUIPCCcxiqkpBpXKvtYoKZgl4ZGNWUOxAbq84nI1VZTvgV74LyB/OE1z6Dt6M1un Y9oHnmMXlSkPqx6CnFeYNyxwZaBM8vXuHr4X+9oYNlSfdLvQk+XqC7Vk2SzOWQ5lHTULQ5gx2j1 /k6XJcbqMzhF2y+AM/DDFpdDe4NaGXb8dx8W3UnTF3eYsRfS X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: SKAMB4YT3SKEVBFSZB67E67I744WYNQA X-Message-ID-Hash: SKAMB4YT3SKEVBFSZB67E67I744WYNQA X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: <> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/amd/raven/acp3x-pcm-dma.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c index 6aec11cf0a6a..7362dd15ad30 100644 --- a/sound/soc/amd/raven/acp3x-pcm-dma.c +++ b/sound/soc/amd/raven/acp3x-pcm-dma.c @@ -421,10 +421,9 @@ static int acp3x_audio_probe(struct platform_device *pdev) return 0; } -static int acp3x_audio_remove(struct platform_device *pdev) +static void acp3x_audio_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - return 0; } static int acp3x_resume(struct device *dev) @@ -509,7 +508,7 @@ static const struct dev_pm_ops acp3x_pm_ops = { static struct platform_driver acp3x_dma_driver = { .probe = acp3x_audio_probe, - .remove = acp3x_audio_remove, + .remove_new = acp3x_audio_remove, .driver = { .name = "acp3x_rv_i2s_dma", .pm = &acp3x_pm_ops, From patchwork Wed Mar 15 15:05:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176103 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B7690C6FD1D for ; Wed, 15 Mar 2023 15:14:19 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A8A38128A; Wed, 15 Mar 2023 16:13:27 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A8A38128A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893257; bh=f8/waBLlObcwhIB/WjlKDiNLRFOIW2D5j7sJuW1o3NA=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=X3slqx45KeVMTowC55MLzoNNJCeFP+ZCCbfEiENBdtTLu0U8COQitiy+mlshEQIMn MSZOgKGY3FeDLn7HGmLOw2BtieGVVR7kEFcbJ0O5CizbwDdirb1w/I+0xsVfUlmkm7 am9ZITkfxWyoZNh29kQOBr5o8xtbc7V+9RCFDKEs= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 756BCF805BB; Wed, 15 Mar 2023 16:09:25 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 36022F80425; Wed, 15 Mar 2023 16:08:34 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8F6F2F8032D for ; Wed, 15 Mar 2023 16:08:08 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8F6F2F8032D Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjS-0007CP-Nd; Wed, 15 Mar 2023 16:08:02 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjR-004KUx-Ax; Wed, 15 Mar 2023 16:08:01 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjQ-0057d7-MV; Wed, 15 Mar 2023 16:08:00 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Mario Limonciello Subject: [PATCH 020/173] ASoC: amd: raven: acp3x-pdm-dma: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:12 +0100 Message-Id: <20230315150745.67084-21-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1616; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=f8/waBLlObcwhIB/WjlKDiNLRFOIW2D5j7sJuW1o3NA=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd1lgSzdNhy4qvF+z2+Rxk9l2p2BYZmjvAXHd MkmYAtsCfGJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdZQAKCRDB/BR4rcrs CZV3CACfr1tddRCTFm3L57INzYFqwPPONVuNMevna4xyYdhwsNtF7SPk0ZRe8Nf+TXDt69jeHAn JldHyY1MpQRC457hWvG2s6iksuY0fhMM1q0Yc1T2vldui8IsmbRLOwnDfmY1pbFdkRFgenl9NjV bdXUun3k5wyX0C1pTCY/lG56b9A6kO08W7nXsLXjksir2Mq/HU/LsMO9YKIQw+GXlZTbmvY0k4V xOmiuMVFFPEszwhD5pNde5QljuwG4cTuRKL9f756hIecvdnsDfhMfTY3D+KD6/u0Hiy1MW9mmiF KW7SNz3skEpE5zdhN1NJPGj/FRc5h8Z+sUNQ8djANJ/CTSLi X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: XHAJUV5TXNH2CRCFU3ETDNJPQMXVOU6B X-Message-ID-Hash: XHAJUV5TXNH2CRCFU3ETDNJPQMXVOU6B X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/amd/renoir/acp3x-pdm-dma.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/amd/renoir/acp3x-pdm-dma.c b/sound/soc/amd/renoir/acp3x-pdm-dma.c index 0d8b693aecc9..4e299f96521f 100644 --- a/sound/soc/amd/renoir/acp3x-pdm-dma.c +++ b/sound/soc/amd/renoir/acp3x-pdm-dma.c @@ -435,10 +435,9 @@ static int acp_pdm_audio_probe(struct platform_device *pdev) return 0; } -static int acp_pdm_audio_remove(struct platform_device *pdev) +static void acp_pdm_audio_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - return 0; } static int acp_pdm_resume(struct device *dev) @@ -489,7 +488,7 @@ static const struct dev_pm_ops acp_pdm_pm_ops = { static struct platform_driver acp_pdm_dma_driver = { .probe = acp_pdm_audio_probe, - .remove = acp_pdm_audio_remove, + .remove_new = acp_pdm_audio_remove, .driver = { .name = "acp_rn_pdm_dma", .pm = &acp_pdm_pm_ops, From patchwork Wed Mar 15 15:05:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176108 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2CB99C6FD1D for ; Wed, 15 Mar 2023 15:15:44 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 33CDB12A0; Wed, 15 Mar 2023 16:14:52 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 33CDB12A0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893342; bh=gRAMOvpcEpLFiOxyVvZWkyo1A3og8HX/Bo7lZDVV4Dw=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=nd7kvPgnyxb7mlNqxUvaPbCcxOWl1tWV8pQ3CUzl45VW/xc8p58ve33LWWcdJYozX UZIXy6RswqyTKI8/rp5JgbBu4o4PtWLlVY+nj43t0PjlNLgBVQokFC/VqqNoKJPn46 Rvzz/ARTyH9TjDmnp0DzL8ra6Dyid+GNgXyeVwaY= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 3A28CF805C9; Wed, 15 Mar 2023 16:09:47 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7B325F805FE; Wed, 15 Mar 2023 16:08:40 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EC20BF80557 for ; Wed, 15 Mar 2023 16:08:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EC20BF80557 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjU-0007FZ-Mk; Wed, 15 Mar 2023 16:08:04 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjS-004KVE-80; Wed, 15 Mar 2023 16:08:02 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjQ-0057dB-Vj; Wed, 15 Mar 2023 16:08:00 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Meng Tang Subject: [PATCH 021/173] ASoC: amd: vangogh: acp5x-pcm-dma: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:13 +0100 Message-Id: <20230315150745.67084-22-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1619; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=gRAMOvpcEpLFiOxyVvZWkyo1A3og8HX/Bo7lZDVV4Dw=; b=owGbwMvMwMV48I9IxdpTbzgZT6slMaQI3s14uGPzP9E/Lkn3TEQ0zqV9Md0lr9Rh+/zHjVvFC Sknv0nbdjIaszAwcjHIiimy1BVpiU2QWPPfrmQJN8wgViaQKQxcnAIwEbPr7P/zdIJ1FogKW6ZV NOiGcvWseVHS1FiwycmwduqC2FhR2e/5d+NfTmX+evyIYtj7N8sT5XNvhlruyrAMehVdl2QaKnu HJ+7QgqmvLqfvEucyLf3pb/uRU0j/xEqlWV/Dc6efWcuWLDpJM/Fp0pflZcFX5sZYSm2uLV7/bU VQ5IomhWnLm+SuBAqLiVncVS92sSuO+cfLsaota+prX2lXH3mzG2aZtdarJdS2/rmW/qCtWfBjZ WGHeNqNKxElrgfFr3wqZk/SZ/O5eoLl6Q7tykAhWdc0kdWx+rfZH3nOaU1V/iB1hdG7w8hZec19 tXjnlrWpbHWTr241f/r1ivHhk7/XmV8OyAwWU2Ho7LAEAA== X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: MXBUOBJOPRZMGI7Y3AJUNW4F3QMVYS42 X-Message-ID-Hash: MXBUOBJOPRZMGI7Y3AJUNW4F3QMVYS42 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/amd/vangogh/acp5x-pcm-dma.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/amd/vangogh/acp5x-pcm-dma.c b/sound/soc/amd/vangogh/acp5x-pcm-dma.c index d36bb718370f..29901ee4bfe3 100644 --- a/sound/soc/amd/vangogh/acp5x-pcm-dma.c +++ b/sound/soc/amd/vangogh/acp5x-pcm-dma.c @@ -415,10 +415,9 @@ static int acp5x_audio_probe(struct platform_device *pdev) return 0; } -static int acp5x_audio_remove(struct platform_device *pdev) +static void acp5x_audio_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - return 0; } static int __maybe_unused acp5x_pcm_resume(struct device *dev) @@ -500,7 +499,7 @@ static const struct dev_pm_ops acp5x_pm_ops = { static struct platform_driver acp5x_dma_driver = { .probe = acp5x_audio_probe, - .remove = acp5x_audio_remove, + .remove_new = acp5x_audio_remove, .driver = { .name = "acp5x_i2s_dma", .pm = &acp5x_pm_ops, From patchwork Wed Mar 15 15:05:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176074 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17E7CC6FD1D for ; Wed, 15 Mar 2023 15:13:29 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C211E127B; Wed, 15 Mar 2023 16:12:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C211E127B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893206; bh=4XkIDipUvzJhlTbbh5RiS7LYTQNtjS4CElPfU0UHaw4=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=FDq291T+E6mv8CyO4wtHVkoj7jvYYihPjydDeMGqGgeNmsqIiLJ3SbRIcHaRH2H5O pEsDMkdeAx1FDynIIrdj04iJ56WRdyiuNvozBimcAxaGp2GQEJPnr2t7rSgDacAPP0 t1ekdeSpK9f/j2OxO6ft3shhUldRSd6km+8WGtjA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 688C4F80656; Wed, 15 Mar 2023 16:09:10 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0C33FF805E7; Wed, 15 Mar 2023 16:08:30 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C99BEF8053B for ; Wed, 15 Mar 2023 16:08:08 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C99BEF8053B Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjT-0007FE-Bh; Wed, 15 Mar 2023 16:08:03 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjS-004KV9-0s; Wed, 15 Mar 2023 16:08:02 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjR-0057dF-5Y; Wed, 15 Mar 2023 16:08:01 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Mario Limonciello Subject: [PATCH 022/173] ASoC: amd: yc: acp6x-pdm-dma: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:14 +0100 Message-Id: <20230315150745.67084-23-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1631; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=4XkIDipUvzJhlTbbh5RiS7LYTQNtjS4CElPfU0UHaw4=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd1rhu2HYliz16v3Ymu9IkC+Ox+6wR1tSIDcp k77lTAMPPCJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdawAKCRDB/BR4rcrs CT8mB/9MGW8v62iHbXZJqWsPqXbfzbbXFGYFmQRqcFJwJKWxbYeVmK4Z8g733Q6SsyO3yUJd6EE c2O0a8ErOzzM/c1rB8hYc2pP5IAsjS551CuowsnC7l1uTjOeFO+eKGZSyxdIyXBd6wccFWN7jWh 3UNUIl/Nk5eBBVbY0kL7lZFZk2jiiW2rSqphPURK6RTXKtxrBRne+K2gp21Ec7ZtFBAWtNu8zj+ q/D0uaxi1+dX4i687TMzC3rdRlGgP26cQG13S+RjqQAZjnGzN1bJYjn6uLnQ/sre2/rR/cNmV9Z 0j9CNANzX7JAmKSQFUKHBjZXFKuiO+n6hituOpGrr60eCgYJ X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: PZBIJNO54M2SLAO6QPNDJANCUGNIRJSO X-Message-ID-Hash: PZBIJNO54M2SLAO6QPNDJANCUGNIRJSO X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/amd/yc/acp6x-pdm-dma.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/amd/yc/acp6x-pdm-dma.c b/sound/soc/amd/yc/acp6x-pdm-dma.c index 294dd7fb43c9..d818eba48546 100644 --- a/sound/soc/amd/yc/acp6x-pdm-dma.c +++ b/sound/soc/amd/yc/acp6x-pdm-dma.c @@ -388,10 +388,9 @@ static int acp6x_pdm_audio_probe(struct platform_device *pdev) return 0; } -static int acp6x_pdm_audio_remove(struct platform_device *pdev) +static void acp6x_pdm_audio_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - return 0; } static int __maybe_unused acp6x_pdm_resume(struct device *dev) @@ -440,7 +439,7 @@ static const struct dev_pm_ops acp6x_pdm_pm_ops = { static struct platform_driver acp6x_pdm_dma_driver = { .probe = acp6x_pdm_audio_probe, - .remove = acp6x_pdm_audio_remove, + .remove_new = acp6x_pdm_audio_remove, .driver = { .name = "acp_yc_pdm_dma", .pm = &acp6x_pdm_pm_ops, From patchwork Wed Mar 15 15:05:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176106 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 26B7AC6FD1D for ; Wed, 15 Mar 2023 15:15:03 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C5875129D; Wed, 15 Mar 2023 16:14:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C5875129D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893300; bh=wPm821FwPtGv/GvaeLedY8OG2bMRZ46ll1a3f2mXz8k=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=AHBvYgK4MVYE92VtXkD4SF+LUZOFL337GA7r513xSqyF1phGkY0ZoHsHqF2cJ9csQ Hi6hIwpX3Lp/fvdGAehyFRlMs75QpwiH1oyo44bp1iijtRChs0U60EniQFT52OUwO6 HGXEFwdtP1dwIcIIAhyCzRulWazo2ZagKD2bnj60= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C4885F805C1; Wed, 15 Mar 2023 16:09:36 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E8D20F805F6; Wed, 15 Mar 2023 16:08:37 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 14F66F8051B for ; Wed, 15 Mar 2023 16:08:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 14F66F8051B Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjT-0007Fw-E7; Wed, 15 Mar 2023 16:08:03 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjS-004KVL-E5; Wed, 15 Mar 2023 16:08:02 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjR-0057dJ-BZ; Wed, 15 Mar 2023 16:08:01 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: =?utf-8?q?Martin_Povi=C5=A1er?= , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 023/173] ASoC: apple: mca: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:15 +0100 Message-Id: <20230315150745.67084-24-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1601; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=wPm821FwPtGv/GvaeLedY8OG2bMRZ46ll1a3f2mXz8k=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd1uKF4twdFxN2YW+TcoInEACi06FNKaFgXYb nNtxaWpoumJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdbgAKCRDB/BR4rcrs CZ5RCACBfLIX6M/sQrkbnnY1xNfV+0VXAsSS/QFNC2qM8RBpvEUU/1EAXDsrY3MSQTVUlPfXP98 dw1s/egsrz0uO7OLO4FEOyH6ZFN88FBZ8lvkWifswC9VRd4+OCFADGd/TAB7yh7gBOhoxSQyeoQ LK3FfE5xdK39QWQmY3Vhtg9Je1i5PZ1zzzF+m1asJd2uMyy1lZ+r7OZ9Dvhsh1TE9ecCDLpGvW9 MvLrMrBbJFG2M3TWDhSDd/CuXw+u6WaZUvdWLy5AY2uQUDhNzFpcv50gGRgsBb1Jyd5FwhUmECy nLh1eQ9Xl/y5bFE+z4dIoYYVwuEC5l/2br+EGKYSw9NetpEa X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 2MIKMCWOA42HVAIG4N3ARK4FJQAQ6EIP X-Message-ID-Hash: 2MIKMCWOA42HVAIG4N3ARK4FJQAQ6EIP X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: asahi@lists.linux.dev, alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/apple/mca.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/apple/mca.c b/sound/soc/apple/mca.c index 64750db9b963..ce77934f3eef 100644 --- a/sound/soc/apple/mca.c +++ b/sound/soc/apple/mca.c @@ -1159,13 +1159,12 @@ static int apple_mca_probe(struct platform_device *pdev) return ret; } -static int apple_mca_remove(struct platform_device *pdev) +static void apple_mca_remove(struct platform_device *pdev) { struct mca_data *mca = platform_get_drvdata(pdev); snd_soc_unregister_component(&pdev->dev); apple_mca_release(mca); - return 0; } static const struct of_device_id apple_mca_of_match[] = { @@ -1180,7 +1179,7 @@ static struct platform_driver apple_mca_driver = { .of_match_table = apple_mca_of_match, }, .probe = apple_mca_probe, - .remove = apple_mca_remove, + .remove_new = apple_mca_remove, }; module_platform_driver(apple_mca_driver); From patchwork Wed Mar 15 15:05:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176127 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 655F6C6FD1D for ; Wed, 15 Mar 2023 15:20:36 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3CB4112F6; Wed, 15 Mar 2023 16:19:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3CB4112F6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893634; bh=Lb5D4CjxCd7MgkuOxSEK0y85kOMat0CKtzuxPfMCN4g=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=FEaEdsGQS/b5JC0ty7/rDQXXOiPmen1AfPpBJDu5rIdNXURT9PiHw62VYdshmTWRJ wQbyXj7PuTNfauHlqTbK3PI0oPdv6bt1idbF4yBQk9D74wlRjhIyCNoAStIh3GHo+E 9B6cjzK22nI6+qTVdUPlwxm6y8wq3/9Z8L5hZktk= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D5BDCF805E5; Wed, 15 Mar 2023 16:11:08 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8E888F8057E; Wed, 15 Mar 2023 16:08:58 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 31063F8057C for ; Wed, 15 Mar 2023 16:08:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 31063F8057C Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjT-0007FV-J8; Wed, 15 Mar 2023 16:08:03 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjS-004KVD-70; Wed, 15 Mar 2023 16:08:02 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjR-0057dN-Jl; Wed, 15 Mar 2023 16:08:01 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Codrin Ciubotariu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Subject: [PATCH 024/173] ASoC: atmel: atmel-i2s: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:16 +0100 Message-Id: <20230315150745.67084-25-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1606; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Lb5D4CjxCd7MgkuOxSEK0y85kOMat0CKtzuxPfMCN4g=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd1xRkewV66peAvZmVzsdz4hWbRvBdk8q0Tys nN6hVk+HeeJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdcQAKCRDB/BR4rcrs CQCPB/9y2G2uxIPUF/+JMscBUxneSVPS7/cZ1+BXtREAluKZV5J8+eBzxgyjn5A8kzrrcHba2YZ WDjOURIug+jmMRvIjzYX1DISjV3OTVSWzH2yxAjETpeuxFW0wuFxjjBf3I+xF/6kAcN9CUZjBtr /Ueyq5K61oiEx6sIa/zLwdU5A1UW+4j5BY47YDnJjZnzLAxs5fMKg9ehzm60MPQX/1BHjvYGGY0 P2PR5tuQ6kLzqBDFYf8rq3QUeGQYef40vdystq+s9bj1zCxvDgv+uXEbNd2RQ61+XACKBDVmztW A17YEWuDVDmlXMZfjOgSOgwaTqvupyS3oQFskYZ9zGMjqgU0 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: Z4SDAA43NWHUIKDRT4RTUWN37HDXQUYQ X-Message-ID-Hash: Z4SDAA43NWHUIKDRT4RTUWN37HDXQUYQ X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea --- sound/soc/atmel/atmel-i2s.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/atmel/atmel-i2s.c b/sound/soc/atmel/atmel-i2s.c index 425d66edbf86..49930baf5e4d 100644 --- a/sound/soc/atmel/atmel-i2s.c +++ b/sound/soc/atmel/atmel-i2s.c @@ -717,13 +717,11 @@ static int atmel_i2s_probe(struct platform_device *pdev) return 0; } -static int atmel_i2s_remove(struct platform_device *pdev) +static void atmel_i2s_remove(struct platform_device *pdev) { struct atmel_i2s_dev *dev = platform_get_drvdata(pdev); clk_disable_unprepare(dev->pclk); - - return 0; } static struct platform_driver atmel_i2s_driver = { @@ -732,7 +730,7 @@ static struct platform_driver atmel_i2s_driver = { .of_match_table = of_match_ptr(atmel_i2s_dt_ids), }, .probe = atmel_i2s_probe, - .remove = atmel_i2s_remove, + .remove_new = atmel_i2s_remove, }; module_platform_driver(atmel_i2s_driver); From patchwork Wed Mar 15 15:05:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176135 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 368E6C61DA4 for ; Wed, 15 Mar 2023 15:22:43 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E243D12F2; Wed, 15 Mar 2023 16:21:50 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E243D12F2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893761; bh=YTRyBE6/DXYQhd9fyvBICqCmhcKbm9DGsMWL3121F+U=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=g/pRj9o3OfNFJsCQAqpK2ZXgyu8DaEp6WrwMA+sistnkY0jaa0Y8OdLcUHzyhH4/M jMEEnYuNknhTdUoMZEGM6YqjKsDPiEtQEV/Ydx9qEKinE1dFSoZg2496X/6BmXW/YZ 9LogWbOJuK6Gl7UaG0/07PR8hLHxCWOtxkjMUPhY= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 5983AF80675; Wed, 15 Mar 2023 16:11:33 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 01917F80655; Wed, 15 Mar 2023 16:09:06 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A57F4F805A9 for ; Wed, 15 Mar 2023 16:08:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A57F4F805A9 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjT-0007Gu-PC; Wed, 15 Mar 2023 16:08:03 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjS-004KVP-Nn; Wed, 15 Mar 2023 16:08:02 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjR-0057dQ-To; Wed, 15 Mar 2023 16:08:01 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Codrin Ciubotariu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Subject: [PATCH 025/173] ASoC: atmel: atmel_wm8904: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:17 +0100 Message-Id: <20230315150745.67084-26-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1801; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=YTRyBE6/DXYQhd9fyvBICqCmhcKbm9DGsMWL3121F+U=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd10Z8XSNnZWQH18pRX98Kd13x77JICiRh0Gw JFYaDd5ep2JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHddAAKCRDB/BR4rcrs CelCB/9FZqALVCiUWxpxbaA3wmoP33Gs8rktzng/subhW4OplR9D+6NvvXbsO/uVoF0dIOtvXyx e+DOrFflFE3cK1Xth0wjeAFZAlFfuU7htgXgWa452j+SgSqBbD9rqZHWWSh6jJNSnVC7fxWimC4 7gbqk4OPYyc8omINsM3oFMtNCZiLihGTLQ5CISExeEYG03NHpoRPRCxe/dWS9XruFkINb7/pdpH uoI8YXQqV5Fo9sNm1kgFOUIRVe6w6ZzwNRaApVq+Yrs4az/pKhX09FPAt99KMMBnld2BGRP/M9V QzCzm6dUU+spxd98q/cRVmg+YXTcSTQT4+KESlbyWJEUSfg9 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: GKCFGZCT7KLMIYJGTMIWGRV2FB46VI3B X-Message-ID-Hash: GKCFGZCT7KLMIYJGTMIWGRV2FB46VI3B X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea --- sound/soc/atmel/atmel_wm8904.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/atmel/atmel_wm8904.c b/sound/soc/atmel/atmel_wm8904.c index 9c974c4e187d..00e98136bec2 100644 --- a/sound/soc/atmel/atmel_wm8904.c +++ b/sound/soc/atmel/atmel_wm8904.c @@ -161,7 +161,7 @@ static int atmel_asoc_wm8904_probe(struct platform_device *pdev) return ret; } -static int atmel_asoc_wm8904_remove(struct platform_device *pdev) +static void atmel_asoc_wm8904_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); struct snd_soc_dai_link *dailink = &atmel_asoc_wm8904_dailink; @@ -171,8 +171,6 @@ static int atmel_asoc_wm8904_remove(struct platform_device *pdev) snd_soc_unregister_card(card); atmel_ssc_put_audio(id); - - return 0; } #ifdef CONFIG_OF @@ -190,7 +188,7 @@ static struct platform_driver atmel_asoc_wm8904_driver = { .pm = &snd_soc_pm_ops, }, .probe = atmel_asoc_wm8904_probe, - .remove = atmel_asoc_wm8904_remove, + .remove_new = atmel_asoc_wm8904_remove, }; module_platform_driver(atmel_asoc_wm8904_driver); From patchwork Wed Mar 15 15:05:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176123 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3AAA1C6FD1D for ; Wed, 15 Mar 2023 15:19:34 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0F4E412EB; Wed, 15 Mar 2023 16:18:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0F4E412EB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893572; bh=RZWxDhTwA9XiLOzSTXLQmnZb1vKcSEg0e0jTzF63mek=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=tTWKDVgEdJzEwwzw29SqFJSCr0my89zX+vQ29acRc3ngHHsF0ERxMSPzYrlTVbtNK s7Ux/HQT4BG25Xq3eVS6vIwP/ekl8q8ZPOJcGmMhbcQAaAECnwQ0Yg2xg5ohoOWlPn 4pTxHxy3vRWG4RNm8DoiN7QZvJ7E3XP0b+Z0UTMA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 1FF5BF8061C; Wed, 15 Mar 2023 16:10:51 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 279D3F8057E; Wed, 15 Mar 2023 16:08:55 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id ECD02F8057F for ; Wed, 15 Mar 2023 16:08:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ECD02F8057F Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjT-0007Gy-Pr; Wed, 15 Mar 2023 16:08:03 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjS-004KVQ-OJ; Wed, 15 Mar 2023 16:08:02 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjS-0057dT-3c; Wed, 15 Mar 2023 16:08:02 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Codrin Ciubotariu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Subject: [PATCH 026/173] ASoC: atmel: mchp-i2s-mcc: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:18 +0100 Message-Id: <20230315150745.67084-27-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1658; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=RZWxDhTwA9XiLOzSTXLQmnZb1vKcSEg0e0jTzF63mek=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd13i7qsJvPILZOsSvkjrxCMCI3O8QnQ4HLTd Gh0t48XD7SJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHddwAKCRDB/BR4rcrs CZPSB/9xBGIEWsf6k2/9ZWABIU50k6BFyNgavZ4rdjbqHdLb5tQPJwBcUw9o1i7vDcX1uWqusgF OSRcaXMUPRN3Cr7/niOMNRuQUgumhYRlPjQANA/jrQRm8rR/De0jDe2J5QX9s44nt4JvJCWN3Oo y0Ldili0WbU2CqEyr7V64K2QK+ClXCZHPWqslXolvkxVQBjoAipwFQOXuV7gFO31JZoCdbqHnYA lyghLC4f19iVPFHWsxa6CmHzAqBH817L64Vr/p5StFn/iTmtHSZBZmfILTXB5au+13F3Zc1bhnA 7oDjmVdBCVOsC0lj+vspQxbmOT3JvE71or6Kem2mN9BJTsTu X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: GVWGIE6YYNH2S75ACE2ILKEF6JFA44TP X-Message-ID-Hash: GVWGIE6YYNH2S75ACE2ILKEF6JFA44TP X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea --- sound/soc/atmel/mchp-i2s-mcc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/atmel/mchp-i2s-mcc.c b/sound/soc/atmel/mchp-i2s-mcc.c index 6dfb96c576ff..7c83d48ca1a0 100644 --- a/sound/soc/atmel/mchp-i2s-mcc.c +++ b/sound/soc/atmel/mchp-i2s-mcc.c @@ -1088,13 +1088,11 @@ static int mchp_i2s_mcc_probe(struct platform_device *pdev) return 0; } -static int mchp_i2s_mcc_remove(struct platform_device *pdev) +static void mchp_i2s_mcc_remove(struct platform_device *pdev) { struct mchp_i2s_mcc_dev *dev = platform_get_drvdata(pdev); clk_disable_unprepare(dev->pclk); - - return 0; } static struct platform_driver mchp_i2s_mcc_driver = { @@ -1103,7 +1101,7 @@ static struct platform_driver mchp_i2s_mcc_driver = { .of_match_table = of_match_ptr(mchp_i2s_mcc_dt_ids), }, .probe = mchp_i2s_mcc_probe, - .remove = mchp_i2s_mcc_remove, + .remove_new = mchp_i2s_mcc_remove, }; module_platform_driver(mchp_i2s_mcc_driver); From patchwork Wed Mar 15 15:05:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176130 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B849BC61DA4 for ; Wed, 15 Mar 2023 15:21:24 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5807D12FB; Wed, 15 Mar 2023 16:20:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5807D12FB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893682; bh=hNc4dORXpE5ELuQNf49V9GlI4t5cUYGeUxy0X2bMhZY=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=PTP9oJTJF5mahtbCmW4FObNodh0ks3W8g8Dj6xy+DnCW73Z1BpttlEV34G7MWpnQw fCAhDwv88atN1zV9ZuM+KvmY+yieXBtNLCwF09CfeTG1ty07xOIj+bBFDj9DJ7Id8r UKyVyREB1LXig98DSg2wkG/mvF5fzCYCTRoX/zZI= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 1E5EFF805DF; Wed, 15 Mar 2023 16:11:17 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 89432F80580; Wed, 15 Mar 2023 16:09:01 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5C542F8059F for ; Wed, 15 Mar 2023 16:08:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5C542F8059F Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjU-0007Jh-LS; Wed, 15 Mar 2023 16:08:04 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjT-004KVg-LY; Wed, 15 Mar 2023 16:08:03 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjS-0057dX-9X; Wed, 15 Mar 2023 16:08:02 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Codrin Ciubotariu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Subject: [PATCH 027/173] ASoC: atmel: mchp-pdmc: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:19 +0100 Message-Id: <20230315150745.67084-28-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1713; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=hNc4dORXpE5ELuQNf49V9GlI4t5cUYGeUxy0X2bMhZY=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd161keJ2fEgfATr0pqgJ6wrK5JULpHbtirqN uOJEkpojsuJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdegAKCRDB/BR4rcrs CdKWB/0ZkXsDM/L75VXSPbERtrJI98YjKCoj9L7x49D5Okv3IF2zuQKk+R138JJJMvfHKrnvvJN /xDCqRZIIMC/OVT0b6Y+XV3wi/tHHE1rgR501GF8A1ENMfEvjuVSSdX2gWOrzJArVgJYi77dZ5U ymcfRoeRC7y1Z2UprdcRXlv24zy1RJeQzPjoXtP162df/M3avKmtwnsQMHnxC4le691LQz8x+pz F8eY7HJtBJU5LF1gzocPp2XmW3KmbKZudnL7IqaCBLVWtVMAkRzV2ptDCTAAUiN49sQoOgbqHxG Ab/junDvO9Kv+jr9nxUDamXI1RRt5sAfQrngruiN0IgB28Ct X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 5CFXOFJOVW65MHPOXIS27CEVNI7HPTGR X-Message-ID-Hash: 5CFXOFJOVW65MHPOXIS27CEVNI7HPTGR X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea --- sound/soc/atmel/mchp-pdmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/atmel/mchp-pdmc.c b/sound/soc/atmel/mchp-pdmc.c index 1aed3baa9369..7fd2c3e100e8 100644 --- a/sound/soc/atmel/mchp-pdmc.c +++ b/sound/soc/atmel/mchp-pdmc.c @@ -1134,7 +1134,7 @@ static int mchp_pdmc_probe(struct platform_device *pdev) return ret; } -static int mchp_pdmc_remove(struct platform_device *pdev) +static void mchp_pdmc_remove(struct platform_device *pdev) { struct mchp_pdmc *dd = platform_get_drvdata(pdev); @@ -1142,8 +1142,6 @@ static int mchp_pdmc_remove(struct platform_device *pdev) mchp_pdmc_runtime_suspend(dd->dev); pm_runtime_disable(dd->dev); - - return 0; } static const struct of_device_id mchp_pdmc_of_match[] = { @@ -1168,7 +1166,7 @@ static struct platform_driver mchp_pdmc_driver = { .pm = pm_ptr(&mchp_pdmc_pm_ops), }, .probe = mchp_pdmc_probe, - .remove = mchp_pdmc_remove, + .remove_new = mchp_pdmc_remove, }; module_platform_driver(mchp_pdmc_driver); From patchwork Wed Mar 15 15:05:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176132 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3276DC61DA4 for ; Wed, 15 Mar 2023 15:21:54 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5162F12C9; Wed, 15 Mar 2023 16:21:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5162F12C9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893711; bh=1ejU5Je6R86D0LelKHlPF9jm3hklKURMJ6QNyfDhJGU=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=EmhWDA11ElHWz7mCPCOZJk/Ktd5d7e4u3jaFRbGwDdvqS87voYC6KRO/bdYQgFWky SSPxnwwqKOHtDxOG/ZuthntGkxnai1xeOG2tUN/ae2F9HmrXplXAIQNnEkoCSOVsAf kkhxodRexVj99jaHHG0tSBbQ8ZB8DhRewGvRAEkw= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 496ABF80637; Wed, 15 Mar 2023 16:11:24 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8B538F8059F; Wed, 15 Mar 2023 16:09:03 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5F787F805A0 for ; Wed, 15 Mar 2023 16:08:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5F787F805A0 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjU-0007Ix-DB; Wed, 15 Mar 2023 16:08:04 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjT-004KVa-DJ; Wed, 15 Mar 2023 16:08:03 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjS-0057dc-GC; Wed, 15 Mar 2023 16:08:02 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Codrin Ciubotariu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Subject: [PATCH 028/173] ASoC: atmel: mchp-spdifrx: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:20 +0100 Message-Id: <20230315150745.67084-29-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1650; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=1ejU5Je6R86D0LelKHlPF9jm3hklKURMJ6QNyfDhJGU=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd19/LS8GpDRrWuzmANWFqYtQ+Ynq7p7AAVZm iQDBYkxxUWJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdfQAKCRDB/BR4rcrs Ca9iB/9GYedltG+1Fe659Jzf+lkzeO7WV+w0zxrQMaeRd0ItYgBeYPhWdEhPv3MloF4yUdBWICH ke8/D4mGGGN+z4GrFQjzrw2WerGDi0B9GOZvHeHocbempy6C2j55IeiCuGFwlJ3vZJrA3FequtC GG0rUEf6vDyjbM/hvaX8+cPZr0QmKVSr8KRYgC+pSrt55LUUqarXYDEzP5U0kTxtZNZ8YIVKlUD A6AkrRM/eW1S4O6lONjbnT1KJvAT8QhbqmAzd7r+r4KsnM3mraiKroaT+sTDavni9bV1eC7bgP1 KLpoWCdzPH+VkJ+UDf5y//dcxvosdOkv66DzP0351iZz0l61 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: HK6K3DC7RTDQLXKBWZXEITD25RW5V3LB X-Message-ID-Hash: HK6K3DC7RTDQLXKBWZXEITD25RW5V3LB X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea --- sound/soc/atmel/mchp-spdifrx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/atmel/mchp-spdifrx.c b/sound/soc/atmel/mchp-spdifrx.c index eb0c0ef4541e..ff6aba143aee 100644 --- a/sound/soc/atmel/mchp-spdifrx.c +++ b/sound/soc/atmel/mchp-spdifrx.c @@ -1183,20 +1183,18 @@ static int mchp_spdifrx_probe(struct platform_device *pdev) return err; } -static int mchp_spdifrx_remove(struct platform_device *pdev) +static void mchp_spdifrx_remove(struct platform_device *pdev) { struct mchp_spdifrx_dev *dev = platform_get_drvdata(pdev); pm_runtime_disable(dev->dev); if (!pm_runtime_status_suspended(dev->dev)) mchp_spdifrx_runtime_suspend(dev->dev); - - return 0; } static struct platform_driver mchp_spdifrx_driver = { .probe = mchp_spdifrx_probe, - .remove = mchp_spdifrx_remove, + .remove_new = mchp_spdifrx_remove, .driver = { .name = "mchp_spdifrx", .of_match_table = of_match_ptr(mchp_spdifrx_dt_ids), From patchwork Wed Mar 15 15:05:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176126 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5A793C61DA4 for ; Wed, 15 Mar 2023 15:20:21 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 627F912E4; Wed, 15 Mar 2023 16:19:29 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 627F912E4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893619; bh=SsRRGH025TBMYguZNbOSbNFDfqd34EijQq3q6O0cmT4=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=bA3MXfnEXEK5TnHzmpl8IWwTlgPkSuFEjM1lP1vNNv69Xg94lvLdCSwuBFr0pUipO TtkjYAWDq6s4NDq3opigqGAxP2ighVwEWMFHt92VrGAxHPm5kpNLJdkIxBa0k33HTG tjjW+xzyR43mbGEhiUrucc5f0PtuD3Fjnw6aiKCw= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id CAAF4F80622; Wed, 15 Mar 2023 16:11:02 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8B90BF8057E; Wed, 15 Mar 2023 16:08:57 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 098DBF80580 for ; Wed, 15 Mar 2023 16:08:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 098DBF80580 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjU-0007Ji-I2; Wed, 15 Mar 2023 16:08:04 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjT-004KVi-MI; Wed, 15 Mar 2023 16:08:03 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjS-0057dg-Nc; Wed, 15 Mar 2023 16:08:02 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Codrin Ciubotariu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Subject: [PATCH 029/173] ASoC: atmel: mchp-spdiftx: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:21 +0100 Message-Id: <20230315150745.67084-30-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1686; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=SsRRGH025TBMYguZNbOSbNFDfqd34EijQq3q6O0cmT4=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd2AxoxR/WnTgFelyNPRnbjyrOzO6r8ixARgc uZ8b0km602JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdgAAKCRDB/BR4rcrs CWRHCACFQmbZkcNlsf5DMUnas4oIg7Emblfp3WDbyxXjG/prbDIW5qMA2wzePnzBn4acefGQ2yR xlr+p3GsOEGuuRttlcFlGtwYCrjD269crMMMkj42CN04fkxtioe2jhhKyzQ9X0Mc84g2KzOTIVq tC1pInasrevX1vk/f0lxJKqy/gibSUHXvN760niAqHw2dAzb6hcc7Z/r+FQk9si1yhpI+yPwtMb NEfv9dTkOR2Etn3jmCmSAl3VGIP6rdk0Sj68jU08Y1UUQ+IxIBlxjZGjnd1cNwFbprZGwh6aS4/ Z5s/MF2im+9LzyWv7p94tB/WlDh7STDxE1e5hpfQF9b8JCKn X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: JJLJUUPGKWFJDBIJ3BD6OAS3CU4GFAO7 X-Message-ID-Hash: JJLJUUPGKWFJDBIJ3BD6OAS3CU4GFAO7 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea --- sound/soc/atmel/mchp-spdiftx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/atmel/mchp-spdiftx.c b/sound/soc/atmel/mchp-spdiftx.c index 20d135c718b0..850cd97bc229 100644 --- a/sound/soc/atmel/mchp-spdiftx.c +++ b/sound/soc/atmel/mchp-spdiftx.c @@ -891,7 +891,7 @@ static int mchp_spdiftx_probe(struct platform_device *pdev) return err; } -static int mchp_spdiftx_remove(struct platform_device *pdev) +static void mchp_spdiftx_remove(struct platform_device *pdev) { struct mchp_spdiftx_dev *dev = platform_get_drvdata(pdev); @@ -899,13 +899,11 @@ static int mchp_spdiftx_remove(struct platform_device *pdev) mchp_spdiftx_runtime_suspend(dev->dev); pm_runtime_disable(dev->dev); - - return 0; } static struct platform_driver mchp_spdiftx_driver = { .probe = mchp_spdiftx_probe, - .remove = mchp_spdiftx_remove, + .remove_new = mchp_spdiftx_remove, .driver = { .name = "mchp_spdiftx", .of_match_table = of_match_ptr(mchp_spdiftx_dt_ids), From patchwork Wed Mar 15 15:05:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176136 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5484BC61DA4 for ; Wed, 15 Mar 2023 15:22:58 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 647B01302; Wed, 15 Mar 2023 16:22:06 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 647B01302 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893776; bh=RdOTx4L18PJgB7/4GgPBuAX3vG8GwHh3vhRU82NKGcc=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Dk2XyW55yiNR9a75Qq3OVXA1/3r8k7mVQnUFBRtln4gWUAn9K4SCo+vpZ5nzWXxcR fkNSJDRnkJtR0pW4hfEBLxdI4a8/Et10PhhNu7BKXcaieWwnjTZaRThfH1O84iHlIr Tu2Dy9Tux+2Rkuy5HUANdgKyNrY2JwjRAk0NgJz0= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7900EF8067A; Wed, 15 Mar 2023 16:11:35 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 61180F80655; Wed, 15 Mar 2023 16:09:08 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 113A4F805AC for ; Wed, 15 Mar 2023 16:08:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 113A4F805AC Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjU-0007Jt-LS; Wed, 15 Mar 2023 16:08:04 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjT-004KVn-PS; Wed, 15 Mar 2023 16:08:03 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjS-0057dl-VV; Wed, 15 Mar 2023 16:08:02 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Codrin Ciubotariu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Subject: [PATCH 030/173] ASoC: atmel: mikroe-proto: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:22 +0100 Message-Id: <20230315150745.67084-31-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1560; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=RdOTx4L18PJgB7/4GgPBuAX3vG8GwHh3vhRU82NKGcc=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd2DBoOoR8WJCor1CmdLOgFkJanJY8JJuFm2C YlN/3DywMCJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdgwAKCRDB/BR4rcrs CfDtB/9cKtBpAv0x5H4EobXVvpeWykgbqGmgHlNFZidQ7fOrwytsRGMEVDnBh/D15CNlNnbBl7Y bKF+90NOl6bUenwXG92qYosCFlfXtrbi/pvjV2X2lflsfuoWvK3hDWITlbPZFtGnyZX+3sOxp9m okKf+P3bbREB+oJIyFSvMQr/aowiAySonA3ImRXQLlA85W1iC36KGSr4aoWvrQwmQQwgG1fp+3Z DlsHq+ghrqNgIYw8Grz79R9KMK/tVtLV6oSSfmK26ApEWFNSICeiXads04A3/pwMWU3zuuorbF+ f/iUIQUSpP34zmmS6LWxwmYOSubs1DHddPL5BV50nTpzpFKj X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: EMDD4QL2HP55Y4LQCS3S64EQSR3MMBZA X-Message-ID-Hash: EMDD4QL2HP55Y4LQCS3S64EQSR3MMBZA X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea --- sound/soc/atmel/mikroe-proto.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/atmel/mikroe-proto.c b/sound/soc/atmel/mikroe-proto.c index 954460719aa3..30c87c2c1b0b 100644 --- a/sound/soc/atmel/mikroe-proto.c +++ b/sound/soc/atmel/mikroe-proto.c @@ -155,11 +155,9 @@ static int snd_proto_probe(struct platform_device *pdev) return ret; } -static int snd_proto_remove(struct platform_device *pdev) +static void snd_proto_remove(struct platform_device *pdev) { snd_soc_unregister_card(&snd_proto); - - return 0; } static const struct of_device_id snd_proto_of_match[] = { @@ -174,7 +172,7 @@ static struct platform_driver snd_proto_driver = { .of_match_table = snd_proto_of_match, }, .probe = snd_proto_probe, - .remove = snd_proto_remove, + .remove_new = snd_proto_remove, }; module_platform_driver(snd_proto_driver); From patchwork Wed Mar 15 15:05:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176122 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7B2E6C61DA4 for ; Wed, 15 Mar 2023 15:19:17 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 55A9A1257; Wed, 15 Mar 2023 16:18:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 55A9A1257 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893555; bh=gVmQ2LG4FEG5o+QO3u7Ff0dmh2zPnPIqpyigSB2evR0=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=byX+89AbsuF7xnzO4zrYjJCwsru/AkHDBKy/s1IyGH/pBDhlnhICMDkjk0Of/uCkO efBkmwx7LF7O/TqZxJElIGqZv3vMMAi0Laz0g+dIpvugXoZp2Q7ulS4TPKGxrkGL/J psbJ6Cn6pb1bt4G/e079P4RDJBr1uBWkwHe9nsSo= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 1AE77F80619; Wed, 15 Mar 2023 16:10:47 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 77513F80652; Wed, 15 Mar 2023 16:08:54 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id ECC09F8057E for ; Wed, 15 Mar 2023 16:08:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ECC09F8057E Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjV-0007Ku-83; Wed, 15 Mar 2023 16:08:05 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjU-004KVy-Bi; Wed, 15 Mar 2023 16:08:04 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjT-0057do-5P; Wed, 15 Mar 2023 16:08:03 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Codrin Ciubotariu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Subject: [PATCH 031/173] ASoC: atmel: sam9g20_wm8731: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:23 +0100 Message-Id: <20230315150745.67084-32-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1712; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=gVmQ2LG4FEG5o+QO3u7Ff0dmh2zPnPIqpyigSB2evR0=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd2Gqm/5mmz/SaGW/HcgXBKDsS35JLeW2hQRB nYmuy46x/2JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdhgAKCRDB/BR4rcrs CW7dB/9DNjfTVXBbG+A1NYJw7mX1Ujb39pvaDmbqyau7SGwdoI7iqgjGIU/5fxUG0L+K00A41Wu djWn8/ahvS+r3ipOXw46KVqglflx1iMCPyGeJidqdrOGpdeIaqD+rlC8Qk1wW9Tw6nye09niJYY vPV9A8gjceideas2qEbU0DHoyiqEYHYFlguZBIiCIDtUnfZCgva0/rkdB01NuFgaONTLNyk+eA7 w9yDgDQRhjp7YXgGc6aULElH/o97ziu1qIlV1oyFzqCIMiJxhiHuQH+HbwKXnTFACTD1SmQ36ZS /2ERxsUkuQJK9s65veaHhlR4RbdE8Yc0Qb9Egpm5WIekFDtK X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: EW5ICIBZ5NHDP5RTWSXZGK6DYD2JVJAF X-Message-ID-Hash: EW5ICIBZ5NHDP5RTWSXZGK6DYD2JVJAF X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea --- sound/soc/atmel/sam9g20_wm8731.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c index 785b9d01d8af..baf38964b491 100644 --- a/sound/soc/atmel/sam9g20_wm8731.c +++ b/sound/soc/atmel/sam9g20_wm8731.c @@ -186,14 +186,12 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev) return ret; } -static int at91sam9g20ek_audio_remove(struct platform_device *pdev) +static void at91sam9g20ek_audio_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); snd_soc_unregister_card(card); atmel_ssc_put_audio(0); - - return 0; } #ifdef CONFIG_OF @@ -210,7 +208,7 @@ static struct platform_driver at91sam9g20ek_audio_driver = { .of_match_table = of_match_ptr(at91sam9g20ek_wm8731_dt_ids), }, .probe = at91sam9g20ek_audio_probe, - .remove = at91sam9g20ek_audio_remove, + .remove_new = at91sam9g20ek_audio_remove, }; module_platform_driver(at91sam9g20ek_audio_driver); From patchwork Wed Mar 15 15:05:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176139 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E30FBC6FD1D for ; Wed, 15 Mar 2023 15:23:53 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DB6BE1307; Wed, 15 Mar 2023 16:23:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DB6BE1307 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893831; bh=xgZdUQPBADb/LfPWKqESn5lFiqQWBx3ITTUTTUr1WVE=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=da0CrQ2uEzzyFygdPLhPY3S7qxv2uNOiEqTa8acBz+0Pi6bj0DduHhKyfwGJ24O0i rbBDD/fBqvT15CaHBEUmf3JXTQG7cmTEpmChnR45HIzK1Ry6lLq9ZV/ZDVOYhAfpXQ cTSJOSj22GW+rdB/pMt8ZtoynVVDOulYDSbBtWIQ= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C908BF80689; Wed, 15 Mar 2023 16:11:44 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 80A26F80651; Wed, 15 Mar 2023 16:09:12 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C8651F805AE for ; Wed, 15 Mar 2023 16:08:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C8651F805AE Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjV-0007Kb-8P; Wed, 15 Mar 2023 16:08:05 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjU-004KVv-7V; Wed, 15 Mar 2023 16:08:04 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjT-0057dr-DO; Wed, 15 Mar 2023 16:08:03 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Codrin Ciubotariu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Subject: [PATCH 032/173] ASoC: atmel: sam9x5_wm8731: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:24 +0100 Message-Id: <20230315150745.67084-33-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1766; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=xgZdUQPBADb/LfPWKqESn5lFiqQWBx3ITTUTTUr1WVE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd2JZvg862UlSLz4T5LrFwpmJBLk7C3DbMzzW 4P81P1XLK+JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdiQAKCRDB/BR4rcrs CYLOB/9U43OcFu0cIUVgBcdXBp8KAEOa1pAZ9fLOaLV1arip5W+Y2i3tW07zUfHdu7YDeay1ofi CbgYpuXKkvY1juuFGRKO3F3+2itfPu97+x/ny04Nb7aSzf4r5qX3D5BYUUHBnwdNcNpO/JQLQhO K7V0Vt+tBgOVhkNQqeTv1XfAyqA1e0XmnBoZtvBnLnC/7IBcpoRWZtQpwew0RgYU4bWAFRaUAmD 5bKrR/Gy93sAoRbHOhlLG86S3t4J1NaW/i0IntUzsPm69wj7JXcaHC3yO46tmf7L6k1IKUqu0ee UvVzUZRkpZEufqGkbGfEXrrtexR+k/NQGAcmMHsFf85MtiV5 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: MNPOE3S7AJRH7KJNMOGNEYDNIYXZYE4D X-Message-ID-Hash: MNPOE3S7AJRH7KJNMOGNEYDNIYXZYE4D X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea --- sound/soc/atmel/sam9x5_wm8731.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/atmel/sam9x5_wm8731.c b/sound/soc/atmel/sam9x5_wm8731.c index 99310e40e7a6..cd1d59a90e02 100644 --- a/sound/soc/atmel/sam9x5_wm8731.c +++ b/sound/soc/atmel/sam9x5_wm8731.c @@ -176,14 +176,12 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev) return ret; } -static int sam9x5_wm8731_driver_remove(struct platform_device *pdev) +static void sam9x5_wm8731_driver_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); struct sam9x5_drvdata *priv = card->drvdata; atmel_ssc_put_audio(priv->ssc_id); - - return 0; } static const struct of_device_id sam9x5_wm8731_of_match[] = { @@ -198,7 +196,7 @@ static struct platform_driver sam9x5_wm8731_driver = { .of_match_table = of_match_ptr(sam9x5_wm8731_of_match), }, .probe = sam9x5_wm8731_driver_probe, - .remove = sam9x5_wm8731_driver_remove, + .remove_new = sam9x5_wm8731_driver_remove, }; module_platform_driver(sam9x5_wm8731_driver); From patchwork Wed Mar 15 15:05:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176128 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92CF6C6FD1D for ; Wed, 15 Mar 2023 15:20:55 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 33C2D1278; Wed, 15 Mar 2023 16:20:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 33C2D1278 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893653; bh=mKzyEEFucC/0pFzfqiyNksqXxTXd6g40Rmd9mtv2udw=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=rHxFODWkJeLoOcvUYAt1NUl1NrY7PWMjCBX84GESZYIDDHkTBP+VfYox55ar3B9HM EOgcon4qg/czEv7ueGYl1pLF3jBvJKOzBRvG7BWyEW3p324PLeCfVgPZ4ZLLGuEQaL UaRcaOWusrzpNUsQfViLu7tpQotMKcFfnJELEers= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id F20D9F80612; Wed, 15 Mar 2023 16:11:10 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 63449F8057E; Wed, 15 Mar 2023 16:08:59 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3E6E9F80589 for ; Wed, 15 Mar 2023 16:08:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3E6E9F80589 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjV-0007Mb-Lc; Wed, 15 Mar 2023 16:08:05 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjU-004KWC-TB; Wed, 15 Mar 2023 16:08:04 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjT-0057dv-Jg; Wed, 15 Mar 2023 16:08:03 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Peter Rosin , Codrin Ciubotariu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Subject: [PATCH 033/173] ASoC: atmel: tse850-pcm5142: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:25 +0100 Message-Id: <20230315150745.67084-34-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1702; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=mKzyEEFucC/0pFzfqiyNksqXxTXd6g40Rmd9mtv2udw=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd2MwwhMR74VoaEJeDAsd0NdTXyU3Kf8y0FLR i6EV1E1pdqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdjAAKCRDB/BR4rcrs CbYEB/913uNz0078rK2/1XPUgqViAJXMxgf7+W4G6+WXkFaJ42TZDjZVT9Kgi4/S/x8zZI65f5P VpMmj7FRq/CX7WHz51NE2CCisGvk1EsjifPQjIS66epLq4kLz9Fuk2G8sSGEv0/iJLIrel8QNEf n06E39IFSl9jatbQySUwjWzafa1HoYvEW4G91PlyFBnuaVh/b9h4eQAWofAva/QkBLvVPg64mZK jYVbs1Nm8mURyvDG+jhV/HttFbJ2qzfJa7HoSVcniOjHCjdE1WEYHDKpsE1LIFKb4JQwbExRdZv wO2YkO9Ii1V1bKz7gKoWrhLnO8AiloT3SoYc2iYL39xN+5sk X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: BPAAS7XMDWQPLV35EBFRSE7F4SEAYNMD X-Message-ID-Hash: BPAAS7XMDWQPLV35EBFRSE7F4SEAYNMD X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Peter Rosin Reviewed-by: Claudiu Beznea --- sound/soc/atmel/tse850-pcm5142.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/atmel/tse850-pcm5142.c b/sound/soc/atmel/tse850-pcm5142.c index ef537de7719c..efead272d92b 100644 --- a/sound/soc/atmel/tse850-pcm5142.c +++ b/sound/soc/atmel/tse850-pcm5142.c @@ -412,15 +412,13 @@ static int tse850_probe(struct platform_device *pdev) return ret; } -static int tse850_remove(struct platform_device *pdev) +static void tse850_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); snd_soc_unregister_card(card); regulator_disable(tse850->ana); - - return 0; } static const struct of_device_id tse850_dt_ids[] = { @@ -435,7 +433,7 @@ static struct platform_driver tse850_driver = { .of_match_table = of_match_ptr(tse850_dt_ids), }, .probe = tse850_probe, - .remove = tse850_remove, + .remove_new = tse850_remove, }; module_platform_driver(tse850_driver); From patchwork Wed Mar 15 15:05:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176114 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 55D81C6FD1D for ; Wed, 15 Mar 2023 15:17:12 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id CE7201267; Wed, 15 Mar 2023 16:16:19 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CE7201267 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893429; bh=neTkn49x53sgf094UGptZRoSBFcVnyyQ5wca+wZPWrI=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Zx5oEj2RB5Aio45HcZ3Bn3Bp9UUgfvBo8OgN2C8i9PHbucsxl1O0q+JxAPfiGNmxT xsRTzKdnz6xCLwgBiq9UfUqEWrC2wj5WUH1ySsdKFBZLQ4aNZlEewQKqRxiKXgRunv nX6oVxS7G8BBlPdxN4/cyvuoiLweRAeOqVl0BBRk= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 8D87BF805F5; Wed, 15 Mar 2023 16:10:12 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A5568F80620; Wed, 15 Mar 2023 16:08:47 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2FE2CF8055B for ; Wed, 15 Mar 2023 16:08:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2FE2CF8055B Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjV-0007Ld-FV; Wed, 15 Mar 2023 16:08:05 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjU-004KW3-If; Wed, 15 Mar 2023 16:08:04 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjT-0057e0-Sh; Wed, 15 Mar 2023 16:08:03 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax Subject: [PATCH 034/173] ASoC: au1x: ac97c: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:26 +0100 Message-Id: <20230315150745.67084-35-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1684; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=neTkn49x53sgf094UGptZRoSBFcVnyyQ5wca+wZPWrI=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd2PDwUX6dQjG6ySbuvvQ+AB13xHkWAFOU0/M GAUlMaEuZWJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdjwAKCRDB/BR4rcrs CZlRCACaeDKTn3klALko3rgHRuRBds5cruGNsO7q/aS+pt4dZsStO9QOkzViJ5i87eTFFC2n4+P Pwd2+xwWZSv3ItVWjqQ58RIpGSmbkq8gm9kwqftH6kmqvcvxCmgck5x6NRZ8SunIXkUuKV4EDs6 BI7Zez6N/07G6QVC2nQVuGWpRUNBeu/B/7j3OIYdNh0BZ86Op/prUnANuh8RNQK6H9F3WuQswKt WtvxGBVewc3pcSfkR3Ka6u6nIlwCbATxwhtas4qh3Z1uSDvTQkLuunTpnC2SLSfg5BvKjObZ4cx TfklJ9rP3udD6zKHL+xEhkYEVOGUEU2KwLVjlXnhANny9+gN X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: A2V3UEDTO32ZQEPXPIAOODBSU37PMVEE X-Message-ID-Hash: A2V3UEDTO32ZQEPXPIAOODBSU37PMVEE X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/au1x/ac97c.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/au1x/ac97c.c b/sound/soc/au1x/ac97c.c index b18512ca2578..a11d6841afc2 100644 --- a/sound/soc/au1x/ac97c.c +++ b/sound/soc/au1x/ac97c.c @@ -285,7 +285,7 @@ static int au1xac97c_drvprobe(struct platform_device *pdev) return 0; } -static int au1xac97c_drvremove(struct platform_device *pdev) +static void au1xac97c_drvremove(struct platform_device *pdev) { struct au1xpsc_audio_data *ctx = platform_get_drvdata(pdev); @@ -294,8 +294,6 @@ static int au1xac97c_drvremove(struct platform_device *pdev) WR(ctx, AC97_ENABLE, EN_D); /* clock off, disable */ ac97c_workdata = NULL; /* MDEV */ - - return 0; } #ifdef CONFIG_PM @@ -338,7 +336,7 @@ static struct platform_driver au1xac97c_driver = { .pm = AU1XPSCAC97_PMOPS, }, .probe = au1xac97c_drvprobe, - .remove = au1xac97c_drvremove, + .remove_new = au1xac97c_drvremove, }; module_platform_driver(au1xac97c_driver); From patchwork Wed Mar 15 15:05:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176113 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ECCD9C61DA4 for ; Wed, 15 Mar 2023 15:16:56 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B50031293; Wed, 15 Mar 2023 16:16:04 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B50031293 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893414; bh=ZqPcBpT6AG7fJEruwPxAEVtTcDfzHeT5Wu2jqDmeTr8=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=OSTZaUxzLArGDNHs/M7sQZ/Xx6fUXR3NVIy8O2SxeRPqFkij8H7e2W9I2A58v/Lpc MNR+Wj23MoNiM+m1b6pGX2NE9tSIzwEjugDRzLDBN6zCggtilei0+Wrsqu5wI/cow7 5h9tVzC+WEqTS3rDWZPwyFpAkYzPuNBty+aQvk+c= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 5FB91F805EF; Wed, 15 Mar 2023 16:10:08 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8F7AFF80621; Wed, 15 Mar 2023 16:08:46 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 60C06F80563 for ; Wed, 15 Mar 2023 16:08:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 60C06F80563 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjW-0007PF-1a; Wed, 15 Mar 2023 16:08:06 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjV-004KWI-BM; Wed, 15 Mar 2023 16:08:05 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjU-0057e4-3N; Wed, 15 Mar 2023 16:08:04 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax Subject: [PATCH 035/173] ASoC: au1x: i2sc: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:27 +0100 Message-Id: <20230315150745.67084-36-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1608; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=ZqPcBpT6AG7fJEruwPxAEVtTcDfzHeT5Wu2jqDmeTr8=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd2Szl4or8lT3GOjpWSIghf2c8yBjCuGoFoj/ YEJJkBmfW+JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdkgAKCRDB/BR4rcrs CcSPB/4tze8YdHp+I10S5v3Cc18gwpTAs5S5JegXECs53b1/epn1R+5ZdYq4tYWVQ8cRFq7BtCD gKAUvS3JxiPd+B6r8t6ch97ZBWPwxq/LxBj+uXZqf+FnuAp9/ZKnX1ENFizCld8FzG6k9qr904M mItRyrRKtgyGWb50tIMlvWrFHhZCAyVSLH5jHp0ypbHd+VRkCPcyMD2EaWy+5Nnt26rPsTliH46 97FwBKVMaZn322g87QyxzM6nEu1rdM4UejkHmiNfGu6gBmzz32Aba2SbucSEOyN3clml+YrQhrF /DzeQI9rVnt9WN1eai74q8p3VlfNbQRj/MhwgLkumJ4NrZQY X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: W6YH2Y3WUXW3PZ3QX4MU3ALYCVX54E3D X-Message-ID-Hash: W6YH2Y3WUXW3PZ3QX4MU3ALYCVX54E3D X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/au1x/i2sc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/au1x/i2sc.c b/sound/soc/au1x/i2sc.c index b15c8baa9ee4..064406080d72 100644 --- a/sound/soc/au1x/i2sc.c +++ b/sound/soc/au1x/i2sc.c @@ -270,15 +270,13 @@ static int au1xi2s_drvprobe(struct platform_device *pdev) &au1xi2s_dai_driver, 1); } -static int au1xi2s_drvremove(struct platform_device *pdev) +static void au1xi2s_drvremove(struct platform_device *pdev) { struct au1xpsc_audio_data *ctx = platform_get_drvdata(pdev); snd_soc_unregister_component(&pdev->dev); WR(ctx, I2S_ENABLE, EN_D); /* clock off, disable */ - - return 0; } #ifdef CONFIG_PM @@ -315,7 +313,7 @@ static struct platform_driver au1xi2s_driver = { .pm = AU1XI2SC_PMOPS, }, .probe = au1xi2s_drvprobe, - .remove = au1xi2s_drvremove, + .remove_new = au1xi2s_drvremove, }; module_platform_driver(au1xi2s_driver); From patchwork Wed Mar 15 15:05:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176105 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C0C36C61DA4 for ; Wed, 15 Mar 2023 15:14:48 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9E5BB12A5; Wed, 15 Mar 2023 16:13:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9E5BB12A5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893286; bh=U9WcJUY/OQ0Hbv/mb6qlRurfrzX2dTgvajW9SWFKgyw=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=hDg73kbAp38qbvRIZ0mZW7x/miiBbSF2UFrYsnrOUqJXBUecEpLLtaVjyHr6z7cK6 X5G8Z3fFTe86M85paMdnAKJON7c0Bt9VL1AADZCdJjdngrmJ/Moo4a8fCESne12vl2 dvHSXvuz3B+i2oMjYXYqAiuG2R/ZGc6VlvcBHYXU= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 9C831F80423; Wed, 15 Mar 2023 16:09:31 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A5BB4F805F3; Wed, 15 Mar 2023 16:08:36 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2B867F80548 for ; Wed, 15 Mar 2023 16:08:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2B867F80548 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjW-0007Qz-Bx; Wed, 15 Mar 2023 16:08:06 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjV-004KWU-MQ; Wed, 15 Mar 2023 16:08:05 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjU-0057e8-Ah; Wed, 15 Mar 2023 16:08:04 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax Subject: [PATCH 036/173] ASoC: au1x: psc-ac97: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:28 +0100 Message-Id: <20230315150745.67084-37-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1710; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=U9WcJUY/OQ0Hbv/mb6qlRurfrzX2dTgvajW9SWFKgyw=; b=owEBbAGT/pANAwAKAcH8FHityuwJAcsmYgBkEd2V+1H/Qeq1E7jVU08wyryrrdV0sAe4vCVWI mDDaryoaSSJATIEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdlQAKCRDB/BR4rcrs CU6OB/d4qcwK7rkTi70ewjEwUOVxl56MDQ39qwKz9ps0OrEHOn0E2F+Em3nLfsP3dlOdQts4pxi P+Q4hntcYol2bBmVxm3IREs1WzzlhjP/MroO88uM7RVfUEyMl19zQDcdJDsVF69tRoG8Pprdo2V ONgVhivE2nMR4BFSFgghSC+M15aiTy83+/PAzeMCpQyFy/0kTgBI3CCjEld2BedZo8IrJjfpyqi v5kiSAXd6N9nh5f0QJbm0FXGvX/fLzNz3sBF//KyxPoNGKo37OXEjmXHhJSOeRgtnT86+1pFzyI j6kR6ye/qlCB1SjOBjh0Z6qtEyelrTD1EL9mT2Fcd6p8s08= X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: RNTI4G7G5EPHHUUGEPMM2KJNAKIDNNPV X-Message-ID-Hash: RNTI4G7G5EPHHUUGEPMM2KJNAKIDNNPV X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/au1x/psc-ac97.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/au1x/psc-ac97.c b/sound/soc/au1x/psc-ac97.c index b536394b9ca0..9fd91aea7d1a 100644 --- a/sound/soc/au1x/psc-ac97.c +++ b/sound/soc/au1x/psc-ac97.c @@ -421,7 +421,7 @@ static int au1xpsc_ac97_drvprobe(struct platform_device *pdev) return 0; } -static int au1xpsc_ac97_drvremove(struct platform_device *pdev) +static void au1xpsc_ac97_drvremove(struct platform_device *pdev) { struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev); @@ -434,8 +434,6 @@ static int au1xpsc_ac97_drvremove(struct platform_device *pdev) wmb(); /* drain writebuffer */ au1xpsc_ac97_workdata = NULL; /* MDEV */ - - return 0; } #ifdef CONFIG_PM @@ -488,7 +486,7 @@ static struct platform_driver au1xpsc_ac97_driver = { .pm = AU1XPSCAC97_PMOPS, }, .probe = au1xpsc_ac97_drvprobe, - .remove = au1xpsc_ac97_drvremove, + .remove_new = au1xpsc_ac97_drvremove, }; module_platform_driver(au1xpsc_ac97_driver); From patchwork Wed Mar 15 15:05:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176115 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7EA82C61DA4 for ; Wed, 15 Mar 2023 15:17:30 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7909D12CE; Wed, 15 Mar 2023 16:16:33 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7909D12CE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893443; bh=kxwhbVr15TCCWvNgo1txJMBZlxM0f7rppvQywDUmUFo=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=kDfUVpvpz1MVp5/7Qsv/qfOzQicT+J11e4QirETX1QbQYXfC/8oQNFIgrlEyXlY/q 34pkKMi4ooD3nudMZBumEbvGe87UL/41Rzcb0U4778/bdzwRWgaAVJEQD3b3uUzoZs u4ScRnXkqlT7/I2LGiJXKs5FY5phJd6Xii8fFCUU= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E04F3F805B2; Wed, 15 Mar 2023 16:10:16 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A7617F80630; Wed, 15 Mar 2023 16:08:48 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A2490F8056F for ; Wed, 15 Mar 2023 16:08:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A2490F8056F Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjW-0007P4-1Z; Wed, 15 Mar 2023 16:08:06 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjV-004KWH-As; Wed, 15 Mar 2023 16:08:05 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjU-0057eC-H8; Wed, 15 Mar 2023 16:08:04 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax Subject: [PATCH 037/173] ASoC: au1x: psc-i2s: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:29 +0100 Message-Id: <20230315150745.67084-38-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1766; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=kxwhbVr15TCCWvNgo1txJMBZlxM0f7rppvQywDUmUFo=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd2XikfCNafpVk6CxU+6+g4VanWJ9YyfoOjgL NSVu9RwgXSJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdlwAKCRDB/BR4rcrs Cb6YCACFmVXRFjLHF+UoTd24qDPVI/moxpy2c4dwyX+C7jqnV+S//DqGLRrOF0Sl2eBqTmHmaLi fGVr67JRsYUlg33KkbN/arc7AgqiahZrAolEd2ymp4S1AQa1eAuLhNnyjqj95eT5KtJu28YtLIh 43keSY10C7pULQiICyqSHo6E4n6sp1E43ztNsD+aBdGeevEoBEWF6hmT0QN9M7l8MADCVmWOtdc MtJqZZZ4rV1ClL09zefN2qWP42ABkCONBoPvG0DiXw6qeu5VK1yhBvvEWuyFWoF1aIFi/wi8wyZ IojswtDP+1A43WbM8bDF26REcj/k47Zd0xtXPd8h3wU5CxXY X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: DL2VYF3XREIJRYJDTXY4EVWYC3ZJZJVJ X-Message-ID-Hash: DL2VYF3XREIJRYJDTXY4EVWYC3ZJZJVJ X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/au1x/psc-i2s.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c index 79b5ae4e494c..52734dec8247 100644 --- a/sound/soc/au1x/psc-i2s.c +++ b/sound/soc/au1x/psc-i2s.c @@ -344,7 +344,7 @@ static int au1xpsc_i2s_drvprobe(struct platform_device *pdev) &au1xpsc_i2s_component, &wd->dai_drv, 1); } -static int au1xpsc_i2s_drvremove(struct platform_device *pdev) +static void au1xpsc_i2s_drvremove(struct platform_device *pdev) { struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev); @@ -352,8 +352,6 @@ static int au1xpsc_i2s_drvremove(struct platform_device *pdev) wmb(); /* drain writebuffer */ __raw_writel(PSC_CTRL_DISABLE, PSC_CTRL(wd)); wmb(); /* drain writebuffer */ - - return 0; } #ifdef CONFIG_PM @@ -406,7 +404,7 @@ static struct platform_driver au1xpsc_i2s_driver = { .pm = AU1XPSCI2S_PMOPS, }, .probe = au1xpsc_i2s_drvprobe, - .remove = au1xpsc_i2s_drvremove, + .remove_new = au1xpsc_i2s_drvremove, }; module_platform_driver(au1xpsc_i2s_driver); From patchwork Wed Mar 15 15:05:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176116 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 270DFC61DA4 for ; Wed, 15 Mar 2023 15:17:42 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 01CA112D5; Wed, 15 Mar 2023 16:16:50 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 01CA112D5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893460; bh=vwG6ePc7di/fwbT4udyqDvX3neh4bVz4dwZcwKy8w+0=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=DM0lP0M9tCMRqMQzzYDnMyYFrfCn1F7CJvpzlu2EGmc+uiT/t4OtRBn3xCJFRtBqB Ajn8558kXLlrIJ84KjlcGTSLz6YiSYX8sfdT1UYT/gOg8wOPNRFSSRaKJP+Ucysa5+ /4ZR3mux72DFcg4PcOTL6FmI9t9wHSAfT5NQDE3E= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 082D9F805F7; Wed, 15 Mar 2023 16:10:21 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A7809F8063B; Wed, 15 Mar 2023 16:08:49 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7712AF80567 for ; Wed, 15 Mar 2023 16:08:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7712AF80567 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjW-0007Qa-AA; Wed, 15 Mar 2023 16:08:06 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjV-004KWR-Jv; Wed, 15 Mar 2023 16:08:05 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjU-0057eG-Np; Wed, 15 Mar 2023 16:08:04 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax Subject: [PATCH 038/173] ASoC: bcm: bcm63xx-i2s-whistler: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:30 +0100 Message-Id: <20230315150745.67084-39-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1598; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=vwG6ePc7di/fwbT4udyqDvX3neh4bVz4dwZcwKy8w+0=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd2bKd/7WtVspYZ+g+4IKKiva+zh0NnLJYDkO aqvz7u6U1WJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdmwAKCRDB/BR4rcrs CUHTB/43v92YHRzo7Vxzl9ArMK4Z6rhALbax83jcCQc1eIgTfa5xozW7+/KMDZ2OYBTibjA/PTv xpC+YCFfPL+1FtrHT+UGOF+OjnZ/DQ8FS+HgrZHz3VsgFFdVQ3j3ynm3WkF/LOBOAzStjZXpKOI TQgu01VLQlKs47XeYPzi93EKMscjjxjo2mR+/wx2blHolOB6qmda+kem/P7zwm9gT3M8P0ht4ez K1kKLLgFB2sDwpkD7Y1j/enL8JUB/KLz2L/iQ+m88kEQ4KdU5s8HUz6RyILiNG2QSmgLzIHRPgB F2+o56ZwrvugBwqW0/UGu0XiStwyTEZevYBx2aKdFXj9hhKt X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: XIBWUSON5IKUC3ISCED6DS2DRQEPRRIM X-Message-ID-Hash: XIBWUSON5IKUC3ISCED6DS2DRQEPRRIM X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/bcm/bcm63xx-i2s-whistler.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/bcm/bcm63xx-i2s-whistler.c b/sound/soc/bcm/bcm63xx-i2s-whistler.c index 2da1384ffe91..18c51dbbc8dc 100644 --- a/sound/soc/bcm/bcm63xx-i2s-whistler.c +++ b/sound/soc/bcm/bcm63xx-i2s-whistler.c @@ -289,10 +289,9 @@ static int bcm63xx_i2s_dev_probe(struct platform_device *pdev) return ret; } -static int bcm63xx_i2s_dev_remove(struct platform_device *pdev) +static void bcm63xx_i2s_dev_remove(struct platform_device *pdev) { bcm63xx_soc_platform_remove(pdev); - return 0; } #ifdef CONFIG_OF @@ -308,7 +307,7 @@ static struct platform_driver bcm63xx_i2s_driver = { .of_match_table = of_match_ptr(snd_soc_bcm_audio_match), }, .probe = bcm63xx_i2s_dev_probe, - .remove = bcm63xx_i2s_dev_remove, + .remove_new = bcm63xx_i2s_dev_remove, }; module_platform_driver(bcm63xx_i2s_driver); From patchwork Wed Mar 15 15:05:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176140 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1D4E7C61DA4 for ; Wed, 15 Mar 2023 15:24:02 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1737E1311; Wed, 15 Mar 2023 16:23:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1737E1311 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893840; bh=FOfIj2pV04aWWA4gsQJnB0qF0b40DO1206/6g6bNZSk=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=FHnTylpX44rXqI+u4nMZEEll25VnhfTo2O8uXwOlIvyPjRtxOvLucTAT9nMve64Ov iIdpYRUZ2tVfHnFX6U6Z0hThTcGXvcF8pdZZvWp2HB6jhAC7LymToQ6FFooPDUz2xS 8wSbFINvcPVaQeZtH3vtNNz1vZRsd8y+3W+yUliA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C082DF8068C; Wed, 15 Mar 2023 16:11:47 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id AEA5BF8016C; Wed, 15 Mar 2023 16:09:13 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 186F6F8016C for ; Wed, 15 Mar 2023 16:08:17 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 186F6F8016C Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjX-0007Ry-HI; Wed, 15 Mar 2023 16:08:07 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjV-004KWa-Uw; Wed, 15 Mar 2023 16:08:05 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjU-0057eJ-W5; Wed, 15 Mar 2023 16:08:05 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Ray Jui , Scott Branden , Charles Keepax , Allison Randal , Greg Kroah-Hartman , Thomas Gleixner Subject: [PATCH 039/173] ASoC: bcm: cygnus-ssp: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:31 +0100 Message-Id: <20230315150745.67084-40-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1591; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=FOfIj2pV04aWWA4gsQJnB0qF0b40DO1206/6g6bNZSk=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd2dv2+30yy3xC9w/q2zfPFOMQd5kFNUcn8zh fp26fHKbxiJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdnQAKCRDB/BR4rcrs CRwcB/9RmUFA62/bGJzNSzRta91M19j8ABIiM7A7CU/afcE4Yv/PX7dqULvsmf5GWFXk1uVQ/t6 U8wFz9Fy0PISZk3ZGMbqfLE71K6VljaMZDX2nimifDq1Yy7yIrR1fEJRr4n9sbF4+uwyY1+vW9f Arh0MBDD4Oi2E7UGR5pp9q+VxxQQneM5iZ+awEHwI+XJbb4ciEwI0B2RNMY/XJcauhAQwyfR/x/ 1J9I7rDC7rySKOa1aa82OSMtMXaEooLvRQObgqB08fKzd49Auz1AyPbwh5kvKBqM/dvZo41r9Ww CzC8UclNEOix56m5fKLyJx//A7MizepNQttqy5vIGhgVzdam X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: BMYNIRU6BVDBWMJDH7QIJW2BF7PSMVGF X-Message-ID-Hash: BMYNIRU6BVDBWMJDH7QIJW2BF7PSMVGF X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Broadcom internal kernel review list , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/bcm/cygnus-ssp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/bcm/cygnus-ssp.c b/sound/soc/bcm/cygnus-ssp.c index 2a92e33e1fbf..8638bf22ef5c 100644 --- a/sound/soc/bcm/cygnus-ssp.c +++ b/sound/soc/bcm/cygnus-ssp.c @@ -1377,11 +1377,9 @@ static int cygnus_ssp_probe(struct platform_device *pdev) return 0; } -static int cygnus_ssp_remove(struct platform_device *pdev) +static void cygnus_ssp_remove(struct platform_device *pdev) { cygnus_soc_platform_unregister(&pdev->dev); - - return 0; } static const struct of_device_id cygnus_ssp_of_match[] = { @@ -1392,7 +1390,7 @@ MODULE_DEVICE_TABLE(of, cygnus_ssp_of_match); static struct platform_driver cygnus_ssp_driver = { .probe = cygnus_ssp_probe, - .remove = cygnus_ssp_remove, + .remove_new = cygnus_ssp_remove, .driver = { .name = "cygnus-ssp", .of_match_table = cygnus_ssp_of_match, From patchwork Wed Mar 15 15:05:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176102 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DE344C7618B for ; Wed, 15 Mar 2023 15:14:01 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id CB35B127A; Wed, 15 Mar 2023 16:13:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CB35B127A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893239; bh=w05buJVZkeC26R2yYlPyIK8jM9jm4BwZXV8XPr0nM7U=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=bPP9O+Pg1w1WTNqmq4B19Xgc5QgZ5K6EHTNVqzuIDyN78sDsDPcnPiDwZFZuy7M8g 50mP4BhRBaog+L08MXlRa8IS2qHwv1OLEOtUPBgf5gD+TCI9ilX0wcrZk/V7VFegwS UPqdczTolC6ABXtQgBUlbG52kIl/ZmZ6iYkxtz5Y= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 559E4F805B5; Wed, 15 Mar 2023 16:09:21 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 914F0F805E8; Wed, 15 Mar 2023 16:08:32 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CE974F80542 for ; Wed, 15 Mar 2023 16:08:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CE974F80542 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjW-0007SZ-Sn; Wed, 15 Mar 2023 16:08:06 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjW-004KWh-7n; Wed, 15 Mar 2023 16:08:06 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjV-0057eN-8f; Wed, 15 Mar 2023 16:08:05 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 040/173] ASoC: cirrus: edb93xx: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:32 +0100 Message-Id: <20230315150745.67084-41-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1580; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=w05buJVZkeC26R2yYlPyIK8jM9jm4BwZXV8XPr0nM7U=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd2gcrUeOnSJsfSwFJvGz21Bx74Ma9icmB2g9 bFgZ+Ja+c6JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdoAAKCRDB/BR4rcrs CWhXB/0ehYx6pdq1fDM5hB4PmiO5nOa99C1MyM93yeBoiy7nlWNV0iYLtJqrD7XGuIpLaTJ4tTG KqpdUAqR9D/saHdUYBDNNn7NpCHa4urDsG9HX1CFDKfZlfQlttKocKxjRdU2+BzENXS+S7eVeLA ow8aknRu/eTtrT/LL4uQW8MBohrvrMHYJAjjq9XXLbEu0EfVrNgG6kw3RYqBZmswDc53kTIXkv/ +vcFRGrmPiPuIiyh/6GwtERdChRgCHbPFLVDRU+LXl/0DXL6HNbs/fHPrwdDPHHZlNIf+hgO3uN aYj/qhHqHH7qmtOzGkKo/MUmnhyxda0pH121RwU3D7+29rcb X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: ZQMQSU6EKE74KESC47ZSYU4NIW6CW5QX X-Message-ID-Hash: ZQMQSU6EKE74KESC47ZSYU4NIW6CW5QX X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/cirrus/edb93xx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/cirrus/edb93xx.c b/sound/soc/cirrus/edb93xx.c index 385290202912..f49caab21a25 100644 --- a/sound/soc/cirrus/edb93xx.c +++ b/sound/soc/cirrus/edb93xx.c @@ -93,14 +93,12 @@ static int edb93xx_probe(struct platform_device *pdev) return ret; } -static int edb93xx_remove(struct platform_device *pdev) +static void edb93xx_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); snd_soc_unregister_card(card); ep93xx_i2s_release(); - - return 0; } static struct platform_driver edb93xx_driver = { @@ -108,7 +106,7 @@ static struct platform_driver edb93xx_driver = { .name = "edb93xx-audio", }, .probe = edb93xx_probe, - .remove = edb93xx_remove, + .remove_new = edb93xx_remove, }; module_platform_driver(edb93xx_driver); From patchwork Wed Mar 15 15:05:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176117 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4F5E8C61DA4 for ; Wed, 15 Mar 2023 15:17:57 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3320912A6; Wed, 15 Mar 2023 16:17:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3320912A6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893475; bh=KsNaPZaC9O+CBLoIkyU0csD2LEDsbYyKNK9/eq9pJV4=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=jC3qe9lMZ/e5DTECEqdd+uOmsR1MrnsMyibT6q4jUVkg5y1gBt1SAPhc7uxSVF1wP 9fbmjyHQr1keRjMrF7qxpVYVpYfTF44+Dlqkrx3gB0YK2rMX1laMrEO7PS89Jf7Jld LgtHqEJ6/mxIYklocDqluk7yaMq+U3jrBK7Slco8= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id DFA40F805FC; Wed, 15 Mar 2023 16:10:25 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6CBC7F8063D; Wed, 15 Mar 2023 16:08:50 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C4F8BF80578 for ; Wed, 15 Mar 2023 16:08:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C4F8BF80578 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjX-0007SY-6E; Wed, 15 Mar 2023 16:08:07 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjW-004KWg-7K; Wed, 15 Mar 2023 16:08:06 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjV-0057eS-Ev; Wed, 15 Mar 2023 16:08:05 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Alexander Sverdlin , Kuninori Morimoto Subject: [PATCH 041/173] ASoC: cirrus: ep93xx-i2s: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:33 +0100 Message-Id: <20230315150745.67084-42-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1522; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=KsNaPZaC9O+CBLoIkyU0csD2LEDsbYyKNK9/eq9pJV4=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd2jJvg/fR5SiZgkPhiiu450UBtVHCGdfL9CT oPyuBIetXmJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdowAKCRDB/BR4rcrs CallB/wOd3jvGs0wb0bAURMs6iyy6SlDUHMJ1VXV1WiNTNzLgxXXo0VnfqH27/Oiv/jTEEOsRn6 M0EXDq2DleLCWxTXsFbdxbSIH7gSa91evNYZs/lqTKYUtr60L63xcogmklMrRADY4aKPO/ihGYm mTnCbDf7SOjnNhrfQyCNi+6fyM6E48pxXjHbcBLtFYf8SLTIr1/k9BTnkDOtPhBvXcaq8a/3tW5 xXGNxoi+AQWoF1NVYmznavDYZoXdpCobPHQgzSDnuZBSLsyzBEDqzl865w42E3WhQR1DsQIvl7m pyUIKXu4dpVeALyti0FIwzNP7BRV6c4LkOYihaTyo9KYwHG8 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: L2WEKFMVCZLISHJFWUUHMCNKI4227HN2 X-Message-ID-Hash: L2WEKFMVCZLISHJFWUUHMCNKI4227HN2 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Alexander Sverdlin --- sound/soc/cirrus/ep93xx-i2s.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c index 70840f27d4a7..9760453d9d79 100644 --- a/sound/soc/cirrus/ep93xx-i2s.c +++ b/sound/soc/cirrus/ep93xx-i2s.c @@ -495,19 +495,18 @@ static int ep93xx_i2s_probe(struct platform_device *pdev) return err; } -static int ep93xx_i2s_remove(struct platform_device *pdev) +static void ep93xx_i2s_remove(struct platform_device *pdev) { struct ep93xx_i2s_info *info = dev_get_drvdata(&pdev->dev); clk_put(info->lrclk); clk_put(info->sclk); clk_put(info->mclk); - return 0; } static struct platform_driver ep93xx_i2s_driver = { .probe = ep93xx_i2s_probe, - .remove = ep93xx_i2s_remove, + .remove_new = ep93xx_i2s_remove, .driver = { .name = "ep93xx-i2s", }, From patchwork Wed Mar 15 15:05:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176112 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 755E2C7618D for ; Wed, 15 Mar 2023 15:16:39 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2148A12C4; Wed, 15 Mar 2023 16:15:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2148A12C4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893397; bh=XAZqZRq8RI9Q12g3sBEgsPfggKTP0lHeGHRQjFerVS4=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=SfQbPwCKFqEqwS887tvNDj4tXnTWYNCC9w0bRWqchi5hHrSbrY+MviT/meximxjGC K7Cwz37GnACsgzb0uhcx9FctQs+Ix9cf2XF0dErYsdfhpUe6rObu/0MY1Wm2eh9vMv ab50zXNHEnhoObuUGwZymnDHP0mrMKO5lBjdIKW4= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 0C715F805EE; Wed, 15 Mar 2023 16:10:06 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3BDCAF80616; Wed, 15 Mar 2023 16:08:45 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8B233F80549 for ; Wed, 15 Mar 2023 16:08:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8B233F80549 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjX-0007Td-Kw; Wed, 15 Mar 2023 16:08:07 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjW-004KWx-Vm; Wed, 15 Mar 2023 16:08:06 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjV-0057eV-Kw; Wed, 15 Mar 2023 16:08:05 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Charles Keepax , Richard Fitzgerald , James Schulman , David Rhodes , Lucas Tanure , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 042/173] ASoC: codecs: cs47l15: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:34 +0100 Message-Id: <20230315150745.67084-43-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1770; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=XAZqZRq8RI9Q12g3sBEgsPfggKTP0lHeGHRQjFerVS4=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd2mbvVMst3/BiE7KXAIqKc4/eZZ8UEtiV7t0 KLXlFpnUNCJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdpgAKCRDB/BR4rcrs CUGkB/45vrmkFhF2k66bM6XupMoqLxvjbSDIlL9kOD7+fzZgNQlQBuVJmnlCx6vNyTG33aVwvgt YZmIF8lGGJldiNXe/cIiBoFhJEiS/oW6KHkNHmUoBfdIsATP5dBVbkA1YVMuXAduV3TeIMUeNLV LDmElcCKwtUCLyZmDX6DOSgtXBshIkkAlUWz/7FGhJWBEp3h9Mp26F5twmLb3JP+JMq9Ny0mvta 48jn737zwBL0b5QHNd3tuu0b54BaDOIH07d0Nh4fhiCVI8VpAxdwegE740n98wNaY9cIdkD009M 1oQRfN0B/tBHvas4HEobFjjb8ShZQx8KnghpaA2hqbdZo6v7 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: RJRVURRRGSI6JWN22JXTHYCFIFKAXZHH X-Message-ID-Hash: RJRVURRRGSI6JWN22JXTHYCFIFKAXZHH X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, patches@opensource.cirrus.com, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax --- sound/soc/codecs/cs47l15.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/cs47l15.c b/sound/soc/codecs/cs47l15.c index 06c4214382e3..a6538dab6639 100644 --- a/sound/soc/codecs/cs47l15.c +++ b/sound/soc/codecs/cs47l15.c @@ -1468,7 +1468,7 @@ static int cs47l15_probe(struct platform_device *pdev) return ret; } -static int cs47l15_remove(struct platform_device *pdev) +static void cs47l15_remove(struct platform_device *pdev) { struct cs47l15 *cs47l15 = platform_get_drvdata(pdev); @@ -1482,8 +1482,6 @@ static int cs47l15_remove(struct platform_device *pdev) madera_free_irq(cs47l15->core.madera, MADERA_IRQ_DSP_IRQ1, cs47l15); madera_free_overheat(&cs47l15->core); madera_core_free(&cs47l15->core); - - return 0; } static struct platform_driver cs47l15_codec_driver = { @@ -1491,7 +1489,7 @@ static struct platform_driver cs47l15_codec_driver = { .name = "cs47l15-codec", }, .probe = &cs47l15_probe, - .remove = &cs47l15_remove, + .remove_new = cs47l15_remove, }; module_platform_driver(cs47l15_codec_driver); From patchwork Wed Mar 15 15:05:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176109 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56973C61DA4 for ; Wed, 15 Mar 2023 15:15:53 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 82B41129F; Wed, 15 Mar 2023 16:15:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 82B41129F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893351; bh=tOybs4YO5WnX4XdM6zgWvbw/Ws2T59aBJKBlajmdgtE=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=rLOyB4ZNn1oAdTSoCQm2xhJUH2K36oykb4CYs9BSNcoOZ7HBfx/YcjTv+F2bolJZN WXMKo7YW4NTzA48CFULtzWo9YUmIf4f071k4wSXg8TZLDijpsRXw5oNI9kiOWzH+z9 qAZS7yWstGJ/p1cM71S6LVbODL9FUqbTVHB8yRlM= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 4196AF80551; Wed, 15 Mar 2023 16:09:51 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5A038F80607; Wed, 15 Mar 2023 16:08:41 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9E4D0F800C9 for ; Wed, 15 Mar 2023 16:08:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9E4D0F800C9 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjX-0007Sq-5B; Wed, 15 Mar 2023 16:08:07 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjW-004KWp-FX; Wed, 15 Mar 2023 16:08:06 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjV-0057ea-Rq; Wed, 15 Mar 2023 16:08:05 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: James Schulman , David Rhodes , Lucas Tanure , Richard Fitzgerald , Charles Keepax , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 043/173] ASoC: codecs: cs47l24: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:35 +0100 Message-Id: <20230315150745.67084-44-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1795; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=tOybs4YO5WnX4XdM6zgWvbw/Ws2T59aBJKBlajmdgtE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd2psg7lC4HgMpAmy42w8tkFW43V2qaXwfn/8 NlYbx7TNB2JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdqQAKCRDB/BR4rcrs CfmrB/9fje5rtegEWUU3YUFr31jvSXOuduQjgew5BZeL7MC4CoJLeUSN8xWNB6/9Rbj1OH1cgbz DbXTkyX9kDrCVNHwGE4NFOiptsv1ikyjWb09VnfQit6yBjqsw7HT66Hqzy4LBKN4KUTZW9Nspam 8mYcPR0OkwHis5jisFkGDXVSHKkoMUqBS8dLqMECqUdgvVIWFGk1fTwRMdZTPhSByGbJFCcp2mq BGJ2Y3/gqS6vapc3Gk1ci+rWzyG3hezPW6mCdIQyx5o2fqEYpahYRUJfPeDVSdGUPj+ucG+c4oH cDL/VdJzpLNvMVGw4nRvHw6teuUuLChrmFVXSH3JXyRWp8RT X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: LSD3MKXULTV7GEQT5ZBNVLHCWB7OINPE X-Message-ID-Hash: LSD3MKXULTV7GEQT5ZBNVLHCWB7OINPE X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, patches@opensource.cirrus.com, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax --- sound/soc/codecs/cs47l24.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/cs47l24.c b/sound/soc/codecs/cs47l24.c index f9a2b865d717..a07b621d463e 100644 --- a/sound/soc/codecs/cs47l24.c +++ b/sound/soc/codecs/cs47l24.c @@ -1319,7 +1319,7 @@ static int cs47l24_probe(struct platform_device *pdev) return ret; } -static int cs47l24_remove(struct platform_device *pdev) +static void cs47l24_remove(struct platform_device *pdev) { struct cs47l24_priv *cs47l24 = platform_get_drvdata(pdev); struct arizona *arizona = cs47l24->core.arizona; @@ -1333,8 +1333,6 @@ static int cs47l24_remove(struct platform_device *pdev) arizona_set_irq_wake(arizona, ARIZONA_IRQ_DSP_IRQ1, 0); arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, cs47l24); - - return 0; } static struct platform_driver cs47l24_codec_driver = { @@ -1342,7 +1340,7 @@ static struct platform_driver cs47l24_codec_driver = { .name = "cs47l24-codec", }, .probe = cs47l24_probe, - .remove = cs47l24_remove, + .remove_new = cs47l24_remove, }; module_platform_driver(cs47l24_codec_driver); From patchwork Wed Mar 15 15:05:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176120 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8DD27C61DA4 for ; Wed, 15 Mar 2023 15:18:43 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5293A12DC; Wed, 15 Mar 2023 16:17:51 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5293A12DC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893521; bh=UWIspkVrEgQ3JI/RAPubyHlp7BRu+ORadNNQVIKreBE=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=AOOez9W7DUK5vPsDEHBCBssPNwRr/fr5/z2L0LIoDgsPi8ZTBC5MlRQY2nH9qZVQd aRXdM0mP35dzT6bUM4DyWpI2PZrDuwCqavFREizWojULs4GmU+59O3p9gvu7+99Di7 DOxFO0jaTmdDXYCO508PdcxNCSHba8cpy/JdKmnI= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 824F3F8060D; Wed, 15 Mar 2023 16:10:37 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 55960F80652; Wed, 15 Mar 2023 16:08:52 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1DB04F80571 for ; Wed, 15 Mar 2023 16:08:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1DB04F80571 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjX-0007Te-MW; Wed, 15 Mar 2023 16:08:07 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjW-004KWy-W2; Wed, 15 Mar 2023 16:08:07 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjW-0057ee-2m; Wed, 15 Mar 2023 16:08:06 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Charles Keepax , Richard Fitzgerald , James Schulman , David Rhodes , Lucas Tanure , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 044/173] ASoC: codecs: cs47l35: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:36 +0100 Message-Id: <20230315150745.67084-45-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1777; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=UWIspkVrEgQ3JI/RAPubyHlp7BRu+ORadNNQVIKreBE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd2sUE8A4lUx+7sGPprwWeHKFpPMuqjeS84lz 7YMbFmrJbSJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdrAAKCRDB/BR4rcrs CU8BB/9UlI0wKnu1fG5Y1xSIWmssUBzF6m76yO4cmH3Q2ZCWqEo65UsTetb0/QswizDLey0stW4 gDRcndMH0bNkQRKpWBJ0YtXnCd3pkT2IRWMPnI+ZldXrZ/WPc0W4de5e0zwHU2aZPo617jj7Jx3 V6IAn31QWKw6GKH2+XvgwDc7IA4SizsiNg9Q0vrTRu7jgjZF1j0Qv1pgK09PqCSGIpbB1qLUSDM f0aTkLXOMod0HZp6+gdXaNsxq/QGsC+6nfSxsSFHQBvxvZZ/h5L7swQiinyUoPfxcpD4BUdBKH/ K61wOfJAMRKs5re4CarDnhZHLgSueSqKHgAkk1ro+98nKnWT X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 7TDNIJ4MGDCUE65WP2SCMSTRSAK2CRH3 X-Message-ID-Hash: 7TDNIJ4MGDCUE65WP2SCMSTRSAK2CRH3 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, patches@opensource.cirrus.com, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax --- sound/soc/codecs/cs47l35.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/cs47l35.c b/sound/soc/codecs/cs47l35.c index c1032d6c9143..c05c80c16c84 100644 --- a/sound/soc/codecs/cs47l35.c +++ b/sound/soc/codecs/cs47l35.c @@ -1744,7 +1744,7 @@ static int cs47l35_probe(struct platform_device *pdev) return ret; } -static int cs47l35_remove(struct platform_device *pdev) +static void cs47l35_remove(struct platform_device *pdev) { struct cs47l35 *cs47l35 = platform_get_drvdata(pdev); int i; @@ -1758,8 +1758,6 @@ static int cs47l35_remove(struct platform_device *pdev) madera_free_irq(cs47l35->core.madera, MADERA_IRQ_DSP_IRQ1, cs47l35); madera_free_overheat(&cs47l35->core); madera_core_free(&cs47l35->core); - - return 0; } static struct platform_driver cs47l35_codec_driver = { @@ -1767,7 +1765,7 @@ static struct platform_driver cs47l35_codec_driver = { .name = "cs47l35-codec", }, .probe = &cs47l35_probe, - .remove = &cs47l35_remove, + .remove_new = cs47l35_remove, }; module_platform_driver(cs47l35_codec_driver); From patchwork Wed Mar 15 15:05:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176118 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 29741C6FD1D for ; Wed, 15 Mar 2023 15:18:16 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 327B0125B; Wed, 15 Mar 2023 16:17:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 327B0125B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893494; bh=E0CSgYgs0vB0V31nnDr73rSdggb0wbXZ/S/BUMFGPj8=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Te1jxveETmhsvDFCduxLxoWsH6ohm6kxQxgh5iAnbZPWyMK5FvtpWzVqtzxpaxkZd vpgszZONohjD6CeTwEC86hXMAO07c3ZqqTRt47sBkDzOGQiZa8P0BBCRCmX2G9GkgD 4Wx4AmQ8cbZFHL3HJjU47FMbfOk6vE4D1krPOx5Y= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id AA743F80606; Wed, 15 Mar 2023 16:10:30 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5B830F80642; Wed, 15 Mar 2023 16:08:51 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C2268F80568 for ; Wed, 15 Mar 2023 16:08:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C2268F80568 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjX-0007TH-Hd; Wed, 15 Mar 2023 16:08:07 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjW-004KWu-TQ; Wed, 15 Mar 2023 16:08:06 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjW-0057eh-8u; Wed, 15 Mar 2023 16:08:06 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: James Schulman , David Rhodes , Lucas Tanure , Richard Fitzgerald , Charles Keepax , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 045/173] ASoC: codecs: cs47l85: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:37 +0100 Message-Id: <20230315150745.67084-46-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1777; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=E0CSgYgs0vB0V31nnDr73rSdggb0wbXZ/S/BUMFGPj8=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd2u/P0vwUjQAYv3GVkuRiU46sLWUgiHap2JX fMgvknwjSqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdrgAKCRDB/BR4rcrs Cd3XCACTNqGhNxbus+U/ftHmQA/GGR8rMTSASXBMpS+8CHfvdJx7TouOlehvoRXxk9769555s5F Kthkds/w3tOzYLzXHVwdb4hnnGdpx0Oy086Wm3AxxdNHCkCdnGxPnM3gxkIYJgTxNWkRSuh06BE iBCJWTD7AcHmUODDij86/5D8ykarvoI1aIrjXzJAE+X44ibw0Cws7fE794cgYMd8LLDdd77HjkG lLw6j817+eGL16MUR/bfXamf/ph1a5AebV1QFdtwPhhzs3bzG+JKvW6L495jPI5FDLf2DWf7BxY OKO0vLBSx2g7a2ffIwM3/jn6R09adb0n1M6HJcDH1YuaPnMi X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: WC3ON53WK5GJJDJUADNVK6SR4FOGFTOI X-Message-ID-Hash: WC3ON53WK5GJJDJUADNVK6SR4FOGFTOI X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, patches@opensource.cirrus.com, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax --- sound/soc/codecs/cs47l85.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/cs47l85.c b/sound/soc/codecs/cs47l85.c index 215d8211aa59..dd7997a53e70 100644 --- a/sound/soc/codecs/cs47l85.c +++ b/sound/soc/codecs/cs47l85.c @@ -2695,7 +2695,7 @@ static int cs47l85_probe(struct platform_device *pdev) return ret; } -static int cs47l85_remove(struct platform_device *pdev) +static void cs47l85_remove(struct platform_device *pdev) { struct cs47l85 *cs47l85 = platform_get_drvdata(pdev); int i; @@ -2709,8 +2709,6 @@ static int cs47l85_remove(struct platform_device *pdev) madera_free_irq(cs47l85->core.madera, MADERA_IRQ_DSP_IRQ1, cs47l85); madera_free_overheat(&cs47l85->core); madera_core_free(&cs47l85->core); - - return 0; } static struct platform_driver cs47l85_codec_driver = { @@ -2718,7 +2716,7 @@ static struct platform_driver cs47l85_codec_driver = { .name = "cs47l85-codec", }, .probe = &cs47l85_probe, - .remove = &cs47l85_remove, + .remove_new = cs47l85_remove, }; module_platform_driver(cs47l85_codec_driver); From patchwork Wed Mar 15 15:05:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176119 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1199DC7618B for ; Wed, 15 Mar 2023 15:18:32 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EE3EB12D6; Wed, 15 Mar 2023 16:17:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EE3EB12D6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893510; bh=Z9x5okcuH+MfxJPQ10nX9udPMHHTxaZwjUYHSvRFEUY=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=rVxuscZTvr9895lR7w3B0jZvZo58NGHin6ns1ZXFJscmVLSs55ORDJX5YRXqrXY2U PAG/hE7JSvLXhVP8ZEivWNHNu7W9aowjD5scbD/S3QjkaZNd1mQns522FcNvatWo1U EeWi3/krpk5TJuEmvrzC6Qdi8RQuO/QCrVHTv9lE= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 1DFB5F8060A; Wed, 15 Mar 2023 16:10:34 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E3481F8064F; Wed, 15 Mar 2023 16:08:51 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id F1850F80579 for ; Wed, 15 Mar 2023 16:08:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F1850F80579 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjY-0007U8-2k; Wed, 15 Mar 2023 16:08:08 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjX-004KX8-BW; Wed, 15 Mar 2023 16:08:07 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjW-0057em-Ga; Wed, 15 Mar 2023 16:08:06 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Charles Keepax , Richard Fitzgerald , James Schulman , David Rhodes , Lucas Tanure , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 046/173] ASoC: codecs: cs47l90: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:38 +0100 Message-Id: <20230315150745.67084-47-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1806; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Z9x5okcuH+MfxJPQ10nX9udPMHHTxaZwjUYHSvRFEUY=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd2xT0HTLIZQkh2xXT3s9k2sZtGfgPrjkxYFL jX8tj99qPSJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdsQAKCRDB/BR4rcrs CcUqCACOdMI7KMWa8Pz2xDJoSa8KioODGQ2xGWOiNjUoSRLtiJ0gQtQXl+oi3mgPsZrfrLznJV3 aitdERuiPp3/gGegh+lgGcidvyRi0oCUCCZxACwnm5rZJZcNjcMFZPGsXjGTPF795HXVdI8FXIk LJDzWfAWRwqMc3RsAoIPcHPtN1kOiH+XuHsGc97vACF7e1fEy1DEEX+/Jdj7wvLBO9GUCfhh+kV 7jOaGxOrbaLlJ8GiCIPxS2q5sYHFPm9nYcxAEvXLRBVbycaxunOJBoZHL2HIgtMw5sg1MBhiRQb 0m0wTtQ+tMgrUPdSR98dWV4xC3ShBeT/WSLPHE3eZWx9IKQu X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: QIIMQJZI53QN2BF4DDFYRAYWGJM6QZEG X-Message-ID-Hash: QIIMQJZI53QN2BF4DDFYRAYWGJM6QZEG X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, patches@opensource.cirrus.com, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax --- sound/soc/codecs/cs47l90.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/cs47l90.c b/sound/soc/codecs/cs47l90.c index 1ad6526c7871..cdd5e7e20b5d 100644 --- a/sound/soc/codecs/cs47l90.c +++ b/sound/soc/codecs/cs47l90.c @@ -2618,7 +2618,7 @@ static int cs47l90_probe(struct platform_device *pdev) return ret; } -static int cs47l90_remove(struct platform_device *pdev) +static void cs47l90_remove(struct platform_device *pdev) { struct cs47l90 *cs47l90 = platform_get_drvdata(pdev); int i; @@ -2633,8 +2633,6 @@ static int cs47l90_remove(struct platform_device *pdev) madera_set_irq_wake(cs47l90->core.madera, MADERA_IRQ_DSP_IRQ1, 0); madera_free_irq(cs47l90->core.madera, MADERA_IRQ_DSP_IRQ1, cs47l90); madera_core_free(&cs47l90->core); - - return 0; } static struct platform_driver cs47l90_codec_driver = { @@ -2642,7 +2640,7 @@ static struct platform_driver cs47l90_codec_driver = { .name = "cs47l90-codec", }, .probe = &cs47l90_probe, - .remove = &cs47l90_remove, + .remove_new = cs47l90_remove, }; module_platform_driver(cs47l90_codec_driver); From patchwork Wed Mar 15 15:05:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176133 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9434DC6FD1D for ; Wed, 15 Mar 2023 15:22:13 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D869812D9; Wed, 15 Mar 2023 16:21:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D869812D9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893730; bh=7W65udiMT++suVj7HEvJGpWPs+cM2yMQTO8Yepg0vsc=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=SlMOZdtJFOx5+cOJZXzHN8U/NRN36lq/k5r5U4DCNpOmIN7yA3uYZj6PgkVgpZqiC 4DwQCzq/rZlDiPooqe29mhD0ygRt6fq8Nt5hFpVP49HFvSeLP+T/3sgZp+/DDorTug Qp+6DQCz5jXVDUyPvMOm1npoU689yS8KbWCIdPVg= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 77E50F8065C; Wed, 15 Mar 2023 16:11:27 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5D526F805A0; Wed, 15 Mar 2023 16:09:04 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 35EE7F80588 for ; Wed, 15 Mar 2023 16:08:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 35EE7F80588 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjY-0007Uv-EH; Wed, 15 Mar 2023 16:08:08 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjX-004KXK-QY; Wed, 15 Mar 2023 16:08:07 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjW-0057eq-PR; Wed, 15 Mar 2023 16:08:06 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: James Schulman , David Rhodes , Lucas Tanure , Richard Fitzgerald , Charles Keepax , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 047/173] ASoC: codecs: cs47l92: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:39 +0100 Message-Id: <20230315150745.67084-48-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1732; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=7W65udiMT++suVj7HEvJGpWPs+cM2yMQTO8Yepg0vsc=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd20oQoTAIgiR/PAZuZBjHKEp1UKUPsaCCiIK Iklf3U892iJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdtAAKCRDB/BR4rcrs CRTpB/0ekzfgAJlviO6ILTiLlgwYKG6SmmEgE1QIfzBA/+ad56Y9fzxqwKwnyqiHJNuOzzw3mrr oQPU8b3rGQ5jOTvmujw4efbHbIE4IWBWCZ/rgR/YnEDXWStFxezUSq1dhLKyPlcdsl82ZAEtv09 HK/WIrawfT53Vizl38oj5xTUUb+NY8VeDTWxWtBrkR967cO4o33Rpfgph8+iPWO0R+BZLuuapHJ TycTkSZmfeLTKh5XpYm4zUSbajB3xDD4AahROux6ho/TYTRSnmO1E9RE6buHvkaH3Q3BueSaxZi 2H1iEX3/zTWk1G+ET4MixUEZixqPpa0kujv+ad5opWil/TZ/ X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: HQTABUOIL7PSGNIAQ6KDZY3A7Y6VPJRW X-Message-ID-Hash: HQTABUOIL7PSGNIAQ6KDZY3A7Y6VPJRW X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, patches@opensource.cirrus.com, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax --- sound/soc/codecs/cs47l92.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/cs47l92.c b/sound/soc/codecs/cs47l92.c index fe576d64e089..bc4d311d4778 100644 --- a/sound/soc/codecs/cs47l92.c +++ b/sound/soc/codecs/cs47l92.c @@ -2068,7 +2068,7 @@ static int cs47l92_probe(struct platform_device *pdev) return ret; } -static int cs47l92_remove(struct platform_device *pdev) +static void cs47l92_remove(struct platform_device *pdev) { struct cs47l92 *cs47l92 = platform_get_drvdata(pdev); @@ -2081,8 +2081,6 @@ static int cs47l92_remove(struct platform_device *pdev) madera_free_irq(cs47l92->core.madera, MADERA_IRQ_DSP_IRQ1, cs47l92); madera_core_free(&cs47l92->core); - - return 0; } static struct platform_driver cs47l92_codec_driver = { @@ -2090,7 +2088,7 @@ static struct platform_driver cs47l92_codec_driver = { .name = "cs47l92-codec", }, .probe = &cs47l92_probe, - .remove = &cs47l92_remove, + .remove_new = cs47l92_remove, }; module_platform_driver(cs47l92_codec_driver); From patchwork Wed Mar 15 15:05:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176107 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 40CD2C6FD1D for ; Wed, 15 Mar 2023 15:15:17 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3C9D512A9; Wed, 15 Mar 2023 16:14:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3C9D512A9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893315; bh=KU1xfjhHq+zCkX6+R5uusEZuFumtSMUlcQdAWocSlGY=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Ai9dNLjdyP2Smu9tb0QLQtoSrBZdoSYhk6lpoJaKLx+p4cV7VJJxqrAAMFNUUZTNG sK75h4xWxb1CTq1T7zndynS/PfCASY71NvgL1QkDlSqWunH03tROcdZey5TBwpbI4o 1DHxf3MmMgEUfgBmubbnzYySp/2IkwioYjxVN6co= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 8E376F805C5; Wed, 15 Mar 2023 16:09:43 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C6A4AF805F6; Wed, 15 Mar 2023 16:08:38 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DFD71F80553 for ; Wed, 15 Mar 2023 16:08:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DFD71F80553 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjY-0007Up-8s; Wed, 15 Mar 2023 16:08:08 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjX-004KXE-Ld; Wed, 15 Mar 2023 16:08:07 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjX-0057eu-14; Wed, 15 Mar 2023 16:08:07 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax Subject: [PATCH 048/173] ASoC: codecs: inno_rk3036: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:40 +0100 Message-Id: <20230315150745.67084-49-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1754; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=KU1xfjhHq+zCkX6+R5uusEZuFumtSMUlcQdAWocSlGY=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd23WszcQEFjJkN7Qv7VFQ/C42HKLTLY8MBgm 62d4R0+MkmJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdtwAKCRDB/BR4rcrs CdnNB/9/CEAPTjP2j28JDme5Sp7cooiikaxeUZeXCPmfLKmEVd3E4gkRLuM/FDARlatx3U4JGn3 sMTmLQGuRV82BMgVcJB9DG+SeyHyOYEI1qoQ390O307CUPlp9PTpV7yjIElg9MExqmWmOhjPRr/ An8/d+Ic92elkIRXswOxYI+/8IntjIroYOHP8QNsO3tqo7uk9RaedK0b+5nXgdZVggmihWKeqZ4 Oc86iOQCcdJBKaBA784+H9EoYyE5eE46sBc8Sg0mqxH8YSrt4hNey++lX3wDuAaM+9Ir4coRiOT +xyxIo7/TwCHUKeN1xWIzkW1tJKKlMIf1EjEKfdx80kG2Rog X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 63VEV5IHLK7KIMFYEBRWGSJ77AETXCSA X-Message-ID-Hash: 63VEV5IHLK7KIMFYEBRWGSJ77AETXCSA X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: <> List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/codecs/inno_rk3036.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/inno_rk3036.c b/sound/soc/codecs/inno_rk3036.c index 8222cde6e3b9..11320423c69c 100644 --- a/sound/soc/codecs/inno_rk3036.c +++ b/sound/soc/codecs/inno_rk3036.c @@ -457,13 +457,11 @@ static int rk3036_codec_platform_probe(struct platform_device *pdev) return ret; } -static int rk3036_codec_platform_remove(struct platform_device *pdev) +static void rk3036_codec_platform_remove(struct platform_device *pdev) { struct rk3036_codec_priv *priv = dev_get_drvdata(&pdev->dev); clk_disable_unprepare(priv->pclk); - - return 0; } static const struct of_device_id rk3036_codec_of_match[] __maybe_unused = { @@ -478,7 +476,7 @@ static struct platform_driver rk3036_codec_platform_driver = { .of_match_table = of_match_ptr(rk3036_codec_of_match), }, .probe = rk3036_codec_platform_probe, - .remove = rk3036_codec_platform_remove, + .remove_new = rk3036_codec_platform_remove, }; module_platform_driver(rk3036_codec_platform_driver); From patchwork Wed Mar 15 15:05:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176129 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7942FC61DA4 for ; Wed, 15 Mar 2023 15:21:09 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 642F61232; Wed, 15 Mar 2023 16:20:17 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 642F61232 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893667; bh=vVhfKYChdGCpFoV8VXoZDbmT40JDxWXqp+ADtV9wJyg=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=NORbeMBLEWKWd1xSsBxoOvgWVUcXOz4z+2Y/kB+qwqwgp3eWUOHi+fEywCeLQWyC9 8UzdbvvQwDayHEgVg7FiP+DOU0t+Bz/tgU9LWhysYrzNKVUQp/q4NUDuTo0oBJLGN3 /CrN1yBpFR4ZeJux611G8epF0m/nZFlCBdVE2Dkk= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E4896F8062D; Wed, 15 Mar 2023 16:11:14 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 678E2F80589; Wed, 15 Mar 2023 16:09:00 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5BC72F8058C for ; Wed, 15 Mar 2023 16:08:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5BC72F8058C Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjY-0007V4-Qz; Wed, 15 Mar 2023 16:08:08 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjX-004KXO-UG; Wed, 15 Mar 2023 16:08:07 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjX-0057ez-7c; Wed, 15 Mar 2023 16:08:07 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 049/173] ASoC: codecs: lpass-rx-macro: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:41 +0100 Message-Id: <20230315150745.67084-50-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1723; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=vVhfKYChdGCpFoV8VXoZDbmT40JDxWXqp+ADtV9wJyg=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd261Dtpx4y4uMJt9VRAdaq/Cwj3PAEuvCP4E Xx6kk2FzU2JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdugAKCRDB/BR4rcrs CRxNB/9n9hOfbGKJv7Nlk/mA1raV+A3+dA0VorP057qctps1egGvJX96qUvHq18LheZB+UlsaPw pVRVv4ICylNfQTIcGnCIwzqoph0wDVa1O1ukV06gxFW+HWOuQHB2PTSWzGZYKQilpD3s0z8FhpB +m/WTDSOKbcr1r9X4yU4Dl1VJiLneYK3QkSmOwoxEEagDjIhzBGVNUJBgseYKvcuRLIdCAfWz7o vaor693vxiS5TeBtTBdRMyCzSaD67fHAIjSh5nQsHIr8qgTcN2rtzKyee1sGpSu1DxOo0R8mEJv Ac40ZkT+jPFTgDaUFM+5Ci39MuWp9AdkcPpCx+pW5IOmEB9a X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: CAISTKNQGZM2A3G4ML6XC64C4PBQCXGT X-Message-ID-Hash: CAISTKNQGZM2A3G4ML6XC64C4PBQCXGT X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/codecs/lpass-rx-macro.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c index a73a7d7a1c0a..9e0a4e8a46c3 100644 --- a/sound/soc/codecs/lpass-rx-macro.c +++ b/sound/soc/codecs/lpass-rx-macro.c @@ -3639,7 +3639,7 @@ static int rx_macro_probe(struct platform_device *pdev) return ret; } -static int rx_macro_remove(struct platform_device *pdev) +static void rx_macro_remove(struct platform_device *pdev) { struct rx_macro *rx = dev_get_drvdata(&pdev->dev); @@ -3650,8 +3650,6 @@ static int rx_macro_remove(struct platform_device *pdev) clk_disable_unprepare(rx->dcodec); lpass_macro_pds_exit(rx->pds); - - return 0; } static const struct of_device_id rx_macro_dt_match[] = { @@ -3723,7 +3721,7 @@ static struct platform_driver rx_macro_driver = { .pm = &rx_macro_pm_ops, }, .probe = rx_macro_probe, - .remove = rx_macro_remove, + .remove_new = rx_macro_remove, }; module_platform_driver(rx_macro_driver); From patchwork Wed Mar 15 15:05:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176121 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CD753C6FD1D for ; Wed, 15 Mar 2023 15:19:00 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E232212CD; Wed, 15 Mar 2023 16:18:08 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E232212CD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893539; bh=mFvkIcFN4FuZoyt7/T0UfkiuDrS1wyOZqQq1Iq+y7J8=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=e12TmyTuZr/rssbaaZrPU+4m87Vzo6xf9oLccGW29nP0e6ZJ12/GYvkDNXyquOKnS qhe04ZgyVRJHEtvw+S79JBbUKRgvOo7vsgBhOSO1VH0wvesxyFjwkJUAoCRCZUrr6s +Fb9MDkVYIcFTwiOrxk1BYA4zLSGm0eGmViG3Ntk= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 53C71F8060C; Wed, 15 Mar 2023 16:10:42 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B2598F80652; Wed, 15 Mar 2023 16:08:53 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 68770F804FE for ; Wed, 15 Mar 2023 16:08:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 68770F804FE Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjY-0007Vc-SN; Wed, 15 Mar 2023 16:08:08 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjY-004KXV-7N; Wed, 15 Mar 2023 16:08:08 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjX-0057f3-FD; Wed, 15 Mar 2023 16:08:07 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 050/173] ASoC: codecs: lpass-tx-macro: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:42 +0100 Message-Id: <20230315150745.67084-51-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1736; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=mFvkIcFN4FuZoyt7/T0UfkiuDrS1wyOZqQq1Iq+y7J8=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd292QriMI/8GNGHyDzetxPiSptb6GKhIV7h2 VeXj06BG92JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdvQAKCRDB/BR4rcrs CU7LB/9kA8x+elzgwnSgCH8w3XCV6VKpLqMooJMWr15cTmiA3RgFKB8YPKjIdi4JloDI94qgwY2 /edAUic8ABTDauGLvX5RxNL3ou+r1k27zV21oJkEa3brvjnGpE3QA5CZy1GJ7JZD9naPPsUa3gf ALYRrnM9LP7HAKwMqzzL2ihEpdcKE0Z/aFdpQj0wimmCYtlwaurUQnAbFqsVDqgUpKE6ASAP71c vPP1YOjRlVF4A1xlttHl4H9MoqcC3pL110x4XQlfZHoI+H+bV064F8m/FDAKvSHFo7mxgXCd4j2 XNoWoNgneFOwep4adwfbhJ7c8MSNc06U14+VO4AF6nkZHwuW X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: OKULGIT7EX5BXDRCA43FTWVCMQD44DRV X-Message-ID-Hash: OKULGIT7EX5BXDRCA43FTWVCMQD44DRV X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/codecs/lpass-tx-macro.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c index bf27bdd5be20..60c207a4f9ee 100644 --- a/sound/soc/codecs/lpass-tx-macro.c +++ b/sound/soc/codecs/lpass-tx-macro.c @@ -2075,7 +2075,7 @@ static int tx_macro_probe(struct platform_device *pdev) return ret; } -static int tx_macro_remove(struct platform_device *pdev) +static void tx_macro_remove(struct platform_device *pdev) { struct tx_macro *tx = dev_get_drvdata(&pdev->dev); @@ -2086,8 +2086,6 @@ static int tx_macro_remove(struct platform_device *pdev) clk_disable_unprepare(tx->fsgen); lpass_macro_pds_exit(tx->pds); - - return 0; } static int __maybe_unused tx_macro_runtime_suspend(struct device *dev) @@ -2159,7 +2157,7 @@ static struct platform_driver tx_macro_driver = { .pm = &tx_macro_pm_ops, }, .probe = tx_macro_probe, - .remove = tx_macro_remove, + .remove_new = tx_macro_remove, }; module_platform_driver(tx_macro_driver); From patchwork Wed Mar 15 15:05:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176124 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9B12BC6FD1D for ; Wed, 15 Mar 2023 15:19:51 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3B86112C5; Wed, 15 Mar 2023 16:18:59 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3B86112C5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893589; bh=NzNDm/HojukvVqZFqRi5AV29oj3+cF2D9GfAu+OQLyU=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=gt07v+peMSjRIVsl25lNAoODNyQjCpW3HfsynuEvoHNDwm4dCDGiqCqwABX/DZk4+ 6eM2RWfy2ftUqfRd/xpc3UFqdd8l7A9+iIRTrjxljrX6Li/dtLerzOzlHIFiZVdgZA X8eKqguKtYBFDACyaiwWqBktB4K55w9avYJQMAvo= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 557BEF8061E; Wed, 15 Mar 2023 16:10:55 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1F38FF80651; Wed, 15 Mar 2023 16:08:56 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 87B89F8057B for ; Wed, 15 Mar 2023 16:08:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 87B89F8057B Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjY-0007Vl-W9; Wed, 15 Mar 2023 16:08:09 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjY-004KXZ-Bd; Wed, 15 Mar 2023 16:08:08 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjX-0057f6-LX; Wed, 15 Mar 2023 16:08:07 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 051/173] ASoC: codecs: lpass-va-macro: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:43 +0100 Message-Id: <20230315150745.67084-52-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1736; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=NzNDm/HojukvVqZFqRi5AV29oj3+cF2D9GfAu+OQLyU=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd3ABWfMOyarl2u4EcT06HoSow/WP20EIrIQ8 JKbbr4644+JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdwAAKCRDB/BR4rcrs CSx5CACHonlMiasUul/4T3O4Hg2D3CT8c3cqts0I38Ok3TMXDHi6NhJzP8f1PCU3RYokizXYEAG 56MUVp79IedUbDNYtfEwau+dUh5ix9Cxhf5ec6l3tVfStGBhc+iCgvvY5NFqha38kt5Nd/zyQpX 10i0o8ZB/JBQJ6uY/HJvyVuj5dpkiFwT4emUCp7lnjcWScHGY2FUTNkSVhM9v3C2/L1ba40usXn NWpPZlVsA588BqZLPpA9pcDOg4nt+EPXAnAaYUrUKWGqzHomijhFhIU0USB4WGdFaRGUIyF1Wp9 sJYoF6mW67KdYFqCCawRn3YdWHiY1NlIUwxFOsjbnKkSWy1S X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 2YISMIAG6XCWMLBXFERBHENJSYFAKZQ5 X-Message-ID-Hash: 2YISMIAG6XCWMLBXFERBHENJSYFAKZQ5 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/codecs/lpass-va-macro.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c index fd62817d29a0..74724448da50 100644 --- a/sound/soc/codecs/lpass-va-macro.c +++ b/sound/soc/codecs/lpass-va-macro.c @@ -1575,7 +1575,7 @@ static int va_macro_probe(struct platform_device *pdev) return ret; } -static int va_macro_remove(struct platform_device *pdev) +static void va_macro_remove(struct platform_device *pdev) { struct va_macro *va = dev_get_drvdata(&pdev->dev); @@ -1584,8 +1584,6 @@ static int va_macro_remove(struct platform_device *pdev) clk_disable_unprepare(va->macro); lpass_macro_pds_exit(va->pds); - - return 0; } static int __maybe_unused va_macro_runtime_suspend(struct device *dev) @@ -1639,7 +1637,7 @@ static struct platform_driver va_macro_driver = { .pm = &va_macro_pm_ops, }, .probe = va_macro_probe, - .remove = va_macro_remove, + .remove_new = va_macro_remove, }; module_platform_driver(va_macro_driver); From patchwork Wed Mar 15 15:05:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176131 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9A36FC61DA4 for ; Wed, 15 Mar 2023 15:21:40 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C509D128D; Wed, 15 Mar 2023 16:20:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C509D128D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893698; bh=by8qx03h3TGleJvhG5+p1Sd5fmkk0BNafWCKwDhfuzM=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=adyNGBn/xLjnfdxnFTrEA/GagIEbobnV/zQ7kbGqAMRdzqGgP+5JBoyBf/5+jP+Oi 1910UUrXM1Q89kNT5+zOnbp5zC3oNp1h/nbBFT/0oIYOm5frsGQKENIFdhAo9rKoBj U56kqRTXjVVFji/fEDFyJJS2W+KvFncZeu7LV9bo= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7FC5FF80633; Wed, 15 Mar 2023 16:11:19 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B0CC1F8059F; Wed, 15 Mar 2023 16:09:02 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 72685F80587 for ; Wed, 15 Mar 2023 16:08:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 72685F80587 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjZ-0007WE-HC; Wed, 15 Mar 2023 16:08:09 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjY-004KXf-O3; Wed, 15 Mar 2023 16:08:08 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjX-0057fA-Su; Wed, 15 Mar 2023 16:08:07 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 052/173] ASoC: codecs: lpass-wsa-macro: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:44 +0100 Message-Id: <20230315150745.67084-53-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1779; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=by8qx03h3TGleJvhG5+p1Sd5fmkk0BNafWCKwDhfuzM=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd3DhKkXY3rYABT/nGOpcy+e27jw+uBDWOUvS UoGf0Igc/aJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdwwAKCRDB/BR4rcrs CQkJB/43tT8/tfohAzTiRJSYLkw0QpVBhMNJjoZqQ8Dm+tMD1bP4wyfNvPCtbTZsfEYwbJ1TkC/ XHAfw+Xuml5r2h1Po1MZNWXnKk8qMKX1H7Y2R2MT3wScbrM+6AGJTRe1mYsxBfV5GOSuKgVysOR dEPJmRxP0nC6fMY04up2q2l+fBJHngvuhEZoCn5CPKJCC7IvWw2hLpY194zQfk7LWfGBasGWEVz C65xp6QXEszYdI6AbVmLNSxB79NlAlFf9zpFwjqFeBalEjbaFdtPgx+F3ZNQx8Xl6U28x/cnO+x Y/tiP1C3/Xbuy4NyArlDtAa86qQNV3mEaBEWooL/iySCfEGu X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: YVB23K3CH5HE6IMZYBSSEQG7GBUGGO5H X-Message-ID-Hash: YVB23K3CH5HE6IMZYBSSEQG7GBUGGO5H X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/codecs/lpass-wsa-macro.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c index ba7480f3831e..728f26d12ab0 100644 --- a/sound/soc/codecs/lpass-wsa-macro.c +++ b/sound/soc/codecs/lpass-wsa-macro.c @@ -2486,7 +2486,7 @@ static int wsa_macro_probe(struct platform_device *pdev) } -static int wsa_macro_remove(struct platform_device *pdev) +static void wsa_macro_remove(struct platform_device *pdev) { struct wsa_macro *wsa = dev_get_drvdata(&pdev->dev); @@ -2495,8 +2495,6 @@ static int wsa_macro_remove(struct platform_device *pdev) clk_disable_unprepare(wsa->mclk); clk_disable_unprepare(wsa->npl); clk_disable_unprepare(wsa->fsgen); - - return 0; } static int __maybe_unused wsa_macro_runtime_suspend(struct device *dev) @@ -2568,7 +2566,7 @@ static struct platform_driver wsa_macro_driver = { .pm = &wsa_macro_pm_ops, }, .probe = wsa_macro_probe, - .remove = wsa_macro_remove, + .remove_new = wsa_macro_remove, }; module_platform_driver(wsa_macro_driver); From patchwork Wed Mar 15 15:05:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176125 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BE60BC6FD1D for ; Wed, 15 Mar 2023 15:20:04 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id CA8EE12E8; Wed, 15 Mar 2023 16:19:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CA8EE12E8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893602; bh=Y9/ywlnTgqNKTLchH8T9XAPtwQIwm194Y4H+j5YQEqc=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=cljG0yjsqITPFDRuMOB7Mu+BQ8wLk+SDQGkEFsIqcEIBbL88BCif/T2Aqtg78gTDM 93TSqEZ9azs8aIX1dQnU8YsiwaSfPA0vNjCX1NdeI2oEnT2KRpkdQgvSQeVeo/NxOf d8VPi/A6AlTVp3AdQIDHDMtSpj7WaoFgOMNdJWlA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 563BAF8061F; Wed, 15 Mar 2023 16:10:59 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C07E0F8057F; Wed, 15 Mar 2023 16:08:56 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E7538F8057A for ; Wed, 15 Mar 2023 16:08:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E7538F8057A Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjZ-0007Wq-Pb; Wed, 15 Mar 2023 16:08:09 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjZ-004KXm-3a; Wed, 15 Mar 2023 16:08:09 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjY-0057fF-2i; Wed, 15 Mar 2023 16:08:08 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 053/173] ASoC: codecs: msm8916-wcd-analog: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:45 +0100 Message-Id: <20230315150745.67084-54-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1806; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Y9/ywlnTgqNKTLchH8T9XAPtwQIwm194Y4H+j5YQEqc=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd3GMS+x0EhcvYyueftmJmtkGa/n/BJ/3kCOW 7aLKkqcYzqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdxgAKCRDB/BR4rcrs CctjB/46yz1Drz4KKqQIX1BwiyH3MwpBoqS8HCDYOLrfBhovuw6Di5AbEKAMpcrMkUCeNITRqAy 0CamLjHar04n25/fK//SFoM16yTDJnEI5xEOeS1xyntN0EzlA6cc4HeC3ZgpRXQp1Dr54dzmxwv 8XlDGfCG+UUrXtENyJxDhVO66ouPKAh//TOK9ujG3Ni2r8sdIn3XEwkB6uJKDTDU3g85jt42NDX dXQ63tnjX45nXuWryLBclwnsGOF7KJ3fTmN88D3VdT3lZOP1INlqFywf5ivfJJSYgGujkaqXtxj HxzyarxbOYUv5o82qfg0XKfyPK41KMDkhE1Pq1Tg8cBAuM9q X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: ZEOFN4LNOP57DBG5HZMFYRW3X4XJRUX5 X-Message-ID-Hash: ZEOFN4LNOP57DBG5HZMFYRW3X4XJRUX5 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/codecs/msm8916-wcd-analog.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c index 78e543eb3c83..cec90cf920ff 100644 --- a/sound/soc/codecs/msm8916-wcd-analog.c +++ b/sound/soc/codecs/msm8916-wcd-analog.c @@ -1276,13 +1276,11 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev) return ret; } -static int pm8916_wcd_analog_spmi_remove(struct platform_device *pdev) +static void pm8916_wcd_analog_spmi_remove(struct platform_device *pdev) { struct pm8916_wcd_analog_priv *priv = dev_get_drvdata(&pdev->dev); clk_disable_unprepare(priv->mclk); - - return 0; } static const struct of_device_id pm8916_wcd_analog_spmi_match_table[] = { @@ -1298,7 +1296,7 @@ static struct platform_driver pm8916_wcd_analog_spmi_driver = { .of_match_table = pm8916_wcd_analog_spmi_match_table, }, .probe = pm8916_wcd_analog_spmi_probe, - .remove = pm8916_wcd_analog_spmi_remove, + .remove_new = pm8916_wcd_analog_spmi_remove, }; module_platform_driver(pm8916_wcd_analog_spmi_driver); From patchwork Wed Mar 15 15:05:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176134 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DC69CC61DA4 for ; Wed, 15 Mar 2023 15:22:29 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 94FBF1295; Wed, 15 Mar 2023 16:21:37 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 94FBF1295 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893747; bh=ueRLfq7zDXFW2TvGzuKTVn84yuV4EQj5F21mMX8Xhlo=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=IxHIFm2ax5ZbqmFUmvdO/cWQ5rp4OTCYKgYAtJQgoMI1TZbUnG5qrkakUxxUvdXRU Xtqf8hV+uJmhmoqdWbnEog1W/gj+BBRaGoZVsw8pN86sdQkGXTLIQMsjWEiXFABtLl Mv1T+77ANxn67DMtgz4XsTcR7mlFyT3vapCPZH/k= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7DFDDF80674; Wed, 15 Mar 2023 16:11:29 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id AF9ADF80651; Wed, 15 Mar 2023 16:09:05 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 98F93F805A8 for ; Wed, 15 Mar 2023 16:08:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 98F93F805A8 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjb-0007Z7-99; Wed, 15 Mar 2023 16:08:11 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSja-004KY0-F0; Wed, 15 Mar 2023 16:08:10 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjY-0057fI-Af; Wed, 15 Mar 2023 16:08:08 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 054/173] ASoC: codecs: msm8916-wcd-digital: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:46 +0100 Message-Id: <20230315150745.67084-55-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1823; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=ueRLfq7zDXFW2TvGzuKTVn84yuV4EQj5F21mMX8Xhlo=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd3KpYRkZhznXZ6/UqWo5z1KlgkQE1IOOO3CJ lea/WxNxLGJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHdygAKCRDB/BR4rcrs CR/qB/9nMoBeLOdKBbsSfq07OGCTovI6ibuFVXajf60uCyYO058OpKcAhhbkJ3eW6Xk5o+qr+jh 5FNCp2Lc2T5rKH/UKbkcK4JGSqrg96oZ8bfXMGQTkgVSv76inlEPXuW09epgWdU648/UoC12HfL AK7kbY8Ug2Sv38CZxoC6gmZ/Iy4EO12VUaA5Nbpt8mYKWCsWh4kIsZReXz5tkE5pShLoEZBTtZR 0NiqtkZT+6TsrV7VFRiaZKcriLihXeel4iuKBMd+9ckWuZw7IZorFiyKbnYN3fgeAZTkiAEYepU LUhxfTQ8JNC9APkBLa7XXmnwfhQU9OW7D5PxaWZ3ZCV1PkAu X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: JH2OVJY225WYNIRADZL44LWIASUZSMO7 X-Message-ID-Hash: JH2OVJY225WYNIRADZL44LWIASUZSMO7 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/codecs/msm8916-wcd-digital.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/msm8916-wcd-digital.c b/sound/soc/codecs/msm8916-wcd-digital.c index d490a0f18675..978c4d056e81 100644 --- a/sound/soc/codecs/msm8916-wcd-digital.c +++ b/sound/soc/codecs/msm8916-wcd-digital.c @@ -1220,14 +1220,12 @@ static int msm8916_wcd_digital_probe(struct platform_device *pdev) return ret; } -static int msm8916_wcd_digital_remove(struct platform_device *pdev) +static void msm8916_wcd_digital_remove(struct platform_device *pdev) { struct msm8916_wcd_digital_priv *priv = dev_get_drvdata(&pdev->dev); clk_disable_unprepare(priv->mclk); clk_disable_unprepare(priv->ahbclk); - - return 0; } static const struct of_device_id msm8916_wcd_digital_match_table[] = { @@ -1243,7 +1241,7 @@ static struct platform_driver msm8916_wcd_digital_driver = { .of_match_table = msm8916_wcd_digital_match_table, }, .probe = msm8916_wcd_digital_probe, - .remove = msm8916_wcd_digital_remove, + .remove_new = msm8916_wcd_digital_remove, }; module_platform_driver(msm8916_wcd_digital_driver); From patchwork Wed Mar 15 15:05:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176137 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 59055C6FD1D for ; Wed, 15 Mar 2023 15:23:12 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5B9F612EC; Wed, 15 Mar 2023 16:22:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5B9F612EC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893790; bh=fgDecm64+2F7WtQICliUo5o+nkIKkgB3qYvC5L8d6fk=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=aZm3wdbCLMSWsTYl7ozlbsKAPBxU3i5EXWrYgPxEpkQH4K3zn9RHtP6t8jay8p4KH dFgfHkH4r5T/bww21rIXHUedzlEh7JPanHPWWAs2ylopFSpZQ54lIO0MnfhfdwUd1a z7iwIBUIYLqwUIqtWoG3KY4WZEXkpU96x1fNGPis= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 4CC97F80677; Wed, 15 Mar 2023 16:11:39 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 65EC1F80655; Wed, 15 Mar 2023 16:09:10 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B65BDF805AB for ; Wed, 15 Mar 2023 16:08:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B65BDF805AB Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjb-0007Zi-GK; Wed, 15 Mar 2023 16:08:11 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSja-004KYA-Nd; Wed, 15 Mar 2023 16:08:10 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjY-0057fN-IH; Wed, 15 Mar 2023 16:08:08 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Miaoqian Lin , Charles Keepax Subject: [PATCH 055/173] ASoC: codecs: rk817_codec: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:47 +0100 Message-Id: <20230315150745.67084-56-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1644; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=fgDecm64+2F7WtQICliUo5o+nkIKkgB3qYvC5L8d6fk=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd3RaXRkKo4UIxwCWpz1OD3QXt9EN84rUJBiJ Pkee03pj5uJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHd0QAKCRDB/BR4rcrs CYhaB/92CnQ/vXRqMNdOkyWpMz8Hr62899WD6UBXkGn1i9+50jXwsblOexWpBCRCSUg/4Nq5fYH xu8hOm5GzhseHaOh+uhDqsKJZY8JGPw4/uvlTIuxCY2fDYiKE72XxZIqLxHMs+bA4TQmKwPRf3T F1EW9S31ydd1BVtPKfxFoOHSS0ToL1R3Yga2h4X7LkRyJ/xl1ZmvmHhOeSG0BeJfTt6+Hk5NFcW IS1+SW+7njFvVRs5d24ZijSo1M0ZRAMxd/BZCIJSX877TpXHOPjLTFb0/nYaaho3AceDMybC5EH afgUNiU7lQP68S2+cawnWPeTeVZsV0KMV0dPvk7AOsXnNflF X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: CMXITKFNOU7MFZ4ZVIF6OK2GTNCN26ZJ X-Message-ID-Hash: CMXITKFNOU7MFZ4ZVIF6OK2GTNCN26ZJ X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/codecs/rk817_codec.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/rk817_codec.c b/sound/soc/codecs/rk817_codec.c index 2a5b274bfc0f..d4da98469f8b 100644 --- a/sound/soc/codecs/rk817_codec.c +++ b/sound/soc/codecs/rk817_codec.c @@ -518,13 +518,11 @@ static int rk817_platform_probe(struct platform_device *pdev) return ret; } -static int rk817_platform_remove(struct platform_device *pdev) +static void rk817_platform_remove(struct platform_device *pdev) { struct rk817_codec_priv *rk817 = platform_get_drvdata(pdev); clk_disable_unprepare(rk817->mclk); - - return 0; } static struct platform_driver rk817_codec_driver = { @@ -532,7 +530,7 @@ static struct platform_driver rk817_codec_driver = { .name = "rk817-codec", }, .probe = rk817_platform_probe, - .remove = rk817_platform_remove, + .remove_new = rk817_platform_remove, }; module_platform_driver(rk817_codec_driver); From patchwork Wed Mar 15 15:05:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176138 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 46380C61DA4 for ; Wed, 15 Mar 2023 15:23:30 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2F4F512AB; Wed, 15 Mar 2023 16:22:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2F4F512AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893808; bh=TW+/qJJe5JmkkUUPf6UQS27dBL3ATFINFgKH+yUaj08=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=aJz0vIosWdn3cU/3IeuDKZKzNdt8CVu6TeoiZ/531d5JZN8uj6ke3AjiM1FFlppV7 oh4c4W+x/m3dEekKKibZFLEo7A1np753xptOwsdIrFKughumBXIFb6qppN5dnAb4TH ybYTCIK4Qx3xRaU6P+QHJTUtMjYenLNNFD5uHU+c= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7B818F80684; Wed, 15 Mar 2023 16:11:41 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 89457F80655; Wed, 15 Mar 2023 16:09:11 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C23C0F80527 for ; Wed, 15 Mar 2023 16:08:16 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C23C0F80527 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjb-0007ZQ-EC; Wed, 15 Mar 2023 16:08:11 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSja-004KY6-Kz; Wed, 15 Mar 2023 16:08:10 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjY-0057fQ-ON; Wed, 15 Mar 2023 16:08:08 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Colin Ian King , Aidan MacDonald Subject: [PATCH 056/173] ASoC: codecs: wcd938x: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:48 +0100 Message-Id: <20230315150745.67084-57-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1557; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=TW+/qJJe5JmkkUUPf6UQS27dBL3ATFINFgKH+yUaj08=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd3VSE/CeAckhT5GzodvmOKgHr5OaH1fJT7LN j4nOyG9+h6JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHd1QAKCRDB/BR4rcrs CaCTCACMCwalE2FEPBxZYm09Hw3trCsoYtlsMLqo0UGCDHrsB76U5uxh9bVN7x5A6aytMcoD4L7 tPZr8i0qYrEtqpO6ZFYcwwMq/I79EH3KC9l49MPo4+CKeqLqty/C6OU1BqnvGkOoMO5HIDib52C D43C71M8KiF51IoszAvlSYKYBpeHnXzzFkhm6zVKatPa6sqGzqwcTSvgO7GkhGA8v4N/4LNtImZ GX7voA5HwJykabn7tgFQHy956aZkTYiriC7035r70YtSyAqXuhMJiYRQ7pCURW/R8lihoaKTO+8 neXh6oe9nHz+0jAKzviRztp2f37fRyrSddYjzsd4WMR1rUgn X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: RQO5CQ6QN7EHU4WHBCD3IE62YQQ5MMEV X-Message-ID-Hash: RQO5CQ6QN7EHU4WHBCD3IE62YQQ5MMEV X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/codecs/wcd938x.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index fcac763b04d1..f033f79ed238 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -4529,11 +4529,9 @@ static int wcd938x_probe(struct platform_device *pdev) return 0; } -static int wcd938x_remove(struct platform_device *pdev) +static void wcd938x_remove(struct platform_device *pdev) { component_master_del(&pdev->dev, &wcd938x_comp_ops); - - return 0; } #if defined(CONFIG_OF) @@ -4547,7 +4545,7 @@ MODULE_DEVICE_TABLE(of, wcd938x_dt_match); static struct platform_driver wcd938x_codec_driver = { .probe = wcd938x_probe, - .remove = wcd938x_remove, + .remove_new = wcd938x_remove, .driver = { .name = "wcd938x_codec", .of_match_table = of_match_ptr(wcd938x_dt_match), From patchwork Wed Mar 15 15:05:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176147 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5FAECC6FD1D for ; Wed, 15 Mar 2023 15:25:54 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 677981321; Wed, 15 Mar 2023 16:25:02 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 677981321 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893952; bh=l13I5jrhGds3caLy5Gkgbx0Pdgm2/RrdKTRpmuQWyqE=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=QwgC5YPOomieX+WTt6+VpetAGEYGDWtpVq/Tlazxy/gxXfIpHtMs+Vg3aDoqP317z bjo6rKiWwTA3r8DO5jnrlos7oatZW3drDDovQbcBY1dSw71HROCr+jIBlh51oyXZlS bd6LrfRvCaGkESdIUt288BWktBeI7ro7BCl102Pc= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D25E7F8063C; Wed, 15 Mar 2023 16:12:06 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 22FA8F8065C; Wed, 15 Mar 2023 16:09:24 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 238D0F805BB for ; Wed, 15 Mar 2023 16:08:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 238D0F805BB Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSja-0007Ym-T1; Wed, 15 Mar 2023 16:08:10 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSja-004KXv-6U; Wed, 15 Mar 2023 16:08:10 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjZ-0057fU-11; Wed, 15 Mar 2023 16:08:09 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Zhang Qilong Subject: [PATCH 057/173] ASoC: codecs: wm5102: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:49 +0100 Message-Id: <20230315150745.67084-58-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1765; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=l13I5jrhGds3caLy5Gkgbx0Pdgm2/RrdKTRpmuQWyqE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd3Zcyh5Ff1r7TFe99tp6xST51i4YqDxJDequ Ydy66wZSyWJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHd2QAKCRDB/BR4rcrs CX4BCACSai0+KIGtrUk1+6dANd0wRRUbuTi5AoiQHVWUGb4XJ7Nyx7EXYDhrfz/xzBprFw+VXM8 EESOnAv/XEFIfylnKzq33mv3V37px3eSCQBGp6e84V9fq1eps/zXS9EWEVBsqO/JxFRmi0dj6Yl V6eSBLDljsGWX0YRj3oxnqxLBN5da4EqQ2gbgplQh5ZXDbJj5So2Ji49FMPrKa9iHh8J8LzBn4a gCUTnsoaqizhbcxFY6WOfCrTFkXIzFrdkzzZdckpzjC8yyEt7OKIUSw8mMHWi4vy2uqFZ8Teq/k iYkBxrEY5u3feidGYB2AWfMc+8kEEu19QTSe5eLGRNe2Cevr X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: G7XYPGGGMGLOFIXEKU4O5IW3PW7GETIO X-Message-ID-Hash: G7XYPGGGMGLOFIXEKU4O5IW3PW7GETIO X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: patches@opensource.cirrus.com, alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: <> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax --- sound/soc/codecs/wm5102.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index adaf886b0a9d..3bdbdf3770b5 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c @@ -2148,7 +2148,7 @@ static int wm5102_probe(struct platform_device *pdev) return ret; } -static int wm5102_remove(struct platform_device *pdev) +static void wm5102_remove(struct platform_device *pdev) { struct wm5102_priv *wm5102 = platform_get_drvdata(pdev); struct arizona *arizona = wm5102->core.arizona; @@ -2163,8 +2163,6 @@ static int wm5102_remove(struct platform_device *pdev) arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, wm5102); arizona_jack_codec_dev_remove(&wm5102->core); - - return 0; } static struct platform_driver wm5102_codec_driver = { @@ -2172,7 +2170,7 @@ static struct platform_driver wm5102_codec_driver = { .name = "wm5102-codec", }, .probe = wm5102_probe, - .remove = wm5102_remove, + .remove_new = wm5102_remove, }; module_platform_driver(wm5102_codec_driver); From patchwork Wed Mar 15 15:05:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176146 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AD786C6FD1D for ; Wed, 15 Mar 2023 15:25:35 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id ADC0012D8; Wed, 15 Mar 2023 16:24:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz ADC0012D8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893933; bh=5jL6O+ApFmtRfs3+b4ICx/fhDGO9uoeIVxFm54GS2pk=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=erHyRFC77trLLGa90WYgFv2ROzsSgyT/qWJJ+qGmkXs+kspwJBccg4nIArOws+s3e itS2YHK3Sa4LYeCaOjux6AoBJFrEPQwSzLFfIy+GMUgVhyuWGZsmUCJUJMvAfp9YS3 cvji14iIu1HLYQ+snr4/1/SYLOzKQ0WQYQqchSFo= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 455FAF806A5; Wed, 15 Mar 2023 16:12:04 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 26213F805B5; Wed, 15 Mar 2023 16:09:21 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 12957F805BA for ; Wed, 15 Mar 2023 16:08:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 12957F805BA Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjb-0007ZR-H1; Wed, 15 Mar 2023 16:08:11 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSja-004KY8-Lc; Wed, 15 Mar 2023 16:08:10 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjZ-0057fY-9B; Wed, 15 Mar 2023 16:08:09 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Zhang Qilong Subject: [PATCH 058/173] ASoC: codecs: wm5110: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:50 +0100 Message-Id: <20230315150745.67084-59-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1765; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=5jL6O+ApFmtRfs3+b4ICx/fhDGO9uoeIVxFm54GS2pk=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd3cPnhUnUJpUxH4UGvct4v9HhRCgnfitTkld bjDDpzfG0uJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHd3AAKCRDB/BR4rcrs CSXeB/sG68qgPHhfbNB3IWguDNsi67tqpCURO+KcQiK8nphijcJBwY1xrdSMZ7QNH9xqrfK4fW1 Er7FOnizw1/+2KzQyZDA/gWSbouIbii8O7OOa9rj0OVgvST9T6zMoaquE2OBzO9K9mbSUXJyARX QI7mx9n8jgDj10DBxvtLIvo0KEyKVWptcED7SXs3Y2acnBQBUVch5zjUvMRATJBtKQUkggAQsiF 1TMW9LF2/tMIL/SrDzR2OQSjOe3k72pLD8asbJ2Bxn/gf5+QlieeQqdA/FtHKxxq2a4CnnLWTOO HS07H8O5CDT3pn6R1ENRopkqVnaPOXXqk+9CBilJYDonYINj X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: FAHZ7BYSKHB6SABLD7ANLIAM4KZOMA3P X-Message-ID-Hash: FAHZ7BYSKHB6SABLD7ANLIAM4KZOMA3P X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: patches@opensource.cirrus.com, alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax --- sound/soc/codecs/wm5110.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index e0b971620d0f..ad670300de8d 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c @@ -2506,7 +2506,7 @@ static int wm5110_probe(struct platform_device *pdev) return ret; } -static int wm5110_remove(struct platform_device *pdev) +static void wm5110_remove(struct platform_device *pdev) { struct wm5110_priv *wm5110 = platform_get_drvdata(pdev); struct arizona *arizona = wm5110->core.arizona; @@ -2523,8 +2523,6 @@ static int wm5110_remove(struct platform_device *pdev) arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, wm5110); arizona_jack_codec_dev_remove(&wm5110->core); - - return 0; } static struct platform_driver wm5110_codec_driver = { @@ -2532,7 +2530,7 @@ static struct platform_driver wm5110_codec_driver = { .name = "wm5110-codec", }, .probe = wm5110_probe, - .remove = wm5110_remove, + .remove_new = wm5110_remove, }; module_platform_driver(wm5110_codec_driver); From patchwork Wed Mar 15 15:05:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176143 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CC08AC6FD1D for ; Wed, 15 Mar 2023 15:24:48 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 59A231329; Wed, 15 Mar 2023 16:23:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 59A231329 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893886; bh=P6/FN5pmayrY5xsPCXVGy0CqO6rObzGCLEanUtDVatU=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=kvA7gsLq9lIE5H2UI63Z/wqkBLVixGz6zBP6BKX+kKyoSBmpxu/02w/G8VA/p4dk9 lG9iFhtViKmZ+ETkiy4EX5wm55c9TF62p1Zyq4/FxRQibUEOpf/4Q6H5t5RKKen0/z JCoLCry68MnNc+0c7xtQXTaIWqik2rOmCT1DQMbs= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 03133F8069C; Wed, 15 Mar 2023 16:11:56 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 180FFF8065D; Wed, 15 Mar 2023 16:09:18 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 31288F80529 for ; Wed, 15 Mar 2023 16:08:19 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 31288F80529 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjc-0007ZG-4v; Wed, 15 Mar 2023 16:08:12 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSja-004KY3-Io; Wed, 15 Mar 2023 16:08:10 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjZ-0057fb-GF; Wed, 15 Mar 2023 16:08:09 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Marek Szyprowski Subject: [PATCH 059/173] ASoC: codecs: wm8994: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:51 +0100 Message-Id: <20230315150745.67084-60-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1467; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=P6/FN5pmayrY5xsPCXVGy0CqO6rObzGCLEanUtDVatU=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd3fBy2tC6E0FTTEu6TysZrodYqmgvXN8jpDk DRRcrYcGtSJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHd3wAKCRDB/BR4rcrs CYQxB/4vpv5dWZm0syhBfT2Y0T8Dge+aLId5XZD3mt0XV/bLbzFkbmRVIxeIdVxaWXNvK2zQMab iSzLjRepaFjLWFGx1GwP+Po0RN0rn1heIPP35GOpM8eANKRyBoGht8bMdotXIMDRwLSKxWlfeeL RXRhGTMkUvNqovlhs80bUU5ahrt+L3gYKhqXfUlMOiDQTrErp5FL+9YHPeiqtzgrLLUfLNlAX+e 3wDiLNCBrUj2Irz3mcRzecV8mSQLqZd0+G0FbfCeKsAj8Nhhdghx9KCTApuB9wXDh9GV4k9cHko MhyXEYSOH52xuv0cnke4JRjZRPIOXj8y0FoPyeVbd+CuxGbU X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: RQFL6VOVCAR5Z5NGB44EBI6GEFDBR5BN X-Message-ID-Hash: RQFL6VOVCAR5Z5NGB44EBI6GEFDBR5BN X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: patches@opensource.cirrus.com, alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax --- sound/soc/codecs/wm8994.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 8fe9a75d1235..bca3ebe0dac4 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -4657,11 +4657,9 @@ static int wm8994_probe(struct platform_device *pdev) return ret; } -static int wm8994_remove(struct platform_device *pdev) +static void wm8994_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -4701,7 +4699,7 @@ static struct platform_driver wm8994_codec_driver = { .pm = &wm8994_pm_ops, }, .probe = wm8994_probe, - .remove = wm8994_remove, + .remove_new = wm8994_remove, }; module_platform_driver(wm8994_codec_driver); From patchwork Wed Mar 15 15:05:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176156 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0FCE1C6FD1D for ; Wed, 15 Mar 2023 15:28:19 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 232E5136B; Wed, 15 Mar 2023 16:27:22 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 232E5136B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894092; bh=Xc0FoRlmMy5q9BpGXbbYv2eorEOfMw4JqM5O+cza9d0=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=L1euqIze4cLT2PNIq4hnv+8/QGB0qEgxLqhh8sXVuV9xzNsdz1JJWIMDfd9I5UAsQ DCMY9N/tsVkiNu/bT5Gq4O1UZRfqW1psqbooRG+PII5Lm8xYAgLrhXjXVnSBIrQ84k 4L3gJRvUGa7HJ7HkCNSstEpIYPWBfdEBLguxb370= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 17128F806D2; Wed, 15 Mar 2023 16:12:31 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 45F94F805C3; Wed, 15 Mar 2023 16:09:32 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EFE73F805C4 for ; Wed, 15 Mar 2023 16:08:21 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EFE73F805C4 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjc-0007cK-Dq; Wed, 15 Mar 2023 16:08:12 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjb-004KYK-CR; Wed, 15 Mar 2023 16:08:11 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjZ-0057fe-OU; Wed, 15 Mar 2023 16:08:09 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Zhang Qilong , Charles Keepax Subject: [PATCH 060/173] ASoC: codecs: wm8997: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:52 +0100 Message-Id: <20230315150745.67084-61-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1740; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Xc0FoRlmMy5q9BpGXbbYv2eorEOfMw4JqM5O+cza9d0=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd3itwiokqKOJvjpavBwhFqL1eOyOB7NsLBNn 9IT7qX1Y9GJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHd4gAKCRDB/BR4rcrs CeWKCACAdRYjWiutOSsgHDBQINCrFSVS5KP0NJE3eoAPSsWMdsQdV4WFdyUl4j7b6yn3LI4bwjg Lv1Sf/4tDbQu4NK0z/Ga3WQuz1UHLzql3rwYSrIjxswok6N/L2+vHU+XG1UhYu6ObS92dbzVc8z UQvbrQyfNWXZAfs6Mwavp2WqF3WXqso1BMeOYcwdfIbfNqjoOJ+fT2qYgPySiuRcg2EeTNttSEz UH5im80VJVr5JYn4x1Tsb3EdUJEuVYsXVyex0FoIRZudAcdR8roH2xNx1Ky1CF7FARP9Fx1PcSS 9Pfr4bImwBzwQ4Y1CBYqzwNAuuyvIne2KN6JBu06t6rxyuZg X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: XC62JXPFHKWLRKHAGNWCLD3CZ3ES2ZM4 X-Message-ID-Hash: XC62JXPFHKWLRKHAGNWCLD3CZ3ES2ZM4 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: patches@opensource.cirrus.com, alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax --- sound/soc/codecs/wm8997.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wm8997.c b/sound/soc/codecs/wm8997.c index c0207e9a7d53..87442840f0af 100644 --- a/sound/soc/codecs/wm8997.c +++ b/sound/soc/codecs/wm8997.c @@ -1193,7 +1193,7 @@ static int wm8997_probe(struct platform_device *pdev) return ret; } -static int wm8997_remove(struct platform_device *pdev) +static void wm8997_remove(struct platform_device *pdev) { struct wm8997_priv *wm8997 = platform_get_drvdata(pdev); struct arizona *arizona = wm8997->core.arizona; @@ -1203,8 +1203,6 @@ static int wm8997_remove(struct platform_device *pdev) arizona_free_spk_irqs(arizona); arizona_jack_codec_dev_remove(&wm8997->core); - - return 0; } static struct platform_driver wm8997_codec_driver = { @@ -1212,7 +1210,7 @@ static struct platform_driver wm8997_codec_driver = { .name = "wm8997-codec", }, .probe = wm8997_probe, - .remove = wm8997_remove, + .remove_new = wm8997_remove, }; module_platform_driver(wm8997_codec_driver); From patchwork Wed Mar 15 15:05:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176144 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 24D64C61DA4 for ; Wed, 15 Mar 2023 15:25:08 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id AB738128E; Wed, 15 Mar 2023 16:24:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AB738128E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893905; bh=OJN6ocPIfdwkw9ZG2j8EszGX5IAYtHE4EOfTG8VOv+A=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Dhz087lA2s/0DiknQuB12Yre7F/2cwqty9WzVAoqmjVW0lFQVUVHUaE+HF/2Xyjf0 Wha0wVra0NwU3IZtVRNCeFsbiGsffcpOyVIyRWERRUTTeyi+eKWVoNEN9wl0ThsR/k eHBTll70fStbvZVXTNlmJ7i/epWgEFkDXZ2wRirY= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D52D5F8069F; Wed, 15 Mar 2023 16:11:58 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CC312F8065C; Wed, 15 Mar 2023 16:09:18 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C67B2F805B4 for ; Wed, 15 Mar 2023 16:08:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C67B2F805B4 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjc-0007cL-LC; Wed, 15 Mar 2023 16:08:12 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjb-004KYL-CR; Wed, 15 Mar 2023 16:08:11 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSja-0057fh-4w; Wed, 15 Mar 2023 16:08:10 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax Subject: [PATCH 061/173] ASoC: codecs: wm8998: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:53 +0100 Message-Id: <20230315150745.67084-62-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1740; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=OJN6ocPIfdwkw9ZG2j8EszGX5IAYtHE4EOfTG8VOv+A=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd3lRIGnpTKW9XICzHUOJGISVHk7zXhREoyj/ eib3bkk0+CJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHd5QAKCRDB/BR4rcrs CeMGCACTqNRjllUB07rWCsojwr2ZsSXQzm3GvuL2vwNV/jX1DzbFSKpk4pG9KlhXD/ic8ATs7+u XxdU/Ms7ckXLlL3gRhE18x5VPDhvjsme9UW2iGro3Jjp7XVQmEAm6rAem2jMJjxZrLuj69/wVwh PcdKhhEBpV7b1+d6gtiN3Pfpn3oUEw6qdsRjMIO/96U6zZCP0hVdgUIdLvH8o7tGHT7SOXO9TwL hWx4PL9pkIxr7exlV0tkmO0Vm+5C9xLbo2dFLI4DRlrLwDYs56heVWCKLVuxnLAEAXOEcCkzLqm wSuw3+rq7iemImo36GBnKxe4IFmN/ZzFOaM+sDAbGQ/ymtHQ X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: H4MFIT5NGG5SAHHM4DF3774OOZLR3BVT X-Message-ID-Hash: H4MFIT5NGG5SAHHM4DF3774OOZLR3BVT X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: patches@opensource.cirrus.com, alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax --- sound/soc/codecs/wm8998.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wm8998.c b/sound/soc/codecs/wm8998.c index 79fc6bbaa3aa..3c2c4d12c08e 100644 --- a/sound/soc/codecs/wm8998.c +++ b/sound/soc/codecs/wm8998.c @@ -1409,7 +1409,7 @@ static int wm8998_probe(struct platform_device *pdev) return ret; } -static int wm8998_remove(struct platform_device *pdev) +static void wm8998_remove(struct platform_device *pdev) { struct wm8998_priv *wm8998 = platform_get_drvdata(pdev); struct arizona *arizona = wm8998->core.arizona; @@ -1419,8 +1419,6 @@ static int wm8998_remove(struct platform_device *pdev) arizona_free_spk_irqs(arizona); arizona_jack_codec_dev_remove(&wm8998->core); - - return 0; } static struct platform_driver wm8998_codec_driver = { @@ -1428,7 +1426,7 @@ static struct platform_driver wm8998_codec_driver = { .name = "wm8998-codec", }, .probe = wm8998_probe, - .remove = wm8998_remove, + .remove_new = wm8998_remove, }; module_platform_driver(wm8998_codec_driver); From patchwork Wed Mar 15 15:05:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176142 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AC3DAC61DA4 for ; Wed, 15 Mar 2023 15:24:32 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 832DB130F; Wed, 15 Mar 2023 16:23:40 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 832DB130F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893870; bh=ZJd+NqjGF6sjyp6Hxv+fUX3MgJu7y0CJa1wbdT9NG7A=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=eG6wj8kSLWcCYS0tm/Z+ZzxSpcjuNYEiApnqgi0qlM6tvU4QWklc9iZ3MSF8i79Ge JCpIQqhnlfkf9sh9R0xVK08fIcFqjTOQWaTphrBlLa5YmU0PWhSsDLFVQBpQz7vkG8 8+a1ONu4JGuA1ZXbwv8dOPlhqHDMobYpIkKVGhr4= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 9A047F8060B; Wed, 15 Mar 2023 16:11:53 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CF51EF8065B; Wed, 15 Mar 2023 16:09:16 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 09535F805B3 for ; Wed, 15 Mar 2023 16:08:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 09535F805B3 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjd-0007dc-5k; Wed, 15 Mar 2023 16:08:13 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjb-004KYW-K0; Wed, 15 Mar 2023 16:08:11 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSja-0057fl-BF; Wed, 15 Mar 2023 16:08:10 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax Subject: [PATCH 062/173] ASoC: dwc: dwc-i2s: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:54 +0100 Message-Id: <20230315150745.67084-63-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1677; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=ZJd+NqjGF6sjyp6Hxv+fUX3MgJu7y0CJa1wbdT9NG7A=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd3ocAxVmcoZAqObmU+fNwCrg7tH8S4Ui0vYI ptKgZLc/62JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHd6AAKCRDB/BR4rcrs CbmNCACNXJVzVagzgE97orbPkhtsIe+G9Ne33bdGt2t5r3/UDCr3ZfSBIGPPumA+EsnCoiX0Mga LM76xUYbjToTVHB45yOgfZxv+E4BvLPHzwU8lzju/gar5kEZ53m+xM61oGhTpjfoHCVi4DczPib xoqwOeP8gkWMTe/B9sGvvQbuSZisCHDPUBf0xmClpTI29iONSs/ELIAStJhzvVZYFQUmaWNkogv 0XL8CdGntzq7tXIog5WXe0bC/PYlaKcQSBv2soJ3c7/suLgBzUKU1pHbTjSwMV+/647ZJMJJ6dL +ZrfVl7WF4Hy9u3ljAwIGjEM/xIkR4ok4qWxWgJBObDpOZTv X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: VMZRMUPH273RXDSW7TRGSOOXEWJQMVM3 X-Message-ID-Hash: VMZRMUPH273RXDSW7TRGSOOXEWJQMVM3 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/dwc/dwc-i2s.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/dwc/dwc-i2s.c b/sound/soc/dwc/dwc-i2s.c index 7f7dd07c63b2..acdf98b2ee9c 100644 --- a/sound/soc/dwc/dwc-i2s.c +++ b/sound/soc/dwc/dwc-i2s.c @@ -730,7 +730,7 @@ static int dw_i2s_probe(struct platform_device *pdev) return ret; } -static int dw_i2s_remove(struct platform_device *pdev) +static void dw_i2s_remove(struct platform_device *pdev) { struct dw_i2s_dev *dev = dev_get_drvdata(&pdev->dev); @@ -738,7 +738,6 @@ static int dw_i2s_remove(struct platform_device *pdev) clk_disable_unprepare(dev->clk); pm_runtime_disable(&pdev->dev); - return 0; } #ifdef CONFIG_OF @@ -756,7 +755,7 @@ static const struct dev_pm_ops dwc_pm_ops = { static struct platform_driver dw_i2s_driver = { .probe = dw_i2s_probe, - .remove = dw_i2s_remove, + .remove_new = dw_i2s_remove, .driver = { .name = "designware-i2s", .of_match_table = of_match_ptr(dw_i2s_of_match), From patchwork Wed Mar 15 15:05:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176141 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6BE42C6FD1D for ; Wed, 15 Mar 2023 15:24:17 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8AD62131E; Wed, 15 Mar 2023 16:23:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8AD62131E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893855; bh=nwXggnw3gu4iZLZ0xgm9Xl0mBvn3Dy6v9S22fOTHgUE=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=P7YMxv+wq6D82/Psq+CHTbpWmGkwj8fIMCZO5WKeHG5WE3GSURXxzF1IrWmNl99MO 5Qg2BZXmE0DducsMIucBhfoVLPfkr8+d4lc70uyMAEmiV7PjYT1nxkFuDDMee83iOS qftXGqwTkka+45LSbeF6Ix33kCa4wflEBq0QetjY= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id BC869F80690; Wed, 15 Mar 2023 16:11:50 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 23A3EF80651; Wed, 15 Mar 2023 16:09:15 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 62484F805B0 for ; Wed, 15 Mar 2023 16:08:17 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 62484F805B0 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjc-0007cV-Qy; Wed, 15 Mar 2023 16:08:12 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjb-004KYN-DQ; Wed, 15 Mar 2023 16:08:11 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSja-0057fp-IV; Wed, 15 Mar 2023 16:08:10 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Liang He Subject: [PATCH 063/173] ASoC: fsl: eukrea-tlv320: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:55 +0100 Message-Id: <20230315150745.67084-64-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1585; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=nwXggnw3gu4iZLZ0xgm9Xl0mBvn3Dy6v9S22fOTHgUE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd3rNbBo/nN2339NwvY8rsTiuHTUonYKPNMUi BVPx6dhumKJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHd6wAKCRDB/BR4rcrs CY6EB/9il+JQyOMMQ3yFoCFC+yB5i4V0jZxbecui7QtlID+sUTYJmGav3OyHbZt+qT+DM7H9bvN nuWw3sNmfpQC+E07edMMJxmwb8VAPPwZNjiZXBw70gK9vGTZAGQQLhmoCy3PNweB4M3YF6AiTl2 hqGH9uzMYQ4790qDJl2IsOFga3qyIr0W5t6QBLM8o2ymEY0xoV8SP46RJPtSiT1MmCHp+LWCNhi 2qA9kGdq4mcAVbgf3a07/hAORA0biIgu3wN/SsVUjtqxMyD2fKoQCHkpkXlR9WX4VBkvwFswmcB vBFdB/CK6DC4qUG0ufCR9OWaeP+Q3UB6oQy3tJ3e92gSUBo7 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 4OZHH6EVSXUMEZGFAQ5CM3AZEFPM7H7B X-Message-ID-Hash: 4OZHH6EVSXUMEZGFAQ5CM3AZEFPM7H7B X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/eukrea-tlv320.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/eukrea-tlv320.c b/sound/soc/fsl/eukrea-tlv320.c index 9af4c4a35eb1..e65a85feba78 100644 --- a/sound/soc/fsl/eukrea-tlv320.c +++ b/sound/soc/fsl/eukrea-tlv320.c @@ -205,11 +205,9 @@ static int eukrea_tlv320_probe(struct platform_device *pdev) return ret; } -static int eukrea_tlv320_remove(struct platform_device *pdev) +static void eukrea_tlv320_remove(struct platform_device *pdev) { snd_soc_unregister_card(&eukrea_tlv320); - - return 0; } static const struct of_device_id imx_tlv320_dt_ids[] = { @@ -224,7 +222,7 @@ static struct platform_driver eukrea_tlv320_driver = { .of_match_table = imx_tlv320_dt_ids, }, .probe = eukrea_tlv320_probe, - .remove = eukrea_tlv320_remove, + .remove_new = eukrea_tlv320_remove, }; module_platform_driver(eukrea_tlv320_driver); From patchwork Wed Mar 15 15:05:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176145 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D3D92C7618D for ; Wed, 15 Mar 2023 15:25:21 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BC2F312F9; Wed, 15 Mar 2023 16:24:29 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BC2F312F9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893919; bh=fVvWWcSxAWVCYLSgVJ2+mg9xqEfsB3yTrujI5TtKEYQ=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=fXfUjhchM0gWjj10sMl2+sBLps2YqmgV73ytsEd3xePItTzSfuJT2nK5n47r4frK5 ab7ToeF6E2H05m9+977F/ziITq2oweFzfNlyzbetfYAdOqKBu1bm6D6lz6ARPJhkyK +CVjnUODqMfpABwfSYzYGDQCOk1g1gswL+wkuOLo= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id DE61EF806A3; Wed, 15 Mar 2023 16:12:00 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id ECE20F8065C; Wed, 15 Mar 2023 16:09:19 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7E6E2F805B5 for ; Wed, 15 Mar 2023 16:08:19 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7E6E2F805B5 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjd-0007eK-HH; Wed, 15 Mar 2023 16:08:13 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjb-004KYc-QE; Wed, 15 Mar 2023 16:08:11 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSja-0057fv-R3; Wed, 15 Mar 2023 16:08:10 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Shengjiu Wang , Xiubo Li , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 064/173] ASoC: fsl: fsl_asrc: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:56 +0100 Message-Id: <20230315150745.67084-65-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1626; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=fVvWWcSxAWVCYLSgVJ2+mg9xqEfsB3yTrujI5TtKEYQ=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd3uMuLmZAxfoHgJe26zrAkHYfN1zZYOA4oFD gntxLorlVGJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHd7gAKCRDB/BR4rcrs CaEqB/9wpFf6xp/MBeIEw1xh9CGYyUDnTISBzgFczQvwHUi5lxtVbonj8QC7dxzGtdEr3OzkCrq qRj3Eqyu8Nfps0UnsRdgbgEqetTYqVgsCV4p9blh1/X5AsWS5aOXm2dL9DheDisbGIogTFpvppf diXf4I+U9p8g3aL25Dln1Ry8S1TCs8mHIi2lVvOtSGUJ2VOePhXJ59itPcgI5iIiYS8p0+FG+RT v+h5MA+0TY0rFSVL8SDNJftnGXOcf7rHty3vjccrjN2UTyKmuvSqmjM4Xmhh72vFvz0/DFAv+YW DM3G8QS3VESy84FmQ0w8cy5q7EmM+43H212Up+Z1rZYI9QXD X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 5XEQRM67MAKXZYWLP3M7GOPQRC425SNU X-Message-ID-Hash: 5XEQRM67MAKXZYWLP3M7GOPQRC425SNU X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fabio Estevam , Nicolin Chen , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/fsl_asrc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index e16e7b3fa96c..adb8a59de2bd 100644 --- a/sound/soc/fsl/fsl_asrc.c +++ b/sound/soc/fsl/fsl_asrc.c @@ -1252,13 +1252,11 @@ static int fsl_asrc_probe(struct platform_device *pdev) return ret; } -static int fsl_asrc_remove(struct platform_device *pdev) +static void fsl_asrc_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) fsl_asrc_runtime_suspend(&pdev->dev); - - return 0; } static int fsl_asrc_runtime_resume(struct device *dev) @@ -1394,7 +1392,7 @@ MODULE_DEVICE_TABLE(of, fsl_asrc_ids); static struct platform_driver fsl_asrc_driver = { .probe = fsl_asrc_probe, - .remove = fsl_asrc_remove, + .remove_new = fsl_asrc_remove, .driver = { .name = "fsl-asrc", .of_match_table = fsl_asrc_ids, From patchwork Wed Mar 15 15:05:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176153 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C47AFC61DA4 for ; Wed, 15 Mar 2023 15:27:25 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E05A71344; Wed, 15 Mar 2023 16:26:33 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E05A71344 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894044; bh=LR7Ysbb8DoWg4s+eEMNYQXIg9WXhYRoMwKCtdwhfAHo=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ag5gbOoBRN4Y0JJt/n+dnCVOTzx/e8R5cLkcU03XaRyVKEZijIub3FsyZEKTeDV6R jGKi8LAi0ulH1plS/LoKpWbE4sHkAtK6CfdNIo0gcVaBVt61czK4m9XOsPolzaQIzG xva7IODctg8aESzAF4VxPkpNh9B1uHryJ+mZxJ0M= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D47F2F806C0; Wed, 15 Mar 2023 16:12:23 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E05C9F805B6; Wed, 15 Mar 2023 16:09:29 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4B2E6F805BD for ; Wed, 15 Mar 2023 16:08:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4B2E6F805BD Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjd-0007fy-PF; Wed, 15 Mar 2023 16:08:13 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjc-004KYg-2r; Wed, 15 Mar 2023 16:08:12 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjb-0057fz-12; Wed, 15 Mar 2023 16:08:11 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Shengjiu Wang , Xiubo Li , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 065/173] ASoC: fsl: fsl_aud2htx: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:57 +0100 Message-Id: <20230315150745.67084-66-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1598; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=LR7Ysbb8DoWg4s+eEMNYQXIg9WXhYRoMwKCtdwhfAHo=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd3yokMVlIRyWHb8wddjrJTvStBIqNge+Sqcv 3AF1QjaFfqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHd8gAKCRDB/BR4rcrs CeUrCACamU38HAdOs3NZycdXa1YcHbNwTNJqcnZ17pBw9GozzGZGa/+tRDHg+tFB49YM0NxxwAj /O9brvOQ4Lt0PixRQLWQPMOoClf+XIyQT/l2RUIBm3A99LSsrvCJzXaG6JB8K+E1Q24vso54ylq AZWI8Z5CLjU8BOP7vkbgdZ5tSKb9H9C0dAhTDJGTZnXLE0A7xvTqAJw7a5ruiALP0udlk5fQTnP KaRz63mTmIOiYrfzmqhcp9i5MbmJFKWuMSjA/91pcItv9qXdAtDCjX7v/CxAAsFN7yvHpwFZFhW d+FBE/srbcicKo7sgluC6hwFJTMvAbSiunG/wes18wHbNyz0 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: MT6JUWT54MZPNO6TYZFGUQBCA65YLUYK X-Message-ID-Hash: MT6JUWT54MZPNO6TYZFGUQBCA65YLUYK X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fabio Estevam , Nicolin Chen , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/fsl_aud2htx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_aud2htx.c b/sound/soc/fsl/fsl_aud2htx.c index 1e421d9a03fb..46b0c5dcc4a5 100644 --- a/sound/soc/fsl/fsl_aud2htx.c +++ b/sound/soc/fsl/fsl_aud2htx.c @@ -257,11 +257,9 @@ static int fsl_aud2htx_probe(struct platform_device *pdev) return ret; } -static int fsl_aud2htx_remove(struct platform_device *pdev) +static void fsl_aud2htx_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - - return 0; } static int __maybe_unused fsl_aud2htx_runtime_suspend(struct device *dev) @@ -300,7 +298,7 @@ static const struct dev_pm_ops fsl_aud2htx_pm_ops = { static struct platform_driver fsl_aud2htx_driver = { .probe = fsl_aud2htx_probe, - .remove = fsl_aud2htx_remove, + .remove_new = fsl_aud2htx_remove, .driver = { .name = "fsl-aud2htx", .pm = &fsl_aud2htx_pm_ops, From patchwork Wed Mar 15 15:05:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176149 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 97722C7618D for ; Wed, 15 Mar 2023 15:26:24 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B4D291336; Wed, 15 Mar 2023 16:25:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B4D291336 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893982; bh=p14DcH32AG7Ktxe05+Ink0Ff/ihkS6ozdHQd/IETROU=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=HT2lIUjGrrNThOehJl1DTVTJWld+6pAmbzBftU+x1Gq6M193kj+rrg9b9x0EpUnXn 1HUcu5dkRWUYkcidj2gb+Krcm8DvixljOax4n30xUGm9ZGPb76OkJxjNVVrNXrkXG3 mPy9bH6wEAZcVZdp4ixOlkdL0Gn+iNwkxpD/xZJ0= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A985AF806B5; Wed, 15 Mar 2023 16:12:14 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7B1B8F8065C; Wed, 15 Mar 2023 16:09:26 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5F3DCF805BF for ; Wed, 15 Mar 2023 16:08:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5F3DCF805BF Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSje-0007gW-1u; Wed, 15 Mar 2023 16:08:14 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjc-004KYk-4p; Wed, 15 Mar 2023 16:08:12 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjb-0057g2-86; Wed, 15 Mar 2023 16:08:11 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Shengjiu Wang , Xiubo Li , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 066/173] ASoC: fsl: fsl_audmix: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:58 +0100 Message-Id: <20230315150745.67084-67-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1701; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=p14DcH32AG7Ktxe05+Ink0Ff/ihkS6ozdHQd/IETROU=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd31I/9A4lr9791ZKRRFlqtLTp1eIYSzhtr8B b9371qwCoOJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHd9QAKCRDB/BR4rcrs CS8TCACCK38290AID6HfDq+ysqKNir8PuJ1Nhg+EOguGMKWr0AKVTWCubphk3WkxjWeHcByk5l3 AIlzOfRSHBEXAofFLBh6UmNBYPYC0SBsL7Wazofzn0uem/JyzGFKYdXWilN7J/qhjVnFl5aeZg2 wGRwE98Cv99QkvFln8buDWX2dUj0JVdmbTxza7os4oPcadrDdp04NEii3X/RfV5ZWT7E0rq1+TT PPNae4d5ZUZVgVDL48oi2r5gA79IGDuke+6j11694DfWg9dpF57eK+JxC3+AzQVSq98AWtJME0I q6AemPqaMZ10pG8t3l9PYWwEuTu937ljE+hCHkGGddQ5UREZ X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: MQUIIQRQ7Z3HQFH7F35YCTBYRWA3I4C3 X-Message-ID-Hash: MQUIIQRQ7Z3HQFH7F35YCTBYRWA3I4C3 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fabio Estevam , Nicolin Chen , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/fsl_audmix.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c index 672148dd4b23..0ab2c1962117 100644 --- a/sound/soc/fsl/fsl_audmix.c +++ b/sound/soc/fsl/fsl_audmix.c @@ -506,7 +506,7 @@ static int fsl_audmix_probe(struct platform_device *pdev) return ret; } -static int fsl_audmix_remove(struct platform_device *pdev) +static void fsl_audmix_remove(struct platform_device *pdev) { struct fsl_audmix *priv = dev_get_drvdata(&pdev->dev); @@ -514,8 +514,6 @@ static int fsl_audmix_remove(struct platform_device *pdev) if (priv->pdev) platform_device_unregister(priv->pdev); - - return 0; } #ifdef CONFIG_PM @@ -558,7 +556,7 @@ static const struct dev_pm_ops fsl_audmix_pm = { static struct platform_driver fsl_audmix_driver = { .probe = fsl_audmix_probe, - .remove = fsl_audmix_remove, + .remove_new = fsl_audmix_remove, .driver = { .name = "fsl-audmix", .of_match_table = fsl_audmix_ids, From patchwork Wed Mar 15 15:05:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176150 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2BF10C61DA4 for ; Wed, 15 Mar 2023 15:26:41 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E5181132F; Wed, 15 Mar 2023 16:25:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E5181132F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893999; bh=NBR+AVL8cNAlqinDBFGAK6/J8chnDfmAuUyzf/QyB3U=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=h4PKllJdoxSAu92raxUm9TaWQWZs4ejn4vXS6IuP866gFsemLSBA4S3fmBpklcE+Q NwyEdqprBgVlNycIhYJgPeowxdhbT5wI/XVeJ/RDz39t+NXIjSvRzzZFm1QBVXNOc8 NzybK0P8OU6NU1ggnf1KVnKGWmnY6ApBJ2GI54sI= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 620FCF80642; Wed, 15 Mar 2023 16:12:17 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 416F0F8065C; Wed, 15 Mar 2023 16:09:27 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BA3B7F805C0 for ; Wed, 15 Mar 2023 16:08:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BA3B7F805C0 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSje-0007iz-7T; Wed, 15 Mar 2023 16:08:14 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjc-004KYs-Gm; Wed, 15 Mar 2023 16:08:12 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjb-0057g5-FJ; Wed, 15 Mar 2023 16:08:11 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Shengjiu Wang , Xiubo Li , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 067/173] ASoC: fsl: fsl_dma: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:05:59 +0100 Message-Id: <20230315150745.67084-68-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1625; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=NBR+AVL8cNAlqinDBFGAK6/J8chnDfmAuUyzf/QyB3U=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd34QIS3bbz2bqxIB59RBNE98PPkP2+QtzfaV vMYjsJgqSmJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHd+AAKCRDB/BR4rcrs CabwB/9yft9ZbixnZyCeMdR/XfN8uFIROqays0L93RU64Y3xph+5QhZfG46rcPD0XOttVcTMC4S uCCT27uOdurmqeuHOP/QHH/9rvsM+VqSIaxSdrQyytVF0/MiVwUuRC9S79eqUfULr/v/lpFTxsc RS2Ae9KL/lL8bBfRZPjeK/fBIUXRvEd9RNNN6XbwAU7lkGOWPRMhRohnTVQ8uQlR+rj6T3FBFOZ i31m6jeWE4iBP7hCm6r0o2NoQm8UEw6eTgxfVASeGutlMzUx0cMCaPzfY3FerYoLjgUgXvkPCbj m4Bbx9TWOo3+GBicDL6q0uAobo2XiQDBPlSSolygBpm91i2C X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: QIGCQH33TXFDQVBJQOY62XREZQYD5SVA X-Message-ID-Hash: QIGCQH33TXFDQVBJQOY62XREZQYD5SVA X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fabio Estevam , Nicolin Chen , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/fsl_dma.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c index 808fb61a7a0f..963f9774c883 100644 --- a/sound/soc/fsl/fsl_dma.c +++ b/sound/soc/fsl/fsl_dma.c @@ -890,15 +890,13 @@ static int fsl_soc_dma_probe(struct platform_device *pdev) return 0; } -static int fsl_soc_dma_remove(struct platform_device *pdev) +static void fsl_soc_dma_remove(struct platform_device *pdev) { struct dma_object *dma = dev_get_drvdata(&pdev->dev); iounmap(dma->channel); irq_dispose_mapping(dma->irq); kfree(dma); - - return 0; } static const struct of_device_id fsl_soc_dma_ids[] = { @@ -913,7 +911,7 @@ static struct platform_driver fsl_soc_dma_driver = { .of_match_table = fsl_soc_dma_ids, }, .probe = fsl_soc_dma_probe, - .remove = fsl_soc_dma_remove, + .remove_new = fsl_soc_dma_remove, }; module_platform_driver(fsl_soc_dma_driver); From patchwork Wed Mar 15 15:06:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176148 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2ED4C7618B for ; Wed, 15 Mar 2023 15:26:05 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9774F12F4; Wed, 15 Mar 2023 16:25:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9774F12F4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678893963; bh=ND/qfEK/K2yQMWNbGuK9dn2/B7iBBl8P2AgxRnz+K/U=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=n8K1dx5d4GDntGyLBz0KJuX9CvIxgApL1laQzwdNIq9EknRfORFHYXmzEBov6n+h5 XXtf7LW34IoU0qUmcHM4r9do5xcBeZFko67XDrCxfwiBZ9tLUUgOzNdfR+e7rktrYh TcD+b1iCcACOgKUrj/p0MMkhJgXJXrUvTvpxOXnw= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 19B8BF80649; Wed, 15 Mar 2023 16:12:11 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 992D5F8065E; Wed, 15 Mar 2023 16:09:25 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4BF36F805BE for ; Wed, 15 Mar 2023 16:08:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4BF36F805BE Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSje-0007hB-1i; Wed, 15 Mar 2023 16:08:14 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjc-004KYo-8q; Wed, 15 Mar 2023 16:08:12 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjb-0057gB-Lk; Wed, 15 Mar 2023 16:08:11 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Shengjiu Wang , Xiubo Li , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 068/173] ASoC: fsl: fsl_easrc: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:00 +0100 Message-Id: <20230315150745.67084-69-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1568; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=ND/qfEK/K2yQMWNbGuK9dn2/B7iBBl8P2AgxRnz+K/U=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd37/BxjPnlV5VAPElq4vSSy0N90dTuQ8/VkK TUwywSQSPaJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHd+wAKCRDB/BR4rcrs Ce4nB/9YjctLamI+NS6NLpoMnvCnOnU9ZRFDJiXHZavIJtFothyEpVyV4tePP4TAvem9U2IEbOC ogzOVYRQDyl74qDKdmoWD9k3Ct2loRXOs3W/acL2k5BeLNOpeAUleGzfH/nqYN33iQM7Smx0flH U1+MakbCW3mDsuLdW6ZVgovuVO7GQO/3uDD2vQ+rQUJnYW8JxLs15KQt+FOMOIkEnN955ZoJPW9 fODaq0Fqv/JDPYEqP3XWAHY6+37obS7I5IqawPcgyYwelMtoBq8g9MBwYNTQqO0ZAR2I7enGb1s sgthKVaRkZ16Ib8phQ6i6QEuhdOLTVfvvZF+57dPCiNuftXr X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 7YJYDXAOZYDFD4RSBBTNVVWMMAGSDCOQ X-Message-ID-Hash: 7YJYDXAOZYDFD4RSBBTNVVWMMAGSDCOQ X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fabio Estevam , Nicolin Chen , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/fsl_easrc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index 3153d19136b2..670cbdb361b6 100644 --- a/sound/soc/fsl/fsl_easrc.c +++ b/sound/soc/fsl/fsl_easrc.c @@ -1979,11 +1979,9 @@ static int fsl_easrc_probe(struct platform_device *pdev) return 0; } -static int fsl_easrc_remove(struct platform_device *pdev) +static void fsl_easrc_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - - return 0; } static __maybe_unused int fsl_easrc_runtime_suspend(struct device *dev) @@ -2093,7 +2091,7 @@ static const struct dev_pm_ops fsl_easrc_pm_ops = { static struct platform_driver fsl_easrc_driver = { .probe = fsl_easrc_probe, - .remove = fsl_easrc_remove, + .remove_new = fsl_easrc_remove, .driver = { .name = "fsl-easrc", .pm = &fsl_easrc_pm_ops, From patchwork Wed Mar 15 15:06:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176155 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C8ABBC6FD1D for ; Wed, 15 Mar 2023 15:28:00 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 726841286; Wed, 15 Mar 2023 16:27:08 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 726841286 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894078; bh=4KrXWTDf4zwf+OYLklG7MbvlDBPMg5fJsMKLrEZj0lU=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=sDCqCwAy6Ie37daPEakRIGUaY08UdIsmL/2xMR1sNtsskGlRdPaI9DFKsIarh6Drl kskVPayWDAb2zFTpJTVpF9phvPRMOKbXLpRX0LSR50ojtabXK02+JyCrt5IPRcL35v 2ZpDALlMHyQnHqHtZ99pNor+ORG6qNsSY8OLsSQA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7A93CF806CD; Wed, 15 Mar 2023 16:12:29 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6B972F805C0; Wed, 15 Mar 2023 16:09:31 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EC26BF805C3 for ; Wed, 15 Mar 2023 16:08:21 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EC26BF805C3 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSje-0007km-IP; Wed, 15 Mar 2023 16:08:14 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjc-004KZ2-Q9; Wed, 15 Mar 2023 16:08:12 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjb-0057gF-SU; Wed, 15 Mar 2023 16:08:11 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Shengjiu Wang , Xiubo Li , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 069/173] ASoC: fsl: fsl_esai: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:01 +0100 Message-Id: <20230315150745.67084-70-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1733; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=4KrXWTDf4zwf+OYLklG7MbvlDBPMg5fJsMKLrEZj0lU=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd3+oDckhhmheTXcok/jAk62jWM2ZXXO7d8QA tG/OVpBLS6JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHd/gAKCRDB/BR4rcrs CU2KCACAOqylsnwSZ46KWtSGC7JjDOHDFfeXRAFNcL814Xzz5MyjfAM39UPjtT/96fpaEmZPW8y IvPI9lCpy9w08Z8o2W8Y8Yz/zg8bp/A3HYN/2hSvLZAP95ugLif7JNf9zBjk1aHuxXyJ3PF1RlH lSSIjkLosYa5X+v2yHcazKhYRmhUIn9OOt/L4Va1SdSNOqgCB7WzPk6BXgwF+nba22022d7JSrj wrdU7t8gXG2aw2VjQgazyYTssn1Jse/OsTPgwSDWOz6yDdiFqFMgIwbrFvQJK4qj4omTbOpvDvQ EuKtkfYzkpM8zKn3f8w9iMLByF++VRCMm5Mte6MZ0wvEdGaS X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: I37AS5HM3U53RFBSQYBUFVHZXRQPKHXO X-Message-ID-Hash: I37AS5HM3U53RFBSQYBUFVHZXRQPKHXO X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fabio Estevam , Nicolin Chen , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/fsl_esai.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index 17fefd27ec90..936f0cd4b06d 100644 --- a/sound/soc/fsl/fsl_esai.c +++ b/sound/soc/fsl/fsl_esai.c @@ -1101,7 +1101,7 @@ static int fsl_esai_probe(struct platform_device *pdev) return ret; } -static int fsl_esai_remove(struct platform_device *pdev) +static void fsl_esai_remove(struct platform_device *pdev) { struct fsl_esai *esai_priv = platform_get_drvdata(pdev); @@ -1110,8 +1110,6 @@ static int fsl_esai_remove(struct platform_device *pdev) fsl_esai_runtime_suspend(&pdev->dev); cancel_work_sync(&esai_priv->work); - - return 0; } static const struct of_device_id fsl_esai_dt_ids[] = { @@ -1200,7 +1198,7 @@ static const struct dev_pm_ops fsl_esai_pm_ops = { static struct platform_driver fsl_esai_driver = { .probe = fsl_esai_probe, - .remove = fsl_esai_remove, + .remove_new = fsl_esai_remove, .driver = { .name = "fsl-esai-dai", .pm = &fsl_esai_pm_ops, From patchwork Wed Mar 15 15:06:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176151 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AE630C6FD1D for ; Wed, 15 Mar 2023 15:26:53 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 91525133D; Wed, 15 Mar 2023 16:26:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 91525133D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894011; bh=iKAaVVxOf7lkZ7V5ze5WCctnJM8IctRpFOwS/9Y0IyM=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=a+0AeJFxBf/U/JzmNgpE6LbUuEG/xWyxVvJcJT6VboBLQo8FBNLVLJNrzL3QtUDRB WFQ/JkI1kbEDAIL9hXP0j0fTYee3/fLE2+/Bs9aX8lv47fmtfsD+GTwnkmZsH94XlM aXiWOCPToHiQ6xKbAgDg5BITAN73YAvorwd5/bZE= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 014CEF806BB; Wed, 15 Mar 2023 16:12:19 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F1C94F8065C; Wed, 15 Mar 2023 16:09:27 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BF1CCF80520 for ; Wed, 15 Mar 2023 16:08:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BF1CCF80520 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSje-0007k6-I8; Wed, 15 Mar 2023 16:08:14 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjc-004KYx-MY; Wed, 15 Mar 2023 16:08:12 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjc-0057gJ-2n; Wed, 15 Mar 2023 16:08:12 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Shengjiu Wang , Xiubo Li , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 070/173] ASoC: fsl: fsl_mqs: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:02 +0100 Message-Id: <20230315150745.67084-71-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1482; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=iKAaVVxOf7lkZ7V5ze5WCctnJM8IctRpFOwS/9Y0IyM=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd4BMf3TI/WQHJSyWvAcll0fBswed0xdEhhKa hIcZ1ta/xCJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeAQAKCRDB/BR4rcrs CSTqCACK7rgbB40bywWv6gpJ6k6MERqBKvI2XsLkFby6yuP0Izhvzb72/SKO1cH/HBtpzIKJq1y 7q1KCC2cmUaOUx6eqO3rPhaPBqVvo+o7OFcaUSHnjR76wwE19k9LURfwD/8+fb8uCUbWwGypqQO KRr1t7MksiW944RHdkqY7nnyOvjm+w2WtElA/Pt5hbXdc33qZQjC44AANOW6q2dn2wKL9PZQ/TR 5hqUOmM6PcE184DRarIOzel7EtUksD6K5RJguguRKdESL6kx+nZ80oBleTwBNM/jJYE6KCeBO1O usaE6LSVaD0GeZ6W6EOPpmHOPohUBdKjKD9NO9/DMOHplZdX X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: VMLFMI2MRODDB7BUOF42QDKDUSYZCXU4 X-Message-ID-Hash: VMLFMI2MRODDB7BUOF42QDKDUSYZCXU4 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fabio Estevam , Nicolin Chen , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/fsl_mqs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/fsl/fsl_mqs.c b/sound/soc/fsl/fsl_mqs.c index 4922e6795b73..3fb3d3e4d09a 100644 --- a/sound/soc/fsl/fsl_mqs.c +++ b/sound/soc/fsl/fsl_mqs.c @@ -261,10 +261,9 @@ static int fsl_mqs_probe(struct platform_device *pdev) return ret; } -static int fsl_mqs_remove(struct platform_device *pdev) +static void fsl_mqs_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - return 0; } #ifdef CONFIG_PM @@ -360,7 +359,7 @@ MODULE_DEVICE_TABLE(of, fsl_mqs_dt_ids); static struct platform_driver fsl_mqs_driver = { .probe = fsl_mqs_probe, - .remove = fsl_mqs_remove, + .remove_new = fsl_mqs_remove, .driver = { .name = "fsl-mqs", .of_match_table = fsl_mqs_dt_ids, From patchwork Wed Mar 15 15:06:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176154 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 068D8C6FD1D for ; Wed, 15 Mar 2023 15:27:40 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0EC191362; Wed, 15 Mar 2023 16:26:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0EC191362 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894058; bh=dDnW86Gv49lCBe7mcignad6VQa0+Mv+vJCSTI6E/ApA=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=E5ML3iQvhfmt/lb+65pEr1GZMncBJNIhNxxQsrkK2/rjfSNST/AV4BcnVHId6B9hj pAZVwY9wSLCB1kKSz49zcsp2h+IXsCXYbAxswntLf7lzc+hmS8tZ4IF03LFS4nHfHZ OFTGwd6JmdZTwvxujwcXcQQH9ak4QJiN/Zn+20tk= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A5383F806C5; Wed, 15 Mar 2023 16:12:26 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 75AEFF805B6; Wed, 15 Mar 2023 16:09:30 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BFB85F805C1 for ; Wed, 15 Mar 2023 16:08:21 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BFB85F805C1 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjf-0007mN-A0; Wed, 15 Mar 2023 16:08:15 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjd-004KZ7-4v; Wed, 15 Mar 2023 16:08:13 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjc-0057gO-90; Wed, 15 Mar 2023 16:08:12 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Shengjiu Wang , Xiubo Li , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 071/173] ASoC: fsl: fsl_rpmsg: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:03 +0100 Message-Id: <20230315150745.67084-72-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1611; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=dDnW86Gv49lCBe7mcignad6VQa0+Mv+vJCSTI6E/ApA=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd4E3hZje9ZrldUwq37J/08EqTMfAuvM9Ri0o d+opEQENRaJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeBAAKCRDB/BR4rcrs CXcRB/wKAxpo1T8zKiYbnRw0OHFAATABwRDpVypmmzre3YQA2J7b0ByHtJA3GrfhaA9Oj8wzUXV B79hrNwI33HRYbYeQWPI23mxiTsFMicb6O53flu+15mEWORrWFxm3UPxsut/yjrmT5ub1rWi7WP DqANNJe1MvGIK4Oos/5bfcvb0jZnMHXPxzkTEzm8ZezIiUR+xj5oAemn0mrKhqIvd4LJpdNfXo3 QfHdd/GxC/I6ROwGzdQ/0B8wbFXQlwMrlXZbZIyQJti8J3iyB3ZrvHs9eOSuUgXlnw7/ByhOTMe /I4QYIHvsuTG2E/jXP/EDUI+p9Msly6jMkBT+eKVdSw+bEV+ X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: Z44EM5ZNNX6F2GDFCQFDXL7HSKBJSTYZ X-Message-ID-Hash: Z44EM5ZNNX6F2GDFCQFDXL7HSKBJSTYZ X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fabio Estevam , Nicolin Chen , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/fsl_rpmsg.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_rpmsg.c b/sound/soc/fsl/fsl_rpmsg.c index 46c7868a2653..15b48b5ea856 100644 --- a/sound/soc/fsl/fsl_rpmsg.c +++ b/sound/soc/fsl/fsl_rpmsg.c @@ -247,14 +247,12 @@ static int fsl_rpmsg_probe(struct platform_device *pdev) return 0; } -static int fsl_rpmsg_remove(struct platform_device *pdev) +static void fsl_rpmsg_remove(struct platform_device *pdev) { struct fsl_rpmsg *rpmsg = platform_get_drvdata(pdev); if (rpmsg->card_pdev) platform_device_unregister(rpmsg->card_pdev); - - return 0; } #ifdef CONFIG_PM @@ -302,7 +300,7 @@ static const struct dev_pm_ops fsl_rpmsg_pm_ops = { static struct platform_driver fsl_rpmsg_driver = { .probe = fsl_rpmsg_probe, - .remove = fsl_rpmsg_remove, + .remove_new = fsl_rpmsg_remove, .driver = { .name = "fsl_rpmsg", .pm = &fsl_rpmsg_pm_ops, From patchwork Wed Mar 15 15:06:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176158 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2B1D5C61DA4 for ; Wed, 15 Mar 2023 15:28:44 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2D456137B; Wed, 15 Mar 2023 16:27:52 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2D456137B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894122; bh=RsUrUTlIpuxTKGng9TMntRINqLup1gTtO3ir0dKPmeA=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=qYKR6ZuC8eQExtZlzOpSn2cXSh1G4WB0tNZEioicIu6lbu6GsOYiS5E9+0sOXJ7p3 M+TJH9qp8dfNfwVNz7m+y68PaLz5u615MzKE4myv+X8X6FWAUf0qyTeWij5CdhSp20 NR9KKxL486ypt8R8cNygHgEYDXO7PkRK81W1G9RY= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A891CF806D9; Wed, 15 Mar 2023 16:12:35 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id AB6FDF805C3; Wed, 15 Mar 2023 16:09:33 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 91AD6F805C2 for ; Wed, 15 Mar 2023 16:08:22 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 91AD6F805C2 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjf-0007oF-Jb; Wed, 15 Mar 2023 16:08:15 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjd-004KZC-Gi; Wed, 15 Mar 2023 16:08:13 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjc-0057gS-Gw; Wed, 15 Mar 2023 16:08:12 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Shengjiu Wang , Xiubo Li , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 072/173] ASoC: fsl: fsl_sai: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:04 +0100 Message-Id: <20230315150745.67084-73-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1619; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=RsUrUTlIpuxTKGng9TMntRINqLup1gTtO3ir0dKPmeA=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd4GiCmWEMOhsKK1SP7e5BFchKZRwxGpFp6aF Q3BVL3LYgKJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeBgAKCRDB/BR4rcrs CWZHB/90dQMuUrCc+efXqqydr0kG3HapQtUN4xuYo0/uNaE4V5ng/W38pWti6GjhqV88/Bh509k vhCWGjOkVgYQGYKlIrN4VJ7U0y1HRHTIro8UOx+fbpDQaBrNCnJYvLBvMEEuE/r5U3dipd7FjMW YpGx5m1PQq933k0DET8/+WQ576uHh8hQSwzH2iun3tVgrSVtBHp5LOpraw6feIZecp6m6X1Ihnr TmbFkiS2jnZQ6B9vCGCZLA4WxCrfQujYliMfTgRQfv8tUB0AgOoknaK+cUIZYzOwJgw57IVqTXo z0PMXW67a8Yr6nuJRwWflYtf5NW9WwgdN1ACdjJvsL/7Ej8H X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: W3WCH7GKPLNMRWQWKRRCF4DRBLDOFYSI X-Message-ID-Hash: W3WCH7GKPLNMRWQWKRRCF4DRBLDOFYSI X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fabio Estevam , Nicolin Chen , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/fsl_sai.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 1b197478b3d9..a5e56e0484f2 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -1489,13 +1489,11 @@ static int fsl_sai_probe(struct platform_device *pdev) return ret; } -static int fsl_sai_remove(struct platform_device *pdev) +static void fsl_sai_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) fsl_sai_runtime_suspend(&pdev->dev); - - return 0; } static const struct fsl_sai_soc_data fsl_sai_vf610_data = { @@ -1696,7 +1694,7 @@ static const struct dev_pm_ops fsl_sai_pm_ops = { static struct platform_driver fsl_sai_driver = { .probe = fsl_sai_probe, - .remove = fsl_sai_remove, + .remove_new = fsl_sai_remove, .driver = { .name = "fsl-sai", .pm = &fsl_sai_pm_ops, From patchwork Wed Mar 15 15:06:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176157 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 36DBBC7618B for ; Wed, 15 Mar 2023 15:28:29 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 018461376; Wed, 15 Mar 2023 16:27:37 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 018461376 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894107; bh=9d6Wlk1f8zwDxEdM+dxWCYeIg6HO2iJkBJm4phRhmvM=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=MQjA45jDe/wQ58RXQhUf9YG6GaByitwnE1mlR5TdNGRNiqVquPjLLWDF352p+6sd9 83wetW8uX+NuhuG0Jnb7mj2CuvY6Qz5uwvXw33WafijlmxT6oaeK0IQj9QLOfVtFOa hJbsNZCsvBB3iOEnA5luXvSrTpYkcwABgWNH477E= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id B08D6F806D5; Wed, 15 Mar 2023 16:12:33 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DD7F8F805C1; Wed, 15 Mar 2023 16:09:32 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 68F8BF805C5 for ; Wed, 15 Mar 2023 16:08:22 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 68F8BF805C5 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjf-0007oG-KP; Wed, 15 Mar 2023 16:08:15 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjd-004KZE-HQ; Wed, 15 Mar 2023 16:08:13 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjc-0057gW-Ob; Wed, 15 Mar 2023 16:08:12 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Shengjiu Wang , Xiubo Li , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 073/173] ASoC: fsl: fsl_spdif: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:05 +0100 Message-Id: <20230315150745.67084-74-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1472; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=9d6Wlk1f8zwDxEdM+dxWCYeIg6HO2iJkBJm4phRhmvM=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd4J4ZqwpeC374d3hlHRtireZgy2tHURmUov+ Bt3eqEH/ZOJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeCQAKCRDB/BR4rcrs Ca7wB/9FePM5BfmGcKb8OLEr69V1N4BoOYLTRKRW7M8qLq7dmoCTXOeC0ZUwxU3mgkyV4qBlmZk FrGUk9MJTkK0xS1yj1FqhFuYRAZVWOUJZGzNhqMbchIuYMzPcGhLOvtWbuw+ogs+xaF36k8ggOq qtMMhtPRVuJDwDuWgyLNbXfGrSMllZUu2vdaDijhREnz2rmxxwKDNz8L+mL+C9Yx7uf587UNLYa N+8hIp+w//O2PXBn0tD9XAPzR1hNHp2YUkHkUoRDwU8nygcEfaM2OZT4Gp67yCFwKMO3kRzDGfx KwNAZiUPZ+Pik8xnMBcIwHxEYKN6LOHSC3toS/qd60XglNuu X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 4LZX2LAYJ7A346EAVF2X2IB2N4THINVL X-Message-ID-Hash: 4LZX2LAYJ7A346EAVF2X2IB2N4THINVL X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fabio Estevam , Nicolin Chen , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/fsl_spdif.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c index 275aba8e0c46..015c3708aa04 100644 --- a/sound/soc/fsl/fsl_spdif.c +++ b/sound/soc/fsl/fsl_spdif.c @@ -1659,11 +1659,9 @@ static int fsl_spdif_probe(struct platform_device *pdev) return ret; } -static int fsl_spdif_remove(struct platform_device *pdev) +static void fsl_spdif_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - - return 0; } #ifdef CONFIG_PM @@ -1765,7 +1763,7 @@ static struct platform_driver fsl_spdif_driver = { .pm = &fsl_spdif_pm, }, .probe = fsl_spdif_probe, - .remove = fsl_spdif_remove, + .remove_new = fsl_spdif_remove, }; module_platform_driver(fsl_spdif_driver); From patchwork Wed Mar 15 15:06:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176160 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D61B1C6FD1D for ; Wed, 15 Mar 2023 15:29:16 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D586C1387; Wed, 15 Mar 2023 16:28:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D586C1387 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894154; bh=lzER8ngZs/WYY6pUSzDfleqHc+/c2ZIHZ4U1i4Rx9PE=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=o0+T/Wy2BmGJwT0hZAXFK1ovgOFaJnWkvORfQ2z5+qAR805b7vqnXXTlB+bM3A9DV KT6qwF6h1hCKyLxPlZm0XZXdLmG0+EmsIGY8ijKOpho7defdusysRJsPkfQcJxdexx jtp1lXcMGCZJ1KZy11MT5tj2vrFAR6B4a7l9fgww= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id AEF07F806E5; Wed, 15 Mar 2023 16:12:41 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CB886F805C3; Wed, 15 Mar 2023 16:09:35 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 80974F805D2 for ; Wed, 15 Mar 2023 16:08:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 80974F805D2 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjf-0007ov-PW; Wed, 15 Mar 2023 16:08:15 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjd-004KZK-Kl; Wed, 15 Mar 2023 16:08:13 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjd-0057gb-35; Wed, 15 Mar 2023 16:08:13 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Shengjiu Wang , Xiubo Li , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 074/173] ASoC: fsl: fsl_ssi: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:06 +0100 Message-Id: <20230315150745.67084-75-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1627; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=lzER8ngZs/WYY6pUSzDfleqHc+/c2ZIHZ4U1i4Rx9PE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd4M8Yqw4jJ6QAV9A+zyKfTN2KWgqLGZwp9DD PRnMffi9suJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeDAAKCRDB/BR4rcrs CUB/CACVKjX4L/z6ettvWGUCLZLr44rN2PJVfK8cbMZYSkTiqsg8TEDGOvQd0AfpAAfnXVXN4kl LbxBH9spuorzBFruAcDKnQhchOGXbFHcIddmpZrUekZAUcqf4AZ+oaHAEG2SM4sDJ39gy4aw9hF +Ncd2dhbvDZtDH5lFhFufWcUu61bG88RwaQVEKrn/iRoVz5fdqCk+bdeU2nPdvKwkrwJc2mhewH zEzRHg/RcgRaCHb72GSYKMz1Y4BHPlkzOaJUPiU96tN5usn+2FiImojkZYQh89o5UxShtMnLwNx v198IlyDJXQsrrQW8S0vVJ90vEkCMZGWDWohyTpiFd7Qw/Qn X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: JHLEU3IQID3JYFCVFLR3BNWZX6GJXCBS X-Message-ID-Hash: JHLEU3IQID3JYFCVFLR3BNWZX6GJXCBS X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fabio Estevam , Nicolin Chen , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/fsl_ssi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 46a53551b955..f9097268589c 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -1671,7 +1671,7 @@ static int fsl_ssi_probe(struct platform_device *pdev) return ret; } -static int fsl_ssi_remove(struct platform_device *pdev) +static void fsl_ssi_remove(struct platform_device *pdev) { struct fsl_ssi *ssi = dev_get_drvdata(&pdev->dev); @@ -1690,8 +1690,6 @@ static int fsl_ssi_remove(struct platform_device *pdev) snd_soc_set_ac97_ops(NULL); mutex_destroy(&ssi->ac97_reg_lock); } - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -1737,7 +1735,7 @@ static struct platform_driver fsl_ssi_driver = { .pm = &fsl_ssi_pm, }, .probe = fsl_ssi_probe, - .remove = fsl_ssi_remove, + .remove_new = fsl_ssi_remove, }; module_platform_driver(fsl_ssi_driver); From patchwork Wed Mar 15 15:06:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176161 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2CCB5C61DA4 for ; Wed, 15 Mar 2023 15:29:35 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DBD8A136A; Wed, 15 Mar 2023 16:28:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DBD8A136A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894172; bh=ygayRBhrJGWkRKJxPwr2o7DgtTmFVHTcMDhPGXeoQcc=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=TcdgrAmEcmXqGo8iczjIdt1qmSmXQHkZy/YFMzFxc9/nBavW0i5BId82WCaGVChqt eAq+lfDV7MH0zqU2zg2VqhzEOjg+iFqRsqA1bc/mlxMhglc/p6UKoTfR0YMy/iAAAH FFiYCYGa/UxJ8irGtUzY4JzMfcCnTMsgg8LSkgfc= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 86219F805A8; Wed, 15 Mar 2023 16:12:44 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7EF0FF805C4; Wed, 15 Mar 2023 16:09:36 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 08561F805C7 for ; Wed, 15 Mar 2023 16:08:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 08561F805C7 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjg-0007qq-Ar; Wed, 15 Mar 2023 16:08:16 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjd-004KZP-Ux; Wed, 15 Mar 2023 16:08:13 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjd-0057gf-97; Wed, 15 Mar 2023 16:08:13 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Shengjiu Wang , Xiubo Li , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 075/173] ASoC: fsl: fsl_xcvr: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:07 +0100 Message-Id: <20230315150745.67084-76-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1523; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=ygayRBhrJGWkRKJxPwr2o7DgtTmFVHTcMDhPGXeoQcc=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd4QhTUgiNTMI8YTKdqGt6kA2Zu6czVsU9CxQ 8mahDTff6iJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeEAAKCRDB/BR4rcrs CXOlB/9PO05PjCrzxTd3qMfWhJAJM9qx1+CaJxwTL8nhe7QRB10wWGi2hTvyxn5PV0UHXLrYDvn 397K4J/VID/YlJa3D4HY720ArE1gBfGEXzTLf35PkQC8jj+Z3A0i3adoHl8e6ICy5uchryLb1g3 o4h/IgWbpM5wjP5QwqYvoWkge6uXHlH27xBnqEjSx8QaObGhKLtnFWJid7Ls7BYKvrUqElId6QG CtONunjrpHqNEgK2+G11PS0/b1Cyj3ULiCZlKBeDfHXC4BBFR0EOQUQMndHVtQ5fC5fO2T62qzG GhKxHxwvehpm8qG76CXeFijhN77WOtLTvy53xJhnuQ1TKb50 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: DWU5IWHF37VCOHBWBWCU76U764MSEARQ X-Message-ID-Hash: DWU5IWHF37VCOHBWBWCU76U764MSEARQ X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fabio Estevam , Nicolin Chen , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/fsl_xcvr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c index 2a78243df752..318fe77683f5 100644 --- a/sound/soc/fsl/fsl_xcvr.c +++ b/sound/soc/fsl/fsl_xcvr.c @@ -1339,10 +1339,9 @@ static int fsl_xcvr_probe(struct platform_device *pdev) return ret; } -static int fsl_xcvr_remove(struct platform_device *pdev) +static void fsl_xcvr_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - return 0; } static __maybe_unused int fsl_xcvr_runtime_suspend(struct device *dev) @@ -1478,7 +1477,7 @@ static struct platform_driver fsl_xcvr_driver = { .pm = &fsl_xcvr_pm_ops, .of_match_table = fsl_xcvr_dt_ids, }, - .remove = fsl_xcvr_remove, + .remove_new = fsl_xcvr_remove, }; module_platform_driver(fsl_xcvr_driver); From patchwork Wed Mar 15 15:06:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176170 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92B8DC61DA4 for ; Wed, 15 Mar 2023 15:31:53 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1071A13C0; Wed, 15 Mar 2023 16:31:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1071A13C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894311; bh=7Rm5rl8OeCAWkljQe3o+60Np2E6ukGuyAf9jP9IYc6w=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=NDMTDQ0ZbFxu3he8mgUxFiqn7C8z4v0KqA4AB1ls2qWG7NZMhifzqj4HhsOyILV7C yl0qM62WWZ1fmobC5FRkGMODEMpsaxtXltfkL09i3NUtmuZ/Xr2xdkrcajZSwFmgaE G3fTUXkaEX6i2W9qgMHLwu7QRLyhZYPzb+KjhcdE= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id AEBF0F80720; Wed, 15 Mar 2023 16:13:11 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 14D52F805D4; Wed, 15 Mar 2023 16:09:45 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7ED3AF805E2 for ; Wed, 15 Mar 2023 16:08:27 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7ED3AF805E2 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjh-0007vL-3K; Wed, 15 Mar 2023 16:08:17 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSje-004KZf-Mv; Wed, 15 Mar 2023 16:08:14 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjd-0057gi-FY; Wed, 15 Mar 2023 16:08:13 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Shengjiu Wang , Xiubo Li , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer Subject: [PATCH 076/173] ASoC: fsl: imx-audmux: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:08 +0100 Message-Id: <20230315150745.67084-77-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1554; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=7Rm5rl8OeCAWkljQe3o+60Np2E6ukGuyAf9jP9IYc6w=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd4T+blhcfk/vA8SLzk8BQ6UIEqcD7+ntHVHw Wb+oBL6KG2JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeEwAKCRDB/BR4rcrs CTSLB/9eXoylhVzAMqbRiHhprdMuMUbIVlVgfD0C87T3tY9+/9AKbctAsw8Me/vDWb5QiTeTX04 g9ziAPQDgR0rNecSyAoEHQJZfOkhqbsL0fe9XlE9lBZtw8oHfLgKSMg8o9rmUtcoUEobOVDm5k7 yNqn2b7tH0V9xQBho5A8B+Y1GW4GzsYNnPBN8aYjqbYgFj3hAjYHqRi+Rrn2g+6SPgGMqTCBVqc +wpCb6q2RUy1XPgYMUaUI1WygF+W/vvQAXYYJG9BqRLMFt6xVClGhZD0T6L+ka69ayiQHbDcDwo VIP8SbRM8pTNnThiUUK05indWUHbmvZ7I1z9eFMY7IpRxM/L X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: XGWJSYWDDN4AGW2Y3IELUWFZF4GH3D44 X-Message-ID-Hash: XGWJSYWDDN4AGW2Y3IELUWFZF4GH3D44 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fabio Estevam , Nicolin Chen , Pengutronix Kernel Team , NXP Linux Team , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/imx-audmux.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c index 582f1e2431ee..be003a117b39 100644 --- a/sound/soc/fsl/imx-audmux.c +++ b/sound/soc/fsl/imx-audmux.c @@ -315,12 +315,10 @@ static int imx_audmux_probe(struct platform_device *pdev) return 0; } -static int imx_audmux_remove(struct platform_device *pdev) +static void imx_audmux_remove(struct platform_device *pdev) { if (audmux_type == IMX31_AUDMUX) audmux_debugfs_remove(); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -359,7 +357,7 @@ static const struct dev_pm_ops imx_audmux_pm = { static struct platform_driver imx_audmux_driver = { .probe = imx_audmux_probe, - .remove = imx_audmux_remove, + .remove_new = imx_audmux_remove, .driver = { .name = DRIVER_NAME, .pm = &imx_audmux_pm, From patchwork Wed Mar 15 15:06:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176167 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ECB0FC6FD1D for ; Wed, 15 Mar 2023 15:31:08 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 687FA135E; Wed, 15 Mar 2023 16:30:16 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 687FA135E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894266; bh=EZGckcKLM37v2OvFGFCDdRxGfVcoY5R/+57Zl0n4oTM=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=oT0+n5dv/MHKvvQ8RVPaB8x+pQsByJTkrC3/UE6GTqaOapa5ZOsNkp2UCd1QVYsGd 8AXyUQHh+uu0Q84TTmBg468ypxXzWJzZKvIBGGb/vJynbm8C/oQR3l36RWe/bfm9c7 Z9Teuq3hih5q5a9dqcYaHfdSCk0l1QXE2WSmPJjA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id BFAAAF80714; Wed, 15 Mar 2023 16:13:02 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C353FF805C4; Wed, 15 Mar 2023 16:09:41 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 236A8F805DA for ; Wed, 15 Mar 2023 16:08:27 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 236A8F805DA Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjh-0007v3-64; Wed, 15 Mar 2023 16:08:17 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSje-004KZY-Ki; Wed, 15 Mar 2023 16:08:14 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjd-0057go-Nj; Wed, 15 Mar 2023 16:08:13 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Shengjiu Wang , Xiubo Li , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer Subject: [PATCH 077/173] ASoC: fsl: imx-pcm-rpmsg: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:09 +0100 Message-Id: <20230315150745.67084-78-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1661; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=EZGckcKLM37v2OvFGFCDdRxGfVcoY5R/+57Zl0n4oTM=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd4VHV29/V4gE79WJYHPLLXMxBetDbfvi0Y3q MO37XW/p6WJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeFQAKCRDB/BR4rcrs CdSWB/9SvDyN/McMzttYZA/Kyr7qDnf2FmMaZR5WzdUoS2vU2nIRn3gs+SIvEfsl3Owgaox1yw8 DYn64h8AN7J28wqdhsyDvE7ay5T7xwqnGky+yRNvSkbQr1hqCZ+OTlKLmFT1PbYBExBLCkJ1q7k izrVMpdyNhhKOMs0CffktgumRGVEp54ZS9oXMv9ebGSwKj3VRJDJY7PF1PCe4ivhWDVUNnTG++M BX5T6m2Usw3nb9CQ4jP9MiLW2Db7YT7cGt9qp7QOM7/pEw7BgTnkY4w5FKOMKgkfVMpSMUtQqVD wio71YixY8n6/3uwtSFMLUY3A4X16c/yEWgWbcSoCmehia2G X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 5LIYOIORJYM5MILDNDGSHMGCWCDXW7JW X-Message-ID-Hash: 5LIYOIORJYM5MILDNDGSHMGCWCDXW7JW X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fabio Estevam , Nicolin Chen , Pengutronix Kernel Team , NXP Linux Team , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/imx-pcm-rpmsg.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/imx-pcm-rpmsg.c b/sound/soc/fsl/imx-pcm-rpmsg.c index 6614b3447649..765dad607bf6 100644 --- a/sound/soc/fsl/imx-pcm-rpmsg.c +++ b/sound/soc/fsl/imx-pcm-rpmsg.c @@ -743,14 +743,12 @@ static int imx_rpmsg_pcm_probe(struct platform_device *pdev) return ret; } -static int imx_rpmsg_pcm_remove(struct platform_device *pdev) +static void imx_rpmsg_pcm_remove(struct platform_device *pdev) { struct rpmsg_info *info = platform_get_drvdata(pdev); if (info->rpmsg_wq) destroy_workqueue(info->rpmsg_wq); - - return 0; } #ifdef CONFIG_PM @@ -821,7 +819,7 @@ static const struct dev_pm_ops imx_rpmsg_pcm_pm_ops = { static struct platform_driver imx_pcm_rpmsg_driver = { .probe = imx_rpmsg_pcm_probe, - .remove = imx_rpmsg_pcm_remove, + .remove_new = imx_rpmsg_pcm_remove, .driver = { .name = IMX_PCM_DRV_NAME, .pm = &imx_rpmsg_pcm_pm_ops, From patchwork Wed Mar 15 15:06:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176166 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 474CCC61DA4 for ; Wed, 15 Mar 2023 15:30:53 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6AD5A13A4; Wed, 15 Mar 2023 16:30:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6AD5A13A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894251; bh=5iJtgOgyyo/1+teuoG4lbK5wrihjCwFgXsIUtvY7fKk=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=UheOc0AMwmgU0p94P9NW2TY4TsOXQCyTT2/W2ytGK5wkbsGrF3eAl8FodKaaEU4iP gSanwPLXH13muK5KTqdPZ7CcQDjTz9IAeS5t5qvwdZfr+cnqGJzdHtzDZa+nhA8V8S eHpDwBcLJ0djA6WHyJIh/Dk8A98T6IRBOSMcN4bc= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 3E10EF8070D; Wed, 15 Mar 2023 16:13:01 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 07F0AF805C5; Wed, 15 Mar 2023 16:09:41 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E9DC4F804B1 for ; Wed, 15 Mar 2023 16:08:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E9DC4F804B1 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjh-0007v4-Ax; Wed, 15 Mar 2023 16:08:17 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSje-004KZc-Lq; Wed, 15 Mar 2023 16:08:14 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjd-0057gr-V2; Wed, 15 Mar 2023 16:08:13 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Shengjiu Wang , Xiubo Li , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer Subject: [PATCH 078/173] ASoC: fsl: imx-sgtl5000: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:10 +0100 Message-Id: <20230315150745.67084-79-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1692; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=5iJtgOgyyo/1+teuoG4lbK5wrihjCwFgXsIUtvY7fKk=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd4YnsK6Wcw+DgrmGVzyWor282+Gkb0GsMiM/ 9FAadCjGVWJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeGAAKCRDB/BR4rcrs CVNhB/0WKbH0qNebg65VsfAebQjLoZYsqa5HL0aetoiq+JT/da0wkxu/NXLXD9bGmpT/m+Nlixe 54quuOdIs9fOharyqFFdcMoKjsB76Hu0f2PvNGDpd/AruuSgD8DirhEmvOtzW1bzSm+1FQZhOFf 9UBdDj9xNK6mt0nrcTnVEW3I8qZiTOGS3NgyxBNU+LVnr5E18CAZe9VQ1thbysG2INGB4vax6cq DYu6XWYxEhWNye0bHaKKqSA5z9J1Bvnk7ci/gwrEFefCzr9sR6ui2agJs90lpyG/Aow86aKI50a HAcAU+MvVVpd9smsYSMbhNNbUjuXDC15Nmbbz0TYkk2WT5dz X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: IKUVTYOKVDVF6Z2JDNEFXK3SP2SSOBUP X-Message-ID-Hash: IKUVTYOKVDVF6Z2JDNEFXK3SP2SSOBUP X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fabio Estevam , Nicolin Chen , Pengutronix Kernel Team , NXP Linux Team , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/imx-sgtl5000.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c index 580a0d963f0e..26c22783927b 100644 --- a/sound/soc/fsl/imx-sgtl5000.c +++ b/sound/soc/fsl/imx-sgtl5000.c @@ -193,14 +193,12 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) return ret; } -static int imx_sgtl5000_remove(struct platform_device *pdev) +static void imx_sgtl5000_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); struct imx_sgtl5000_data *data = snd_soc_card_get_drvdata(card); clk_put(data->codec_clk); - - return 0; } static const struct of_device_id imx_sgtl5000_dt_ids[] = { @@ -216,7 +214,7 @@ static struct platform_driver imx_sgtl5000_driver = { .of_match_table = imx_sgtl5000_dt_ids, }, .probe = imx_sgtl5000_probe, - .remove = imx_sgtl5000_remove, + .remove_new = imx_sgtl5000_remove, }; module_platform_driver(imx_sgtl5000_driver); From patchwork Wed Mar 15 15:06:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176152 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 12874C6FD1D for ; Wed, 15 Mar 2023 15:27:11 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id F0BEE1348; Wed, 15 Mar 2023 16:26:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F0BEE1348 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894029; bh=MLaFMwKz9kXOQDqJ5rFiUNPx5qayl46gRkFmbQjZlC0=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ogcB/m/x6dVU0LhwS61/stLYlFlh15mUk1N0T/xz/n8JxgzgmM0/EpUfntLeursFo QNP/5qzDW8iALpRZWXX5tPJIpXbzNzMrPdgoWHN0DufF2E8oV6qRPS1HB8HpzYwS0I rnI7MF8yGxXeCLakv9xlpzPdMrvW1AXoEYckNtEo= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id F0547F806BF; Wed, 15 Mar 2023 16:12:21 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D5C1BF8065C; Wed, 15 Mar 2023 16:09:28 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BA13CF80423 for ; Wed, 15 Mar 2023 16:08:21 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BA13CF80423 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjh-0007w1-Cd; Wed, 15 Mar 2023 16:08:17 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSje-004KZl-Rx; Wed, 15 Mar 2023 16:08:14 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSje-0057gv-5N; Wed, 15 Mar 2023 16:08:14 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 079/173] ASoC: fsl: mpc5200_psc_ac97: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:11 +0100 Message-Id: <20230315150745.67084-80-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1649; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=MLaFMwKz9kXOQDqJ5rFiUNPx5qayl46gRkFmbQjZlC0=; b=owEBawGU/pANAwAKAcH8FHityuwJAcsmYgBkEd4bZewCOwt/PAZGJRFkbcq8PVUaIbUkFIfx/ K0lVNr3ThWJATEEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeGwAKCRDB/BR4rcrs CZOHB+4hQagnf/vO+lkWUgFf2OyMzlaUJCvmJO3kFJQp85U9W9y3oICYtLv8kRAUy9OHrDpQvTv d5ChleoCh6VSD4kvklzjeTh2tCZZUO3Mt1IkPA1BL9iS5GNZLS32L9OFIkOzBuNzjBVWPagldMo 0vEhGFYBykazqxqTrZfFPGAnSVc27qKweSbEKvoGz16fAp/TaZHqaMbysZTW7N8/aADc6hYCh4X razju89lV1IbcG16436TG3hDKSEEwY6J0nNzc4SrwfpWHEP2OeR/m/3hPJAGzerFVs99t33I/0w jAXvMfapu2nsaJZfKCWVZ8ug/smc89FN56DmAn+RmCEw5Q== X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: KB6P3KG3BIQTA4AKQ4BI7E57PSW3YWTR X-Message-ID-Hash: KB6P3KG3BIQTA4AKQ4BI7E57PSW3YWTR X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/mpc5200_psc_ac97.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/fsl/mpc5200_psc_ac97.c b/sound/soc/fsl/mpc5200_psc_ac97.c index a082ae636a4f..40a4a2667394 100644 --- a/sound/soc/fsl/mpc5200_psc_ac97.c +++ b/sound/soc/fsl/mpc5200_psc_ac97.c @@ -311,12 +311,11 @@ static int psc_ac97_of_probe(struct platform_device *op) return 0; } -static int psc_ac97_of_remove(struct platform_device *op) +static void psc_ac97_of_remove(struct platform_device *op) { mpc5200_audio_dma_destroy(op); snd_soc_unregister_component(&op->dev); snd_soc_set_ac97_ops(NULL); - return 0; } /* Match table for of_platform binding */ @@ -329,7 +328,7 @@ MODULE_DEVICE_TABLE(of, psc_ac97_match); static struct platform_driver psc_ac97_driver = { .probe = psc_ac97_of_probe, - .remove = psc_ac97_of_remove, + .remove_new = psc_ac97_of_remove, .driver = { .name = "mpc5200-psc-ac97", .of_match_table = psc_ac97_match, From patchwork Wed Mar 15 15:06:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176159 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DFE5EC61DA4 for ; Wed, 15 Mar 2023 15:28:59 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EA8141339; Wed, 15 Mar 2023 16:28:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EA8141339 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894138; bh=FUwigMeYuDJCDw0LdCq5DHTlpTJLYmcpmw8mh5EDCpQ=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=mq8ZR0J8Iyfwkvlaoawjr0SHv/V0qQM2dc4gi0Q1YMgCVQSJnUFp/3XGQGZbwqYc0 53vKknnbmYlsntVBJ/QfhovmMQWQ6GMpG790aFGv5xx+NK4m1/0K/euoNQSI+KQrL1 v0O4ghd0l6D+KyxE3ksUMulaE1DKH/I/xHBz0oZ0= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 9A5C4F806DA; Wed, 15 Mar 2023 16:12:39 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DD1B3F805C2; Wed, 15 Mar 2023 16:09:34 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5E6D1F805C6 for ; Wed, 15 Mar 2023 16:08:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5E6D1F805C6 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjh-0007xH-K0; Wed, 15 Mar 2023 16:08:17 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjf-004KZo-4I; Wed, 15 Mar 2023 16:08:15 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSje-0057gy-D9; Wed, 15 Mar 2023 16:08:14 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax Subject: [PATCH 080/173] ASoC: fsl: mpc5200_psc_i2s: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:12 +0100 Message-Id: <20230315150745.67084-81-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1593; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=FUwigMeYuDJCDw0LdCq5DHTlpTJLYmcpmw8mh5EDCpQ=; b=owGbwMvMwMV48I9IxdpTbzgZT6slMaQI3pMzWNlzv5H325mlAgqh81pf3jvQOisolutdVr3cx nyRi70cnYzGLAyMXAyyYoosdUVaYhMk1vy3K1nCDTOIlQlkCgMXpwBMxJGR/X9q5c6AvkyudSc7 XOou7msRK3UMPFcj6mC2J/L1nKkWW5WOXYpZ9MX4+0K3unlKQUtUnsebb7qyU329j36m1fZzRdw e5gfKVwjtmSP160kdg5W04CyvI7yVUfflzj7WWTWRwzvohu+jnXczn/89lXJ5go8uo5tSUsCKJb aykk3K2wsTZ3bYilfvEg3WY6hZMq31Kbc1B4/w/60TObsvBG5NPbGrbG4w/+r4qu9SCs/rp9Zoa 5XZJ9587qEkpZubyGZ2Y5XJuxvpuq/qOjkOTja9avPXIif1nabyL7/cWx7aT3NjLKZ0uzOmtYgw NhpKHvK53aUp6sl4LnBOl4mQ7tFLJurdO5c+/sz746IBAA== X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: E6PKO2LLQGEDXXGEGQNRUPRFNRGVAUK4 X-Message-ID-Hash: E6PKO2LLQGEDXXGEGQNRUPRFNRGVAUK4 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/mpc5200_psc_i2s.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c index 73f3e61f208a..413df413b5eb 100644 --- a/sound/soc/fsl/mpc5200_psc_i2s.c +++ b/sound/soc/fsl/mpc5200_psc_i2s.c @@ -210,11 +210,10 @@ static int psc_i2s_of_probe(struct platform_device *op) } -static int psc_i2s_of_remove(struct platform_device *op) +static void psc_i2s_of_remove(struct platform_device *op) { mpc5200_audio_dma_destroy(op); snd_soc_unregister_component(&op->dev); - return 0; } /* Match table for of_platform binding */ @@ -227,7 +226,7 @@ MODULE_DEVICE_TABLE(of, psc_i2s_match); static struct platform_driver psc_i2s_driver = { .probe = psc_i2s_of_probe, - .remove = psc_i2s_of_remove, + .remove_new = psc_i2s_of_remove, .driver = { .name = "mpc5200-psc-i2s", .of_match_table = psc_i2s_match, From patchwork Wed Mar 15 15:06:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176165 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BA890C6FD1D for ; Wed, 15 Mar 2023 15:30:32 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A25501338; Wed, 15 Mar 2023 16:29:40 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A25501338 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894230; bh=cmP13A8o+Za6P3YFXH6efMNV7cvca/r1fIYEacD5Ox4=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=eIVpdBDavQwVdd1kGkZ7DjjJ23NvmtMWmPTJ28yyBDDxj1EBXM33dsZOTB88ptV+g GQASaswFK6X80j5/eP6eGGUl4b3IrYIClJjA1vI8soUkbQPRYLNVGD1r5/2IeKxhGn veQF37ytXJQyLybKq+uNUwAu3V1R7nVD7QXh14yw= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id BBB52F8064F; Wed, 15 Mar 2023 16:12:58 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 38A6BF805C5; Wed, 15 Mar 2023 16:09:40 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E17AFF805D8 for ; Wed, 15 Mar 2023 16:08:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E17AFF805D8 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjh-0007yd-V7; Wed, 15 Mar 2023 16:08:18 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjf-004KZt-DG; Wed, 15 Mar 2023 16:08:15 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSje-0057h1-JI; Wed, 15 Mar 2023 16:08:14 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Shengjiu Wang , Xiubo Li , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 081/173] ASoC: fsl: mpc8610_hpcd: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:13 +0100 Message-Id: <20230315150745.67084-82-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1763; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=cmP13A8o+Za6P3YFXH6efMNV7cvca/r1fIYEacD5Ox4=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd4gX/B9WGBIOLpcfX8F1BzBvFGywuHUixuIG urHDoa46bqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeIAAKCRDB/BR4rcrs CSxaB/47Qy6arHQwRzgUwnsusrjFdHZpR5Rs/abN9oJx+WtFCSkpKjGT011O2RlsXBbDU48lXTa 7y+qJf8g4aqxV1eeJhkTGqYA0r9TiWpr0fmHGfNkYfmIfxrV3g89K4dOrS4viLwVVQTUXg20aqi gFwLjMB+jHbBav8992AnGYmwnSvBplu9KD578YUaA7m2KEDBEs0Ubf+eyGGyLyVsUpeZmkRyGYN X7Sge04lRcOAD7VAT00JNsKk02pRceHYZO9l8d/wAFU25N0fJzaKfA9/3UbrW1Ilp249bjEBUth rtYK/P+2C8RmVXjRr9L2ASbzP1lE/S2a8TRMxv7V9/9r6MVx X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: CGV3V7R3NPZYV2TY6WNQTHBAXGMEJDVL X-Message-ID-Hash: CGV3V7R3NPZYV2TY6WNQTHBAXGMEJDVL X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Fabio Estevam , Nicolin Chen , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/mpc8610_hpcd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c index e71a992fbf93..ea2076ea8afe 100644 --- a/sound/soc/fsl/mpc8610_hpcd.c +++ b/sound/soc/fsl/mpc8610_hpcd.c @@ -387,7 +387,7 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev) * * This function is called when the platform device is removed. */ -static int mpc8610_hpcd_remove(struct platform_device *pdev) +static void mpc8610_hpcd_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); struct mpc8610_hpcd_data *machine_data = @@ -395,13 +395,11 @@ static int mpc8610_hpcd_remove(struct platform_device *pdev) snd_soc_unregister_card(card); kfree(machine_data); - - return 0; } static struct platform_driver mpc8610_hpcd_driver = { .probe = mpc8610_hpcd_probe, - .remove = mpc8610_hpcd_remove, + .remove_new = mpc8610_hpcd_remove, .driver = { /* The name must match 'compatible' property in the device tree, * in lowercase letters. From patchwork Wed Mar 15 15:06:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176164 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E2BCEC6FD1D for ; Wed, 15 Mar 2023 15:30:19 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9E4D3138D; Wed, 15 Mar 2023 16:29:27 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9E4D3138D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894217; bh=Snt/UTlj6cCx+ffjjMvek8Oo3uNSPrhcycQrRNAXJTQ=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Kz8WMWiAcpmdjLP0PrbAYAwaqHEUDROiM/KYBQEAiizFrqIfzwos/0FCJVtbLLUGG IrZHHvCdL6PuY74uGCDgghU63NMzgwfQtQv2tG7dofESW7zuVnGubtkJy1GTWzBYLG IVwlQRFgqubPlrAGz5sStWGoESK3EVxx6MzaXHUw= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id B86EFF806F8; Wed, 15 Mar 2023 16:12:54 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E8EDDF805C5; Wed, 15 Mar 2023 16:09:38 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 80886F805CB for ; Wed, 15 Mar 2023 16:08:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 80886F805CB Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSji-000806-6p; Wed, 15 Mar 2023 16:08:18 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjf-004Ka0-NG; Wed, 15 Mar 2023 16:08:15 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSje-0057h6-Ry; Wed, 15 Mar 2023 16:08:14 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 082/173] ASoC: fsl: p1022_ds: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:14 +0100 Message-Id: <20230315150745.67084-83-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1670; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Snt/UTlj6cCx+ffjjMvek8Oo3uNSPrhcycQrRNAXJTQ=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd4jRHwM8PynzC58uWNksFQTLp/zj7SS+Vuht T0phmrZGCyJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeIwAKCRDB/BR4rcrs CY4yB/9zQL2r5jS86ekkTa0JfJGOGq/Ph5cs9T7khExt01w+sl4Wg60VB42mZfpdzutLmEAmkIW eD7IEcM+hppLqtRfd6OSD6y3QR7rGYJgH+T28ipMOpmLyB8WgL7fZGJ2W/vg05bsEk5DHKeVi7O TQnaBWCQiUot1rxwDvxUsKQtAS+N6deXpqOkEqt9vYaiw/tZP1WsbRDEHPHcbU8EQUTHQCi6djW D9EDeKrwvImNJjRTkMYPehP761KwF68LFtH9s/Mhq+jDY/Hx8LU+xeoIgA2sDX5qYhaxNHgYK/S 6F9UMnHF/EVOFNM/EV/6DA7n0BwD0jV6TGVW8Rcyhidue3h0 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: SH3QIPSYD46O6U6PUUKTYD4OGRVPUWCN X-Message-ID-Hash: SH3QIPSYD46O6U6PUUKTYD4OGRVPUWCN X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/p1022_ds.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/p1022_ds.c b/sound/soc/fsl/p1022_ds.c index b45742931b0d..0b1418abeb9c 100644 --- a/sound/soc/fsl/p1022_ds.c +++ b/sound/soc/fsl/p1022_ds.c @@ -396,7 +396,7 @@ static int p1022_ds_probe(struct platform_device *pdev) * * This function is called when the platform device is removed. */ -static int p1022_ds_remove(struct platform_device *pdev) +static void p1022_ds_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); struct machine_data *mdata = @@ -404,13 +404,11 @@ static int p1022_ds_remove(struct platform_device *pdev) snd_soc_unregister_card(card); kfree(mdata); - - return 0; } static struct platform_driver p1022_ds_driver = { .probe = p1022_ds_probe, - .remove = p1022_ds_remove, + .remove_new = p1022_ds_remove, .driver = { /* * The name must match 'compatible' property in the device tree, From patchwork Wed Mar 15 15:06:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176162 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A6B0BC61DA4 for ; Wed, 15 Mar 2023 15:29:47 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C09391379; Wed, 15 Mar 2023 16:28:55 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C09391379 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894185; bh=rM2B1eNF3J/lOe6uSgTNNS2drHnAP7ouOW2JZBS8whA=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=AVJHrfSo8hkZPnC9WfnTTX4N5fW8Fa9JzNVJHg6uIL/1wWhi1tnuUPP4JinF4ZAGf I3mLFwXjGisIhGKM4DPIsvtMtlIgKx8RXtLmpvTvMDjB/Y1Ug09FOOUS1X3Pevxm9Y HP5VtIIxHy7CbJeKig2QbBxQoqiPOMstcnDIm0n4= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A0BB6F806EF; Wed, 15 Mar 2023 16:12:48 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 793CDF805C6; Wed, 15 Mar 2023 16:09:37 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8D09BF8052E for ; Wed, 15 Mar 2023 16:08:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8D09BF8052E Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSji-000807-2v; Wed, 15 Mar 2023 16:08:18 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjf-004KZy-NA; Wed, 15 Mar 2023 16:08:15 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjf-0057hB-2Z; Wed, 15 Mar 2023 16:08:15 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 083/173] ASoC: fsl: p1022_rdk: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:15 +0100 Message-Id: <20230315150745.67084-84-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1683; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=rM2B1eNF3J/lOe6uSgTNNS2drHnAP7ouOW2JZBS8whA=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd4m1qEdHMlKgd0g6QPU+9R4xCoJO1xVfNcMy crswPM67/CJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeJgAKCRDB/BR4rcrs CZ9EB/9KUmWz9dQydqIoj9K4hMlL760gEJ8ZVGzjA145KLsHNDz8ZbkK85KwaPI9LDqhM6xRaA6 efwJktBEGypMnC1d+Bnh8wKtrlFHVG5LeE7fQ+9cSAP0EtE1X4iui6r1ez9X2izNEc60LlnuiWb 4/1+VoVjbI9fBILjke0tTDQ+R70BnNRsHkCqkaYNHiKc8idF604u/Mwjuq4tcI7IrHjnqrlSKeK yXE+ZLG5MVy4yNmkwMbNFaHnARO0fq1YCQuLdKs9BtcRh2nALHVaWIsxe7bMA1wqC8dGLe/UTd9 Tnhz0YJ3WAcfu3h4SFHECbayj89IVi1eTnCq358XvZu7hO1f X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 7O6IYJ55A55CDDSCAYNFC6SMVJII4DOS X-Message-ID-Hash: 7O6IYJ55A55CDDSCAYNFC6SMVJII4DOS X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/p1022_rdk.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/p1022_rdk.c b/sound/soc/fsl/p1022_rdk.c index b395adabe823..4d85b742114c 100644 --- a/sound/soc/fsl/p1022_rdk.c +++ b/sound/soc/fsl/p1022_rdk.c @@ -345,7 +345,7 @@ static int p1022_rdk_probe(struct platform_device *pdev) * * This function is called when the platform device is removed. */ -static int p1022_rdk_remove(struct platform_device *pdev) +static void p1022_rdk_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); struct machine_data *mdata = @@ -353,13 +353,11 @@ static int p1022_rdk_remove(struct platform_device *pdev) snd_soc_unregister_card(card); kfree(mdata); - - return 0; } static struct platform_driver p1022_rdk_driver = { .probe = p1022_rdk_probe, - .remove = p1022_rdk_remove, + .remove_new = p1022_rdk_remove, .driver = { /* * The name must match 'compatible' property in the device tree, From patchwork Wed Mar 15 15:06:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176163 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A1A4DC61DA4 for ; Wed, 15 Mar 2023 15:30:04 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2315A1341; Wed, 15 Mar 2023 16:29:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2315A1341 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894202; bh=S7bx951p+HOZI+R4A02wuTDzqf4/t544R+GallvPJHE=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=pOfnWOTTCZoxPcqZtt+q6fSWdmeSRae0PaaxUR54PtO4t7kt5SM7mqD5QFD1QA9eD Au5GXzHRPMBpttb3JQFbTm9COBNPLFGn15X+UQ9J/oEpXpvBU24MCepSC1v4j0UOVA Br4LLhYWOQvS8gXZz7gYedZO/jUJOYUBR9q8dyn8= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E2AB8F806F1; Wed, 15 Mar 2023 16:12:51 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4E644F805C5; Wed, 15 Mar 2023 16:09:38 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0BA3DF805D4 for ; Wed, 15 Mar 2023 16:08:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0BA3DF805D4 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSji-00081Q-Gq; Wed, 15 Mar 2023 16:08:18 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjf-004Ka8-Ux; Wed, 15 Mar 2023 16:08:15 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjf-0057hF-AX; Wed, 15 Mar 2023 16:08:15 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Yang Yingliang Subject: [PATCH 084/173] ASoC: fsl: pcm030-audio-fabric: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:16 +0100 Message-Id: <20230315150745.67084-85-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1746; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=S7bx951p+HOZI+R4A02wuTDzqf4/t544R+GallvPJHE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd4pIsou8KuPZoqVMvpX3nR3jV2JC+jYU65ej plOGJHSy+2JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeKQAKCRDB/BR4rcrs CQIiB/96MPapTnv4TtYcEOyHeljMgwTE7ZJZfTtKT+xwgaTLuQ2JvUeEkmn0uuSv2VNbeqpox73 n78aQPNBRPUyEWSzNokAEfFJ0FbDEPhtdAtPFnSDisYocolP2bzRHaujMV7hxN0ZQHgUVMd9Gwf i44SvIHLXaDBuSZkYcfqIh3mYM/r4wroo+Vfy5AhdNbFMyASJWX6pr0CO7QlwFADNwQWTXjZMLb NbRO+cuBqf908B7IpK2JtgpD05EVDd/UJmc6NaNPbraTG7aTHmfupUaQdWkyvN3XsHdcu1JrxO6 HTm2fYgo4i9phlsd5IXbO7zGd2eLWbTmuBp2ym11K3soxAq6 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: ZPETNC6HK6ECN6QG4DBB5ZPUDOKPYOKP X-Message-ID-Hash: ZPETNC6HK6ECN6QG4DBB5ZPUDOKPYOKP X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/fsl/pcm030-audio-fabric.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/pcm030-audio-fabric.c b/sound/soc/fsl/pcm030-audio-fabric.c index 997c3e66c636..d24c02e90878 100644 --- a/sound/soc/fsl/pcm030-audio-fabric.c +++ b/sound/soc/fsl/pcm030-audio-fabric.c @@ -109,14 +109,12 @@ static int pcm030_fabric_probe(struct platform_device *op) } -static int pcm030_fabric_remove(struct platform_device *op) +static void pcm030_fabric_remove(struct platform_device *op) { struct pcm030_audio_data *pdata = platform_get_drvdata(op); snd_soc_unregister_card(pdata->card); platform_device_unregister(pdata->codec_device); - - return 0; } static const struct of_device_id pcm030_audio_match[] = { @@ -127,7 +125,7 @@ MODULE_DEVICE_TABLE(of, pcm030_audio_match); static struct platform_driver pcm030_fabric_driver = { .probe = pcm030_fabric_probe, - .remove = pcm030_fabric_remove, + .remove_new = pcm030_fabric_remove, .driver = { .name = DRV_NAME, .of_match_table = pcm030_audio_match, From patchwork Wed Mar 15 15:06:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176169 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4C228C7618B for ; Wed, 15 Mar 2023 15:31:38 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D8F6E13CE; Wed, 15 Mar 2023 16:30:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D8F6E13CE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894295; bh=Gvew36y30KZaSjscw1P3MRFZiS7QSiA3KSnhv+WKp4E=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=K4Jhq5x20fpEUoZXb/E8BmaM+NUM27zwK8moyFOqUWSa7iz7nZ9sFHD5+3+MO+C37 xnWltk7936csqIVkK2jzZmDI3T3iQZs1jXUoRhIyj2tD/ifbjTBQAARtEtMaeopkvV VE+pOHjfJjTmtuF9Bt9Nd61HFHBPFW0reOTEVMBw= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2CBDCF8071C; Wed, 15 Mar 2023 16:13:08 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C93AFF805C7; Wed, 15 Mar 2023 16:09:43 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 293B3F805E0 for ; Wed, 15 Mar 2023 16:08:27 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 293B3F805E0 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSji-00083Z-V6; Wed, 15 Mar 2023 16:08:18 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjg-004KaD-C4; Wed, 15 Mar 2023 16:08:16 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjf-0057hJ-HH; Wed, 15 Mar 2023 16:08:15 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Kuninori Morimoto Subject: [PATCH 085/173] ASoC: generic: test-component: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:17 +0100 Message-Id: <20230315150745.67084-86-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1549; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Gvew36y30KZaSjscw1P3MRFZiS7QSiA3KSnhv+WKp4E=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd4sGmBH3qh+vMSv41z++ZXBISnzRrlnABd4A 4dZoPNAo9WJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeLAAKCRDB/BR4rcrs CXcQCACfmQGQrBDyoI6FQAszjAiPcCoCiwolWAn76pwLoTr32dREAEiyD1bQU91M6ALad1pvJxz 6D3aAFLZagbhaBnCnGVtmVjd+1WCWoVtuauAzmagQfRvU4GHMQPUQ//DSqRXtj8wJ6RFqBAuCP0 o377LnxznWVIRbQg7gx7sI8gYLN9vxMhEcc7RIIE1HE6eLjXbilC2mVfiWRSF/VJUJqiQ2jmgNg e82WhF+T6fQih8Y68CeCwxosp3FLV1qCtTvUIYOctjrm5qTFKZ2fd3WFoKRVNlkG56fxKSSVn8J zPXO+UHIz4M+Q5CQOSZnkmSt1Yi2PDnEtAo6Y/fxy6f9c552 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: VVCYJCHQ5LLXTNMEEBIJRAC33DLONVVW X-Message-ID-Hash: VVCYJCHQ5LLXTNMEEBIJRAC33DLONVVW X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/generic/test-component.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/generic/test-component.c b/sound/soc/generic/test-component.c index 98c8990596a8..e10e5bf28432 100644 --- a/sound/soc/generic/test-component.c +++ b/sound/soc/generic/test-component.c @@ -635,11 +635,9 @@ static int test_driver_probe(struct platform_device *pdev) return 0; } -static int test_driver_remove(struct platform_device *pdev) +static void test_driver_remove(struct platform_device *pdev) { mile_stone_x(&pdev->dev); - - return 0; } static struct platform_driver test_driver = { @@ -648,7 +646,7 @@ static struct platform_driver test_driver = { .of_match_table = test_of_match, }, .probe = test_driver_probe, - .remove = test_driver_remove, + .remove_new = test_driver_remove, }; module_platform_driver(test_driver); From patchwork Wed Mar 15 15:06:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176168 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 93D98C61DA4 for ; Wed, 15 Mar 2023 15:31:23 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7293D13B3; Wed, 15 Mar 2023 16:30:31 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7293D13B3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894281; bh=mAfToYYRajwhEI7ApvCPU/bfjlrvkX0rl1TSVQcFKpA=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=AFuXC2sJ6zD3lLlP+RbFCS7Rt8yAn6ql+OYvLI/IwcnDaZZHqjXhHNtvwEyivBcA3 NTjKpE6KzQmv10W7vLJ4idfkhrD63ulbkdLdFoyqztZpnRlER7ABv3t07iAwFEkREB 8GgiWAiw9HORgfA6bQFHpa6UIiYdNi+SixMYgI3s= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id BB78FF80716; Wed, 15 Mar 2023 16:13:05 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 787B0F805C5; Wed, 15 Mar 2023 16:09:42 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5D8ACF805E1 for ; Wed, 15 Mar 2023 16:08:27 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5D8ACF805E1 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjj-00085v-Fg; Wed, 15 Mar 2023 16:08:19 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjg-004KaL-UF; Wed, 15 Mar 2023 16:08:16 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjf-0057hM-Ni; Wed, 15 Mar 2023 16:08:15 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Minghao Chi Subject: [PATCH 086/173] ASoC: img: img-i2s-in: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:18 +0100 Message-Id: <20230315150745.67084-87-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1599; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=mAfToYYRajwhEI7ApvCPU/bfjlrvkX0rl1TSVQcFKpA=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd4vd0v46P7Yl/1RPIgkF5oYs0XAfOZ0/xvXa DCyJhMqWnCJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeLwAKCRDB/BR4rcrs CY1uB/4zcfMe+xNhNTJFAG5nGDuJIpvbeYBY9RBRujNUFjTp8JaA58H8HoXuJY+jbwd59lLDb8v YY8pOJcgYM+E4JDTXbsDg0trgWekvySqn3gI3vqUBj5bLtA3O9szAP9/ljFY+ZPnImYZ7sf7M+6 1Efjjpkpb4Gbsr98HW5DVpCYvSj7OxkcO5yDXCTJPCeZHwZnDSVQoHS4gKj6r5eInZ0nHwnSLur e5TZGM6fBoKDoSTvutD23KMG9YkX3qs4587oOWFsGa4+ntSazlLcqf3nxHLDKgSdzqbYrBkPUvB eslmcwWwmJcR2GBy4ha/nk9/rB+ZPYIk2H5EV7XJvMfOwU9t X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: G4LI2CYDIK2STAOQXIPPQB2XLCZ3ELSO X-Message-ID-Hash: G4LI2CYDIK2STAOQXIPPQB2XLCZ3ELSO X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/img/img-i2s-in.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/img/img-i2s-in.c b/sound/soc/img/img-i2s-in.c index 56bb7bbd3976..b7ab8467b5cf 100644 --- a/sound/soc/img/img-i2s-in.c +++ b/sound/soc/img/img-i2s-in.c @@ -532,13 +532,11 @@ static int img_i2s_in_probe(struct platform_device *pdev) return ret; } -static int img_i2s_in_dev_remove(struct platform_device *pdev) +static void img_i2s_in_dev_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) img_i2s_in_runtime_suspend(&pdev->dev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -609,7 +607,7 @@ static struct platform_driver img_i2s_in_driver = { .pm = &img_i2s_in_pm_ops }, .probe = img_i2s_in_probe, - .remove = img_i2s_in_dev_remove + .remove_new = img_i2s_in_dev_remove }; module_platform_driver(img_i2s_in_driver); From patchwork Wed Mar 15 15:06:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176286 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1D301C6FD1D for ; Wed, 15 Mar 2023 15:54:16 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0BD5B155F; Wed, 15 Mar 2023 16:53:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0BD5B155F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895654; bh=sk1qEXx9hxufZWcKJoi2K7B+q2dhAbe5HE7FKeg27oY=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=GGlWy4m5nT/SmPxiZ01gJuQIorG5HjkeHKVU5lyKpYRAEkRRl2qpWYEHmdX9h2909 W5reVmVVzUumc6naGipSyUc0qkDC5+pM36gqMMocUhK8UFZltS/ICQwmKFTNaP1vNz fJmpl7QS+cOoxrbCUAszyyzCSeCc296yOu2JPmuk= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E1E53F89723; Wed, 15 Mar 2023 16:17:59 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8587EF80623; Wed, 15 Mar 2023 16:11:01 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 380B0F8057E for ; Wed, 15 Mar 2023 16:09:02 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 380B0F8057E Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjj-00085u-QN; Wed, 15 Mar 2023 16:08:19 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjg-004KaK-UJ; Wed, 15 Mar 2023 16:08:16 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjf-0057hR-Vx; Wed, 15 Mar 2023 16:08:16 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Kai Vehmanen , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 087/173] ASoC: img: img-i2s-out: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:19 +0100 Message-Id: <20230315150745.67084-88-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1614; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=sk1qEXx9hxufZWcKJoi2K7B+q2dhAbe5HE7FKeg27oY=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd4x+r81vz2NWpCoMLQLtqDV0mIFceAwPcpRO c4fMWkUg5+JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeMQAKCRDB/BR4rcrs CewlB/4pLq94+tOFLPu1XYpKenw9KCZQELbsip0gVSW0sxXUopaZxZQ1WSL0vitoyYfh1nkqoe6 bc5LSZ1Q/oQYSgyO++TAODhMMVDs+Vw/tIHnsp6P1laOdvItLMRnpCtTRzlgP+fGHD4IdEFIml6 IVc+HFcQ52LWtAvSjMYBsZX4gtAC6Shr/YLF0Msn70/HvI8WK2Yl9B5YHvZq8LOyFns7RBxnV+S 7jQGmgjVfoTkpoi3DyUbZYHBdh1Z+Xy/qR/weDtipW2fJiSh7zSRRA22CgzRNLeTJdltSWi2VWY k1UPy3X37m8ztXlQDHA+P6pcw9FdVPMfoeRSCD9deAxsvZ+u X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: DJGELFWKRJRVD7RKCBGBSW7FRSWS33RS X-Message-ID-Hash: DJGELFWKRJRVD7RKCBGBSW7FRSWS33RS X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/img/img-i2s-out.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/img/img-i2s-out.c b/sound/soc/img/img-i2s-out.c index abeff7829310..fe95ddfb8407 100644 --- a/sound/soc/img/img-i2s-out.c +++ b/sound/soc/img/img-i2s-out.c @@ -532,13 +532,11 @@ static int img_i2s_out_probe(struct platform_device *pdev) return ret; } -static int img_i2s_out_dev_remove(struct platform_device *pdev) +static void img_i2s_out_dev_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) img_i2s_out_runtime_suspend(&pdev->dev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -609,7 +607,7 @@ static struct platform_driver img_i2s_out_driver = { .pm = &img_i2s_out_pm_ops }, .probe = img_i2s_out_probe, - .remove = img_i2s_out_dev_remove + .remove_new = img_i2s_out_dev_remove }; module_platform_driver(img_i2s_out_driver); From patchwork Wed Mar 15 15:06:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176175 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 04218C61DA4 for ; Wed, 15 Mar 2023 15:33:12 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 279141310; Wed, 15 Mar 2023 16:32:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 279141310 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894390; bh=YPO4VR6mwV6Uj6GEU4R+EW+Lyni9vsTb3MHMAInqoV8=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=G9eAoiPStzcDbGIGAlyE6rJzC7cuQK0KQaxvkWk9JTmKuiKS6x2GX7I/P0nfoZqK1 erwzKKEPKheMH45eyTspeBEPcdM0Vkf32XQE1k4G9IvOUWqcRG0KgaPfXChOnRC1Lw 2Vy6YGgXQX6/T5C8JBdN1L0iDT6nbmv2jGIQMapE= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 8E49EF80750; Wed, 15 Mar 2023 16:13:24 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3A13FF805D8; Wed, 15 Mar 2023 16:09:49 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 867CBF805E3 for ; Wed, 15 Mar 2023 16:08:27 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 867CBF805E3 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjj-00086u-NL; Wed, 15 Mar 2023 16:08:19 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjh-004KaS-4q; Wed, 15 Mar 2023 16:08:17 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjg-0057hV-5u; Wed, 15 Mar 2023 16:08:16 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Minghao Chi Subject: [PATCH 088/173] ASoC: img: img-parallel-out: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:20 +0100 Message-Id: <20230315150745.67084-89-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1770; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=YPO4VR6mwV6Uj6GEU4R+EW+Lyni9vsTb3MHMAInqoV8=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd41JqjwKyXKeAh7wqoKU/c0+FdnbjKHRfkLT hu9d2/mZ5yJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeNQAKCRDB/BR4rcrs CXWEB/wMH4UV6WqSFTFcCiTl6rXeWmQVPOShqRcXkVnM9VqgOiEevzE15BvnGVK673v9Zcot0Ig 9lZzd3CRMyKIQgKQYAdLPVNIyDJ7K02oksvgZ/SLuG4GtJkXeXGPwfoyLcZ/rwNGDHKFjsYcY+I 41A1A89AhxHFerkWQ+WwOh+5+jO0RZJE+9Ir4HBMxajhJqVmeM7Y5QAwUsJkISWb4wMZROE67bX rMubKhLpTPlpB6FNtqNsqizkVBVufZufobxVdyVTv4+fd7vK11oiD+G/NiHw5bh7bTLJ96P17cl aWB79V8MJv26kc+uqTDfAs/rf+ryL5cC6ioDGhpGNXc0IQQP X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: OXTQP6MOFHBXHOD3CABLNFNSMN4IO3CS X-Message-ID-Hash: OXTQP6MOFHBXHOD3CABLNFNSMN4IO3CS X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/img/img-parallel-out.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/img/img-parallel-out.c b/sound/soc/img/img-parallel-out.c index 08506b05e226..df1291ee2b3b 100644 --- a/sound/soc/img/img-parallel-out.c +++ b/sound/soc/img/img-parallel-out.c @@ -282,7 +282,7 @@ static int img_prl_out_probe(struct platform_device *pdev) return ret; } -static int img_prl_out_dev_remove(struct platform_device *pdev) +static void img_prl_out_dev_remove(struct platform_device *pdev) { struct img_prl_out *prl = platform_get_drvdata(pdev); @@ -291,8 +291,6 @@ static int img_prl_out_dev_remove(struct platform_device *pdev) img_prl_out_suspend(&pdev->dev); clk_disable_unprepare(prl->clk_sys); - - return 0; } static const struct of_device_id img_prl_out_of_match[] = { @@ -313,7 +311,7 @@ static struct platform_driver img_prl_out_driver = { .pm = &img_prl_out_pm_ops }, .probe = img_prl_out_probe, - .remove = img_prl_out_dev_remove + .remove_new = img_prl_out_dev_remove }; module_platform_driver(img_prl_out_driver); From patchwork Wed Mar 15 15:06:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176171 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4440AC61DA4 for ; Wed, 15 Mar 2023 15:32:09 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E856D13EC; Wed, 15 Mar 2023 16:31:16 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E856D13EC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894327; bh=caJXpXbDDNsn9Xq29RP9miXgv1XnX3Zojhb2eBbQQak=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Bx998CqU399iywMQF/Z02bdcpNujTkZLY262sxPlFb5dXwVVtp/MSuMda/DKxMWbu DJrqzcCGRsrjmclqZO37tBuCGjA0XGpyatAdZfGhdZBxR33frtY4AmbOnqbicQWOue m45X0P9Mo16ftwxvw4OLiRR80hd27/0r5sdUwit4= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A9365F8072D; Wed, 15 Mar 2023 16:13:13 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 882EBF805D4; Wed, 15 Mar 2023 16:09:45 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 45B0CF8052D for ; Wed, 15 Mar 2023 16:08:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 45B0CF8052D Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjj-00086s-VE; Wed, 15 Mar 2023 16:08:20 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjh-004KaR-4q; Wed, 15 Mar 2023 16:08:17 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjg-0057hY-Cu; Wed, 15 Mar 2023 16:08:16 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Minghao Chi Subject: [PATCH 089/173] ASoC: img: img-spdif-in: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:21 +0100 Message-Id: <20230315150745.67084-90-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1629; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=caJXpXbDDNsn9Xq29RP9miXgv1XnX3Zojhb2eBbQQak=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd43wLBFADjTRQBBjlRR599tdH/NQgu8Q34iN Vn19E7Q/pyJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeNwAKCRDB/BR4rcrs CfIECACbM8Og6xFPLVdWIrRwXuRVxZvAkzGhBft25AZAFOHf/+md28oYgfWvxCeh+nEK11w2NUa M2KaRRWOGb9H8lenlPnwqpPuj7AaJyQQH2TkR1lcx2wmGJoSvro7Mom7GSgczZmgXss+/APh7d0 1xN8eufwyvyrGYoLGQAnnZomNVn9eJwkTsJfoFDGacA7cUI/BoXBu0UaxDnOQaVWXp6GYHT+UpV NSecZGtUv6rNCna8hIkLBX6DrHkEpcqLV7jd5cWpbUwIlyQx2vabe96UYzLa1LvzfhzmBpBcXI3 xyj1itXUBwsvC16amLZ2M9D0X5j5HMOFN4l+7k7cXlezEZTd X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: J66CDCEGHIIGPJF5I2NQYPE5OO5GFYUC X-Message-ID-Hash: J66CDCEGHIIGPJF5I2NQYPE5OO5GFYUC X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/img/img-spdif-in.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/img/img-spdif-in.c b/sound/soc/img/img-spdif-in.c index 3f1d1a7e8735..558062a1804a 100644 --- a/sound/soc/img/img-spdif-in.c +++ b/sound/soc/img/img-spdif-in.c @@ -810,13 +810,11 @@ static int img_spdif_in_probe(struct platform_device *pdev) return ret; } -static int img_spdif_in_dev_remove(struct platform_device *pdev) +static void img_spdif_in_dev_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) img_spdif_in_runtime_suspend(&pdev->dev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -880,7 +878,7 @@ static struct platform_driver img_spdif_in_driver = { .pm = &img_spdif_in_pm_ops }, .probe = img_spdif_in_probe, - .remove = img_spdif_in_dev_remove + .remove_new = img_spdif_in_dev_remove }; module_platform_driver(img_spdif_in_driver); From patchwork Wed Mar 15 15:06:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176174 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9EF2FC76195 for ; Wed, 15 Mar 2023 15:32:58 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BBBAC13D5; Wed, 15 Mar 2023 16:32:06 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BBBAC13D5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894376; bh=OGPo9ZzjFiyT3hFV+92ViHoT5jJAEqeRXaGwuuIK6xw=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=HRgtVs1PB5+EvFdl7CmPg/TsS5mjlN+/IcVN371wo1+4inRxJRsAo0aFvvYKRQ+R/ 9dna1x/XHNUj65jcZkajXuVCLaS0HLD0jdt/UPuNB4Or+AibAWdo08E0CXpyWnxefN nAnNen/7EonrcINVYUJIM9Iap3RiQCMVkHfGJVrU= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 767AAF8074C; Wed, 15 Mar 2023 16:13:20 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1E7F9F805D8; Wed, 15 Mar 2023 16:09:48 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1A1B0F805EA for ; Wed, 15 Mar 2023 16:08:34 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1A1B0F805EA Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjm-0008GC-LO; Wed, 15 Mar 2023 16:08:22 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjj-004Kb6-Az; Wed, 15 Mar 2023 16:08:19 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjg-0057hc-JF; Wed, 15 Mar 2023 16:08:16 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Minghao Chi , Charles Keepax Subject: [PATCH 090/173] ASoC: img: img-spdif-out: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:22 +0100 Message-Id: <20230315150745.67084-91-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1644; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=OGPo9ZzjFiyT3hFV+92ViHoT5jJAEqeRXaGwuuIK6xw=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd46atZtvUe29pMPmzx2RVlbEtjx8sjEIxX5n 5bK4YirQD2JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeOgAKCRDB/BR4rcrs Cb5cCACJB9Cy9BthaghIPAVeGJPO0PlczsgJh0C1W+BqqhUzkFTwA97TzD/vrgrBmm57KEwe+xV 34H0ifVbbPLUafe/5a+vXt4t4Hio/8bHIZbd3249CHLp6fbWe3nYGcJx4B9leiZKwj+gOu2Z19O B6f8/XxZm5DZBOVhga83TZQ/EDMpWz8VmihNUp3715tvNy4wwU4U+iAChv/OqTO28JN4nPet0IT kBvMfyG8MpEVBAPwPjAm+2fEsLnfyNqOvHZG1WCmnMAahO06rX1X7rt8M+VI4gImlXNCzJoks9z d3vmJ0d0UK820q90J9/RtQBcDMIFOdNgn9I/HrdP+XC1acKn X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: L3CKEDNEX3RQHRPQVAEJ4DJ3AI2TVGHG X-Message-ID-Hash: L3CKEDNEX3RQHRPQVAEJ4DJ3AI2TVGHG X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/img/img-spdif-out.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/img/img-spdif-out.c b/sound/soc/img/img-spdif-out.c index 983761d3fa7e..b13e128e50d6 100644 --- a/sound/soc/img/img-spdif-out.c +++ b/sound/soc/img/img-spdif-out.c @@ -402,13 +402,11 @@ static int img_spdif_out_probe(struct platform_device *pdev) return ret; } -static int img_spdif_out_dev_remove(struct platform_device *pdev) +static void img_spdif_out_dev_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) img_spdif_out_runtime_suspend(&pdev->dev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -470,7 +468,7 @@ static struct platform_driver img_spdif_out_driver = { .pm = &img_spdif_out_pm_ops }, .probe = img_spdif_out_probe, - .remove = img_spdif_out_dev_remove + .remove_new = img_spdif_out_dev_remove }; module_platform_driver(img_spdif_out_driver); From patchwork Wed Mar 15 15:06:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176172 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2595EC61DA4 for ; Wed, 15 Mar 2023 15:32:29 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D7F2413A3; Wed, 15 Mar 2023 16:31:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D7F2413A3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894346; bh=2mMKd9mCReKqcthawRe+K9t2mI8DXHqv4Kg2doti88k=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=gxmeAM0H36zWmV2zP6IhU1K7EAUFGS0ObFcwQ/LCVKRJXqnYSV1NN6cHjSRbFdUh/ yWROVhamyM2KAJd+XFcZVuHN8WcCmYOBDbHlRQIRXIV3X2oE2taLWqUbkLVKQPwLLL eN80PsN8i8kWSUZn3OxM4egKQ4uuxl1ekLaToqzE= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 562CDF80736; Wed, 15 Mar 2023 16:13:16 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 43FF6F805D4; Wed, 15 Mar 2023 16:09:46 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 717EEF80482 for ; Wed, 15 Mar 2023 16:08:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 717EEF80482 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjl-0008Cq-IX; Wed, 15 Mar 2023 16:08:21 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSji-004Kan-Bg; Wed, 15 Mar 2023 16:08:18 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjg-0057hf-SE; Wed, 15 Mar 2023 16:08:16 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax Subject: [PATCH 091/173] ASoC: img: pistachio-internal-dac: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:23 +0100 Message-Id: <20230315150745.67084-92-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1809; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=2mMKd9mCReKqcthawRe+K9t2mI8DXHqv4Kg2doti88k=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd49XxOL3bAVC7aweYop/NGIbapas3l1DmdBL do/xOGdJVyJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHePQAKCRDB/BR4rcrs CaQkB/92UJX8GOPKvMey05E6dZCx/+kaK5IA2fVIByAj5lQlR/yD26Ndza8yaE5KinFVxi2mGyD SHa/ApZmC/p1d2yEaujauw5QmyKU9Z2dAWaf65jT3U9YM1+BBzVP4on6G1ooOqUfwWjyOZSxcqd CWA9jaSwndSNboah/bfQ0K0MN7NnOsOE9Wb04rMcgGYBUOQi+cZTucYqOLQTB9BTtWvNoJDSNxc p7xIfeVd7O8D9dgnC6ZLSCV0lQqCzsjKvSoZJkp/9PDV/FeW9HbOO5OkR+uXbBlsakioMySXT0H 7KSR3aky6j4rCuOxL0tVApP6Ogmh/xTduhKP+9lLAbzaO+3Q X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 2NCOFFNN5L5S3R6VQCMW5AQVOCHQIHB4 X-Message-ID-Hash: 2NCOFFNN5L5S3R6VQCMW5AQVOCHQIHB4 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/img/pistachio-internal-dac.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/img/pistachio-internal-dac.c b/sound/soc/img/pistachio-internal-dac.c index e3b858643bd5..da6251680e41 100644 --- a/sound/soc/img/pistachio-internal-dac.c +++ b/sound/soc/img/pistachio-internal-dac.c @@ -215,15 +215,13 @@ static int pistachio_internal_dac_probe(struct platform_device *pdev) return ret; } -static int pistachio_internal_dac_remove(struct platform_device *pdev) +static void pistachio_internal_dac_remove(struct platform_device *pdev) { struct pistachio_internal_dac *dac = dev_get_drvdata(&pdev->dev); pm_runtime_disable(&pdev->dev); pistachio_internal_dac_pwr_off(dac); regulator_disable(dac->supply); - - return 0; } #ifdef CONFIG_PM @@ -273,7 +271,7 @@ static struct platform_driver pistachio_internal_dac_plat_driver = { .pm = &pistachio_internal_dac_pm_ops }, .probe = pistachio_internal_dac_probe, - .remove = pistachio_internal_dac_remove + .remove_new = pistachio_internal_dac_remove }; module_platform_driver(pistachio_internal_dac_plat_driver); From patchwork Wed Mar 15 15:06:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176253 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 438EFC6FD1D for ; Wed, 15 Mar 2023 15:48:45 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3EBCE14DC; Wed, 15 Mar 2023 16:47:53 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3EBCE14DC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895323; bh=Xf5bOoH1MuminEEvN7xrWq25qG+rKH+DUyT1lZpw864=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=PTp7wp1OgSiOisaT6GAIvPPW+F/NxX42WxGuNVXhLBjUsHY68i2gN4txqADiZeNeF xxR9ntzVrt6soPx+J14lMOUFxjot5PdI6XwojcDXaINJc8VLZogdknBja2w8AEFjWe 89SlLr623iNQwuXMn/yeo4b+LW7sB1Ph8DrrIRMw= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 39EB2F805E2; Wed, 15 Mar 2023 16:16:34 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CE36AF80614; Wed, 15 Mar 2023 16:10:42 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BCC58F8056F for ; Wed, 15 Mar 2023 16:08:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BCC58F8056F Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjm-0008H9-Pu; Wed, 15 Mar 2023 16:08:22 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjj-004KbE-I0; Wed, 15 Mar 2023 16:08:19 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjh-0057hk-2B; Wed, 15 Mar 2023 16:08:17 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax Subject: [PATCH 092/173] ASoC: Intel: sst-mfld-platform-pcm: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:24 +0100 Message-Id: <20230315150745.67084-93-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1628; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Xf5bOoH1MuminEEvN7xrWq25qG+rKH+DUyT1lZpw864=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd5AjIQMsP1ZGmj+E8+PZMMYcWdQIgsKkHCVk O64mDbHPaGJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeQAAKCRDB/BR4rcrs CcQEB/4kPikCvuYbKzprnOo2czc58UQugsjW3XyAx8akyThZEkMmY26c07ChRMLXXQvW22t1BMf rVAdaoxXlZhOQVyIZZUWybIsdr1YCNUVTNw9MiIzKqJ8OU617Kc5BZKZuvkFS3vO0k9w9zfQ47U qsX+2qmi37Oq/1/TMw+Hk5/O5j+SaMT8UOQXhWrt2FGVHro4sGYGEgsGNkmlX8DDY6Ku+KXZgdf y6jEz8cEcGuSm0cnJhqxM7uiJIrhgJcjCjkAOxe48CGkBdTmfCaUPrYLmhTV85TFgFuik5jOb8j ZhO+sBjhDYT7EHBaTCviMTTDBtLI8inQmJb8o5CCk+pYWSvK X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: CHWJDRLMY4LDFEV3ML3YIYBGA6QUJJMQ X-Message-ID-Hash: CHWJDRLMY4LDFEV3ML3YIYBGA6QUJJMQ X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c index c75616a5fd0a..ba4597bdf32e 100644 --- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c +++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c @@ -741,10 +741,9 @@ static int sst_platform_probe(struct platform_device *pdev) return ret; } -static int sst_platform_remove(struct platform_device *pdev) +static void sst_platform_remove(struct platform_device *pdev) { dev_dbg(&pdev->dev, "sst_platform_remove success\n"); - return 0; } #ifdef CONFIG_PM_SLEEP @@ -813,7 +812,7 @@ static struct platform_driver sst_platform_driver = { .pm = &sst_platform_pm, }, .probe = sst_platform_probe, - .remove = sst_platform_remove, + .remove_new = sst_platform_remove, }; module_platform_driver(sst_platform_driver); From patchwork Wed Mar 15 15:06:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176235 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 21C9FC61DA4 for ; Wed, 15 Mar 2023 15:44:34 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 19FB684D; Wed, 15 Mar 2023 16:43:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 19FB684D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895072; bh=OyEOZykefhgVgex7iCw3irk3tvrRh0H+0rRIsGTTINM=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=m70JzxwVkJ2Bby+NKAG5wiOGHYPyQoeaebBfM6TJzPetfObdXEbiyPCx414VnJBDf byx8ayQe9Cta9VZgxng0rUsRIT+1yMFdGsqJUyzfHvpsWZIs0BUK2vKgcbMRzvbY8K QWCeEheHuJH9bqsM+lCTG9+qMJFo1LdjUxIUFZgY= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 96A8DF80CB3; Wed, 15 Mar 2023 16:15:38 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2DDA7F80601; Wed, 15 Mar 2023 16:10:26 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id F342CF8060D for ; Wed, 15 Mar 2023 16:08:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F342CF8060D Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjl-0008By-Ce; Wed, 15 Mar 2023 16:08:21 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSji-004Kah-4O; Wed, 15 Mar 2023 16:08:18 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjh-0057hp-9M; Wed, 15 Mar 2023 16:08:17 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 093/173] ASoC: Intel: sst: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:25 +0100 Message-Id: <20230315150745.67084-94-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1723; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=OyEOZykefhgVgex7iCw3irk3tvrRh0H+0rRIsGTTINM=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd5DLQ7R1quKibSGqQzvLfAW3IURcigi10X+Y rPIv9o4696JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeQwAKCRDB/BR4rcrs CbvIB/9rqKxAXqbqx1PDqKnKcar/PdobNh/ancOHp6kYlRhVAfAj4nRv0tkUCm234z0g5fsJodn jZKLfJsz79up47E7kfKBJDCdSIMTjLnNwIFeMPOIuyNuXDz7aOnfAolmCyFtkmsNA9d/7mDBUeW 2WP2mKGQAQsjkZMU9dihz3+6B6Zt9dtUM/uL75dj2MzOz99ltwaUc1ETnYVPqB6wiUqzVUi70Kh 5c2sSI1ssjlF3yf4bscamntzeHHsRdYKxWUFpg07Zo8CHJCD24gGV6e9c6QFnNkpZrCy+3f1ccg 7Yr5qjzP2shjwvJl0CdcDQ1+El7B3TYaAzH1VRf/0VMvX2sz X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 7PDRAWM6W2NEW7QBJJOV37S63IPS6NV7 X-Message-ID-Hash: 7PDRAWM6W2NEW7QBJJOV37S63IPS6NV7 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/intel/atom/sst/sst_acpi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/intel/atom/sst/sst_acpi.c b/sound/soc/intel/atom/sst/sst_acpi.c index 3be64430c256..d3973936426a 100644 --- a/sound/soc/intel/atom/sst/sst_acpi.c +++ b/sound/soc/intel/atom/sst/sst_acpi.c @@ -335,14 +335,13 @@ static int sst_acpi_probe(struct platform_device *pdev) * This function is called by OS when a device is unloaded * This frees the interrupt etc */ -static int sst_acpi_remove(struct platform_device *pdev) +static void sst_acpi_remove(struct platform_device *pdev) { struct intel_sst_drv *ctx; ctx = platform_get_drvdata(pdev); sst_context_cleanup(ctx); platform_set_drvdata(pdev, NULL); - return 0; } static const struct acpi_device_id sst_acpi_ids[] = { @@ -360,7 +359,7 @@ static struct platform_driver sst_acpi_driver = { .pm = &intel_sst_pm, }, .probe = sst_acpi_probe, - .remove = sst_acpi_remove, + .remove_new = sst_acpi_remove, }; module_platform_driver(sst_acpi_driver); From patchwork Wed Mar 15 15:06:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176233 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BFE76C61DA4 for ; Wed, 15 Mar 2023 15:43:59 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A0C5714AC; Wed, 15 Mar 2023 16:43:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A0C5714AC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895037; bh=CLY5Z8vV7vd/CgtJa6KA5gKNMMbpMVJf4QlK8YL7Es4=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ox5ysNLi8TI07xtdythuz0sjWBNadLOyW4M8VoySz3R7/9wHZkX2nrlzYKovGBM3a by9ziGxpNrzXFahcs0qymAm4O8ZPDViQqewBelE/XaDqZ3LYvf+SfuMQP6iW/JMr9m RS4pZDtkRLOqUjkh2sqgfnREe5Id0KGD+L812IUA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 96525F80C95; Wed, 15 Mar 2023 16:15:31 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B7E88F805FC; Wed, 15 Mar 2023 16:10:24 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8CCBAF80617 for ; Wed, 15 Mar 2023 16:08:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8CCBAF80617 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjm-0008Em-C5; Wed, 15 Mar 2023 16:08:22 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSji-004Kax-Sz; Wed, 15 Mar 2023 16:08:18 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjh-0057hs-G3; Wed, 15 Mar 2023 16:08:17 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Akihiko Odaki , =?utf-8?q?Amadeusz_S=C5=82awi?= =?utf-8?q?=C5=84ski?= , Andy Shevchenko , Hans de Goede Subject: [PATCH 094/173] ASoC: Intel: bytcht_es8316: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:26 +0100 Message-Id: <20230315150745.67084-95-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1980; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=CLY5Z8vV7vd/CgtJa6KA5gKNMMbpMVJf4QlK8YL7Es4=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd5GyVg7enwY9EpFYKjYpS7WwuZzdCIzYzyf4 4TRR5FU0FeJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeRgAKCRDB/BR4rcrs CbZ+B/9h4IfCdvFBYOCE2IZOCKclMwTiyyvlLYn1ANm18hOkR5JZw6EGQIIh38bDab9oBO7YU0V 9c04nWnHU61+kxivcTUxGLwPsMjQyJ8hvxkyppC4Q2AJf3DPkqudIhB/NZBhvP2srDyzpYDHn0e Vz7du36H38JY/CjqRsnSaA35VpBLSuDYUyszZY91IGGnDzNU4987ZA6/k0SHvbztp0IbznGXrqU blCUyzQffduAxrpzxJJQTXCN1lR/PkyjdTBUjEvP0BtMfqQZSqMyPSxczK+RqOMQSlX4CV+TlWt tOkSy7o5Xd682QeTJMjPmmSECt/IhQ5jKspsYlOX2lOojAth X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 7LR6DHCYUIBEIRPYGGPGWTWAUTJKXLTH X-Message-ID-Hash: 7LR6DHCYUIBEIRPYGGPGWTWAUTJKXLTH X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/intel/boards/bytcht_es8316.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c index df157b01df8b..7a30d2d36f19 100644 --- a/sound/soc/intel/boards/bytcht_es8316.c +++ b/sound/soc/intel/boards/bytcht_es8316.c @@ -628,7 +628,7 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev) return ret; } -static int snd_byt_cht_es8316_mc_remove(struct platform_device *pdev) +static void snd_byt_cht_es8316_mc_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); struct byt_cht_es8316_private *priv = snd_soc_card_get_drvdata(card); @@ -636,7 +636,6 @@ static int snd_byt_cht_es8316_mc_remove(struct platform_device *pdev) gpiod_put(priv->speaker_en_gpio); device_remove_software_node(priv->codec_dev); put_device(priv->codec_dev); - return 0; } static struct platform_driver snd_byt_cht_es8316_mc_driver = { @@ -644,7 +643,7 @@ static struct platform_driver snd_byt_cht_es8316_mc_driver = { .name = "bytcht_es8316", }, .probe = snd_byt_cht_es8316_mc_probe, - .remove = snd_byt_cht_es8316_mc_remove, + .remove_new = snd_byt_cht_es8316_mc_remove, }; module_platform_driver(snd_byt_cht_es8316_mc_driver); From patchwork Wed Mar 15 15:06:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176214 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EF48BC61DA4 for ; Wed, 15 Mar 2023 15:40:20 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 10FE6147B; Wed, 15 Mar 2023 16:39:29 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 10FE6147B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894819; bh=2EZkQh4bCPryjNd8miKoVCiUSUuad0w0KQWPOfXF+Ek=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=SyU3TFanDroRdQXgNQI7TeEOktTjy6CExK04duvBJOlqqvVsalsF06jG913XKeQ9Q xRyYK1kLvekhvcWYENiWjDxZh1KFkRtJ91CE3fEYqVxyAoIcRt4k/TDxXrvp2+7XJQ T/ZCHeT3CXuVZvs4HcrxMcCSB2ey+NXMvjduC9gs= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 74B32F808C9; Wed, 15 Mar 2023 16:14:47 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id BE111F805F7; Wed, 15 Mar 2023 16:10:12 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 52856F80609 for ; Wed, 15 Mar 2023 16:08:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 52856F80609 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjm-0008Dw-66; Wed, 15 Mar 2023 16:08:22 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSji-004Kas-K0; Wed, 15 Mar 2023 16:08:18 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjh-0057hv-MB; Wed, 15 Mar 2023 16:08:17 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Hans de Goede , =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= , Moises Cardona , Akihiko Odaki , Andy Shevchenko Subject: [PATCH 095/173] ASoC: Intel: bytcr_rt5640: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:27 +0100 Message-Id: <20230315150745.67084-96-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1906; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=2EZkQh4bCPryjNd8miKoVCiUSUuad0w0KQWPOfXF+Ek=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd5JogqMbXzpYTLvjSkQgDGF9udcw2ZhFUFvI h6Uk3M1B3yJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeSQAKCRDB/BR4rcrs CbZYB/0TwaHEbp/rwVoG3kZyZj2X3vrMcFNkJVR3pLAH0+XBa+/EGHXX7qiPvPQuyFSllST23tU Tf8uMo12jZqptDafETdmNa+kKmsLv+NEXZxU5mxMXpAoe6rwn51G1o9K+gqabhOUXPcnToPQGCa RA+5xZJH+PdhL7r/+QHS/CDD55YZHfCTKPjewmYXtKV35nX3n6WFPUYv3mdfe8cLaaHmvj6bj+s hO/rD89CBPcdNA43FhX+QxwpFVjiyh/SKudliUgTZesr1dwL5ZaSu6hlJJt4PHbdbJye/azSRNa eIEpkQnHbPoCE0VIexUfVnMcfDnivrSbFTCMAUWfBbL2XDq5 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: WBQGYEX36376UVREPCW7PFQWDYHHHKW7 X-Message-ID-Hash: WBQGYEX36376UVREPCW7PFQWDYHHHKW7 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/intel/boards/bytcr_rt5640.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c index 79e0039c79a3..789609eb0884 100644 --- a/sound/soc/intel/boards/bytcr_rt5640.c +++ b/sound/soc/intel/boards/bytcr_rt5640.c @@ -1844,7 +1844,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) return ret_val; } -static int snd_byt_rt5640_mc_remove(struct platform_device *pdev) +static void snd_byt_rt5640_mc_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); struct byt_rt5640_private *priv = snd_soc_card_get_drvdata(card); @@ -1854,7 +1854,6 @@ static int snd_byt_rt5640_mc_remove(struct platform_device *pdev) device_remove_software_node(priv->codec_dev); put_device(priv->codec_dev); - return 0; } static struct platform_driver snd_byt_rt5640_mc_driver = { @@ -1862,7 +1861,7 @@ static struct platform_driver snd_byt_rt5640_mc_driver = { .name = "bytcr_rt5640", }, .probe = snd_byt_rt5640_mc_probe, - .remove = snd_byt_rt5640_mc_remove, + .remove_new = snd_byt_rt5640_mc_remove, }; module_platform_driver(snd_byt_rt5640_mc_driver); From patchwork Wed Mar 15 15:06:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176210 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 45571C6FD1D for ; Wed, 15 Mar 2023 15:39:18 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6C3A71399; Wed, 15 Mar 2023 16:38:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6C3A71399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894756; bh=sED5q+hQf3E1ecJCYy+vjM9bcgImOORsEau6u1CL9rg=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=bp2dTazaJwJSjV2Lj6qSPb0vPaq5lXxrdXpJvsrcAs2qc55I7LD8dcjH0anyTqVuj jTDfsCHXlZ5YbFL/JDe8qZ1Tor1gEq3bvxa/SxlI7/JLMSqNymc+CnFCMWkFpLpuNw sYEzWPKRwJh+PzeDERwnL8Y2jjlNB1GobXyHWeMA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 1EAC1F8087C; Wed, 15 Mar 2023 16:14:36 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 24BDFF805F5; Wed, 15 Mar 2023 16:10:09 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 066B7F80601 for ; Wed, 15 Mar 2023 16:08:40 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 066B7F80601 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjm-0008F6-F1; Wed, 15 Mar 2023 16:08:22 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjj-004Kb1-1b; Wed, 15 Mar 2023 16:08:19 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjh-0057hy-Sq; Wed, 15 Mar 2023 16:08:17 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Akihiko Odaki , Andy Shevchenko , =?utf-8?q?Amadeusz_S?= =?utf-8?q?=C5=82awi=C5=84ski?= Subject: [PATCH 096/173] ASoC: Intel: boards: bytcr_rt5651: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:28 +0100 Message-Id: <20230315150745.67084-97-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1819; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=sED5q+hQf3E1ecJCYy+vjM9bcgImOORsEau6u1CL9rg=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd5MA7ObFnJqrSIwQDSfsOf6ddhOzsmihVi9O k4+xvCei8KJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeTAAKCRDB/BR4rcrs CdVfB/9I7fisbfL36by954+xt0NQ/oRiGlfiyJ2bGQWMm6o2+bx22fOBIY5e7LewoomvSHmx5AY fT+tJY7rp01KTxPeEOBz4oPccdKDJ/+RpnkVejVLPkCz4oIf1lD9cX3iw5QwMZ3eIHJiFZ/HsrI 07fF5NYl+fhDVDe9HVH2MvcJNwW2tlq/RpjZ4HDEeHs4GazOWHTvNsiGQ26qSFVZlodDGfLUauG CnLrYYDOFtprDNhGPbbd7LalHVMTelFUBsudbXE6UmjbhzB9CYXEuoSajsEgWrVsZr6ykSoMbQC p8DypcXZkdEMURdiOe6MwKnSegUeGjsbMFwErLRlVHjqULIC X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 4SXIHK3RHLFN52XTACX2EXR5YFUFOHUJ X-Message-ID-Hash: 4SXIHK3RHLFN52XTACX2EXR5YFUFOHUJ X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/intel/boards/bytcr_rt5651.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c index 8fca9b82d4d0..805afaf47b29 100644 --- a/sound/soc/intel/boards/bytcr_rt5651.c +++ b/sound/soc/intel/boards/bytcr_rt5651.c @@ -1127,14 +1127,13 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) return ret_val; } -static int snd_byt_rt5651_mc_remove(struct platform_device *pdev) +static void snd_byt_rt5651_mc_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); struct byt_rt5651_private *priv = snd_soc_card_get_drvdata(card); device_remove_software_node(priv->codec_dev); put_device(priv->codec_dev); - return 0; } static struct platform_driver snd_byt_rt5651_mc_driver = { @@ -1142,7 +1141,7 @@ static struct platform_driver snd_byt_rt5651_mc_driver = { .name = "bytcr_rt5651", }, .probe = snd_byt_rt5651_mc_probe, - .remove = snd_byt_rt5651_mc_remove, + .remove_new = snd_byt_rt5651_mc_remove, }; module_platform_driver(snd_byt_rt5651_mc_driver); From patchwork Wed Mar 15 15:06:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176218 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D8F66C6FD1D for ; Wed, 15 Mar 2023 15:41:21 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id CE80C13D1; Wed, 15 Mar 2023 16:40:29 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CE80C13D1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894879; bh=QayUoddaZAI5MU8JitoewaMeahzu4AFBR53/KnjvjAA=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=i+oi3vDljRmySFHYFxqp9scBYjhGCwItloqZfRJZ81pz5qUItBTTHtiYnYAyTAGaD Pe97hcncuckCJjvj9mufIvmb9+ciMkMVtSWFv+6O5yQSGQLa33G6OuUorXZOvGnig7 x1bQC1CYVP2jVIubWxovcCRd6x2ZIjXHIGRIW21k= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2D484F80C20; Wed, 15 Mar 2023 16:14:57 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 55492F805F3; Wed, 15 Mar 2023 16:10:15 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9ABF1F80558 for ; Wed, 15 Mar 2023 16:08:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9ABF1F80558 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjm-0008GW-T9; Wed, 15 Mar 2023 16:08:22 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjj-004Kb9-EN; Wed, 15 Mar 2023 16:08:19 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSji-0057i1-3Q; Wed, 15 Mar 2023 16:08:18 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Hans de Goede , Akihiko Odaki , Andy Shevchenko , Charles Keepax , =?utf-8?q?Amadeusz_S=C5=82a?= =?utf-8?q?wi=C5=84ski?= Subject: [PATCH 097/173] ASoC: Intel: bytcr_wm5102: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:29 +0100 Message-Id: <20230315150745.67084-98-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1766; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=QayUoddaZAI5MU8JitoewaMeahzu4AFBR53/KnjvjAA=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd5Ol+d5O6FYCPD4ojnkkfzr/cx+WOxAUghl9 VLJSx9BuwKJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeTgAKCRDB/BR4rcrs CRGmCACbiMXwGKLolnqa3wF93WAFH4g/xEq3Vjf3slwkdx63WrQjTex9ffzwBuvctnactF7x02E KHfCajOupP5PrfDOF73IdF1UBbQ3CwfffPs7Aycd1uf4g+b7ysi4KFVcsYOwVfUj5KhO0sR+HHs ONk17tbxOmDKk84rXlWwqoSMGvu0rxbpjtQU6Yu89HMg3a281EdqtfQez2a0Wo6ZptjU3EtDXfs vT+b2puJzMHCIRZY1O12bsFic3Jn79MR611uwad5QHDVZQO+2C99qWomv2YMaYhHwVqk3KqLVqH /4/rc9B01aJ5VtkJKGkPcEhkNWmfdZjomoHfzQt1hPjQ5La7 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: FFBZQLR4HLMXBWCKEBHCMT5UF6WVBFXV X-Message-ID-Hash: FFBZQLR4HLMXBWCKEBHCMT5UF6WVBFXV X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/intel/boards/bytcr_wm5102.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/intel/boards/bytcr_wm5102.c b/sound/soc/intel/boards/bytcr_wm5102.c index c0706537f673..f2382d4cb76f 100644 --- a/sound/soc/intel/boards/bytcr_wm5102.c +++ b/sound/soc/intel/boards/bytcr_wm5102.c @@ -466,13 +466,12 @@ static int snd_byt_wm5102_mc_probe(struct platform_device *pdev) return ret; } -static int snd_byt_wm5102_mc_remove(struct platform_device *pdev) +static void snd_byt_wm5102_mc_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); struct byt_wm5102_private *priv = snd_soc_card_get_drvdata(card); gpiod_put(priv->spkvdd_en_gpio); - return 0; } static struct platform_driver snd_byt_wm5102_mc_driver = { @@ -480,7 +479,7 @@ static struct platform_driver snd_byt_wm5102_mc_driver = { .name = "bytcr_wm5102", }, .probe = snd_byt_wm5102_mc_probe, - .remove = snd_byt_wm5102_mc_remove, + .remove_new = snd_byt_wm5102_mc_remove, }; module_platform_driver(snd_byt_wm5102_mc_driver); From patchwork Wed Mar 15 15:06:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176224 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8CCE2C6FD1D for ; Wed, 15 Mar 2023 15:42:59 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4D56D1478; Wed, 15 Mar 2023 16:42:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4D56D1478 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894977; bh=ywBag1HQp7FGXTggGcd6TDHEQeQ1oaRevehzmahx6qg=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Oa3QV6PjlExHzfYGtHFS/JpbUF2z/ZurTKjH+0U9K59xQcJSshABVDoVX4kAISAxy +NqIaPkhWDol9P7bxGyZ5QaornWxiIu45fNpo3ZcOP/PZqhYkuvIjd51bdOAQfNeTa enQk0htc/k+pY1lmIBQC2sOgFP4PrE5oKNavD/24= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id B435CF80C78; Wed, 15 Mar 2023 16:15:18 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6D2E6F805C8; Wed, 15 Mar 2023 16:10:21 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 02488F80610 for ; Wed, 15 Mar 2023 16:08:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 02488F80610 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjn-0008Gv-6Z; Wed, 15 Mar 2023 16:08:23 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjj-004KbC-GN; Wed, 15 Mar 2023 16:08:19 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSji-0057i5-AW; Wed, 15 Mar 2023 16:08:18 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Zhen Ni , =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= , Akihiko Odaki Subject: [PATCH 098/173] ASoC: Intel: cht_bsw_max98090_ti: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:30 +0100 Message-Id: <20230315150745.67084-99-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1788; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=ywBag1HQp7FGXTggGcd6TDHEQeQ1oaRevehzmahx6qg=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd5T8qVVrv7XBiB2nQZZLhy+9v7kk/US8LLRf HPBb0YRBGKJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeUwAKCRDB/BR4rcrs CXPbB/9pj9/Wf6YftFjZIrZzCmC5crcnVrik8JfJpYfw3qTAWoKRtO+jGshhigfRaqvkEFKjSf1 Jb+KT288I9Nfrz/IL8sSDnb8VvruW5IiJMYsQme9uaLgLlR2e3pJdx85TR2VJA9P2F7yyBJTlEB L6SNb8QSxc8/eJklsP32b7J3sjRjIONToHq1b2qNZ1a/LHeU9N/yCqSvB4Ade4Gy9a2tlTJ6d6n AwMrjaLgfh7IJJ+7q5YQ+dWVoEBo0C2rXd7HHbbZLdqxygcYTK9Wqs6Um9kB1OeaetCJyAotTjI WoIi0xK52ce47JAfXjUIA96zvghVIX9YIig0RSU9zp3mtyUc X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: DOTCXG7ZB7X6PNGE4VDBYWT4H72L5Y2Z X-Message-ID-Hash: DOTCXG7ZB7X6PNGE4VDBYWT4H72L5Y2Z X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c index 2c086e901aae..850310de774b 100644 --- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c +++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c @@ -623,15 +623,13 @@ static int snd_cht_mc_probe(struct platform_device *pdev) return ret_val; } -static int snd_cht_mc_remove(struct platform_device *pdev) +static void snd_cht_mc_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); struct cht_mc_private *ctx = snd_soc_card_get_drvdata(card); if (ctx->quirks & QUIRK_PMC_PLT_CLK_0) clk_disable_unprepare(ctx->mclk); - - return 0; } static struct platform_driver snd_cht_mc_driver = { @@ -639,7 +637,7 @@ static struct platform_driver snd_cht_mc_driver = { .name = "cht-bsw-max98090", }, .probe = snd_cht_mc_probe, - .remove = snd_cht_mc_remove, + .remove_new = snd_cht_mc_remove, }; module_platform_driver(snd_cht_mc_driver) From patchwork Wed Mar 15 15:06:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176287 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9F072C76195 for ; Wed, 15 Mar 2023 15:54:34 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 53C831567; Wed, 15 Mar 2023 16:53:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 53C831567 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895672; bh=1ASzZt86yis4aCe6OEj+FqtnlDZuoEFAOf3gLepHO20=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=LBo8Pt9oJjjVjMhYh4XeINO+Z6tMTlb2DsXn4k3oxl/ruq23NKMy5sXuwPrzLtcoo /igiL9Ds+LwYwofv5AvDIXYHG0c3KHpAYwF92vY8rCOGVdsfWWwayef9vzZBragxv3 0AusFXV8e5aInFSiPB12jYShOJrdM7aHIBo6W3Yg= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 96442F89725; Wed, 15 Mar 2023 16:18:06 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 32EADF80624; Wed, 15 Mar 2023 16:11:03 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B076DF80570 for ; Wed, 15 Mar 2023 16:09:02 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B076DF80570 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjn-0008Hq-8d; Wed, 15 Mar 2023 16:08:23 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjj-004KbK-NM; Wed, 15 Mar 2023 16:08:19 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSji-0057i9-IC; Wed, 15 Mar 2023 16:08:18 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Mauro Carvalho Chehab , Andy Shevchenko , Andrey Turkin , Muralidhar Reddy , Zhu Ning Subject: [PATCH 099/173] ASoC: Intel: sof_es8336: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:31 +0100 Message-Id: <20230315150745.67084-100-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1877; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=1ASzZt86yis4aCe6OEj+FqtnlDZuoEFAOf3gLepHO20=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd5Ww18B9CZ8jHmkm52t9BH0be8MX9zazDCv3 oTu9JSys72JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeVgAKCRDB/BR4rcrs CeqQB/98l4yj+XLwUdcktxIM7f0wIHDZw52rC9bKNQ0wsGU74aCQXDHpAWC6Hs1wTBWszb6Ignw baPqv4JOCGuOqKxx12yhQQnyQ9zNgwjTVGw3clK51q004N3Tj3qRr6/u2s8Binnrt3uqeaHnTh5 AUyeqNdpwDfv3yeV099jUXw9hlG2coIRWGCW0cYR4Hx2fwsCZOX1kBnR8Opm3h3Lb4sArCM2uAK ma4SdZ5cCCiCpB1/MH7/ohRwi0PeTAXIjPUqw1xlJXgGZTgf2kKZRonEyL2NGHX5NUIQhrvVRwu QdQYES9G4P5dkMoK3eCFyYq2e0QVQgLNzcElcGS5/3gLmHrm X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: BGKMBWGHNB6OWRWCTDDGEG6FPIEOPC5R X-Message-ID-Hash: BGKMBWGHNB6OWRWCTDDGEG6FPIEOPC5R X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/intel/boards/sof_es8336.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c index 894b6610b9e2..adf5852b2c9a 100644 --- a/sound/soc/intel/boards/sof_es8336.c +++ b/sound/soc/intel/boards/sof_es8336.c @@ -780,7 +780,7 @@ static int sof_es8336_probe(struct platform_device *pdev) return ret; } -static int sof_es8336_remove(struct platform_device *pdev) +static void sof_es8336_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); struct sof_es8336_private *priv = snd_soc_card_get_drvdata(card); @@ -789,8 +789,6 @@ static int sof_es8336_remove(struct platform_device *pdev) gpiod_put(priv->gpio_speakers); device_remove_software_node(priv->codec_dev); put_device(priv->codec_dev); - - return 0; } static const struct platform_device_id board_ids[] = { @@ -817,7 +815,7 @@ static struct platform_driver sof_es8336_driver = { .pm = &snd_soc_pm_ops, }, .probe = sof_es8336_probe, - .remove = sof_es8336_remove, + .remove_new = sof_es8336_remove, .id_table = board_ids, }; module_platform_driver(sof_es8336_driver); From patchwork Wed Mar 15 15:06:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176259 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C60AC6FD1D for ; Wed, 15 Mar 2023 15:50:18 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9C77D1520; Wed, 15 Mar 2023 16:49:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9C77D1520 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895416; bh=wz4JaAqwfndZ/27pVHObLVq7KIs3mkSYU0vvTlqtGVk=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=MU+FT+L1X/Bw5IDSYH987tJT0D6jJsb40AHqrTxPxoZXZHtXNfhdS9kEomtj5OQ+l QRgPSX7s9+Ql0unSeu98PolGDgcOXHQpJttNwYgEdKY4gB1fp6cGwmJ1DLdPeDULZF bAHyLxbNDIlOyO2HAE2n2ZxhqMeoYn2BGiyl4KeA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 9C33EF896E9; Wed, 15 Mar 2023 16:16:56 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 241F4F8061C; Wed, 15 Mar 2023 16:10:48 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DA3A9F80633 for ; Wed, 15 Mar 2023 16:08:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DA3A9F80633 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjn-0008KC-P3; Wed, 15 Mar 2023 16:08:23 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjk-004KbZ-8A; Wed, 15 Mar 2023 16:08:20 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSji-0057iD-OW; Wed, 15 Mar 2023 16:08:18 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 100/173] ASoC: Intel: sof_pcm512x: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:32 +0100 Message-Id: <20230315150745.67084-101-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1661; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=wz4JaAqwfndZ/27pVHObLVq7KIs3mkSYU0vvTlqtGVk=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd5Z7oF5bmIHqmJ8Jkeb117SNqw9IR9nqRdUT Uy46WrLvqeJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeWQAKCRDB/BR4rcrs CU9HB/9+PF79G+NBerhnls93epUWB1mfZuQphaNWDUI1BZM32bm2VDLFdJgxH40NLwTtItfnRTY +Y+0TL2/Grboz5jVOJu+N/OFL2Q1BoORbbXMq/c0VyEwv2WibItGz2MnjQ/ZuI8RbEgsqLBSKL2 BG+tkr/11S0RkVQ947QIWtG3y0/1t6UKk4+IZpMgYzaNXyrT3PDFtTRBe1cb8xxXUCqCDcqLYv3 6bzKpxH6ycJvdujc1FL7ZiGZ/Do88MA3TeH+F46lNY447PP75AfiSjeWeyldT4Cfevb6wjZ1OsD vuEfbV8HdNjqlJHiSS/NnkE0lGhuL6qXd7tdezcfgP5ku3Px X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: WFBEDG7RPN6AI4ADGH3OXLBQDQDMLEPF X-Message-ID-Hash: WFBEDG7RPN6AI4ADGH3OXLBQDQDMLEPF X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/intel/boards/sof_pcm512x.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/intel/boards/sof_pcm512x.c b/sound/soc/intel/boards/sof_pcm512x.c index d4c67d5340a9..5192e02b3cee 100644 --- a/sound/soc/intel/boards/sof_pcm512x.c +++ b/sound/soc/intel/boards/sof_pcm512x.c @@ -416,7 +416,7 @@ static int sof_audio_probe(struct platform_device *pdev) &sof_audio_card_pcm512x); } -static int sof_pcm512x_remove(struct platform_device *pdev) +static void sof_pcm512x_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); struct snd_soc_component *component; @@ -427,13 +427,11 @@ static int sof_pcm512x_remove(struct platform_device *pdev) break; } } - - return 0; } static struct platform_driver sof_audio = { .probe = sof_audio_probe, - .remove = sof_pcm512x_remove, + .remove_new = sof_pcm512x_remove, .driver = { .name = "sof_pcm512x", .pm = &snd_soc_pm_ops, From patchwork Wed Mar 15 15:06:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176288 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 44CE7C61DA4 for ; Wed, 15 Mar 2023 15:54:53 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 28C03155A; Wed, 15 Mar 2023 16:54:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 28C03155A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895691; bh=zLxnf1jUFU7w0MTv+EbqAy7vb5dDXijHl5zIUv9JeqA=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ofirqqRr3KDF3ihnlwLZdYoUSirBytBeOcQeGR/wGWuDCnXRrodhg4FbHeFFbQ3KY 4/W7X5YqSEVHQv/XMSsTe/BypLz9buw2b+yOiIUc6lx1pGDress2TqwT6c6eL8yIlX WZ/bC/FVDsFCFHDF75uPtQgAusX+3SH5cUyzO6IU= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E24BBF8972F; Wed, 15 Mar 2023 16:18:10 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CF0F2F8059F; Wed, 15 Mar 2023 16:11:04 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CF3F7F805AB for ; Wed, 15 Mar 2023 16:09:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CF3F7F805AB Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjn-0008Ij-JE; Wed, 15 Mar 2023 16:08:23 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjj-004KbR-UW; Wed, 15 Mar 2023 16:08:19 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjj-0057iH-00; Wed, 15 Mar 2023 16:08:19 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Gongjun Song , Shuming Fan , Yong Zhi Subject: [PATCH 101/173] ASoC: Intel: sof_sdw: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:33 +0100 Message-Id: <20230315150745.67084-102-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1554; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=zLxnf1jUFU7w0MTv+EbqAy7vb5dDXijHl5zIUv9JeqA=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd5dK73QSFMe1md0vSdRz2fUVGnuIHNz5Frco YaWRK79ZgmJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeXQAKCRDB/BR4rcrs CQo3B/4vq0sSCwqYFGsWGx1LQYD8MlvHN761N4y+a7uZy4AHgCShey7GJv2pqk87IDv3nn+Mfi5 4BT1SwPg588I4iNX3Si5LUR9HFXwX8t3tH0/mlWKh7u/6xGZIzTBhnSyUlMAF+S+6SFOBJMzSjv WQgsYqezeHUg8xYzjusJKBP0WZweud97q1ZDK+wGivRoYjV6BY8PZbFijGB3FA31vjjo8LvR7zw +8bOXSndpl6u+urW/azK5FTPXyoa/0lfy0xlojGY3Nvw5fOGmZny8QBZ3uKhQfalaW+fJXx3TcE raqxRHACKZeU4yDew6U5DAXSn6psotdZClih2NRKgpLmOu61 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 7ZQXTNDKEPQCKRTGW2O2ORLNCJ4LAE6L X-Message-ID-Hash: 7ZQXTNDKEPQCKRTGW2O2ORLNCJ4LAE6L X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/intel/boards/sof_sdw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index d2ed807abde9..4ea69197791c 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -1602,13 +1602,11 @@ static int mc_probe(struct platform_device *pdev) return ret; } -static int mc_remove(struct platform_device *pdev) +static void mc_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); mc_dailink_exit_loop(card); - - return 0; } static struct platform_driver sof_sdw_driver = { @@ -1617,7 +1615,7 @@ static struct platform_driver sof_sdw_driver = { .pm = &snd_soc_pm_ops, }, .probe = mc_probe, - .remove = mc_remove, + .remove_new = mc_remove, }; module_platform_driver(sof_sdw_driver); From patchwork Wed Mar 15 15:06:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176285 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 897E6C7618B for ; Wed, 15 Mar 2023 15:54:03 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BE8A2153C; Wed, 15 Mar 2023 16:53:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BE8A2153C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895641; bh=Qy6/UBU9ZDg8sTdMoe1M/o1TpuvfPS8hsO1W6kt7RqI=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=iAx5CzqD0UCWcFGtQGdGhIkAwdtJNQ/vwZVDiSR6wuGokeoo/r7uqqLaFT099Qrk+ 7qYEMlP6vyx1ZIwqVMI6SX1gh/1RUbuZJw7um/n8Zt75ATA43PZV6H1S72zi9TI+f7 icBlFtFLBweco1jtMgvM4n10EiNwHkHXtdR/7bB4= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7E524F89721; Wed, 15 Mar 2023 16:17:55 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 47F9DF80623; Wed, 15 Mar 2023 16:11:00 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8B48EF80587 for ; Wed, 15 Mar 2023 16:09:02 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8B48EF80587 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjn-0008JY-QB; Wed, 15 Mar 2023 16:08:23 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjk-004KbV-4H; Wed, 15 Mar 2023 16:08:20 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjj-0057iL-6C; Wed, 15 Mar 2023 16:08:19 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Andy Shevchenko Subject: [PATCH 102/173] ASoC: Intel: sof_wm8804: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:34 +0100 Message-Id: <20230315150745.67084-103-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1663; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Qy6/UBU9ZDg8sTdMoe1M/o1TpuvfPS8hsO1W6kt7RqI=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd5grFrkIjYVOMN4siTotCSPs3EpJhufDyEMC bjQVjKKsomJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeYAAKCRDB/BR4rcrs CQtUB/9U64LMlKQQpHKyGrRheaihlM3Uvb5tMk/r5rGUgoyXT3sJh3dE5yefSqF9NUdgTHp5UwB WmPg5OarG3FMWC1p1eqWlogJcSXQW1mODq/PDwm2JycmhEVw2Rhm+tIFRr1jluY3d2Q9AliLebk /wuif5+5ulWJluCN0ssxEDsH3UsO1Q/WZMtiu+WXsXLu/UtARxZAWRMbB9E9z95wZ1hr1JssHAJ odkwMRldhPaJhOLTT/4zuReUs8BYRchR9DgQPZjZvGIiGf9sq8p5w32szYOVOXSh9IIqf/F7NGY xPCh6OZCFjnX+rT2T1tqXHki7rE3h5CL8/55la+8hcTDhwOd X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: PIC3GCP7NDDN75DITIAG5I63ZVUXKKHX X-Message-ID-Hash: PIC3GCP7NDDN75DITIAG5I63ZVUXKKHX X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/intel/boards/sof_wm8804.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/intel/boards/sof_wm8804.c b/sound/soc/intel/boards/sof_wm8804.c index fbad5a73de44..17224d26d9d6 100644 --- a/sound/soc/intel/boards/sof_wm8804.c +++ b/sound/soc/intel/boards/sof_wm8804.c @@ -278,11 +278,10 @@ static int sof_wm8804_probe(struct platform_device *pdev) return devm_snd_soc_register_card(&pdev->dev, card); } -static int sof_wm8804_remove(struct platform_device *pdev) +static void sof_wm8804_remove(struct platform_device *pdev) { if (sof_wm8804_quirk & SOF_WM8804_UP2_QUIRK) gpiod_remove_lookup_table(&up2_gpios_table); - return 0; } static struct platform_driver sof_wm8804_driver = { @@ -291,7 +290,7 @@ static struct platform_driver sof_wm8804_driver = { .pm = &snd_soc_pm_ops, }, .probe = sof_wm8804_probe, - .remove = sof_wm8804_remove, + .remove_new = sof_wm8804_remove, }; module_platform_driver(sof_wm8804_driver); From patchwork Wed Mar 15 15:06:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176195 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4F155C7618B for ; Wed, 15 Mar 2023 15:38:13 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4C4211421; Wed, 15 Mar 2023 16:37:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4C4211421 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894690; bh=Q0ejRxOhry91/ybcK0cajd11DLKC/LTk8bA1g+lEv9E=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=psb3JlnzecfNUnIgHFD2MJs3cvujbpldOhIQU/llJM6/D5wrvEgz9JPgZ7PPf4v9K GvyPnY4XyZaonrCZjRMrOyJYdMa3Llizf9EMsSmjN5ayQTFJdbJrJ0deYw/d7gxNLR SXl3s9OKaW9JbEWvv+eRUcdvYszJ+vk5EavxlFto= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2671DF80858; Wed, 15 Mar 2023 16:14:26 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 85947F805EA; Wed, 15 Mar 2023 16:10:04 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id ADC8BF805FB for ; Wed, 15 Mar 2023 16:08:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ADC8BF805FB Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjo-0008LH-8a; Wed, 15 Mar 2023 16:08:24 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjk-004Kbd-Eo; Wed, 15 Mar 2023 16:08:20 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjj-0057iO-EP; Wed, 15 Mar 2023 16:08:19 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Andy Shevchenko Subject: [PATCH 103/173] ASoC: Intel: catpt: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:35 +0100 Message-Id: <20230315150745.67084-104-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1768; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Q0ejRxOhry91/ybcK0cajd11DLKC/LTk8bA1g+lEv9E=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd5j+TN/ObcLwlXbGezye9KJx1DoKj+w9tieu y6oUWYoUdGJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeYwAKCRDB/BR4rcrs Cfd+CACEG7/mnVSkTN7zOMn/0ceVu5nraLmg98/Ll6sZ6v3s3IOnfp/J/VSXaxxvnV1QZ9kXjXP nDdPBkcc4Up8i26VbDiysVcODtISWAq146wUZEDFNsap5ayJwxzl8LHFX7eScywdxLVPvCTVA2F mQ2AH5IntqHBN35MHyCnRKKEOuDaPzeDBujpclwuqTP+zDGvZHzgMPq1kYTew0yL+QhwWRoKkUD 7mBQinIT/vxo6OGemNtAuPTGv9FHjnxsB9PdrEli7Bq66fUdstr5LgCKgaGtzJgmdGz7qq955zB uEwCqLBc0BY22mUESnxMXdCJDx/0RPCDoWEI8gmdzk+t3612 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: LLQCWE3P3IFVH44MYKRBXBGUTS4OU3ZS X-Message-ID-Hash: LLQCWE3P3IFVH44MYKRBXBGUTS4OU3ZS X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/intel/catpt/device.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/intel/catpt/device.c b/sound/soc/intel/catpt/device.c index d5d08bd766c7..cac3dffbd0d9 100644 --- a/sound/soc/intel/catpt/device.c +++ b/sound/soc/intel/catpt/device.c @@ -293,7 +293,7 @@ static int catpt_acpi_probe(struct platform_device *pdev) return catpt_probe_components(cdev); } -static int catpt_acpi_remove(struct platform_device *pdev) +static void catpt_acpi_remove(struct platform_device *pdev) { struct catpt_dev *cdev = platform_get_drvdata(pdev); @@ -305,8 +305,6 @@ static int catpt_acpi_remove(struct platform_device *pdev) catpt_sram_free(&cdev->iram); catpt_sram_free(&cdev->dram); - - return 0; } static struct snd_soc_acpi_mach lpt_machines[] = { @@ -376,7 +374,7 @@ MODULE_DEVICE_TABLE(acpi, catpt_ids); static struct platform_driver catpt_acpi_driver = { .probe = catpt_acpi_probe, - .remove = catpt_acpi_remove, + .remove_new = catpt_acpi_remove, .driver = { .name = "intel_catpt", .acpi_match_table = catpt_ids, From patchwork Wed Mar 15 15:06:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176283 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 18CF1C7619A for ; Wed, 15 Mar 2023 15:53:31 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 40EC0152C; Wed, 15 Mar 2023 16:52:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 40EC0152C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895609; bh=y7bkf0kfZ1NvpcDLNE4Clskb9DgC0P1qR71Wo9dBXOE=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=GnNl37kpJXHCPva7EVIR0hMICii/MXmtPDAEwvNPTGfoeMarjPrwA7Iqo3MiqyOOY QOUlA8mvapr1HdxfYce0FSR+BjTFC6HJyT5lI1B7ileydg0vXuXdYaP1Krp3022VFQ LnQWhQbA9pi+6QnaaXxXCvB/Ohwy0xu2acCgyWo0= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 4E159F8971B; Wed, 15 Mar 2023 16:17:49 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C27F5F80621; Wed, 15 Mar 2023 16:10:58 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 06041F8064C for ; Wed, 15 Mar 2023 16:08:51 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 06041F8064C Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjo-0008MH-Fh; Wed, 15 Mar 2023 16:08:24 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjk-004Kbk-P3; Wed, 15 Mar 2023 16:08:20 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjj-0057iV-L2; Wed, 15 Mar 2023 16:08:19 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 104/173] ASoC: Intel: skl-ssp-clk: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:36 +0100 Message-Id: <20230315150745.67084-105-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1697; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=y7bkf0kfZ1NvpcDLNE4Clskb9DgC0P1qR71Wo9dBXOE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd5lQ97ur8+v+4jHGsGj9lOehYfthvqQGw15X 9kSXJ8jAPmJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeZQAKCRDB/BR4rcrs CS7+B/4/z7wvILy+tCCgosLb4RqHtZGhfVHi8N6JK4cCC1uxRd2C0olDOfz2NdvQDBCT+zfi0OO jZ+G2TyUvDolQP7YaYC7lmSiHysP63LjTE8Diz1/MmDrFI0N8XxK4tB7yqDLfjMyy/mk6YatT6c q8fdqvEYCzHzqyq3yWBRrx3PtUAobOa9EN5SPoVcrqVtBjIC6iegbTaZZNWFQVaTg4gxjBj6o82 MovzglyRrIZKXHQc8bGSC3X8bQMAy998DxP9hYaLtbrd1N1wGXPsNWSMmmmo0WrxdO9g0Y5vrs1 vmYxWAWkPJabx7PMimGzQzuXkkbf/6Ovu18/+3W853DsPSCN X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: DZ24NRJZSUDVFWF5ZIWN4ZKV4EA62DL3 X-Message-ID-Hash: DZ24NRJZSUDVFWF5ZIWN4ZKV4EA62DL3 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/intel/skylake/skl-ssp-clk.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/intel/skylake/skl-ssp-clk.c b/sound/soc/intel/skylake/skl-ssp-clk.c index a3a73c26f9aa..50e93c3707e8 100644 --- a/sound/soc/intel/skylake/skl-ssp-clk.c +++ b/sound/soc/intel/skylake/skl-ssp-clk.c @@ -402,15 +402,13 @@ static int skl_clk_dev_probe(struct platform_device *pdev) return ret; } -static int skl_clk_dev_remove(struct platform_device *pdev) +static void skl_clk_dev_remove(struct platform_device *pdev) { struct skl_clk_data *data; data = platform_get_drvdata(pdev); unregister_src_clk(data); unregister_parent_src_clk(data->parent, SKL_MAX_CLK_SRC); - - return 0; } static struct platform_driver skl_clk_driver = { @@ -418,7 +416,7 @@ static struct platform_driver skl_clk_driver = { .name = "skl-ssp-clk", }, .probe = skl_clk_dev_probe, - .remove = skl_clk_dev_remove, + .remove_new = skl_clk_dev_remove, }; module_platform_driver(skl_clk_driver); From patchwork Wed Mar 15 15:06:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176191 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C03A7C6FD1D for ; Wed, 15 Mar 2023 15:37:12 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B559D1383; Wed, 15 Mar 2023 16:36:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B559D1383 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894630; bh=q5ZoqELeT9ugGnG/PcrKCdPub+WjB5Fj5qh1kwUtOiY=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=gfqgh+H3r3IMFTTIChhsP72gKnVijKDRv1gbmUdc6zALEDe7fL0nw9vk336bl4X1C y7ulKh3ClCLHSPqijC+5F0GKUeHIMT1XwEnjBv8faEnYyixTJoCMylIdg57Hf3XUtr hIuP94mAdI49G54PWyf2sCMcveGY97giwetfROZc= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id DE719F8081A; Wed, 15 Mar 2023 16:14:10 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A7A9CF805E3; Wed, 15 Mar 2023 16:10:01 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7732FF805F3 for ; Wed, 15 Mar 2023 16:08:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7732FF805F3 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjo-0008M0-2R; Wed, 15 Mar 2023 16:08:24 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjk-004Kbg-KI; Wed, 15 Mar 2023 16:08:20 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjj-0057iZ-S0; Wed, 15 Mar 2023 16:08:19 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lior Amsalem , Andrew Lunn , Hezi Shahmoon , Neta Zur Hershkovits , Marcin Wojtas Subject: [PATCH 105/173] ASoC: kirkwood: kirkwood-i2s: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:37 +0100 Message-Id: <20230315150745.67084-106-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1844; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=q5ZoqELeT9ugGnG/PcrKCdPub+WjB5Fj5qh1kwUtOiY=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd5oCXV5HCi3JvU9ud2Vcd09gk47TPlfqEMId wYK7c7MWVuJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeaAAKCRDB/BR4rcrs CURSB/9Gd2Bhb+mdNsIG3pHZYe9XF2ZuWogHU0rVbr9h9tPhw4cEoHdpfMqUYfbZZDnFMC8cSLM 5rK6tgNuH3o0QEpUpTH467V+J47pK6xj/HaigFafOhGd8aZjilCVT53H+mh5RtDsXybQmYLjwVN PBwS8UnPLMywbrTDY10n3QliIkXlJOiXthfaJoO+uKF1ZjPheuFcjtvXElWUStH9xS8BLZclpRx Q4wOlgJTV0sG1n6TfziQsnM1kSB0gd1QofM3gp2LDrK9IynyqrCUyfJpzBmniIlrrTUufJWUNS9 s7OM/bFj4Yt+ihP7o9+e73CTDW199LD/Fggu0HLw5ova8Fgv X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: KXV4GSEMSULI5UFRTAZ6PKNU5VHNWFYD X-Message-ID-Hash: KXV4GSEMSULI5UFRTAZ6PKNU5VHNWFYD X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Andrew Lunn --- sound/soc/kirkwood/kirkwood-i2s.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index afdf7d61e4c5..d1eb90310afa 100644 --- a/sound/soc/kirkwood/kirkwood-i2s.c +++ b/sound/soc/kirkwood/kirkwood-i2s.c @@ -736,7 +736,7 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev) return err; } -static int kirkwood_i2s_dev_remove(struct platform_device *pdev) +static void kirkwood_i2s_dev_remove(struct platform_device *pdev) { struct kirkwood_dma_data *priv = dev_get_drvdata(&pdev->dev); @@ -744,8 +744,6 @@ static int kirkwood_i2s_dev_remove(struct platform_device *pdev) if (!IS_ERR(priv->extclk)) clk_disable_unprepare(priv->extclk); clk_disable_unprepare(priv->clk); - - return 0; } #ifdef CONFIG_OF @@ -761,7 +759,7 @@ MODULE_DEVICE_TABLE(of, mvebu_audio_of_match); static struct platform_driver kirkwood_i2s_driver = { .probe = kirkwood_i2s_dev_probe, - .remove = kirkwood_i2s_dev_remove, + .remove_new = kirkwood_i2s_dev_remove, .driver = { .name = DRV_NAME, .of_match_table = of_match_ptr(mvebu_audio_of_match), From patchwork Wed Mar 15 15:06:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176177 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3E79BC61DA4 for ; Wed, 15 Mar 2023 15:33:28 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1377913FA; Wed, 15 Mar 2023 16:32:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1377913FA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894406; bh=ahl9KygTwblq68kPHzDYsCEqiARfMFVXvf8GAD2RDMg=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=g6RZZs3E2eUmhAlCOLZ6RSmpAW60hM/cuFajv5W0ayjsU99yaS3wsQ9mQVjazNK33 tK/8xNkRmgFlexH2XBigdfZ8/NRrW4Wa4NxH5+r+kwsH1ULjIzveBy+K7gWZsRnTxO xOZDTGPY5pU/lNzPgwzWmj32szY6kvpzpRGOe0X0= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 97010F8075C; Wed, 15 Mar 2023 16:13:27 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EA85EF805D8; Wed, 15 Mar 2023 16:09:49 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 956FCF805EE for ; Wed, 15 Mar 2023 16:08:34 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 956FCF805EE Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjo-0008N4-DX; Wed, 15 Mar 2023 16:08:24 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjk-004Kbo-Ul; Wed, 15 Mar 2023 16:08:20 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjk-0057id-2a; Wed, 15 Mar 2023 16:08:20 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Matthias Brugger , Jiasheng Jiang Subject: [PATCH 106/173] ASoC: mediatek: mtk-btcvsd: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:38 +0100 Message-Id: <20230315150745.67084-107-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1747; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=ahl9KygTwblq68kPHzDYsCEqiARfMFVXvf8GAD2RDMg=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd5rdLn2/QrNzz4s3XIAZIoZBbbcn3NAB5SYf Pxf3yJ0MV2JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeawAKCRDB/BR4rcrs CQ6pCACY1l5JzzFwlvblloFP5e2I/4MbxP1QaVkmoDqg50Sx0sgrREEZzRHuGZO5gqOp5zYXso+ aBrPJRmH4juyzHtrT0AVChmffwf13AJZz1eT6gVgKXYp4mTHpMUN4oArqDPrUirnnWXRAo/N6sN VZGND1DfZo+hoSyiqBLolJlCDrkeoj1k77bhj37X/zlzUTsgWwjoTRSiMRm5UJUG2MwAoH+/UMC G3BmOKbVl/clkIu/PhEcrxpJ9NoQ3MvfhMcbktr0/Tdienya0ezfbi8Hxk7C5iOKNYKWmNwBiG5 NK4l5T6mlT+JXFdiEBaqPfV40WsbzCHHvUMa0pvyfNnc0WpJ X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 3X54YYLBLDCRVUNM7SJ5SKOZ5CAP23SC X-Message-ID-Hash: 3X54YYLBLDCRVUNM7SJ5SKOZ5CAP23SC X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: AngeloGioacchino Del Regno , alsa-devel@alsa-project.org, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/mediatek/common/mtk-btcvsd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/mediatek/common/mtk-btcvsd.c b/sound/soc/mediatek/common/mtk-btcvsd.c index 1c28b41e4311..1ba0633e542f 100644 --- a/sound/soc/mediatek/common/mtk-btcvsd.c +++ b/sound/soc/mediatek/common/mtk-btcvsd.c @@ -1387,13 +1387,12 @@ static int mtk_btcvsd_snd_probe(struct platform_device *pdev) return ret; } -static int mtk_btcvsd_snd_remove(struct platform_device *pdev) +static void mtk_btcvsd_snd_remove(struct platform_device *pdev) { struct mtk_btcvsd_snd *btcvsd = dev_get_drvdata(&pdev->dev); iounmap(btcvsd->bt_pkv_base); iounmap(btcvsd->bt_sram_bank2_base); - return 0; } static const struct of_device_id mtk_btcvsd_snd_dt_match[] = { @@ -1408,7 +1407,7 @@ static struct platform_driver mtk_btcvsd_snd_driver = { .of_match_table = mtk_btcvsd_snd_dt_match, }, .probe = mtk_btcvsd_snd_probe, - .remove = mtk_btcvsd_snd_remove, + .remove_new = mtk_btcvsd_snd_remove, }; module_platform_driver(mtk_btcvsd_snd_driver); From patchwork Wed Mar 15 15:06:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176179 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 52715C61DA4 for ; Wed, 15 Mar 2023 15:34:02 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3ED7D1389; Wed, 15 Mar 2023 16:33:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3ED7D1389 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894440; bh=koWfqNykvz7tdkgZlN4qWKDgHoQvfRsTgvMjWDwhmWo=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=KUcVopMPGrbmpOJKfFXlG2l04MLjTDDoq8DzxXur0r6G/yNRUVAsJ7kC0f3DLQva4 rT8fil4s3s2qFmLfCiurLTGUHbfhcetMuVqIjLuye/X4ptV697lCC+uwqV5Qupqpzx L+BZ6UeeKWj5SC5gqLBESWRtTjJtmxDHWuUKk+4M= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id EB293F80768; Wed, 15 Mar 2023 16:13:31 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 33915F805D5; Wed, 15 Mar 2023 16:09:52 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2AD0AF805E9 for ; Wed, 15 Mar 2023 16:08:34 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2AD0AF805E9 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjp-0008RI-Vr; Wed, 15 Mar 2023 16:08:26 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjm-004Kc5-5w; Wed, 15 Mar 2023 16:08:22 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjk-0057ih-9n; Wed, 15 Mar 2023 16:08:20 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Matthias Brugger Subject: [PATCH 107/173] ASoC: mediatek: mt2701-afe-pcm: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:39 +0100 Message-Id: <20230315150745.67084-108-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1800; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=koWfqNykvz7tdkgZlN4qWKDgHoQvfRsTgvMjWDwhmWo=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd5ucK4eJxav+CKwEsT01ChAzCaqlzIv8d6dH VVRe7CFjDaJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHebgAKCRDB/BR4rcrs CbZgB/9IiPRZCQsk2TcCq8DpBsxbaKQzOJPMb6WfwGKP8e0UNyi6D0TcOWODUdHan56YY07E6Jf WRXUEJR2VvMvmX03OsBOOP/O1YNl0dm6Cnl9YZisPAb89yBxPncJoypGeiK8Ov0Jmea3+ylSBpy SO9AfgDQnkCfot1KYwYFwBV9DOrid9PcYhZsCrDnfa0jV7w3q+wXTcPAs6N6wHc5R+y7phFwPed Sf/s0WmaqN8gcTF0eVHC1IL8S4WpcHiTJcasvbNvFhG9iC6+sOI5IoHII6m8MTf8mA5FWdHQd9t EhBw6LplS8ZgwS7iEaxsI1hp/4eZELOXh9JP2XREj9qavttQ X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: YDWOUGAPALSWKWTJZ23Q6RFKVOWYQWDU X-Message-ID-Hash: YDWOUGAPALSWKWTJZ23Q6RFKVOWYQWDU X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: AngeloGioacchino Del Regno , alsa-devel@alsa-project.org, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: <> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c index 0f178de92a0f..c9d4420e9b4c 100644 --- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c +++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c @@ -1439,14 +1439,12 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) return ret; } -static int mt2701_afe_pcm_dev_remove(struct platform_device *pdev) +static void mt2701_afe_pcm_dev_remove(struct platform_device *pdev) { pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) mt2701_afe_runtime_suspend(&pdev->dev); - - return 0; } static const struct mt2701_soc_variants mt2701_soc_v1 = { @@ -1477,7 +1475,7 @@ static struct platform_driver mt2701_afe_pcm_driver = { .pm = &mt2701_afe_pm_ops, }, .probe = mt2701_afe_pcm_dev_probe, - .remove = mt2701_afe_pcm_dev_remove, + .remove_new = mt2701_afe_pcm_dev_remove, }; module_platform_driver(mt2701_afe_pcm_driver); From patchwork Wed Mar 15 15:06:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176173 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DF431C6FD1D for ; Wed, 15 Mar 2023 15:32:41 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D83B313B5; Wed, 15 Mar 2023 16:31:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D83B313B5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894359; bh=CcBYQ5pQ+b1R38q6a0nA+xt8V3GqdSrNzwGaMGzN1GQ=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=WECtyS+ppyuz9Eln4rCi2D8hplE3hL5dvYdtYALUWT6g2iPGdtZOXlNczpJCfMKqv vdNZzA97tJSbNtMDCDt59DIsa0j4qtpCZ0H5tleHY49zQEgC3qpxHf0kZpCs5LZ6Ie w1qjxVwj2aYO4nuKjVhZvgPy3/ZAf1zXz2Ij3QvQ= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id F2353F8073C; Wed, 15 Mar 2023 16:13:17 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 257CEF805D4; Wed, 15 Mar 2023 16:09:47 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2C331F805E8 for ; Wed, 15 Mar 2023 16:08:33 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2C331F805E8 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjo-0008OO-PE; Wed, 15 Mar 2023 16:08:24 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjl-004Kbs-8F; Wed, 15 Mar 2023 16:08:21 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjk-0057im-Iq; Wed, 15 Mar 2023 16:08:20 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Matthias Brugger Subject: [PATCH 108/173] ASoC: mediatek: mt6797-afe-pcm: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:40 +0100 Message-Id: <20230315150745.67084-109-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1801; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=CcBYQ5pQ+b1R38q6a0nA+xt8V3GqdSrNzwGaMGzN1GQ=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd5yAeixOHswBtO0H+V7OyHXBqnKrU/grjWsv qkVDwGnJQuJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHecgAKCRDB/BR4rcrs CcBVCAChU0f86GTKfll67nh1XsJDDBemWChBAlE0j+6eUqdTFDFKJwHznlAYmaD0vc7ERrmfhej o+86jOK2Cj5lmaAgxprFRLYZfrkm/LLlZ6xbuKL0+ssgtVJbKpFSMV4vq5fM1JJiYWdmhoCA9Th GejMxo+Lfm0lPHhwG4PdgwUUUJHW1Bb0/pfRq0vTO+hTZyj0IYUPlNRHSCi+jaM5kDzPdxQAuZx MbVW3IBP6jmcMdZkZHDZzbKyxNgJ8J4uFZWNNI3kA1nXQCKYSFWFqiDuLfLgDff3p851LKWduyL xly2Hz0+oAYj14BkhbM3uSG1b5U3RoyhyJmFVKM8nrvMv3a9 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 66FFZUP6UFQHTTBUSINCI6B3V5FRRLWF X-Message-ID-Hash: 66FFZUP6UFQHTTBUSINCI6B3V5FRRLWF X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: AngeloGioacchino Del Regno , alsa-devel@alsa-project.org, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/mediatek/mt6797/mt6797-afe-pcm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/mediatek/mt6797/mt6797-afe-pcm.c b/sound/soc/mediatek/mt6797/mt6797-afe-pcm.c index fb4abec9aa5f..43038444c43d 100644 --- a/sound/soc/mediatek/mt6797/mt6797-afe-pcm.c +++ b/sound/soc/mediatek/mt6797/mt6797-afe-pcm.c @@ -876,14 +876,12 @@ static int mt6797_afe_pcm_dev_probe(struct platform_device *pdev) return ret; } -static int mt6797_afe_pcm_dev_remove(struct platform_device *pdev) +static void mt6797_afe_pcm_dev_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) mt6797_afe_runtime_suspend(&pdev->dev); pm_runtime_put_sync(&pdev->dev); - - return 0; } static const struct of_device_id mt6797_afe_pcm_dt_match[] = { @@ -904,7 +902,7 @@ static struct platform_driver mt6797_afe_pcm_driver = { .pm = &mt6797_afe_pm_ops, }, .probe = mt6797_afe_pcm_dev_probe, - .remove = mt6797_afe_pcm_dev_remove, + .remove_new = mt6797_afe_pcm_dev_remove, }; module_platform_driver(mt6797_afe_pcm_driver); From patchwork Wed Mar 15 15:06:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176186 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EB2EDC7618B for ; Wed, 15 Mar 2023 15:35:53 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BCB3E13BE; Wed, 15 Mar 2023 16:35:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BCB3E13BE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894551; bh=WZRfua/0LMXioanbvKICWoWXRffy5HNp9GLEsVv6j1s=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=urcrgfj0GBRWtptLsS4ZnMdzSHekp4NuJC+OoP9LoRQhaSKOwOTjVq4xaCnfls0De O3ylaUOXfRtNcYUeVM3mGweMTOy+80va6d9HrynGdwGLYUHMmOMCpQTfAxEveX6/en jGnPKawcqNaf2HkuK0ceL5RjAPqQ8wQv4PlPH8AU= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id AC8D7F805B4; Wed, 15 Mar 2023 16:13:56 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id AA069F805D9; Wed, 15 Mar 2023 16:09:57 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2A52CF80553 for ; Wed, 15 Mar 2023 16:08:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2A52CF80553 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjq-0008Qn-1v; Wed, 15 Mar 2023 16:08:26 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjl-004Kc1-Vu; Wed, 15 Mar 2023 16:08:21 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjk-0057ir-Sk; Wed, 15 Mar 2023 16:08:20 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Matthias Brugger , Ricardo Ribalda , Minghao Chi Subject: [PATCH 109/173] ASoC: mediatek: mt8173-afe-pcm: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:41 +0100 Message-Id: <20230315150745.67084-110-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1813; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=WZRfua/0LMXioanbvKICWoWXRffy5HNp9GLEsVv6j1s=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd52X0tz+W+r4kAb1tBB28FBdgdferrxE0kwp dT98nc6twyJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHedgAKCRDB/BR4rcrs CdGPCACIWmH9Zm7gYX3u9Bay0G3aIjUKWFSjwi5RkDEeVKf4ltfEQTNqlFpDOSSs473x/ZiqyOH SHXqh0A6QO733cT95HhzVvSsiO9V1fAUk+rr8VHvPrw19TTKBzMuqY04Z6ZGLtRiMK7MeD5W1P8 9vcqD3sdtzf2lfpWsUanBb+MRNJ9pC0GR1FS7yfggAkrhHu7dkR5cBlT5yjhqjAVdRL+3o9FQ8S 9VexIb2cbPgF4oMLxO+GmP/+0AA+k2SvogDSm2D4AeTFxiYfHEvy9cRKFuzUO25iJIRb6lT2fvY iQhwvuWPtOnXAWu2pNN+ExRRke/ysd/3IZNz6sNkgHt+xAaI X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: YKUPQPOSHQ65KXWQ74YFELWASR4TIUJW X-Message-ID-Hash: YKUPQPOSHQ65KXWQ74YFELWASR4TIUJW X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: AngeloGioacchino Del Regno , alsa-devel@alsa-project.org, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c index bc155dd937e0..f93c2ec8beb7 100644 --- a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c +++ b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c @@ -1195,14 +1195,13 @@ static int mt8173_afe_pcm_dev_probe(struct platform_device *pdev) return ret; } -static int mt8173_afe_pcm_dev_remove(struct platform_device *pdev) +static void mt8173_afe_pcm_dev_remove(struct platform_device *pdev) { snd_soc_unregister_component(&pdev->dev); pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) mt8173_afe_runtime_suspend(&pdev->dev); - return 0; } static const struct of_device_id mt8173_afe_pcm_dt_match[] = { @@ -1223,7 +1222,7 @@ static struct platform_driver mt8173_afe_pcm_driver = { .pm = &mt8173_afe_pm_ops, }, .probe = mt8173_afe_pcm_dev_probe, - .remove = mt8173_afe_pcm_dev_remove, + .remove_new = mt8173_afe_pcm_dev_remove, }; module_platform_driver(mt8173_afe_pcm_driver); From patchwork Wed Mar 15 15:06:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176181 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A7E4FC61DA4 for ; Wed, 15 Mar 2023 15:34:34 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2FE7913E7; Wed, 15 Mar 2023 16:33:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2FE7913E7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894472; bh=Vbc4xUnTL1Y0I7B/wT0bsowfdarYOTW4ugcUlyhtNZ0=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=LcBbA1OD7m7mJOYE3Skh7i6tc6HJPdWIgr6JCBVoEl69nKcSj1pFQ3hWnbMRE4ERi /Q7oQKrQg+46eFbeq1b4885sCZah31OoFHiREXHoQHQch1u1Y5iVHgK7QnFPdxNWxd aRXwyvewa+Hz/wGD7egeRKldBbVl7O82/mCp3NFw= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 5E654F80774; Wed, 15 Mar 2023 16:13:38 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D7865F805D9; Wed, 15 Mar 2023 16:09:53 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 95C78F805EF for ; Wed, 15 Mar 2023 16:08:34 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 95C78F805EF Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjq-0008RT-3B; Wed, 15 Mar 2023 16:08:26 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjm-004Kc6-75; Wed, 15 Mar 2023 16:08:22 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjl-0057iv-37; Wed, 15 Mar 2023 16:08:21 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Matthias Brugger Subject: [PATCH 110/173] ASoC: mediatek: mt8183-afe-pcm: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:42 +0100 Message-Id: <20230315150745.67084-111-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1769; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Vbc4xUnTL1Y0I7B/wT0bsowfdarYOTW4ugcUlyhtNZ0=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd56cbEdE639c06BbjtIwKcsxlSF18v0KMOjU KcNVzNENRCJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeegAKCRDB/BR4rcrs CdMfCACXO8H0LPcx1idndfScu9x9KvAjfBRlRKsCPhrXYUUjpgScQjOLz+GCNqQFuU3+fmLA2r7 /7u4opuAY4ecvMR7uPn+YV6Qywy3UZeYJuVJJsB/uoz+gCHtPX7gbF+AyGKy+WggPtb4LiBN4v4 LZ2F4zzyu6+Vq5hKNd/XFDE8T2LPHS04ot1qNFx7tmCpSzjeLfNfnqrMWISI2RAByyt4grAtt45 TpXXEFTmuudCbuFVrTGk231hw9Kip6LcapIFmfKlX0j5jwRA56sah0vySs57zcwc0M037mgRp9T 92lp6rk/SwLPOXM5g/7JZDOMNSMIribUc7HhDBLSlPj1k+wQ X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: R5H7EU45VJ4ZIFIH7NN3II7PVQZM544G X-Message-ID-Hash: R5H7EU45VJ4ZIFIH7NN3II7PVQZM544G X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: AngeloGioacchino Del Regno , alsa-devel@alsa-project.org, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c b/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c index 86c8a523fe9e..90422ed2bbcc 100644 --- a/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c +++ b/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c @@ -1255,13 +1255,11 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev) return ret; } -static int mt8183_afe_pcm_dev_remove(struct platform_device *pdev) +static void mt8183_afe_pcm_dev_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) mt8183_afe_runtime_suspend(&pdev->dev); - - return 0; } static const struct of_device_id mt8183_afe_pcm_dt_match[] = { @@ -1282,7 +1280,7 @@ static struct platform_driver mt8183_afe_pcm_driver = { .pm = &mt8183_afe_pm_ops, }, .probe = mt8183_afe_pcm_dev_probe, - .remove = mt8183_afe_pcm_dev_remove, + .remove_new = mt8183_afe_pcm_dev_remove, }; module_platform_driver(mt8183_afe_pcm_driver); From patchwork Wed Mar 15 15:06:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176190 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E86B7C7618B for ; Wed, 15 Mar 2023 15:36:56 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 16EE71418; Wed, 15 Mar 2023 16:36:00 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 16EE71418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894610; bh=rg/ZjAXLV7+w8zhdF1+AVjHUTlMZxTtIj2THNFeshK4=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=sLPOYTAL+8lr5P2fNYvBh19JiFoMXxKN/fF3fCKIJNf3fANfUUZXu7ZZ8U34b+QQD DWkLYIw7Q916pan7BkY4WSUyiL6jxmikYdV2ZH28N4skzsZ96LE67Rm5Dnn7yKIAIi 8FyUApGe4E/c+GjwL7TXbUZJEk5kc6K95gEiOKwk= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D7FA6F8053D; Wed, 15 Mar 2023 16:14:08 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CBDB4F805E3; Wed, 15 Mar 2023 16:10:00 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5AF51F805F8 for ; Wed, 15 Mar 2023 16:08:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5AF51F805F8 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjq-0008SR-JL; Wed, 15 Mar 2023 16:08:26 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjm-004KcI-Fz; Wed, 15 Mar 2023 16:08:22 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjl-0057iy-AK; Wed, 15 Mar 2023 16:08:21 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Matthias Brugger , Trevor Wu , Dan Carpenter Subject: [PATCH 111/173] ASoC: mediatek: mt8188-afe-pcm: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:43 +0100 Message-Id: <20230315150745.67084-112-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1685; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=rg/ZjAXLV7+w8zhdF1+AVjHUTlMZxTtIj2THNFeshK4=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd5/fru44LZHAAv4PCDovgzr8zNvOxmz7AIS9 c1cgADxPSKJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHefwAKCRDB/BR4rcrs CekrB/9BOlZfG9QLl7wV7Cu5kKBKyhpVi5qBSnjGYfECrdBABxkug2YMjP9qnOrR2Bmfp4hsL37 5aMQC+zS1yy673slw25+yuYa2EWew79TG+zzKhHWUGavxsJ0+c+5HMxAcGov/e6DqSxBd0AhBb8 ApOs09b6SsvVE+X002ZZBQS1fczVd2LLBdLJJmQp3jtHeiWPqhJAmIfON90yyaRomb1KQVHNH/O iNh0U79qwnDRCrj/eu3D4b08h2SeTEGvMdSgdsP0yxRtfgcS0mhT3hKJ1mnpjP/qIZ43pDtNiwa kfVSV9li0tdl1XipV9ztHWczAUvvIDTseXHKnY60O3bngPts X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: SBQYJ6M7PZ4QRBF3NO6FX6HQQFG6MM4C X-Message-ID-Hash: SBQYJ6M7PZ4QRBF3NO6FX6HQQFG6MM4C X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: AngeloGioacchino Del Regno , alsa-devel@alsa-project.org, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: AngeloGioacchino Del Regno Acked-by: Trevor Wu --- sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c index e8e84de86542..e5f9373bed56 100644 --- a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c +++ b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c @@ -3323,11 +3323,9 @@ static int mt8188_afe_pcm_dev_probe(struct platform_device *pdev) return ret; } -static int mt8188_afe_pcm_dev_remove(struct platform_device *pdev) +static void mt8188_afe_pcm_dev_remove(struct platform_device *pdev) { snd_soc_unregister_component(&pdev->dev); - - return 0; } static const struct of_device_id mt8188_afe_pcm_dt_match[] = { @@ -3348,7 +3346,7 @@ static struct platform_driver mt8188_afe_pcm_driver = { .pm = &mt8188_afe_pm_ops, }, .probe = mt8188_afe_pcm_dev_probe, - .remove = mt8188_afe_pcm_dev_remove, + .remove_new = mt8188_afe_pcm_dev_remove, }; module_platform_driver(mt8188_afe_pcm_driver); From patchwork Wed Mar 15 15:06:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176182 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5BF85C61DA4 for ; Wed, 15 Mar 2023 15:34:46 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5A56B1432; Wed, 15 Mar 2023 16:33:54 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5A56B1432 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894484; bh=oy4WAcFg56RPxM4WdJAbkIaNY2s74SZyhCiy+bdWvBM=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=l5/IpKhIZralonWIhKLpWLjZktcyCF1gZ3pWqsPDmt5rETH0z+xb94CS5OqeFw3LM a5gsXlqOUQ5aavYqoR/xxMwya1ZylTMdbYGfPTLzLggoef1whGnF//gFwIk/Q9TpUx WwOHs1SlqwX8pIRmodx7jY2n5VEx0RRfvTMYEy+w= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id B18A3F80793; Wed, 15 Mar 2023 16:13:41 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A7B24F805D9; Wed, 15 Mar 2023 16:09:54 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 6CEE2F805F0 for ; Wed, 15 Mar 2023 16:08:35 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6CEE2F805F0 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjq-0008Rt-Ax; Wed, 15 Mar 2023 16:08:26 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjm-004KcD-CL; Wed, 15 Mar 2023 16:08:22 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjl-0057j2-Ha; Wed, 15 Mar 2023 16:08:21 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Matthias Brugger Subject: [PATCH 112/173] ASoC: mediatek: mt8192-afe-pcm: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:44 +0100 Message-Id: <20230315150745.67084-113-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1850; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=oy4WAcFg56RPxM4WdJAbkIaNY2s74SZyhCiy+bdWvBM=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd6Cm8pswKLfMzxnzK+YKyJGFeJFqLJyx/NjW hDX4C58WXSJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeggAKCRDB/BR4rcrs CWg4B/9BjBTomz49FUtXlQUBveDcQ04GYri71P24yDuc+2naiaNLblmOFsPC/Vuiz3rQxDHTPt8 95WZRIVjAfudPk652joJo9clCuaA6T1beDGqocTG5/zs/BqAkpfYvqiiEj6ERwmpSSftRv8k0NR sQZ+ZxzsTs/0QP9Mh+hcKAe2r06ShkxwMHIMfRfxLh4cOHdnljqMQEHe7739DqleBaKm3eKRVU6 ULgV5cpgHe91YVUnzKGFwpIQzolTeZyX8kDrZZUk0C8joTPX4DYy+wzP6027wZ+qRykBCG34Gen O7vCXPJkjE5yU3dmuFYt1q6gOyyQOFkViIEDw3W22k2gSu8c X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: LORQ6LYVOXBG4LS6PXC5BAPV5UJO3VGD X-Message-ID-Hash: LORQ6LYVOXBG4LS6PXC5BAPV5UJO3VGD X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: AngeloGioacchino Del Regno , alsa-devel@alsa-project.org, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c index e1e4ca931551..adff3d667267 100644 --- a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c +++ b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c @@ -2353,7 +2353,7 @@ static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev) return ret; } -static int mt8192_afe_pcm_dev_remove(struct platform_device *pdev) +static void mt8192_afe_pcm_dev_remove(struct platform_device *pdev) { struct mtk_base_afe *afe = platform_get_drvdata(pdev); @@ -2363,7 +2363,6 @@ static int mt8192_afe_pcm_dev_remove(struct platform_device *pdev) /* disable afe clock */ mt8192_afe_disable_clock(afe); - return 0; } static const struct of_device_id mt8192_afe_pcm_dt_match[] = { @@ -2384,7 +2383,7 @@ static struct platform_driver mt8192_afe_pcm_driver = { .pm = &mt8192_afe_pm_ops, }, .probe = mt8192_afe_pcm_dev_probe, - .remove = mt8192_afe_pcm_dev_remove, + .remove_new = mt8192_afe_pcm_dev_remove, }; module_platform_driver(mt8192_afe_pcm_driver); From patchwork Wed Mar 15 15:06:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176178 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3E29EC7618B for ; Wed, 15 Mar 2023 15:33:47 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 93C9C13D6; Wed, 15 Mar 2023 16:32:54 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 93C9C13D6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894424; bh=Vrevh/9+Tt9NBTkdA3ayadMtrznBbxNATV0c6JUQjk8=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=S41chK0mmPFbcUhQ9yDSkV5gbDPdbmsYThbirb69nulab71eQ5mgSyGnWMbP9F43T w7F4fsLkZiEqsFQzAJyAJipHH7LcAneDaub9EwmX7x/3vxAuUKADjpEgXMsPoHCjZl QOiLq5ZFGGBpmy6GrIoMj0a8wqJWkKSHvH9ajmXA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 56A00F80765; Wed, 15 Mar 2023 16:13:29 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CE76FF805D5; Wed, 15 Mar 2023 16:09:50 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 64364F805EC for ; Wed, 15 Mar 2023 16:08:35 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 64364F805EC Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjq-0008SQ-Hd; Wed, 15 Mar 2023 16:08:26 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjm-004KcH-Fr; Wed, 15 Mar 2023 16:08:22 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjl-0057j5-O5; Wed, 15 Mar 2023 16:08:21 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Matthias Brugger Subject: [PATCH 113/173] ASoC: mediatek: mt8195-afe-pcm: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:45 +0100 Message-Id: <20230315150745.67084-114-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1866; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Vrevh/9+Tt9NBTkdA3ayadMtrznBbxNATV0c6JUQjk8=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd6FPMOFGppFQCVABceDv/v8niyN69Vxw1dPW t1vVl8VttKJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHehQAKCRDB/BR4rcrs CROfB/9cn1lQZJZwq/BhnTEC7pmpcbvVu6MtU9rYrHSQOGFOlTJgeHY+o3jrkDezY2n6GGRxv77 A5y6LSFfENIfLl63FiSEcffYanjqtLo4RT19eJdXfaRbPfgE6yHOqKAeEsjY8Ub0kSS0MgG0ZRY u0evzAnY0guqz33nlb9dNaf5uThRrCVCpOZG/xOD6jbP88DDOgdIX8eYCkLJfqk0D/JIU98PvdL Kyk0SXvSAUL9PkW96Fn40F7SNm8o3KLuDVOKWNBZju57X1zCVv9spZtcN17bGGVywKxOgGCUOSY tJrlX8VFULBs8lKcYpY4feO33SfXKPRapCo69sle/NXefRGC X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: EOTJNOKI2HJIJYMA2HWRZASB46JQZPU3 X-Message-ID-Hash: EOTJNOKI2HJIJYMA2HWRZASB46JQZPU3 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: AngeloGioacchino Del Regno , alsa-devel@alsa-project.org, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c b/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c index 72b2c6d629b9..9e45efeada55 100644 --- a/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c +++ b/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c @@ -3253,7 +3253,7 @@ static int mt8195_afe_pcm_dev_probe(struct platform_device *pdev) return ret; } -static int mt8195_afe_pcm_dev_remove(struct platform_device *pdev) +static void mt8195_afe_pcm_dev_remove(struct platform_device *pdev) { struct mtk_base_afe *afe = platform_get_drvdata(pdev); @@ -3264,7 +3264,6 @@ static int mt8195_afe_pcm_dev_remove(struct platform_device *pdev) mt8195_afe_runtime_suspend(&pdev->dev); mt8195_afe_deinit_clock(afe); - return 0; } static const struct of_device_id mt8195_afe_pcm_dt_match[] = { @@ -3285,7 +3284,7 @@ static struct platform_driver mt8195_afe_pcm_driver = { .pm = &mt8195_afe_pm_ops, }, .probe = mt8195_afe_pcm_dev_probe, - .remove = mt8195_afe_pcm_dev_remove, + .remove_new = mt8195_afe_pcm_dev_remove, }; module_platform_driver(mt8195_afe_pcm_driver); From patchwork Wed Mar 15 15:06:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176188 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4217BC6FD1D for ; Wed, 15 Mar 2023 15:36:24 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D92981434; Wed, 15 Mar 2023 16:35:31 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D92981434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894581; bh=dFzHDZxFY1LnF/vH5qoG7cREA6ZssUK4dysHkK1fy3A=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=VAweIVNX8flErECBdDx3U645aV8oGJsQ/VF/yHO46P6pzbrbDpoTGoYRgS5StKwmy NuwreqiZXmn4IHNqxSMY2QBZl1prF2faEtcsDFVxEDzBn27rvstz5DhjHFniKubDS3 uGEin1zldkb9+mdtIhHwNPGSlz9V7Xv37Ukv4mY0= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 97632F805C0; Wed, 15 Mar 2023 16:14:01 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 00D99F805E2; Wed, 15 Mar 2023 16:09:58 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3AA60F805F6 for ; Wed, 15 Mar 2023 16:08:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3AA60F805F6 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjq-0008Ss-Lv; Wed, 15 Mar 2023 16:08:26 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjm-004KcQ-M1; Wed, 15 Mar 2023 16:08:22 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjm-0057j8-0A; Wed, 15 Mar 2023 16:08:22 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Jerome Brunet , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Neil Armstrong , Kevin Hilman Subject: [PATCH 114/173] ASoC: meson: aiu: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:46 +0100 Message-Id: <20230315150745.67084-115-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1491; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=dFzHDZxFY1LnF/vH5qoG7cREA6ZssUK4dysHkK1fy3A=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd6IFDyIZ+oP9ndVzNSV6myRohvWzvUoe1phQ d70M0WZcFGJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeiAAKCRDB/BR4rcrs CedYCACaTxr2Cr6x7kpn5otGsM2h3AKhrioeNQ8GDsl1gB4YmGd9E1ofZNVLrIZTrNUaWI0Zde7 Y1zXna1xWS3sHW9SJCuBa+HQ/xaETvenpY4Fe+wV304I0Apc9wOMK+cm1L56OfMmTKcFowRQV5w 4ua2v/XE+PN1Z/YYoZk+NXdcmR/MDs2X4Fd/mfYn4QdYpfeOC598kaD2KQow3eBjWAis2TClebj SFO6orzadXQ7yAjJoAt/pOVhjOaDP4/jU10XNl18SKLlFveYaHXQStNg/mhYO6c+o0BjON1RTVK dLpi1gJ8qzhs/LzSOEhsE1ZIUC5GqBxDNsuzwMdOu7E3tOU5 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: I74NJUFG5X426Q7ZEM6AON6TQJ3REH46 X-Message-ID-Hash: I74NJUFG5X426Q7ZEM6AON6TQJ3REH46 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Martin Blumenstingl , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Martin Blumenstingl --- sound/soc/meson/aiu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/meson/aiu.c b/sound/soc/meson/aiu.c index 88e611e64d14..da351a60df0c 100644 --- a/sound/soc/meson/aiu.c +++ b/sound/soc/meson/aiu.c @@ -331,11 +331,9 @@ static int aiu_probe(struct platform_device *pdev) return ret; } -static int aiu_remove(struct platform_device *pdev) +static void aiu_remove(struct platform_device *pdev) { snd_soc_unregister_component(&pdev->dev); - - return 0; } static const struct aiu_platform_data aiu_gxbb_pdata = { @@ -364,7 +362,7 @@ MODULE_DEVICE_TABLE(of, aiu_of_match); static struct platform_driver aiu_pdrv = { .probe = aiu_probe, - .remove = aiu_remove, + .remove_new = aiu_remove, .driver = { .name = "meson-aiu", .of_match_table = aiu_of_match, From patchwork Wed Mar 15 15:06:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176209 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 79C3CC7618B for ; Wed, 15 Mar 2023 15:39:01 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 659CC1455; Wed, 15 Mar 2023 16:38:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 659CC1455 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894739; bh=iskRGe0e1NEGCS7ZHmi3EBejchItbPDswgJSbudaUeU=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=RGUJlQZaL/xr4w04qH7jEhqUyOWYMFN8Us/pLiFc+biFs8Rgu+UkeDrhbFAp08Qzr qKTb1BCc7oTLykb2LJcvVsT5Bsz7WwJV01FB58xOZ1879LNesquLK688ByWb3JwoJ1 YSL7LbFP6veu8IasN8Web/ZWhGDe+2Ml7jd2XJ4Y= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 8443DF8065E; Wed, 15 Mar 2023 16:14:34 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 23470F805F2; Wed, 15 Mar 2023 16:10:08 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3313EF80602 for ; Wed, 15 Mar 2023 16:08:40 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3313EF80602 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjq-0008Tn-Ot; Wed, 15 Mar 2023 16:08:26 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjm-004KcU-Rh; Wed, 15 Mar 2023 16:08:22 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjm-0057jC-6m; Wed, 15 Mar 2023 16:08:22 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer Subject: [PATCH 115/173] ASoC: mxs: mxs-sgtl5000: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:47 +0100 Message-Id: <20230315150745.67084-116-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1567; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=iskRGe0e1NEGCS7ZHmi3EBejchItbPDswgJSbudaUeU=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd6Lg/gNsBo6JMr3ON8DbURBj6KfkcNPv1ZwN ak71fFUY3qJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeiwAKCRDB/BR4rcrs CTALB/9KOvXM/G3yE8Hng/r+wNaWy/ust4Mr67X7D+ahaMcBRi6ZkTnmu+zj5E6+4uziPE0p9pz e4ZoUZZTyoI7nE/pki7ui3AbsQt9AUH2HkpjWg5xVZh0KZohBXxxFVPSgohAvMTwXh3G+tLPtQ3 CPIBHolzkIpMGJy9+5BkLxa648IaMpxPN0Y/0olvuVRV2ePBvXfrfR99WzvfCBcoMSymVQjNvHK 0q+0QGC4Nqpp5P1K5YyXvlgovhyXg5m9quadT9Kf9dc50CrV4SsvI8ROA5FPhKPUH8Hod9MFE+b zKMq/fxxTaXWRpluZUTwSQO45QNUUq1CbYVM3/aE8NUNpdIg X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 4ECF4FYXGZ7GAXJZYSW46XOL5YZHKUJF X-Message-ID-Hash: 4ECF4FYXGZ7GAXJZYSW46XOL5YZHKUJF X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/mxs/mxs-sgtl5000.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/mxs/mxs-sgtl5000.c b/sound/soc/mxs/mxs-sgtl5000.c index 746f40938675..e24e89cc1270 100644 --- a/sound/soc/mxs/mxs-sgtl5000.c +++ b/sound/soc/mxs/mxs-sgtl5000.c @@ -169,11 +169,9 @@ static int mxs_sgtl5000_probe(struct platform_device *pdev) return 0; } -static int mxs_sgtl5000_remove(struct platform_device *pdev) +static void mxs_sgtl5000_remove(struct platform_device *pdev) { mxs_saif_put_mclk(0); - - return 0; } static const struct of_device_id mxs_sgtl5000_dt_ids[] = { @@ -188,7 +186,7 @@ static struct platform_driver mxs_sgtl5000_audio_driver = { .of_match_table = mxs_sgtl5000_dt_ids, }, .probe = mxs_sgtl5000_probe, - .remove = mxs_sgtl5000_remove, + .remove_new = mxs_sgtl5000_remove, }; module_platform_driver(mxs_sgtl5000_audio_driver); From patchwork Wed Mar 15 15:06:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176211 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 14068C6FD1D for ; Wed, 15 Mar 2023 15:39:31 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8477D1464; Wed, 15 Mar 2023 16:38:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8477D1464 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894769; bh=CX53kDhH+rgYcvpQwWo4admZmaf2ZIfuHupUwI3i/sE=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=cynU8fBmk3uLtQd+LxUl4ymkxvdGzRQ7ofptgUSi10m59CtSnFvsPRCCcEcHby7Gi wcDIQmEwNUIV0HdYktbhW1xQ+Bl4WAYlke0ADCcKv+GScG3G/CwxuOmtOHen3Ymbng vX6eBy4vWouZLFt+A3krDuq+iDSfEgdG/5tvIOGw= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D050CF80897; Wed, 15 Mar 2023 16:14:38 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5E83EF805F3; Wed, 15 Mar 2023 16:10:10 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 52BA4F80600 for ; Wed, 15 Mar 2023 16:08:40 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 52BA4F80600 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjr-0008VN-7o; Wed, 15 Mar 2023 16:08:27 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjn-004Kcb-AW; Wed, 15 Mar 2023 16:08:23 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjm-0057jH-D8; Wed, 15 Mar 2023 16:08:22 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 116/173] ASoC: pxa: mmp-sspa: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:48 +0100 Message-Id: <20230315150745.67084-117-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1777; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=CX53kDhH+rgYcvpQwWo4admZmaf2ZIfuHupUwI3i/sE=; b=owGbwMvMwMV48I9IxdpTbzgZT6slMaQI3usziW9t6CyqslnGm7hc0qhSxEWkzYHr7eKyOm89L yevA7qdjMYsDIxcDLJiiix1RVpiEyTW/LcrWcINM4iVCWQKAxenAEzEQIH9v9P3vbVsF9w/P/SQ 3dZ7Q3ZV4nUF99Tq1sSdLx/Ffrpzk9socfpXL3P+aKneq91CThK/l+X6W7qzXfNJXHj8yP2n19a /Wbtv2m21XWZXXsR531rLks5so7bdRT9+qUd9b0S+5sZN/PMumLv0Pus9duJaYRLD6Sjp1X1FTJ cWiV3jmqklI7RIbueLh1N8OratUvdhPaiRdTjpEd+NXbkJoh3L7XN+WQoyMeYd4NguWNgvuElho cEK5lfF1UmKf4veOMvr1pwRDmkrmb3slzh394ev/8/4H+teqvjt00LDZ1khSe9ie2fMFirPmmZW 4neN2dO3VMPz2cxtBbY6SaEfDh27xG0ssOeCz2tmbWZHAA== X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 2JCSUV63VGO7SDCCW3IDB2ZEGC37IU4K X-Message-ID-Hash: 2JCSUV63VGO7SDCCW3IDB2ZEGC37IU4K X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/pxa/mmp-sspa.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/soc/pxa/mmp-sspa.c b/sound/soc/pxa/mmp-sspa.c index b3c1744eff91..a1ed141b8795 100644 --- a/sound/soc/pxa/mmp-sspa.c +++ b/sound/soc/pxa/mmp-sspa.c @@ -545,7 +545,7 @@ static int asoc_mmp_sspa_probe(struct platform_device *pdev) return 0; } -static int asoc_mmp_sspa_remove(struct platform_device *pdev) +static void asoc_mmp_sspa_remove(struct platform_device *pdev) { struct sspa_priv *sspa = platform_get_drvdata(pdev); @@ -553,11 +553,10 @@ static int asoc_mmp_sspa_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); if (pdev->dev.of_node) - return 0; + return; clk_put(sspa->audio_clk); clk_put(sspa->sysclk); - return 0; } #ifdef CONFIG_OF @@ -575,7 +574,7 @@ static struct platform_driver asoc_mmp_sspa_driver = { .of_match_table = of_match_ptr(mmp_sspa_of_match), }, .probe = asoc_mmp_sspa_probe, - .remove = asoc_mmp_sspa_remove, + .remove_new = asoc_mmp_sspa_remove, }; module_platform_driver(asoc_mmp_sspa_driver); From patchwork Wed Mar 15 15:06:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176234 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DB6A8C6FD1D for ; Wed, 15 Mar 2023 15:44:16 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1783414AE; Wed, 15 Mar 2023 16:43:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1783414AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895055; bh=7wVGPl89kBFi24N5Z/3t7qbXFFw34gY1XTuc8wLzvxQ=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=I6+ienrxtJ2pj9YWUMOD8+A+v2R9U7bkxc9VeOioDKJhwWKXaHwqIr56k3b5KnyJu T1p2KRD2plbxAl9TO80NHb2/gAgBXQcrQCPztDwGO5aof650ONNlG3ZM5v++4PEbk+ eKs/pBAG6kKOAMK+crxZ3+v2gu/NG2Q4/oAEEszU= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 4BF5BF80CAB; Wed, 15 Mar 2023 16:15:35 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8CF84F805FD; Wed, 15 Mar 2023 16:10:25 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B7A06F80616 for ; Wed, 15 Mar 2023 16:08:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B7A06F80616 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjr-0008W4-BT; Wed, 15 Mar 2023 16:08:27 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjn-004Kch-HH; Wed, 15 Mar 2023 16:08:23 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjm-0057jN-KC; Wed, 15 Mar 2023 16:08:22 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 117/173] ASoC: pxa: pxa2xx-ac97: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:49 +0100 Message-Id: <20230315150745.67084-118-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1708; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=7wVGPl89kBFi24N5Z/3t7qbXFFw34gY1XTuc8wLzvxQ=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd6Rh3jc+UVZFX0VHttssuMiHcI+7nqybMatS n/nIjVsjBqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHekQAKCRDB/BR4rcrs CY27B/9A5QaHdAJck126dSyrVOecjThExoFLz3srUEBlo3JFTPHlzOqGMqq5SNPegMO0djiuEFb sqJRzuzUjnh5wq8C8kzCypd2YZ2ogMq7XOe1vCi0GC78gdJ28FbUDMr43BlMGDRvA9xsk2Fjz9F PkEJlw8A54ZTn5c+nljIzOMQZ1mf5ttU2VUmdPVir8L1tCIqL26GNAAEXPQ6JOuXAaGSiL29Opk Wnh0zOSxcIlNyOgeXDyFfblxxbwunRGE3D8i+UoU7ojLNA3aaK7Hfpw4kDLw+KDt/PblI+JPDH1 TZpn3/2L6HtVMatHYAYhqixzhCB0LFLDbkZJ7doHDKtM1syz X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 6DD6B4RQHZYFIH6AZYRRGRLIE45CC7QN X-Message-ID-Hash: 6DD6B4RQHZYFIH6AZYRRGRLIE45CC7QN X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/pxa/pxa2xx-ac97.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c index 809ea34736ed..e73bd62c033c 100644 --- a/sound/soc/pxa/pxa2xx-ac97.c +++ b/sound/soc/pxa/pxa2xx-ac97.c @@ -263,13 +263,12 @@ static int pxa2xx_ac97_dev_probe(struct platform_device *pdev) pxa_ac97_dai_driver, ARRAY_SIZE(pxa_ac97_dai_driver)); } -static int pxa2xx_ac97_dev_remove(struct platform_device *pdev) +static void pxa2xx_ac97_dev_remove(struct platform_device *pdev) { struct ac97_controller *ctrl = platform_get_drvdata(pdev); snd_ac97_controller_unregister(ctrl); pxa2xx_ac97_hw_remove(pdev); - return 0; } #ifdef CONFIG_PM_SLEEP @@ -289,7 +288,7 @@ static SIMPLE_DEV_PM_OPS(pxa2xx_ac97_pm_ops, static struct platform_driver pxa2xx_ac97_driver = { .probe = pxa2xx_ac97_dev_probe, - .remove = pxa2xx_ac97_dev_remove, + .remove_new = pxa2xx_ac97_dev_remove, .driver = { .name = "pxa2xx-ac97", #ifdef CONFIG_PM_SLEEP From patchwork Wed Mar 15 15:06:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176183 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 51771C6FD1D for ; Wed, 15 Mar 2023 15:35:06 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B4A4D1417; Wed, 15 Mar 2023 16:34:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B4A4D1417 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894503; bh=gEf2oKt7yZYncJHFQDqYPhEswyQeMqk69sSk8qFn7Nw=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=pLh72ffBcjXXjv6iOSYTKM0akTnrB3XuS+KVd4WA4/cBDMGQ4eXlAarfBDR2mXRSY vMtDiRWcd5ews0nFx9kcvKX0eou2USkh5/Nw40OPjlmCAnAERKjUvO4QF6P6bD2tM4 2S2pNKo2/3TZERvwW229rm7M0XcnPgnjFfNcHs9I= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 49408F80796; Wed, 15 Mar 2023 16:13:45 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 27D77F805A1; Wed, 15 Mar 2023 16:09:55 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8507EF805F1 for ; Wed, 15 Mar 2023 16:08:35 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8507EF805F1 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjr-000055-HK; Wed, 15 Mar 2023 16:08:27 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjn-004Kcm-N8; Wed, 15 Mar 2023 16:08:23 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjm-0057jR-TU; Wed, 15 Mar 2023 16:08:22 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 118/173] ASoC: qcom: qdsp6: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:50 +0100 Message-Id: <20230315150745.67084-119-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1611; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=gEf2oKt7yZYncJHFQDqYPhEswyQeMqk69sSk8qFn7Nw=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd6T/tzMl5pkp8hum7iqrT4gVjSB8I3WaKMR5 MjyxQqFpW2JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHekwAKCRDB/BR4rcrs CcLAB/4nZEARDckbkd0y6eeYqT2SPRPr8RysajMdUVv5e/rLcugLuupe/nJVeww2IaxkeWF7K/a 4jltpb+Uf//im1L/0JBDmQZMwRyZqyX2YnVzh+K5lINS4HCqYy6gL64Vip6Exxo6m86H88n6rYk oHq8lghWIRl6aDzYgj10bsVsmF/WyyUxFAsHDSaiMqVhd2fTiitML01ZUV1rOxrKU+rf/jSxNlG 8hZKFH6Miv6sRy7QUrpnJ9Kxas8c/xENR6lCazxVmHfa/HzKajGoywLu7Bza8wPZfiqL35qjt0d biuWk0UBShGRgABzRAcL8GsNeN6vOhQSpWl4YXSPxq8ZAd1U X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: Z3GSVOZXSNAVM63JP2SQRNOMCEESK2JN X-Message-ID-Hash: Z3GSVOZXSNAVM63JP2SQRNOMCEESK2JN X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/qcom/qdsp6/q6routing.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c index 928fd23e2c27..bba07899f8fc 100644 --- a/sound/soc/qcom/qdsp6/q6routing.c +++ b/sound/soc/qcom/qdsp6/q6routing.c @@ -1140,12 +1140,10 @@ static int q6pcm_routing_probe(struct platform_device *pdev) NULL, 0); } -static int q6pcm_routing_remove(struct platform_device *pdev) +static void q6pcm_routing_remove(struct platform_device *pdev) { kfree(routing_data); routing_data = NULL; - - return 0; } #ifdef CONFIG_OF @@ -1162,7 +1160,7 @@ static struct platform_driver q6pcm_routing_platform_driver = { .of_match_table = of_match_ptr(q6pcm_routing_device_id), }, .probe = q6pcm_routing_probe, - .remove = q6pcm_routing_remove, + .remove_new = q6pcm_routing_remove, }; module_platform_driver(q6pcm_routing_platform_driver); From patchwork Wed Mar 15 15:06:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176180 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 16896C61DA4 for ; Wed, 15 Mar 2023 15:34:16 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D492A13A6; Wed, 15 Mar 2023 16:33:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D492A13A6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894453; bh=ZdN5klOvP29SLEvL9BI/I7KMW66b93lMlx6fT9RACus=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=F9vEfETlcEvF9H5nl6ajsQpcrvh3jBpMXdXpPh86agFA6zWwiiL/16/vwl8FcNveW sKu7afIZUCAHGeb0HZhOx9y5+mtv/ZWZctzSY25O2m9jdDWG9RmB0hatU2wsP3PThq S24Na1eyL9mzCnE3NkjQ0yDlpFs9RehtF4J0McBY= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 6C4AAF8076D; Wed, 15 Mar 2023 16:13:33 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1530DF805E0; Wed, 15 Mar 2023 16:09:53 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 66CCBF805ED for ; Wed, 15 Mar 2023 16:08:35 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 66CCBF805ED Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjr-00005m-Q3; Wed, 15 Mar 2023 16:08:27 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjn-004Kcq-RU; Wed, 15 Mar 2023 16:08:23 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjn-0057jV-3h; Wed, 15 Mar 2023 16:08:23 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Heiko Stuebner Subject: [PATCH 119/173] ASoC: rockchip: rockchip_i2s: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:51 +0100 Message-Id: <20230315150745.67084-120-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1820; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=ZdN5klOvP29SLEvL9BI/I7KMW66b93lMlx6fT9RACus=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd6WemVdfuqwbUAkWKuntINDcKvOWrL0cEGeh Ee6iAGfQPSJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHelgAKCRDB/BR4rcrs CaTSB/wPuI/OBYaVHWcxJ5VpT8HzmX3sG7MAiLtlNlaP8Gah5scZSqJIjLXeQoozOA6b1hw5UTd 1oeX1fwtgbNYA82yxbZIVJQvvW4B3Sm97gxcvMSK8aLqarRHoirRyne4rdXICNMfT53gz71pOdq rYd3kD8W+3dYQNNmeDA5CuuZkitBGjI3SCJ7Gvsbdzw8/WwFjtvpc0vfWXsj7D3RSJ0K2d5LRTr +rZZkAsCF3vNrK4faLodDCmDwc1wm5j+5trYuTY79cJfPjsmT/Y1DhYciinZW0BcfIFuOULvmjc bf5y/CgQVty7SW3fbWfS9bnNnu6vMkUWVNbRXeLw5pZkJpD1 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: QFMOEJ7SOEFFIPZTMAD3AYPCJCISILNB X-Message-ID-Hash: QFMOEJ7SOEFFIPZTMAD3AYPCJCISILNB X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/rockchip/rockchip_i2s.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c index a8758ad68442..79abec24a5a2 100644 --- a/sound/soc/rockchip/rockchip_i2s.c +++ b/sound/soc/rockchip/rockchip_i2s.c @@ -850,7 +850,7 @@ static int rockchip_i2s_probe(struct platform_device *pdev) return ret; } -static int rockchip_i2s_remove(struct platform_device *pdev) +static void rockchip_i2s_remove(struct platform_device *pdev) { struct rk_i2s_dev *i2s = dev_get_drvdata(&pdev->dev); @@ -859,8 +859,6 @@ static int rockchip_i2s_remove(struct platform_device *pdev) i2s_runtime_suspend(&pdev->dev); clk_disable_unprepare(i2s->hclk); - - return 0; } static const struct dev_pm_ops rockchip_i2s_pm_ops = { @@ -870,7 +868,7 @@ static const struct dev_pm_ops rockchip_i2s_pm_ops = { static struct platform_driver rockchip_i2s_driver = { .probe = rockchip_i2s_probe, - .remove = rockchip_i2s_remove, + .remove_new = rockchip_i2s_remove, .driver = { .name = DRV_NAME, .of_match_table = of_match_ptr(rockchip_i2s_match), From patchwork Wed Mar 15 15:06:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176192 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3E837C6FD1D for ; Wed, 15 Mar 2023 15:37:25 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id F04EE1371; Wed, 15 Mar 2023 16:36:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F04EE1371 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894643; bh=bxa7oqwO4CDIhDDV/+gTG3tBSwdbzGBsmosnfqeoLaY=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=vIlsAZJ60DySXdXeQm9wAgwaHt+UmHd07iMRxLzBUYg6gaD1hnNFdOr1g7OWd/y9E UvX+dsr/QV6E7Ai6NHEypbXeNYn5L/hoLClFyn5lTy9NMs3asDivT7reY9utSLRoa1 L3UqMOs2v20KCOyfcbZEejt3mwkjfs6RcaTrgYfc= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 14076F8080E; Wed, 15 Mar 2023 16:14:15 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id BC88CF805E3; Wed, 15 Mar 2023 16:10:02 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 28217F805F9 for ; Wed, 15 Mar 2023 16:08:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 28217F805F9 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjs-00006b-1H; Wed, 15 Mar 2023 16:08:28 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjo-004Kcw-41; Wed, 15 Mar 2023 16:08:24 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjn-0057jY-Ai; Wed, 15 Mar 2023 16:08:23 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Nicolas Frattaroli , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Heiko Stuebner Subject: [PATCH 120/173] ASoC: rockchip: rockchip_i2s_tdm: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:52 +0100 Message-Id: <20230315150745.67084-121-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1807; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=bxa7oqwO4CDIhDDV/+gTG3tBSwdbzGBsmosnfqeoLaY=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd6ZppXe7kh2gT9GFFh7N7KCNurmQRJeuc3hj khN4tvLC2+JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHemQAKCRDB/BR4rcrs CVFWCACTvskd6CjuJJv2mGvB9WqemBva4WyJup6JkKzyHHI46MtxXK88Bc7BFV5bVq69hoDHJf6 apmLfll3+uSPFXjUEKXaHdW5ukGDAt1ErmVqS/vL6FilGrO48SyZfoSVQN6SL8uXNQDel0xhIHw qlhhmFZGfA8voisLJW9yrtkKjCWvAloPIyKz+McWBhx+arOCz3DKgBSlHnbrfycWXQfMXG4rdXN 5tAuDANryH93tW7a3ou2SvlGSjidmcwY0lIa+YqD/sn0vMaRWOBR6LEe416MWEXyYRTwS66RR74 a+mo7CofdSC1h/MV/UdOkft3HR6TAPvxOd8yfTMEhzukQFIg X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: Z5I7FC22IWGC72BW2EHZTQ7UW2DSYX2Y X-Message-ID-Hash: Z5I7FC22IWGC72BW2EHZTQ7UW2DSYX2Y X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: linux-rockchip@lists.infradead.org, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/rockchip/rockchip_i2s_tdm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/rockchip/rockchip_i2s_tdm.c b/sound/soc/rockchip/rockchip_i2s_tdm.c index 166257c6ae14..c2e9fd5ab05e 100644 --- a/sound/soc/rockchip/rockchip_i2s_tdm.c +++ b/sound/soc/rockchip/rockchip_i2s_tdm.c @@ -1722,14 +1722,12 @@ static int rockchip_i2s_tdm_probe(struct platform_device *pdev) return ret; } -static int rockchip_i2s_tdm_remove(struct platform_device *pdev) +static void rockchip_i2s_tdm_remove(struct platform_device *pdev) { if (!pm_runtime_status_suspended(&pdev->dev)) i2s_tdm_runtime_suspend(&pdev->dev); pm_runtime_disable(&pdev->dev); - - return 0; } static int __maybe_unused rockchip_i2s_tdm_suspend(struct device *dev) @@ -1764,7 +1762,7 @@ static const struct dev_pm_ops rockchip_i2s_tdm_pm_ops = { static struct platform_driver rockchip_i2s_tdm_driver = { .probe = rockchip_i2s_tdm_probe, - .remove = rockchip_i2s_tdm_remove, + .remove_new = rockchip_i2s_tdm_remove, .driver = { .name = DRV_NAME, .of_match_table = of_match_ptr(rockchip_i2s_tdm_match), From patchwork Wed Mar 15 15:06:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176184 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 32F86C61DA4 for ; Wed, 15 Mar 2023 15:35:20 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 532CA13D9; Wed, 15 Mar 2023 16:34:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 532CA13D9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894518; bh=R5sAzYAeAz7UmVg6PWNYIucRjNJbrP/w9lKFt0p3Gao=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=eM1sYi0C1TZusrCgx2DRuFRNm1OMX0motIG7vsjHzd0U05ubKk6/AkRp+4koSalSX TvLVws+pwkAemsY+Kh1ICkRwDkot/5tyluLJLDlFr4SBASytEtCCMWEB/oagM08IN2 K6YN0N1GU4bqbo4RFHOmTFLdM40R/GD/8GWAJb8M= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 92E00F8079B; Wed, 15 Mar 2023 16:13:48 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 62EC2F805E2; Wed, 15 Mar 2023 16:09:56 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id AA9F1F805F2 for ; Wed, 15 Mar 2023 16:08:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AA9F1F805F2 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjs-00007Q-4u; Wed, 15 Mar 2023 16:08:28 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjo-004Kd1-AZ; Wed, 15 Mar 2023 16:08:24 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjn-0057jc-I9; Wed, 15 Mar 2023 16:08:23 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Heiko Stuebner Subject: [PATCH 121/173] ASoC: rockchip: rockchip_pdm: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:53 +0100 Message-Id: <20230315150745.67084-122-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1794; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=R5sAzYAeAz7UmVg6PWNYIucRjNJbrP/w9lKFt0p3Gao=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd6crhdW9NWhoT42/vTOyQdYigF3pALKqxNJZ NnN8gf0oa2JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHenAAKCRDB/BR4rcrs CV7VCACHC9Ttbsh6xSWGAbxwntOXecBcaQjBkMc+v9ENniX5X74SoujiSvdBudMwghC86tHV5C3 tr05oIw5rG8NeXZHzqOlb/y7yA2nZteiJ4rWuIw+lPd4yDUv7RmoLBkRxLR7zEBGDZ1sNRYLpTn pxJbp1t7rcq2VH7B79ECp1RkfGQNh9TNHa6XwPok8V4JkeBjdC5PwgCm7+cCQO+kr7ymvPu1lCI SzjfUgMw+Qvdvy6DjywJGNZiuixU4Uf0cR/48lqXGg17/f2FUW6S9ivskE1q2uKdR7Q+uunGdIz 4Z6PHEEQZz3rXRMO3vUCWdLj16FbxabRrfglJPps6OPTc+WK X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: EVH6E5HXQA62HG5D6SLS74QRT64TXIDK X-Message-ID-Hash: EVH6E5HXQA62HG5D6SLS74QRT64TXIDK X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/rockchip/rockchip_pdm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c index 6ce92b1db790..52f9aae60be8 100644 --- a/sound/soc/rockchip/rockchip_pdm.c +++ b/sound/soc/rockchip/rockchip_pdm.c @@ -661,7 +661,7 @@ static int rockchip_pdm_probe(struct platform_device *pdev) return ret; } -static int rockchip_pdm_remove(struct platform_device *pdev) +static void rockchip_pdm_remove(struct platform_device *pdev) { struct rk_pdm_dev *pdm = dev_get_drvdata(&pdev->dev); @@ -671,8 +671,6 @@ static int rockchip_pdm_remove(struct platform_device *pdev) clk_disable_unprepare(pdm->clk); clk_disable_unprepare(pdm->hclk); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -710,7 +708,7 @@ static const struct dev_pm_ops rockchip_pdm_pm_ops = { static struct platform_driver rockchip_pdm_driver = { .probe = rockchip_pdm_probe, - .remove = rockchip_pdm_remove, + .remove_new = rockchip_pdm_remove, .driver = { .name = "rockchip-pdm", .of_match_table = of_match_ptr(rockchip_pdm_match), From patchwork Wed Mar 15 15:06:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176187 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1C31BC6FD1D for ; Wed, 15 Mar 2023 15:36:06 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1A09E13BB; Wed, 15 Mar 2023 16:35:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1A09E13BB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894564; bh=DYgV418G1HHJeUqCA1P1kSgz2wPVPuFAcd/9MCT5gwM=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=uxNMd6e0q8DHY9hspnSwW0ZWQ/q5bAP6RJzuxDDz94H+TWyY2l2vm5D2RATKWm0NU xRYBh8Lh+6oDhCHapqFpp16BJ5H2hrpJp2hZSEqdquQ3DYzSyjBctEGm/16P8Fp6wO B/QziSw4HVjbpUSRqmpWkmfJfG+xTPDtbVHs3RJs= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7453FF80803; Wed, 15 Mar 2023 16:13:58 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 24852F805D9; Wed, 15 Mar 2023 16:09:58 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 39C06F805F5 for ; Wed, 15 Mar 2023 16:08:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 39C06F805F5 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjs-00007m-6A; Wed, 15 Mar 2023 16:08:28 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjo-004Kd4-CM; Wed, 15 Mar 2023 16:08:24 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjn-0057jg-PB; Wed, 15 Mar 2023 16:08:23 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Heiko Stuebner Subject: [PATCH 122/173] ASoC: rockchip: rockchip_rt5645: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:54 +0100 Message-Id: <20230315150745.67084-123-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1733; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=DYgV418G1HHJeUqCA1P1kSgz2wPVPuFAcd/9MCT5gwM=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd6f1wJzQoQD2KJzDYqef/HTE55r9Gi6cw/3Y j+egw14J2yJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHenwAKCRDB/BR4rcrs CStYB/wKLpGaEafdneDGlLIhen0gzV3CF324RUbG9aCV5HIu06+4ZtTa3ojtN2fdpsiyPnDSnQh RYSpAIJda34Z26emwUC1P7qwqjBqxDMT6K2gvK+8o99EdttfdR83juiiymJg/fAEX8U4OjtEWgC 9PT2Xtx6CoMIMkRkcbhDv2wOSchPsfLFxE+YkSWgQYrsBuAscZmMrkrfDY+0T1KRHgym7X1hTga UJAhaxFCxh5zhxy3OcmEuDhwCNvWcshLE62Hd9nvqr2z/b0aoetqFXh2aJw74WPWQKz6/mOaruf gQfin9fYn38PLvvIty1tW/im8tlNMtiOi743hv1yOZM9GQWc X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: LHW7NXTLJAFDQ5ERVXLTMTEWCDAAYUKV X-Message-ID-Hash: LHW7NXTLJAFDQ5ERVXLTMTEWCDAAYUKV X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/rockchip/rockchip_rt5645.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/rockchip/rockchip_rt5645.c b/sound/soc/rockchip/rockchip_rt5645.c index d07cc5c813f2..e73a342b7953 100644 --- a/sound/soc/rockchip/rockchip_rt5645.c +++ b/sound/soc/rockchip/rockchip_rt5645.c @@ -206,14 +206,12 @@ static int snd_rk_mc_probe(struct platform_device *pdev) return ret; } -static int snd_rk_mc_remove(struct platform_device *pdev) +static void snd_rk_mc_remove(struct platform_device *pdev) { of_node_put(rk_dailink.cpus->of_node); rk_dailink.cpus->of_node = NULL; of_node_put(rk_dailink.codecs->of_node); rk_dailink.codecs->of_node = NULL; - - return 0; } static const struct of_device_id rockchip_rt5645_of_match[] = { @@ -225,7 +223,7 @@ MODULE_DEVICE_TABLE(of, rockchip_rt5645_of_match); static struct platform_driver snd_rk_mc_driver = { .probe = snd_rk_mc_probe, - .remove = snd_rk_mc_remove, + .remove_new = snd_rk_mc_remove, .driver = { .name = DRV_NAME, .pm = &snd_soc_pm_ops, From patchwork Wed Mar 15 15:06:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176185 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9302EC7618B for ; Wed, 15 Mar 2023 15:35:35 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C12C3141B; Wed, 15 Mar 2023 16:34:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C12C3141B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894531; bh=rlWaemh5g1rU89YQHf9WoIxkHz6iNm5nKoRUg8ayQWU=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=IMXtdPaUOxqQq6oTGLoZlCeUhKdUSjPq29ca5glF/PaZPDdFY6GeL5Z4Z4Go6yuzN CA2Jsf70OeYRdx2QbhqibNBcGvRo7fEY2MQrnua2sYVGP5AhPgLHhDzM5Nq8EJsWPP mVgt9iIknGdgNQJUz10Ore6BtbWd7OMkNMEpxXzM= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 59A32F807B5; Wed, 15 Mar 2023 16:13:52 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1D477F805E2; Wed, 15 Mar 2023 16:09:57 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 59F5CF8051B for ; Wed, 15 Mar 2023 16:08:37 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 59F5CF8051B Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjs-00008j-Gl; Wed, 15 Mar 2023 16:08:28 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjo-004KdB-K2; Wed, 15 Mar 2023 16:08:24 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjo-0057jl-1Z; Wed, 15 Mar 2023 16:08:24 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Heiko Stuebner Subject: [PATCH 123/173] ASoC: rockchip: rockchip_spdif: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:55 +0100 Message-Id: <20230315150745.67084-124-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1707; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=rlWaemh5g1rU89YQHf9WoIxkHz6iNm5nKoRUg8ayQWU=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd6iN/f1A+POuc00eAzNx+MicdH5YwPwIHzDF fnYJxlQM+qJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeogAKCRDB/BR4rcrs CWCaB/9ZFn64nRSnQ7vzabp6712lwI3s6X0NLJKZD5OP+GPLprl/YMMK/KksxgLBIh9XzWdr/+2 7dlGddyyvmsTKFVBmc006vaXoj/An8bywG82MJyN4sQ+FsSofM2KhUXakOF0aJRrwobi6dxLK65 VUfLhskBlZye7NpnTDMD/AtwfFAVZeb1mXBujvPJxhvKIXd4lKZx1Gccfhv5e+u7unG78LYoJ64 v8MzPA+ViWbkzym9jVSjti1dENGjnXDueup7SnyDmGpet4tfoFhTtbw2/J3EuyWmplu0Coh2k6B ybes8lR+RJNg9cGZ54EolMScG65aMldYl2kEsYkzdbMhhLVx X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: OESJD5BLV2XPFH2P52K6FBWXOFN32PUZ X-Message-ID-Hash: OESJD5BLV2XPFH2P52K6FBWXOFN32PUZ X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/rockchip/rockchip_spdif.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/rockchip/rockchip_spdif.c b/sound/soc/rockchip/rockchip_spdif.c index 2d937fcf357d..0b73fe94e4bb 100644 --- a/sound/soc/rockchip/rockchip_spdif.c +++ b/sound/soc/rockchip/rockchip_spdif.c @@ -367,13 +367,11 @@ static int rk_spdif_probe(struct platform_device *pdev) return ret; } -static int rk_spdif_remove(struct platform_device *pdev) +static void rk_spdif_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) rk_spdif_runtime_suspend(&pdev->dev); - - return 0; } static const struct dev_pm_ops rk_spdif_pm_ops = { @@ -383,7 +381,7 @@ static const struct dev_pm_ops rk_spdif_pm_ops = { static struct platform_driver rk_spdif_driver = { .probe = rk_spdif_probe, - .remove = rk_spdif_remove, + .remove_new = rk_spdif_remove, .driver = { .name = "rockchip-spdif", .of_match_table = of_match_ptr(rk_spdif_match), From patchwork Wed Mar 15 15:06:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176212 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3A653C61DA4 for ; Wed, 15 Mar 2023 15:39:50 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 697C21452; Wed, 15 Mar 2023 16:38:58 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 697C21452 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894788; bh=3e3jjmCkktlumQTJA4uoT4cnPf2J77RMwyvmI+NSjLQ=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=JKFsPTe5MMjewUnxzGuESalla6AdQHh7Q+VmbPzeyMW7OR6jB7ObNSOXTmIa6draW a2jLO+i05p30q1t8Fd7SeJyuKKtgm0Yiljns3qXYZGXz+A6ByKXa8fmnd16du6MsUP EQ8kQqN9ISF772rHuRU17dMr01ECoW6TYRu039gA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id CBA39F808C3; Wed, 15 Mar 2023 16:14:43 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A0F8BF805F5; Wed, 15 Mar 2023 16:10:10 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 50D2EF80604 for ; Wed, 15 Mar 2023 16:08:40 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 50D2EF80604 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSju-0000Ax-1d; Wed, 15 Mar 2023 16:08:30 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjp-004KdI-8R; Wed, 15 Mar 2023 16:08:25 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjo-0057jp-8U; Wed, 15 Mar 2023 16:08:24 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Krzysztof Kozlowski , Sylwester Nawrocki , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 124/173] ASoC: samsung: arndale: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:56 +0100 Message-Id: <20230315150745.67084-125-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1631; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=3e3jjmCkktlumQTJA4uoT4cnPf2J77RMwyvmI+NSjLQ=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd6m8r7qzoTkoMgeF8KGKi25JvSyb5OuJHJ40 LfoXcp+wt+JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHepgAKCRDB/BR4rcrs CUYRCACKr5qOSA4rAZ1D7M8emRXhr6k57qjUjfb2N4EaDN6WJd37d+JQSCeW0z171XqUTrrYf7z 8LZwlKDuh2xmZc73XC5/IONqDwTulPz8Jb5rY0NzpdoMN5OlhzbRwJeoTCZksuUZUIlK7Z0VGrh p8/OgyFai2GOlbV+QuR1kVoQbn9AwdvcOdJ+zCmJux05DsLituSmGtkXmO88oJTktadBPHw4DRH q0AYlUW3ub60YK0SlkF4Qs8H64WR2DquYJJCPVkoqBAAdtLKyUP54TVhAtW+YaN7QKpkFuaHOAU 8ftPEouJslLlMbtDQP7AwXWKOjKR8MRrEcEcohk6Sv9Us2+7 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: WZ744ZYGDYVC4NKSSSML3UD7DHIYL2J4 X-Message-ID-Hash: WZ744ZYGDYVC4NKSSSML3UD7DHIYL2J4 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/samsung/arndale.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/samsung/arndale.c b/sound/soc/samsung/arndale.c index a5dc640d0d76..fdff83e72d29 100644 --- a/sound/soc/samsung/arndale.c +++ b/sound/soc/samsung/arndale.c @@ -185,12 +185,11 @@ static int arndale_audio_probe(struct platform_device *pdev) return ret; } -static int arndale_audio_remove(struct platform_device *pdev) +static void arndale_audio_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); arndale_put_of_nodes(card); - return 0; } static const struct of_device_id arndale_audio_of_match[] = { @@ -208,7 +207,7 @@ static struct platform_driver arndale_audio_driver = { .of_match_table = arndale_audio_of_match, }, .probe = arndale_audio_probe, - .remove = arndale_audio_remove, + .remove_new = arndale_audio_remove, }; module_platform_driver(arndale_audio_driver); From patchwork Wed Mar 15 15:06:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176194 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 70B90C61DA4 for ; Wed, 15 Mar 2023 15:37:59 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 546FA13AF; Wed, 15 Mar 2023 16:37:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 546FA13AF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894677; bh=JoZBkZsaiKa+CxmsPZr1F3gcsY0YIJeDYYrO6zREfOw=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=RtvCdE3GBVLyqmiP+WD0vbnDZ0tUJJfl29/MGHEu3F0inP4IREGA8aIMqrxFD2iVb dC4ODJl63Yky+ibQdHQ6VnMVKqC9yn6mDuVY3MjsTXG11LppWQoABb97WQVmyG1m9R uyzhBYampdhqB69ln5Xtnf+HlTBs9EYddoHQiN8o= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E1FF2F80855; Wed, 15 Mar 2023 16:14:21 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C64A5F805E2; Wed, 15 Mar 2023 16:10:03 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id AD6D4F805FC for ; Wed, 15 Mar 2023 16:08:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AD6D4F805FC Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSju-0000Bb-1i; Wed, 15 Mar 2023 16:08:30 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjp-004KdN-Gd; Wed, 15 Mar 2023 16:08:25 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjo-0057jt-ES; Wed, 15 Mar 2023 16:08:24 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Krzysztof Kozlowski , Sylwester Nawrocki , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 125/173] ASoC: samsung: i2s: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:57 +0100 Message-Id: <20230315150745.67084-126-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1950; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=JoZBkZsaiKa+CxmsPZr1F3gcsY0YIJeDYYrO6zREfOw=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd6p5vGhEZz9mIMtTPI6lh2Mf2w2Rg4uK2WAa 5H2GWQMoBeJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeqQAKCRDB/BR4rcrs CT9uB/4/jUBgAYEYbAzVnGSBbIlzTqehym2Kl0IBlCexreeriemel9przG8IwEO3DQUBGJbh9y2 SZOnNlxSp6uSyUlwy673QVwMJO4YI8j5PvAEGW4YzCe/urbU+ukoXmz4vK1LwnJXl9K5qt3/MMN LIsY5GN/xkE/IVV+8BUctLMokvgswKp0vBnmYoUozW+kM9LpwSJ2ddHKTg+D8S482QbcsgIVBZ2 DVKZRDEchlnis/sXm//NUtFZfEt+rYabXH3/OctR9xwnME+2298XW3S7s8sxsRqciZjP9JY4ACF TcldmceR9YwORckRZmf+aAaVGSmkjnKdzUABSk3vTs/KikGt X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: KPHEZILCKAAPVG6BZJNSBSIFGVPZQ3EO X-Message-ID-Hash: KPHEZILCKAAPVG6BZJNSBSIFGVPZQ3EO X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/samsung/i2s.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 6f96032090de..ca995db406b0 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1560,13 +1560,13 @@ static int samsung_i2s_probe(struct platform_device *pdev) return ret; } -static int samsung_i2s_remove(struct platform_device *pdev) +static void samsung_i2s_remove(struct platform_device *pdev) { struct samsung_i2s_priv *priv = dev_get_drvdata(&pdev->dev); /* The secondary device has no driver data assigned */ if (!priv) - return 0; + return; pm_runtime_get_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); @@ -1576,8 +1576,6 @@ static int samsung_i2s_remove(struct platform_device *pdev) clk_disable_unprepare(priv->clk); pm_runtime_put_noidle(&pdev->dev); - - return 0; } static void fsd_i2s_fixup_early(struct snd_pcm_substream *substream, @@ -1746,7 +1744,7 @@ static const struct dev_pm_ops samsung_i2s_pm = { static struct platform_driver samsung_i2s_driver = { .probe = samsung_i2s_probe, - .remove = samsung_i2s_remove, + .remove_new = samsung_i2s_remove, .id_table = samsung_i2s_driver_ids, .driver = { .name = "samsung-i2s", From patchwork Wed Mar 15 15:06:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176208 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 991C9C6FD1D for ; Wed, 15 Mar 2023 15:38:46 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id AA029132C; Wed, 15 Mar 2023 16:37:54 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AA029132C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894724; bh=3pXZEm4vbM3TzF+vbhXKPVBTOr6mlALGPy9M/ma52OE=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Q/z7piGQfcInWyRH9lAZZaJ1Ivt0zXb+yQYfazfppYxPB0PTTZyobuy6x4AoxnPIy xbhXDgx1e6dalLCxa40ygnWgR0pWN9JyepKQMHA67x6tLRvd00FH9LJmE0qKcbb63d CRaunNFpammBFpbHwWAm2yq8M0rmoo22auP/fOQo= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C9EC7F8086D; Wed, 15 Mar 2023 16:14:31 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9109EF805F1; Wed, 15 Mar 2023 16:10:06 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B6879F805FE for ; Wed, 15 Mar 2023 16:08:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B6879F805FE Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSju-0000BZ-1e; Wed, 15 Mar 2023 16:08:30 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjp-004KdM-G1; Wed, 15 Mar 2023 16:08:25 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjo-0057jx-LW; Wed, 15 Mar 2023 16:08:24 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Krzysztof Kozlowski , Sylwester Nawrocki , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 126/173] ASoC: samsung: odroid: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:58 +0100 Message-Id: <20230315150745.67084-127-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1690; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=3pXZEm4vbM3TzF+vbhXKPVBTOr6mlALGPy9M/ma52OE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd6somnnWVBDgMFbDL5P6Ynm+1rc8oaB7Qlip IcMXgEiJ7KJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHerAAKCRDB/BR4rcrs CYjyCACVTLtBf+CB2WZ4lq1yy0aSRg6YzzOqVFdiIbAKSkX5Bz5OBdZLrIkH3oaJxdNxfcct6kk JHMxxZnpJK+98fsZdODfy6amSiwviFq38wm+zRnxweq4KSoSO4Q30voBGXppkOJ5cRvID/ukDgD 2z77gtvLvxa6YTNzUBAfq/4nPtI87R3NGhTKvHCmYslldXyCM7L614IzmXQCUyM6IHzCy3qd46F lQZGwxlhLh1/rv1M0O1zwZs5q8yyZw8z1eUqcXHp55okCZPFx/31XJlXkZMGvSMY4KMTpkd2J5a CxJb0FR+wMObwTUuutbPVGnF/vanhwOo4gV3kFWGh1MVqj7P X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: SVMBIO4XV7QDAXDDFKASOGKMTZMH7TGM X-Message-ID-Hash: SVMBIO4XV7QDAXDDFKASOGKMTZMH7TGM X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/samsung/odroid.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/samsung/odroid.c b/sound/soc/samsung/odroid.c index 1e0fefa89ad5..fd95a79cc9fa 100644 --- a/sound/soc/samsung/odroid.c +++ b/sound/soc/samsung/odroid.c @@ -331,15 +331,13 @@ static int odroid_audio_probe(struct platform_device *pdev) return ret; } -static int odroid_audio_remove(struct platform_device *pdev) +static void odroid_audio_remove(struct platform_device *pdev) { struct odroid_priv *priv = platform_get_drvdata(pdev); snd_soc_of_put_dai_link_codecs(&priv->card.dai_link[1]); clk_put(priv->sclk_i2s); clk_put(priv->clk_i2s_bus); - - return 0; } static const struct of_device_id odroid_audio_of_match[] = { @@ -358,7 +356,7 @@ static struct platform_driver odroid_audio_driver = { .pm = &snd_soc_pm_ops, }, .probe = odroid_audio_probe, - .remove = odroid_audio_remove, + .remove_new = odroid_audio_remove, }; module_platform_driver(odroid_audio_driver); From patchwork Wed Mar 15 15:06:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176215 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9F95BC61DA4 for ; Wed, 15 Mar 2023 15:40:37 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id CCE68146E; Wed, 15 Mar 2023 16:39:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CCE68146E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894835; bh=e8NKkAkmXtqhoRNheSMdJEhJyByEz8N+Tj0JK7q0Q1k=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Lkv1o37eLhrewQSAmYSnw5TaBb7utMGVJBtXi6n6EInjm3ZxH54lSAXBkTExZ+mjf 2vR77/huN/y3lMxHiuPgCZxMXAI5r2CW0FziASIJzNkmt9mdTFNLqjnblsaGmQoKEh REf0FskORKtNIGU1OUs/fUoWOqZFD8QuQ1u4jzwU= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 567A5F808F5; Wed, 15 Mar 2023 16:14:50 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B557DF805F7; Wed, 15 Mar 2023 16:10:13 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 90648F80606 for ; Wed, 15 Mar 2023 16:08:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 90648F80606 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSju-0000Df-8N; Wed, 15 Mar 2023 16:08:30 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjq-004KdZ-9h; Wed, 15 Mar 2023 16:08:26 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjo-0057k1-Tp; Wed, 15 Mar 2023 16:08:24 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Krzysztof Kozlowski , Sylwester Nawrocki , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 127/173] ASoC: samsung: pcm: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:06:59 +0100 Message-Id: <20230315150745.67084-128-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1524; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=e8NKkAkmXtqhoRNheSMdJEhJyByEz8N+Tj0JK7q0Q1k=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd6vo/Ev1ZLBHFWx+nNIrrr+gCYZg3IEUD/kA aEQfo7o/nqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHerwAKCRDB/BR4rcrs CV3ZCACTaaC5xAoBXbBJgn83tK8IHcUuyQIGYZxRkRF+jgeM9t5uWKOEsM8SHYHVgwYb7yiSfTu jJtqOyHkyBnT8hmKT0btrvamRqNNV9GWhbV+hDjVbMlxbQtErv3tKKtEqFfnO5AYig/f2kNvxtn k4VKfQ6lmZ76sqf7cYmg0/eoZRgdWxiz95oF4/TqaIPLEXf1KPeJbybCErrfbQL15lzrt4ox1GG ZPX6wAz/dfTeDcUV714ZWfGb2BFnpV7HRvTm+5PbucDq3FGQyWOwLzV7v/8Muz5v+gOj8OT3JeE TphFYySHnXFH6UxHj34nHnerFynSVVM6vUXHW1KfpFThlBK3 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 2CNNROYT6OXFQXZOSEM4JTJPH4NIMMOU X-Message-ID-Hash: 2CNNROYT6OXFQXZOSEM4JTJPH4NIMMOU X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/samsung/pcm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c index e859252ae5e6..335fe5cb9cfc 100644 --- a/sound/soc/samsung/pcm.c +++ b/sound/soc/samsung/pcm.c @@ -579,20 +579,18 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev) return ret; } -static int s3c_pcm_dev_remove(struct platform_device *pdev) +static void s3c_pcm_dev_remove(struct platform_device *pdev) { struct s3c_pcm_info *pcm = &s3c_pcm[pdev->id]; pm_runtime_disable(&pdev->dev); clk_disable_unprepare(pcm->cclk); clk_disable_unprepare(pcm->pclk); - - return 0; } static struct platform_driver s3c_pcm_driver = { .probe = s3c_pcm_dev_probe, - .remove = s3c_pcm_dev_remove, + .remove_new = s3c_pcm_dev_remove, .driver = { .name = "samsung-pcm", }, From patchwork Wed Mar 15 15:07:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176216 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A5D8CC6FD1D for ; Wed, 15 Mar 2023 15:40:50 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id CD3021484; Wed, 15 Mar 2023 16:39:58 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CD3021484 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894848; bh=0vDgBEnl/fL1JI9E+OZXFid/nh+gpJ39ysHsOc7Kqqo=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=JA0K52Ogv9SrpCCHBitPqP8yczWpR0dowXqC4/ooCOMvBOusw+8SYuUZaSKnCEl97 H3xlAjpIdoripDo5pqcLG/cyDU6HXJck4hbtcd/wDAj7/Ib4FC9o0bdGmV/dAcUf18 uViisSpy9OJ5sYmvoandgqqVndAX6z6biYPUM0xc= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 0CC36F80C07; Wed, 15 Mar 2023 16:14:52 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 113BCF805F7; Wed, 15 Mar 2023 16:10:14 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2E0F3F80607 for ; Wed, 15 Mar 2023 16:08:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2E0F3F80607 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjw-0000J6-2q; Wed, 15 Mar 2023 16:08:32 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjr-004KeA-U7; Wed, 15 Mar 2023 16:08:27 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjp-0057k4-3l; Wed, 15 Mar 2023 16:08:25 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Krzysztof Kozlowski , Sylwester Nawrocki , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 128/173] ASoC: samsung: snow: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:00 +0100 Message-Id: <20230315150745.67084-129-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1690; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=0vDgBEnl/fL1JI9E+OZXFid/nh+gpJ39ysHsOc7Kqqo=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd6zVtSBj7d9Bs+6goXKAitwe5fWAH/n0In8Z 6Clfh8r8AGJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeswAKCRDB/BR4rcrs CYcbB/45oBd1uuwspQHRGEONOhL38G4Xo0n8gLLNPMyYR7xIkp1zeb18+Lm8fzFXFfaZ4Mqic1o hwfu4wCL/wdguNtYJK+OTfoVFkyj8hNo4UjOzY1SENedtzl8XF77RXEfKjkYuavrYKkOZJvb7Qa OdyRi1/xBGNRfg21yr88BeBHhSDrc24FueQIRCywArwjG+2i5cI97e0XhSW3czePSk8iQQ64x4c 805Aku0iS2ebIk++siujwoioHF12rGn1lQoPgBzsMradnh/13vG/RSL0JZ4uRPaL6neQPUKAsnh GwhoNp2BFDjI/ABAnlNLv6jDnReTsK77Gsmcs/lZ7YJ/X1iH X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: K77RTWZL44QBEUVI4AQU2MR2OYS4AYVO X-Message-ID-Hash: K77RTWZL44QBEUVI4AQU2MR2OYS4AYVO X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/samsung/snow.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/samsung/snow.c b/sound/soc/samsung/snow.c index da342da03880..334080e631af 100644 --- a/sound/soc/samsung/snow.c +++ b/sound/soc/samsung/snow.c @@ -219,7 +219,7 @@ static int snow_probe(struct platform_device *pdev) return 0; } -static int snow_remove(struct platform_device *pdev) +static void snow_remove(struct platform_device *pdev) { struct snow_priv *priv = platform_get_drvdata(pdev); struct snd_soc_dai_link *link = &priv->dai_link; @@ -229,8 +229,6 @@ static int snow_remove(struct platform_device *pdev) snd_soc_of_put_dai_link_codecs(link); clk_put(priv->clk_i2s_bus); - - return 0; } static const struct of_device_id snow_of_match[] = { @@ -248,7 +246,7 @@ static struct platform_driver snow_driver = { .of_match_table = snow_of_match, }, .probe = snow_probe, - .remove = snow_remove, + .remove_new = snow_remove, }; module_platform_driver(snow_driver); From patchwork Wed Mar 15 15:07:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176193 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C91EFC6FD1D for ; Wed, 15 Mar 2023 15:37:42 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9C7591357; Wed, 15 Mar 2023 16:36:50 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9C7591357 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894660; bh=02Spe7v3Q++XZMTKA/zSVg21fPmG0uj1J9dMaRUCQkQ=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=gDYTat/+UL+JOzI+LP/jk0xJkxV3Qf2bJIa46XJyhJrFqrXLZy0h1+0/ddohudv+5 j34kayLCWADPzYb0T6UvjOE96GxFsypJx59m2HQLi+IXU15GCwvWh4EKU0tTrBuJcH snzNf4tiimIY9xG/5weD/Ime5CA8g5GGQmfVnv/U= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A3B13F80852; Wed, 15 Mar 2023 16:14:18 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7D2CEF805E3; Wed, 15 Mar 2023 16:10:03 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8D2F3F80557 for ; Wed, 15 Mar 2023 16:08:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8D2F3F80557 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSju-0000Dq-5d; Wed, 15 Mar 2023 16:08:30 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjq-004Kda-B2; Wed, 15 Mar 2023 16:08:26 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjp-0057k7-BG; Wed, 15 Mar 2023 16:08:25 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Krzysztof Kozlowski , Sylwester Nawrocki , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 129/173] ASoC: samsung: spdif: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:01 +0100 Message-Id: <20230315150745.67084-130-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1579; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=02Spe7v3Q++XZMTKA/zSVg21fPmG0uj1J9dMaRUCQkQ=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd62p+AZdtGVRLTvvgTmra1w2nwEIc68FW7zI +ttyaEk3peJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHetgAKCRDB/BR4rcrs CZd1CACMoIRL3Us48aosK5sCM7AJ+hrZr1LslymEXMmS46m2689kEXfrSw/61sA+85TAunS+r60 MyP0meSe9B+TcGCDbcIRW4lA/lDRWI3RfIxB5fMTT9jGZOa8o3EuzpEjWFkWGDJliwXISuN1SqD O/NObxVePB4B3IG1mmKjaznU88OsW9hwaVfODOhNvctK44dRk8JgiSK0VBvNGuXGATGJfzAK/Pn AbZ3jQouXHIKG632wK3+tWAS7kkpM/HP2Vfq+j9hsyVyDJJc6XGjw11+11UMzd3SvSPS6XgBKZZ QjqE7mYGp9Kkqo1PtP72oZMgANCE+zOcICgvEFDY1UuIGn3V X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: UNVKSZIX7NGFTVBK7A4XJGUO2QR62V7A X-Message-ID-Hash: UNVKSZIX7NGFTVBK7A4XJGUO2QR62V7A X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/samsung/spdif.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c index 7d815e237e5c..28dc1bbfc8e7 100644 --- a/sound/soc/samsung/spdif.c +++ b/sound/soc/samsung/spdif.c @@ -460,7 +460,7 @@ static int spdif_probe(struct platform_device *pdev) return ret; } -static int spdif_remove(struct platform_device *pdev) +static void spdif_remove(struct platform_device *pdev) { struct samsung_spdif_info *spdif = &spdif_info; struct resource *mem_res; @@ -472,13 +472,11 @@ static int spdif_remove(struct platform_device *pdev) clk_disable_unprepare(spdif->sclk); clk_disable_unprepare(spdif->pclk); - - return 0; } static struct platform_driver samsung_spdif_driver = { .probe = spdif_probe, - .remove = spdif_remove, + .remove_new = spdif_remove, .driver = { .name = "samsung-spdif", }, From patchwork Wed Mar 15 15:07:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176213 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 31AA2C6FD1D for ; Wed, 15 Mar 2023 15:40:02 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E6D6212FA; Wed, 15 Mar 2023 16:39:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E6D6212FA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894800; bh=Au3//x6OBt/VH8WsuRCI66F0mKUyFRGgvmb7fHf0zhA=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=DVE7wZ05BeAQxjiShAlO4wJs+7gMExxgD4le6t1W5Pu29FqOZhJZ6pJ3mO9Up2TYv mpEdfg5xVWhBvDGyxkP8Dg69nr7nYmD9pH6mPqJ5UY6uoD7hGUVAIDy+JoR5yhgqDC rTVByPYK09OITM4itdo6tJgYqV5RRtkUPzoCN8NQ= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C7F97F808CA; Wed, 15 Mar 2023 16:14:45 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7AC0CF805F5; Wed, 15 Mar 2023 16:10:11 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B17A1F80605 for ; Wed, 15 Mar 2023 16:08:40 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B17A1F80605 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjv-0000GJ-8J; Wed, 15 Mar 2023 16:08:31 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjr-004Kdq-3Q; Wed, 15 Mar 2023 16:08:27 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjp-0057kB-I0; Wed, 15 Mar 2023 16:08:25 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Kuninori Morimoto Subject: [PATCH 130/173] ASoC: sh: fsi: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:02 +0100 Message-Id: <20230315150745.67084-131-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1573; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Au3//x6OBt/VH8WsuRCI66F0mKUyFRGgvmb7fHf0zhA=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd658CIvuWY5xjRu3LWLWE60iXKh/V/OPGfVe b9an3rGPUGJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeuQAKCRDB/BR4rcrs CcUOCACChZbN3/GiZ3i+bh0LOoVF0A8mm2AnprcptgN+InIs0wU8++lj02Ezhvz/c2S6+s07BN6 UXfNGJIlblxr+JMq3mw2nbaDsF9uTpOyTGIsDuKQy/siQ02qf7+gGDDx1fEFZt7p/pwizdff1JD u1TgTTLP9Fe0Y/eK+4fkwho0TNEu76M1y20OATElJ4HL0eUBtg1rWb2rNQY+6w/Owh8JjQWRSdO DGZHXzwtkmMbZFRnQaSDpcrvl1SQxRbCYLgqIUDUHnsiPO2MCIWVd2xxV2w6DbxuaLF2AWdexpS 8oySojrQtg5M1uNNAIXsjd7o0Rv7lHtgZwlgockkommvVG3g X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 2YQ5P6M4XTP5IRZP3TYIFU4ETLE2JSQT X-Message-ID-Hash: 2YQ5P6M4XTP5IRZP3TYIFU4ETLE2JSQT X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Kuninori Morimoto --- sound/soc/sh/fsi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index f3edc2e3d9d7..47f051667050 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -2030,7 +2030,7 @@ static int fsi_probe(struct platform_device *pdev) return ret; } -static int fsi_remove(struct platform_device *pdev) +static void fsi_remove(struct platform_device *pdev) { struct fsi_master *master; @@ -2040,8 +2040,6 @@ static int fsi_remove(struct platform_device *pdev) fsi_stream_remove(&master->fsia); fsi_stream_remove(&master->fsib); - - return 0; } static void __fsi_suspend(struct fsi_priv *fsi, @@ -2108,7 +2106,7 @@ static struct platform_driver fsi_driver = { .of_match_table = fsi_of_match, }, .probe = fsi_probe, - .remove = fsi_remove, + .remove_new = fsi_remove, .id_table = fsi_id_table, }; From patchwork Wed Mar 15 15:07:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176189 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4CAECC61DA4 for ; Wed, 15 Mar 2023 15:36:43 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2E8A51407; Wed, 15 Mar 2023 16:35:51 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2E8A51407 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894601; bh=WF9zVoigCyuAiunLqFxyZmYGHeiSaJjQwVrvrpsTdio=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=iy6JhuTuLfJGfXR3uCzRZSY+A6hmyofmjgpE6eYKIT2r3E4P788SPCn65CQyMrM5z wpE+AwTGYUXMa0uLgL7OoGpH7uDmgI/DtrtdtuDZnNlryvPiebu1GnmEdHjCGSI2L6 RocYXLoTpKS8Txn31v5RXmWzPTdQXoL7Kh3Di2Ps= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 10E52F8080B; Wed, 15 Mar 2023 16:14:05 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2EB68F805E3; Wed, 15 Mar 2023 16:10:00 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5AEACF805F7 for ; Wed, 15 Mar 2023 16:08:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5AEACF805F7 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSju-0000EH-5i; Wed, 15 Mar 2023 16:08:30 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjq-004Kdh-GF; Wed, 15 Mar 2023 16:08:26 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjp-0057kG-OW; Wed, 15 Mar 2023 16:08:25 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax Subject: [PATCH 131/173] ASoC: sh: hac: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:03 +0100 Message-Id: <20230315150745.67084-132-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1506; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=WF9zVoigCyuAiunLqFxyZmYGHeiSaJjQwVrvrpsTdio=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd68zc+zI7fuJ6ZVnFg53FjvLzi3tBN40VSVe V8zp1wr4RaJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHevAAKCRDB/BR4rcrs CXk6B/0fCJdo/tsDY6dT4ijTxVCLEO636KNRXW3VF66HuBSnc/jyP89X813lvVS0jcGdPmgL4Ps oBxzDGUefM3R/vShCnxAJrpGse5AEWBXraqbP8gKsEPm+4nDYoZdg6+mr77Rt3yDGCr4W48+FaQ eJYNoVgg5MJYZ08C0nIR+O+zzcAJUNkbMA/HyH0BPtaUpfU/PlEJlRVdoMZ2CCrdZ0Pf6ojvSzc CqHZTpmd4zssrACNsFg0EU1HAdQJD1Dom8KMlk11x5vjA8qW/lLELaP5v9syjR2d2SZw9+Bno3U bNXhyEPhfon6d2lKUsShXineAIn5fp+m2jVAqZpse0uMaTOX X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: WEZXPNTIJKVU6OFND3RGE2I4LYIYNXV5 X-Message-ID-Hash: WEZXPNTIJKVU6OFND3RGE2I4LYIYNXV5 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/sh/hac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/sh/hac.c b/sound/soc/sh/hac.c index 46d145cbaf29..cc200f45826c 100644 --- a/sound/soc/sh/hac.c +++ b/sound/soc/sh/hac.c @@ -323,10 +323,9 @@ static int hac_soc_platform_probe(struct platform_device *pdev) sh4_hac_dai, ARRAY_SIZE(sh4_hac_dai)); } -static int hac_soc_platform_remove(struct platform_device *pdev) +static void hac_soc_platform_remove(struct platform_device *pdev) { snd_soc_set_ac97_ops(NULL); - return 0; } static struct platform_driver hac_pcm_driver = { @@ -335,7 +334,7 @@ static struct platform_driver hac_pcm_driver = { }, .probe = hac_soc_platform_probe, - .remove = hac_soc_platform_remove, + .remove_new = hac_soc_platform_remove, }; module_platform_driver(hac_pcm_driver); From patchwork Wed Mar 15 15:07:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176240 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 364B2C61DA4 for ; Wed, 15 Mar 2023 15:45:55 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 62BD914B1; Wed, 15 Mar 2023 16:45:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 62BD914B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895153; bh=Yk/xa9Gr7/kpCtKBTzVC2b340W2BgIxvfRppl4LhIOs=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=mSrUoBOLozpjoSPx/FAHtuqEtti9dG+m0yB1YpchvAolapmJWWCA1MOrIZeEGpTwc SJYpJe1oieO97zy6Fbef43HlYv2bNFiAoCfkVTd7DPUhyFjevvToBeXCb6CF4B+L5k wfdSL1cjMA84phoY2ahbml6q4bBlxoGcdeuASeVw= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id EF010F80CC2; Wed, 15 Mar 2023 16:15:53 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C2302F80609; Wed, 15 Mar 2023 16:10:30 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 60E94F8061E for ; Wed, 15 Mar 2023 16:08:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 60E94F8061E Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjw-0000Ji-7Q; Wed, 15 Mar 2023 16:08:32 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjs-004KeE-1n; Wed, 15 Mar 2023 16:08:28 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjp-0057kJ-W7; Wed, 15 Mar 2023 16:08:26 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Kuninori Morimoto , Charles Keepax , Linh Phung , Shang XiaoJing Subject: [PATCH 132/173] ASoC: sh: rcar: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:04 +0100 Message-Id: <20230315150745.67084-133-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1684; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Yk/xa9Gr7/kpCtKBTzVC2b340W2BgIxvfRppl4LhIOs=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd6+wD09m+gJ6EHIFMe/Hh6t845X6LxBWKRCx bsFn43z4WiJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHevgAKCRDB/BR4rcrs CcLQB/oDblXhbI1BwMlgDNs8D2vud9kpJ0w3DoYymBF3/Cnta1jmqYRBwOhmN4RiQdnJPouiTFI 8akO+IACCAnr332817qOf9hXtrBkKlbfqqjHZbhitCbQhyd9PqWMPYUz6D+tKivE9ErLGAClXZC yihp00M+O6/epmAGZKASTu/gFK+ybyAc7nwt0t30A5GmITVhfCtocNUf4msX8G3THxHvdXwqAFa NdJOCFplxgapC5Y1TsEKn1gWHZfo8BIcMT+wSHJ9Ao4ayqrT1KkfAbuzfhFMw6x6h19wknMvtPh zhJ3yGp1XxzIGxt2dfYE5qMLiZmFnFk1Xn1csc3r8D+q80A5 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: LNPIBKBDFBM623JR7DWCVYBW657RCBAM X-Message-ID-Hash: LNPIBKBDFBM623JR7DWCVYBW657RCBAM X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Kuninori Morimoto --- sound/soc/sh/rcar/core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index cb17f7d0cf0c..6a522e6dd85a 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -1987,7 +1987,7 @@ static int rsnd_probe(struct platform_device *pdev) return ret; } -static int rsnd_remove(struct platform_device *pdev) +static void rsnd_remove(struct platform_device *pdev) { struct rsnd_priv *priv = dev_get_drvdata(&pdev->dev); struct rsnd_dai *rdai; @@ -2019,8 +2019,6 @@ static int rsnd_remove(struct platform_device *pdev) for (i = 0; i < ARRAY_SIZE(remove_func); i++) remove_func[i](priv); - - return 0; } static int __maybe_unused rsnd_suspend(struct device *dev) @@ -2052,7 +2050,7 @@ static struct platform_driver rsnd_driver = { .of_match_table = rsnd_of_match, }, .probe = rsnd_probe, - .remove = rsnd_remove, + .remove_new = rsnd_remove, }; module_platform_driver(rsnd_driver); From patchwork Wed Mar 15 15:07:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176220 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A6CBBC6FD1D for ; Wed, 15 Mar 2023 15:41:55 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B5A971492; Wed, 15 Mar 2023 16:41:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B5A971492 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894913; bh=LaYuducFRK2PP/9D2yS5gTCCrN1sjrJHdhHs+FEPv7c=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=uv5MphVH+KYOoj4MpyhW86IPtSLllDcbrUN7Pa6J0fChyDVmk1FqL/PP96EJAvkWR +6DlJ8kiyU9uD9TV/axVspduI/Nl3ps5max5DNPi40wPt6SKdstsvkJOsFDx2sLxfN E0cibLYM4VVb9kfeVC4wgIx5ufuoZjbfLHwqXT3Y= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D58B9F80C32; Wed, 15 Mar 2023 16:15:02 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DD36CF805F8; Wed, 15 Mar 2023 16:10:17 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 533ABF8060C for ; Wed, 15 Mar 2023 16:08:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 533ABF8060C Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjv-0000GM-BN; Wed, 15 Mar 2023 16:08:31 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjr-004Kdu-6j; Wed, 15 Mar 2023 16:08:27 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjq-0057kM-6k; Wed, 15 Mar 2023 16:08:26 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lad Prabhakar , Charles Keepax , Biju Das Subject: [PATCH 133/173] ASoC: sh: rz-ssi: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:05 +0100 Message-Id: <20230315150745.67084-134-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1683; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=LaYuducFRK2PP/9D2yS5gTCCrN1sjrJHdhHs+FEPv7c=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd7BymI0nnGN/rE2TtFSPZ9Ym5VNksweMJj+0 ZuOxTC3xDmJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHewQAKCRDB/BR4rcrs CcL8B/4o9IYeDfdc0+uJCNMd0NKMGXqNRc4hQvr7qurETfb7aLd6emS7YCtb86s1TLapXzSajSf U1bp2Io68kiKu2LvYUtPTpB8ZyA5PmF4TDZ1IMkcgfmqIleTlVTRMfXuEsQO7yJF6LeJ17qoWls NP30+dF0UeCxleXW47TEeLcuLjEktZZDsAWVhNcIZ6baEfg+w9K0sqF4O9cuDe3iSM/GbNsVz7x raAMbUE2Huy/KDo302ZOvpgIlQKlUxWolQZS666v7oyu0vmNSR2rQMw5BBzIVjSOZcvbtJqNcDN 8o5BvCPe72+3jNeKmEeZY2PCKYHMqZ3tkEzCZk1O7BhZlq2r X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: S22XZ5TXCYMOXWEDTRGJV3HJ7M5OYSQX X-Message-ID-Hash: S22XZ5TXCYMOXWEDTRGJV3HJ7M5OYSQX X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/sh/rz-ssi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/sh/rz-ssi.c b/sound/soc/sh/rz-ssi.c index 5d6bae33ae34..5b598843800e 100644 --- a/sound/soc/sh/rz-ssi.c +++ b/sound/soc/sh/rz-ssi.c @@ -1050,7 +1050,7 @@ static int rz_ssi_probe(struct platform_device *pdev) return ret; } -static int rz_ssi_remove(struct platform_device *pdev) +static void rz_ssi_remove(struct platform_device *pdev) { struct rz_ssi_priv *ssi = dev_get_drvdata(&pdev->dev); @@ -1059,8 +1059,6 @@ static int rz_ssi_remove(struct platform_device *pdev) pm_runtime_put(ssi->dev); pm_runtime_disable(ssi->dev); reset_control_assert(ssi->rstc); - - return 0; } static const struct of_device_id rz_ssi_of_match[] = { @@ -1075,7 +1073,7 @@ static struct platform_driver rz_ssi_driver = { .of_match_table = rz_ssi_of_match, }, .probe = rz_ssi_probe, - .remove = rz_ssi_remove, + .remove_new = rz_ssi_remove, }; module_platform_driver(rz_ssi_driver); From patchwork Wed Mar 15 15:07:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176207 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CF534C61DA4 for ; Wed, 15 Mar 2023 15:38:30 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7FD4B1439; Wed, 15 Mar 2023 16:37:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7FD4B1439 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894708; bh=ApGEaxqryUQwbJHtP3jabys4BCWA6GIkS9uVdMXPpcY=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=IslvIIOcXMZjXAeg6tMuXuCYeiMoAD0j/ubJK/fNhh5HszDXDxTz9E2cM37gZKRla TYgHwomQqlyKhXrEc5QJsQyn7woXibJJC8aa/MOJ/lMd6p63IW/ZNwMHqhShVEs5co f3iPx7hFxBNbsp1606cY5ru89RHGUeH53sJgk5jI= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 59D8AF80854; Wed, 15 Mar 2023 16:14:29 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7608CF805ED; Wed, 15 Mar 2023 16:10:05 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id ADAC1F805FD for ; Wed, 15 Mar 2023 16:08:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ADAC1F805FD Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjv-0000HC-BQ; Wed, 15 Mar 2023 16:08:31 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjr-004Kdz-D8; Wed, 15 Mar 2023 16:08:27 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjq-0057kR-Ej; Wed, 15 Mar 2023 16:08:26 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 134/173] ASoC: sh: siu_dai: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:06 +0100 Message-Id: <20230315150745.67084-135-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1433; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=ApGEaxqryUQwbJHtP3jabys4BCWA6GIkS9uVdMXPpcY=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd7Eb9Jo/ukSw3yLmovB6IrpHM1g3gk3Z/Kcs 9oxe/K27iCJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHexAAKCRDB/BR4rcrs CUjHB/0ajUU/JrwgvxGqBtRK95o8YQMUfqAzW5FpZ41pMnoP+Ls1N4r9PV75YtqlA9Gy9avJELU IE4fDGM7+jGd+EjufRyZ7HncFsH2guB75dsNwl1QiHis56ncxOyYpC77oqQeCnElL9fejilauui zrmUeg7mRJ4l0qWmjVIH5r61wVm8T1djmQG6nPp247u6XWIFiahXVZi3omFDH7Lg9uxJRKD8of2 R2ZJAHiznLbyi+U4yyBSEP5r5Teql95WLY0Na1eI0M0vBtm5CQMzgCghcNdHmRIsN98LqfNPLAe 6ZpihHTd14G3f2gzbZP81eI2ZrA1Su26LrIGNgVEusGAb0j2 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: ZZE5TZDKL25BA3NL6E4HKA5EIJOHYU2G X-Message-ID-Hash: ZZE5TZDKL25BA3NL6E4HKA5EIJOHYU2G X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: <> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/sh/siu_dai.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/sh/siu_dai.c b/sound/soc/sh/siu_dai.c index f2a386fcd92e..84e1b14e68e4 100644 --- a/sound/soc/sh/siu_dai.c +++ b/sound/soc/sh/siu_dai.c @@ -778,10 +778,9 @@ static int siu_probe(struct platform_device *pdev) return 0; } -static int siu_remove(struct platform_device *pdev) +static void siu_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - return 0; } static struct platform_driver siu_driver = { @@ -789,7 +788,7 @@ static struct platform_driver siu_driver = { .name = "siu-pcm-audio", }, .probe = siu_probe, - .remove = siu_remove, + .remove_new = siu_remove, }; module_platform_driver(siu_driver); From patchwork Wed Mar 15 15:07:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176219 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 10886C6FD1D for ; Wed, 15 Mar 2023 15:41:40 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1122F1481; Wed, 15 Mar 2023 16:40:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1122F1481 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894898; bh=UBagYGohs4sJgsIAK9eomN0OPRyg45i2tVQt7AL5Ma4=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=HZwwNw7P2wLLf/GPv4sXcwRq+4zeEyjqS/XFgQFlMATLHZny95X1OYiZy+5G7u/Np czo2cY+MBik9z5TRwrEBcIVlElDy9AguYe/zBJTroKjLCjZgEMe1HhtlzGY/vvAdYT oeYnGAeOThS3QC4k0YvXtclnOKVgleYm1A1VA0SE= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id B3EDFF80C41; Wed, 15 Mar 2023 16:14:59 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4C6F3F805F7; Wed, 15 Mar 2023 16:10:16 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 523DCF8055C for ; Wed, 15 Mar 2023 16:08:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 523DCF8055C Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjv-0000Hr-LH; Wed, 15 Mar 2023 16:08:31 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjr-004Ke3-Iw; Wed, 15 Mar 2023 16:08:27 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjq-0057kV-LD; Wed, 15 Mar 2023 16:08:26 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Orson Zhai , Baolin Wang , Chunyan Zhang Subject: [PATCH 135/173] ASoC: sprd: sprd-mcdt: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:07 +0100 Message-Id: <20230315150745.67084-136-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1716; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=UBagYGohs4sJgsIAK9eomN0OPRyg45i2tVQt7AL5Ma4=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd7H4D1VS4nSSSBmnkJLwAuO2eQ+amxU1Dbz7 okQjHqfOVKJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHexwAKCRDB/BR4rcrs CdZ7B/4nIR+vvl5CNlMpecsfQAq4YGPzWk3vujlQLe5WcoyEIv0M4vgd4Pe3xfEAVRWIgW1m3GT /pxXVpuAHXZEOQO839CPgzozFn9JImB0jSopkTUTJEOLkxx7bsqTRhMOvb1+6DkEMeP0G0z0xWb Ckq7pUbnFuO3AUw3uTKtr2nVBOlxqxTBbovVN1SH3bjsc1tP8pq6sUD3oFBckP1bp4h2tSuC77A +lNwGaSskVhCw1anKIQIlyffaB0yJBv/pL7fNa8nbb8p1UftMgfAGeZy4Sb6sNJNeonYLRB14kT pA1SPlCxOnlPlhBaRByCYbzB2nqZR+bmZ6ZxuhQaUqGx7DwZ X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 6K7EOZR3LI2YUEPNRZMOAMJNMTAOQCTM X-Message-ID-Hash: 6K7EOZR3LI2YUEPNRZMOAMJNMTAOQCTM X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/sprd/sprd-mcdt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/sprd/sprd-mcdt.c b/sound/soc/sprd/sprd-mcdt.c index f6a55fa60c1b..688419c6b092 100644 --- a/sound/soc/sprd/sprd-mcdt.c +++ b/sound/soc/sprd/sprd-mcdt.c @@ -973,7 +973,7 @@ static int sprd_mcdt_probe(struct platform_device *pdev) return 0; } -static int sprd_mcdt_remove(struct platform_device *pdev) +static void sprd_mcdt_remove(struct platform_device *pdev) { struct sprd_mcdt_chan *chan, *temp; @@ -983,8 +983,6 @@ static int sprd_mcdt_remove(struct platform_device *pdev) list_del(&chan->list); mutex_unlock(&sprd_mcdt_list_mutex); - - return 0; } static const struct of_device_id sprd_mcdt_of_match[] = { @@ -995,7 +993,7 @@ MODULE_DEVICE_TABLE(of, sprd_mcdt_of_match); static struct platform_driver sprd_mcdt_driver = { .probe = sprd_mcdt_probe, - .remove = sprd_mcdt_remove, + .remove_new = sprd_mcdt_remove, .driver = { .name = "sprd-mcdt", .of_match_table = sprd_mcdt_of_match, From patchwork Wed Mar 15 15:07:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176217 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 78091C61DA4 for ; Wed, 15 Mar 2023 15:41:08 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 35BCA145C; Wed, 15 Mar 2023 16:40:16 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 35BCA145C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894866; bh=mkEA2aglVrZicYe+eAFWE7drEQFhyfBxx2S9b8QGsDI=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=MfkWGUjLfM/PJcuJqjqidmvhWNESGhxuRJll2lRpEJcVRKZDZTnhqtnvZ1PQMS9jX LH2Ut+FQtH+kcZXRRxPdwgNcnZnSxNW4PJkx7diIHB0684N3g+z4FfNJfvhyV/kvQ0 xuJzUQ943YD2gik7RMieF6w17dKUze6fQeda0PGU= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 596D9F805BD; Wed, 15 Mar 2023 16:14:55 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C5B6AF805AF; Wed, 15 Mar 2023 16:10:14 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9BE8AF8060A for ; Wed, 15 Mar 2023 16:08:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9BE8AF8060A Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjw-0000Jh-Fi; Wed, 15 Mar 2023 16:08:32 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjs-004KeD-1G; Wed, 15 Mar 2023 16:08:28 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjq-0057kY-Sm; Wed, 15 Mar 2023 16:08:26 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Olivier Moysan , Arnaud Pouliquen , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Maxime Coquelin , Alexandre Torgue Subject: [PATCH 136/173] ASoC: stm: stm32_adfsdm: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:08 +0100 Message-Id: <20230315150745.67084-137-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1617; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=mkEA2aglVrZicYe+eAFWE7drEQFhyfBxx2S9b8QGsDI=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd7KrH18BKn6U5TdR0h99SdCYDXnSsCGZlZWO lXdTzExb5+JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHeygAKCRDB/BR4rcrs CeFlB/9b4zj1DMI0KekPjwfjO/6X4fGR4QmZVhy3RG441iQZTYXUUpIi56sqakT4hWfixMulfCZ jalr6IzIuLtLiNmrhi8ggcllJIbzLCK+PcacY5nAtScVQ062PbynwU5XuSE1ik1HXojBp5HctL/ 3jxkC2Zdm/z+4MDkd7dVimP18I6t/aFhTyRpNiBmVnKYLsiar4glu1Kw7DWt01Zin62trRg2O36 EVI4aq1rx4wegyCh414DlUkHEG0VFrZZ0L9Lqi8F0ZNEsOQVQ2BnKn4mRGbY/8RCAXUg8g644BV uVA/weNz9A4wkcyKddy7+FamBZTsghFM8iSAXynFlZpiYDlD X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: FMYXSG5BYRW76DIU7I72A6CFGZJWDD5G X-Message-ID-Hash: FMYXSG5BYRW76DIU7I72A6CFGZJWDD5G X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/stm/stm32_adfsdm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/stm/stm32_adfsdm.c b/sound/soc/stm/stm32_adfsdm.c index 837c1848d9bf..a8fff7378641 100644 --- a/sound/soc/stm/stm32_adfsdm.c +++ b/sound/soc/stm/stm32_adfsdm.c @@ -386,12 +386,10 @@ static int stm32_adfsdm_probe(struct platform_device *pdev) return ret; } -static int stm32_adfsdm_remove(struct platform_device *pdev) +static void stm32_adfsdm_remove(struct platform_device *pdev) { snd_soc_unregister_component(&pdev->dev); pm_runtime_disable(&pdev->dev); - - return 0; } static struct platform_driver stm32_adfsdm_driver = { @@ -400,7 +398,7 @@ static struct platform_driver stm32_adfsdm_driver = { .of_match_table = stm32_adfsdm_of_match, }, .probe = stm32_adfsdm_probe, - .remove = stm32_adfsdm_remove, + .remove_new = stm32_adfsdm_remove, }; module_platform_driver(stm32_adfsdm_driver); From patchwork Wed Mar 15 15:07:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176246 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2EF0AC61DA4 for ; Wed, 15 Mar 2023 15:47:26 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BA4D41495; Wed, 15 Mar 2023 16:46:33 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BA4D41495 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895243; bh=G3+Zub3on/oNv5MlUhL//kM8stML3hIwmYkNv5rWxLo=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=NEse3ooBeDjtOQ+PoilacK7mUEKNXXppv3jpFumnF+8ciH6BgCzsrPqco4TXRIbiM 3Es5GAuuFlEQOyA06HVDP+KUfF6VMJPB9zz5l+dY+ILq3mnRB5hqN41lAX1pg95WDO 8qc9flaF9NArkf1Wb2XkBTY/+DEGAAMYNmbn+dTg= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 5167FF89631; Wed, 15 Mar 2023 16:16:17 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8393EF8060E; Wed, 15 Mar 2023 16:10:37 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 26DACF8061F for ; Wed, 15 Mar 2023 16:08:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 26DACF8061F Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjw-0000KT-KM; Wed, 15 Mar 2023 16:08:32 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjs-004KeO-Cy; Wed, 15 Mar 2023 16:08:28 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjr-0057kb-4B; Wed, 15 Mar 2023 16:08:27 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Olivier Moysan , Arnaud Pouliquen , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Maxime Coquelin , Alexandre Torgue Subject: [PATCH 137/173] ASoC: stm: stm32_i2s: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:09 +0100 Message-Id: <20230315150745.67084-138-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1608; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=G3+Zub3on/oNv5MlUhL//kM8stML3hIwmYkNv5rWxLo=; b=owGbwMvMwMV48I9IxdpTbzgZT6slMaQI3ju71CVIvOSn+Q9LRruINMUs606RY0H/z3YsbroQu 79m0uoPnYzGLAyMXAyyYoosdUVaYhMk1vy3K1nCDTOIlQlkCgMXpwBMxNKQ/X+C+rJK+yA/0RMq pvGGpoLciUZvOG6s9GM0XvbJZU2qLGPJ9vT6L00d3MVmKsZ6ixcv53r4pH/RxNeM+x7vNCrXFmw J1NxeGjiDd96rZfXre/e9XLpdMuPpkdDMWzK1b7ruzrh4aNsip6vrZkZeMJq1eEbP6tjouiv9LQ cqd0n1zJzbLy51jsl72h/TMs2mX9zfbyT52vxz8+l8m/D38NbD3RMvi+b2uvZL3n4vInRAfHZU0 vYtvTb1u8TfaPHXH3QsYjl3/fcH1qkr5qYpyrk/e/u+uWmVYlWwnpebjEWcE+NX9sKDW7e57TVn 0mKySQB6+PHj1Rn2r8Rss4vmx81l/eh8M6Qo5Cj7leVnAA== X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: AHBSA5H3TFDI4Q3WUTCXZDDXCIRAOD6V X-Message-ID-Hash: AHBSA5H3TFDI4Q3WUTCXZDDXCIRAOD6V X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/stm/stm32_i2s.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/stm/stm32_i2s.c b/sound/soc/stm/stm32_i2s.c index f3dd9f8e621c..f7e381187216 100644 --- a/sound/soc/stm/stm32_i2s.c +++ b/sound/soc/stm/stm32_i2s.c @@ -1097,13 +1097,11 @@ static int stm32_i2s_parse_dt(struct platform_device *pdev, return 0; } -static int stm32_i2s_remove(struct platform_device *pdev) +static void stm32_i2s_remove(struct platform_device *pdev) { snd_dmaengine_pcm_unregister(&pdev->dev); snd_soc_unregister_component(&pdev->dev); pm_runtime_disable(&pdev->dev); - - return 0; } static int stm32_i2s_probe(struct platform_device *pdev) @@ -1221,7 +1219,7 @@ static struct platform_driver stm32_i2s_driver = { .pm = &stm32_i2s_pm_ops, }, .probe = stm32_i2s_probe, - .remove = stm32_i2s_remove, + .remove_new = stm32_i2s_remove, }; module_platform_driver(stm32_i2s_driver); From patchwork Wed Mar 15 15:07:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176223 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 30908C6FD1D for ; Wed, 15 Mar 2023 15:42:41 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 292341482; Wed, 15 Mar 2023 16:41:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 292341482 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894959; bh=xG7bgQl1WQ6zGD0G+sP96zZYOX6Rmgyluc+Vlw6F6Xw=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=DCU88m3K+bi+YrKWpvQpYn+hrWEQ1ogxbBStTM2bG/T2zeEs5OnOweKmTt5QVov6W Au30i4ji9VCk76XdT0HhyjgNygEjN5DMmymzNyNLphRJLiVTSAOazmbeCXQWeqUuBL SqVKaP6oKqURWLWETzQnIlAB1Hr0/AADDjti+F80= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 0DC55F80C79; Wed, 15 Mar 2023 16:15:15 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9E5E6F805FB; Wed, 15 Mar 2023 16:10:20 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0D847F80612 for ; Wed, 15 Mar 2023 16:08:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0D847F80612 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjw-0000L4-9o; Wed, 15 Mar 2023 16:08:32 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjs-004KeS-KC; Wed, 15 Mar 2023 16:08:28 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjr-0057kg-AW; Wed, 15 Mar 2023 16:08:27 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Olivier Moysan , Arnaud Pouliquen , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Maxime Coquelin , Alexandre Torgue Subject: [PATCH 138/173] ASoC: stm: stm32_sai_sub: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:10 +0100 Message-Id: <20230315150745.67084-139-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1778; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=xG7bgQl1WQ6zGD0G+sP96zZYOX6Rmgyluc+Vlw6F6Xw=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd7QZu6j8n8G0uOcXjx79C0pgFIGqDwF5fWYo pQIkZG9/fmJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHe0AAKCRDB/BR4rcrs CansB/9BsX2txlHSdHcMeg+f3WY/EE4bSOWq3xqBnWRRe/ARYATwjTxGqKAyiVP0J2hrChbcUBs MrfzZu+FDutl48VHlwQtICETaBebUAl5vpaZsQQKHDXMdIkPSH+YxVhyFyCuwb02BtC6r5J60rI pP68z0qoh5xu3gef9Kzj0X1tmxtDxhpRwGeY5Z0absUWr4TRRMPYJU1lC2KWlfTC2vjFLSqbZZA W1Gy99aP5SSfjXWU6IQ+XaPNn2qjYHGAy/abQFM65OBIWN63xkM/WFcJyfOvGIOBtNe0bWZwMUg FQIjUoiXL5LkE9HmIrMNxPCm2KnSMn9KOkXBqnU4/v7BFzqu X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: LKWSA32QBCWBQQSPHO45YQV5LSCPD6MU X-Message-ID-Hash: LKWSA32QBCWBQQSPHO45YQV5LSCPD6MU X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/stm/stm32_sai_sub.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c index eb31b49e6597..38e65e1f9496 100644 --- a/sound/soc/stm/stm32_sai_sub.c +++ b/sound/soc/stm/stm32_sai_sub.c @@ -1559,7 +1559,7 @@ static int stm32_sai_sub_probe(struct platform_device *pdev) return 0; } -static int stm32_sai_sub_remove(struct platform_device *pdev) +static void stm32_sai_sub_remove(struct platform_device *pdev) { struct stm32_sai_sub_data *sai = dev_get_drvdata(&pdev->dev); @@ -1567,8 +1567,6 @@ static int stm32_sai_sub_remove(struct platform_device *pdev) snd_dmaengine_pcm_unregister(&pdev->dev); snd_soc_unregister_component(&pdev->dev); pm_runtime_disable(&pdev->dev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -1618,7 +1616,7 @@ static struct platform_driver stm32_sai_sub_driver = { .pm = &stm32_sai_sub_pm_ops, }, .probe = stm32_sai_sub_probe, - .remove = stm32_sai_sub_remove, + .remove_new = stm32_sai_sub_remove, }; module_platform_driver(stm32_sai_sub_driver); From patchwork Wed Mar 15 15:07:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176221 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 773DAC6FD1D for ; Wed, 15 Mar 2023 15:42:10 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 32D041498; Wed, 15 Mar 2023 16:41:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 32D041498 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894928; bh=jvU7ygEInOmx/cF0f3yVtLZnqi+/vqLXkGO3jVzqefI=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=bnNzVC2Wb87Zx8RyA0PAKuKQbZHNpU0eXUm8+w6HY9MEy6g+RE86+v5kaxH/QvK/5 CL0hDbW3VGI8nDqR588Q/kplT6OXBzLKIwSIZX/u7FRhQaqavqgkIkGLBwhc8YZwrS jeiSPd5P8sbyq1JqSbg2nfuklf4t08smvw0YqLfM= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2C59DF80C5A; Wed, 15 Mar 2023 16:15:05 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1338FF805F8; Wed, 15 Mar 2023 16:10:19 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B83C7F8060E for ; Wed, 15 Mar 2023 16:08:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B83C7F8060E Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjx-0000Nl-M1; Wed, 15 Mar 2023 16:08:33 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjt-004Keb-6k; Wed, 15 Mar 2023 16:08:29 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjr-0057kk-Hb; Wed, 15 Mar 2023 16:08:27 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Olivier Moysan , Arnaud Pouliquen , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Maxime Coquelin , Alexandre Torgue Subject: [PATCH 139/173] ASoC: stm: stm32_spdifrx: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:11 +0100 Message-Id: <20230315150745.67084-140-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1818; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=jvU7ygEInOmx/cF0f3yVtLZnqi+/vqLXkGO3jVzqefI=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd7UNtXy7hf+SoCky6y/BdsqAnVT3qt0hrnt+ q769hD4HRWJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHe1AAKCRDB/BR4rcrs CdBIB/9wNtNYu6Z9CDMtcblJUy8Ow3xZop7E/DXPoOFZTpA/dP7f4Ys5RAS5wIa+tE8T33DJfTp m8DbJ/Hb33d3JuC+g0i+npWqa8bXsAx1CBGieRffBZ2xveBOSNHO9FmSXOdSG/PSF3nyopsGCXw tW254RS67iTOpFBxy75ixIfbZB74rIfXYyxXPc9D/EUaUSNdx226Z/mBOpyd1SMrdGyP0/zSi52 QWnCQjAR9W1pib1i7Tqcppi+YNR1G5ougCqWdQwoHG89aElsDzFtkBCY6IQY8qA4yVxav7B+1zY Rs7A7TLGfk1RFvXYNsjI99ffdc5E3qhLPYgcRPb7aaWXVTCQ X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: D7HK6EI6CCTN77BVN755F23EDANP7M2N X-Message-ID-Hash: D7HK6EI6CCTN77BVN755F23EDANP7M2N X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/stm/stm32_spdifrx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/stm/stm32_spdifrx.c b/sound/soc/stm/stm32_spdifrx.c index d399c906bb92..a4066f271f2d 100644 --- a/sound/soc/stm/stm32_spdifrx.c +++ b/sound/soc/stm/stm32_spdifrx.c @@ -939,7 +939,7 @@ static int stm32_spdifrx_parse_of(struct platform_device *pdev, return 0; } -static int stm32_spdifrx_remove(struct platform_device *pdev) +static void stm32_spdifrx_remove(struct platform_device *pdev) { struct stm32_spdifrx_data *spdifrx = platform_get_drvdata(pdev); @@ -952,8 +952,6 @@ static int stm32_spdifrx_remove(struct platform_device *pdev) snd_dmaengine_pcm_unregister(&pdev->dev); snd_soc_unregister_component(&pdev->dev); pm_runtime_disable(&pdev->dev); - - return 0; } static int stm32_spdifrx_probe(struct platform_device *pdev) @@ -1078,7 +1076,7 @@ static struct platform_driver stm32_spdifrx_driver = { .pm = &stm32_spdifrx_pm_ops, }, .probe = stm32_spdifrx_probe, - .remove = stm32_spdifrx_remove, + .remove_new = stm32_spdifrx_remove, }; module_platform_driver(stm32_spdifrx_driver); From patchwork Wed Mar 15 15:07:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176284 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F893C61DA4 for ; Wed, 15 Mar 2023 15:53:47 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 426A01555; Wed, 15 Mar 2023 16:52:55 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 426A01555 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895625; bh=dcUEPZbouxDhw5jZ6zxfPGfcIHaKSoZUnFxJMzyPH6Y=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=B5gKbqq/jI0tqS6hBe49OI9VbOIyEUFtBDwm2arcDvw4rtS9iByCZEEZxz98kx8VY wDno0GlgpAwPGouoAHl3fJmDQI1AYusnYk7eOvZiJV4YamQzNUFzYJ7ESUvvXbmvPE AjWfnc/La0yUz27RdC1GBKIf0ZCWW51jk1Zg702A= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 81711F8971D; Wed, 15 Mar 2023 16:17:51 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 69E10F80623; Wed, 15 Mar 2023 16:10:59 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7490EF80571 for ; Wed, 15 Mar 2023 16:08:51 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7490EF80571 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjx-0000NV-P0; Wed, 15 Mar 2023 16:08:33 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjt-004KeY-3x; Wed, 15 Mar 2023 16:08:29 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjr-0057ko-SU; Wed, 15 Mar 2023 16:08:27 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Charles Keepax , Mikhail Rudenko , Li Chen Subject: [PATCH 140/173] ASoC: sunxi: sun4i-codec: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:12 +0100 Message-Id: <20230315150745.67084-141-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1835; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=dcUEPZbouxDhw5jZ6zxfPGfcIHaKSoZUnFxJMzyPH6Y=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd7XV6zQ4+UotaB6YV/1EzfFac8SlwxS4kQp8 k/q2nF3AeqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHe1wAKCRDB/BR4rcrs CcV8B/4oIH6x6tk/YRQDLKV6v15HwXFmVnUNTa0W7fbDK5dgM1GgbcInERGzQplFDwgpj2HBmr1 8GWOMnsc6/D9XcydMoqhS2HFrU7qh22bi9cI5zzVfYhCMsjgC4AW0BKIVgsEyS1Zp5WjkLBqkHl K9oKofM17um9ldm/vxhdW19kSv+sr1hnxmCdrouDOS4NeQ1mKN/wY7852yucpb0i1ccJLDHQfYL kYPKZjikG0u/EGs0OwnHIT4V0dC/JSQWdMhFCD+YVr5FF7AFCz+riTaN1k15PZu/lYRXxjoJcgq TBasxx6CMo/4X7O/H5myD/3rd4S0n24ixUkBOK2a9yJcDvd8 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: Y2W5VHRVAZMK7XXOZGRLUYNJLV3OE56B X-Message-ID-Hash: Y2W5VHRVAZMK7XXOZGRLUYNJLV3OE56B X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: <> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec --- sound/soc/sunxi/sun4i-codec.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 835dc3404367..55328850aef5 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -1821,7 +1821,7 @@ static int sun4i_codec_probe(struct platform_device *pdev) return ret; } -static int sun4i_codec_remove(struct platform_device *pdev) +static void sun4i_codec_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); struct sun4i_codec *scodec = snd_soc_card_get_drvdata(card); @@ -1830,8 +1830,6 @@ static int sun4i_codec_remove(struct platform_device *pdev) if (scodec->rst) reset_control_assert(scodec->rst); clk_disable_unprepare(scodec->clk_apb); - - return 0; } static struct platform_driver sun4i_codec_driver = { @@ -1840,7 +1838,7 @@ static struct platform_driver sun4i_codec_driver = { .of_match_table = sun4i_codec_of_match, }, .probe = sun4i_codec_probe, - .remove = sun4i_codec_remove, + .remove_new = sun4i_codec_remove, }; module_platform_driver(sun4i_codec_driver); From patchwork Wed Mar 15 15:07:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176262 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 11D34C7618B for ; Wed, 15 Mar 2023 15:51:09 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 38FB1152E; Wed, 15 Mar 2023 16:50:17 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 38FB1152E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895467; bh=XMeII0RdOtxphRzHkvGSDdSw/5DkBBmHMFgBoQlWdIQ=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=oGEIS3tTCBRD6ZqUMWMp9HMdJJtX7mCvMEOu1P611My4tOYHGGYD1z/0hCqqgbq91 1gS4/rPqMudnMKih2S6EljDychAzeQodZndPxpu333KH3L5jCw1ovHmIJOK4YIEPGx GCoeDqUsGT2+H4M1rgRmTAMBkrvhozgBlkqqRAr0= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id EE54FF896F8; Wed, 15 Mar 2023 16:17:07 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2B136F8061D; Wed, 15 Mar 2023 16:10:50 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 85527F80635 for ; Wed, 15 Mar 2023 16:08:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 85527F80635 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjy-0000Nt-07; Wed, 15 Mar 2023 16:08:34 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjt-004Kee-9j; Wed, 15 Mar 2023 16:08:29 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjs-0057ks-2i; Wed, 15 Mar 2023 16:08:28 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Charles Keepax , Kai Vehmanen , Ranjani Sridharan , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 141/173] ASoC: sunxi: sun4i-i2s: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:13 +0100 Message-Id: <20230315150745.67084-142-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1743; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=XMeII0RdOtxphRzHkvGSDdSw/5DkBBmHMFgBoQlWdIQ=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd7a1nCZFs0/sRGiRjaH/NOEtQWa5LWd/3AGq apgzANfQKiJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHe2gAKCRDB/BR4rcrs CRUZCACV6EGN0CLlFZ2zP5JJe31vt6VGTy0FlY+8oe2S4EmZGkEU6zDyAUCjhKhj1Bn5Y71d4xU kq+DIVA6hRcI2UUB2WL4tRIP3qtMpPVslKt4HcLiu8zu7RatUAx+2jZncEIZl7pDC0LjT9KwyO6 /j9Jllzj5lCp96Miw/etWOFlIpBq7qmu0oaYTq8JA5N8WGF55GnuSx+ezsnOPRSSHzqaYg3KIBh CREh28dwdeG6ZackuHdX7menpCJWLdLYUo5AvUGoN4K8LleXRvYEbGDgYcqb+qu8+VjAAddeZNN OXZ8c0EYjGUBlNMmVkveG9qBrzS/rLuDuDeocEnZ/5Aqf5gS X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: BLJRTCOQZQ72KBZMRAZUS7ZQU2EAES2Y X-Message-ID-Hash: BLJRTCOQZQ72KBZMRAZUS7ZQU2EAES2Y X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec --- sound/soc/sunxi/sun4i-i2s.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index 6028871825ba..669d712bbe9f 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -1606,7 +1606,7 @@ static int sun4i_i2s_probe(struct platform_device *pdev) return ret; } -static int sun4i_i2s_remove(struct platform_device *pdev) +static void sun4i_i2s_remove(struct platform_device *pdev) { struct sun4i_i2s *i2s = dev_get_drvdata(&pdev->dev); @@ -1616,8 +1616,6 @@ static int sun4i_i2s_remove(struct platform_device *pdev) if (!IS_ERR(i2s->rst)) reset_control_assert(i2s->rst); - - return 0; } static const struct of_device_id sun4i_i2s_match[] = { @@ -1660,7 +1658,7 @@ static const struct dev_pm_ops sun4i_i2s_pm_ops = { static struct platform_driver sun4i_i2s_driver = { .probe = sun4i_i2s_probe, - .remove = sun4i_i2s_remove, + .remove_new = sun4i_i2s_remove, .driver = { .name = "sun4i-i2s", .of_match_table = sun4i_i2s_match, From patchwork Wed Mar 15 15:07:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176256 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 68169C6FD1D for ; Wed, 15 Mar 2023 15:49:31 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 525B914C9; Wed, 15 Mar 2023 16:48:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 525B914C9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895369; bh=OoD0/NsEqxU5fRK/LbTs3wPZVaS3oxKRvhUhi6Txvfk=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=XljJIwkXozyKiOym2NRUesj3O08xgkP5xNUmHXtrkt2dO2ZPETpjiG/As3be74yTt 0UAj0a8F2iJX0wmuPEigsOSmWN6vj9CNmjz+SmzTAUSNE8msbzeBKRtBPvhRWVfV73 kJ0s8xi2MX4TUtrLqAGsXG4REHlhlA3EOW4f1crE= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 81D53F896B7; Wed, 15 Mar 2023 16:16:45 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 807C0F80612; Wed, 15 Mar 2023 16:10:45 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BD46AF80631 for ; Wed, 15 Mar 2023 16:08:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BD46AF80631 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjx-0000PJ-S9; Wed, 15 Mar 2023 16:08:33 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjt-004Kek-Kd; Wed, 15 Mar 2023 16:08:29 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjs-0057kx-98; Wed, 15 Mar 2023 16:08:28 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Charles Keepax Subject: [PATCH 142/173] ASoC: sunxi: sun4i-spdif: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:14 +0100 Message-Id: <20230315150745.67084-143-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1636; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=OoD0/NsEqxU5fRK/LbTs3wPZVaS3oxKRvhUhi6Txvfk=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd7dQzIaPACKsmiIQnsh/hqYmkMHCJ96u+ul5 TJNW/9hIS+JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHe3QAKCRDB/BR4rcrs CdodB/oDDlewV0j3U99T7pNZQ/h8kflA6pF8CVZbDKvnptHiWpa323lumQws+yRs7dVRJJjHAkt VIHOiyMNJKvEWkCzFNY3W0RAE1TPRZbao3KVoJx5owUugEVY9SWh7+ybYtu5dHa6e0op1UPYAWo 03UQcK6YD+eBgGURaEtEeAUWnTmQteNadhShfAuM38+q7y7DNvJh7kmyPZtAgXztcDDFlbpYzM2 Rind26Cic3IW/u+JqHbap2wjJWRZVl1w5DLyEOCrpOCv0x/G38VA0l/eIX6Q7ie6g9NHwMQiUYl 8EFg/WeVmp7NlT1vnMRnSumutXOzxVKo0XLayQ+OUNXO6oEG X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: EKHF73OADCFFTIRNKZ3AURPFFRWGOQV2 X-Message-ID-Hash: EKHF73OADCFFTIRNKZ3AURPFFRWGOQV2 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec --- sound/soc/sunxi/sun4i-spdif.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdif.c index bcceebca915a..ff18d4113aac 100644 --- a/sound/soc/sunxi/sun4i-spdif.c +++ b/sound/soc/sunxi/sun4i-spdif.c @@ -703,13 +703,11 @@ static int sun4i_spdif_probe(struct platform_device *pdev) return ret; } -static int sun4i_spdif_remove(struct platform_device *pdev) +static void sun4i_spdif_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) sun4i_spdif_runtime_suspend(&pdev->dev); - - return 0; } static const struct dev_pm_ops sun4i_spdif_pm = { @@ -724,7 +722,7 @@ static struct platform_driver sun4i_spdif_driver = { .pm = &sun4i_spdif_pm, }, .probe = sun4i_spdif_probe, - .remove = sun4i_spdif_remove, + .remove_new = sun4i_spdif_remove, }; module_platform_driver(sun4i_spdif_driver); From patchwork Wed Mar 15 15:07:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176255 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AC2CEC6FD1D for ; Wed, 15 Mar 2023 15:49:17 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 854D31505; Wed, 15 Mar 2023 16:48:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 854D31505 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895355; bh=IwlsE4Vc9Qt7mC6XrfSGUhCWfafElqIfLGaSkpDgDog=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=JAv/sXjxWaYjNEg/0ToCjxc2Pdfjxrs0dvZgb81JrVAj7ADWN4ejGwUKqENtrngk/ 3SqFm+3RRraVbd9D4NugxeozCAWzt3RuMh3h/8pSr7pYs7ferf5gqMZ11j8JUseuW9 mYQO+2TJidACh6tH79joujW3crKaZc6QQ9jCxi3c= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E5197F896CC; Wed, 15 Mar 2023 16:16:42 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 83C97F805E4; Wed, 15 Mar 2023 16:10:44 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BDC70F80632 for ; Wed, 15 Mar 2023 16:08:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BDC70F80632 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjy-0000PV-1X; Wed, 15 Mar 2023 16:08:34 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjt-004Kem-MO; Wed, 15 Mar 2023 16:08:29 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjs-0057l1-GI; Wed, 15 Mar 2023 16:08:28 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Ban Tao , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Subject: [PATCH 143/173] ASoC: sunxi: sun50i-dmic: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:15 +0100 Message-Id: <20230315150745.67084-144-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1659; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=IwlsE4Vc9Qt7mC6XrfSGUhCWfafElqIfLGaSkpDgDog=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd7hk/lU18iuI7quSK7gC681Bl2helTb8zSFn GRRHJfnZXaJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHe4QAKCRDB/BR4rcrs CfstB/9Pg8kpWZGCGXRT82VSg0XoKrXcmlBDwbQ8GeocE33K92rsyE0l89zSRODY7l/tycU+RKB wQCEa0VM3uOnOHqvx1Eyy9NIrdwSa3zsn9KPoz7RUKmi7IZWQjkdIOw1Bmr1aEHNR0UcSKsyK4v cWZ9xkGEf7MmX5+IeCpK2U/07zj62M5yn17GT5q/PXjqvihffYLozvRZp+dSrJaTu/zdNNJFapp yAuzw1eYtOqZjkGpNMCUSJXE+agujbsxwA0FE2KtMh6G3FMpjjx8thNqJOLv8oVkJvFm6LEmXxb 4bySqddGQB2HR1b3y4hbv/YC9uaLIx0bMSORFiIk2TfDqIM+ X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: HDZIB23QC3ONSZL3C54V3P4FRY66Z3LN X-Message-ID-Hash: HDZIB23QC3ONSZL3C54V3P4FRY66Z3LN X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec Acked-by: Ban Tao --- sound/soc/sunxi/sun50i-dmic.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/sunxi/sun50i-dmic.c b/sound/soc/sunxi/sun50i-dmic.c index 069c993acb31..c10439b9e0a2 100644 --- a/sound/soc/sunxi/sun50i-dmic.c +++ b/sound/soc/sunxi/sun50i-dmic.c @@ -373,13 +373,11 @@ static int sun50i_dmic_probe(struct platform_device *pdev) return ret; } -static int sun50i_dmic_remove(struct platform_device *pdev) +static void sun50i_dmic_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) sun50i_dmic_runtime_suspend(&pdev->dev); - - return 0; } static const struct dev_pm_ops sun50i_dmic_pm = { @@ -394,7 +392,7 @@ static struct platform_driver sun50i_dmic_driver = { .pm = &sun50i_dmic_pm, }, .probe = sun50i_dmic_probe, - .remove = sun50i_dmic_remove, + .remove_new = sun50i_dmic_remove, }; module_platform_driver(sun50i_dmic_driver); From patchwork Wed Mar 15 15:07:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176266 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F2826C6FD1D for ; Wed, 15 Mar 2023 15:52:11 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DE08014E9; Wed, 15 Mar 2023 16:51:19 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DE08014E9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895530; bh=PKZLUUN2FnYm9E45kDT+erWezzQ4AUZAVT1pyOCNUaE=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=r+zN5UUEjq9okYKFDOTij7GCmuT42KYHmBdkxX+ET4oUufwZwY6PxNHBeuWVUED3u IN6GVM0AFEJAAG9lIg2oIZXCif4AjSxW4H2yZle3hVVybg+UdPd+alBfayqdmxYCIw opQuyB0GSF+mMSJHnXJ3oWywVE5Z4Rq+1t29/iUY= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C4EFCF89709; Wed, 15 Mar 2023 16:17:23 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 32D22F8061F; Wed, 15 Mar 2023 16:10:54 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 75E5AF80641 for ; Wed, 15 Mar 2023 16:08:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 75E5AF80641 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjy-0000QT-9y; Wed, 15 Mar 2023 16:08:34 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjt-004Ker-T0; Wed, 15 Mar 2023 16:08:29 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjs-0057l4-MI; Wed, 15 Mar 2023 16:08:28 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Charles Keepax Subject: [PATCH 144/173] ASoC: sunxi: sun8i-codec: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:16 +0100 Message-Id: <20230315150745.67084-145-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1652; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=PKZLUUN2FnYm9E45kDT+erWezzQ4AUZAVT1pyOCNUaE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd7kJZBA5L8T3lsg8WMR+VXbx+6E9hoN/Zgx9 P1VmeBcBcKJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHe5AAKCRDB/BR4rcrs Ceg1B/4gksIQaHhoSv2yjkYstPXz3vvl3ILg0AUMo5CJN4UP+IJdXd4OU3/Vx3/OMVm003lxeAd 8wMO+ljo4kxN5KGbScBlE1R5aYVEjiCe0DmxIK6CzTX+miVfdhuCO6R0Hdk82lHO4i5boNn7XlO 8Eqf2TVLSC8JBav8DGGrt6WiGL51y5JQESOLgErWxloaNylKpsGTbY7vivhn67BtJLQntHs3sG9 O7jMcwH3+nEWJn99pnm+tJeq4kY45Ac7tWIp6Ec7JKjYhOgYn1mUFeG7+LwJhtvOyL8Sjah+buw Y5MFjzWijMWzrBui0GanOVa2OmIQp0Wz3iU7dev92ls530la X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: SET4CHQNHP5H4BMCBDJ2XZGDYFNFYHWJ X-Message-ID-Hash: SET4CHQNHP5H4BMCBDJ2XZGDYFNFYHWJ X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec --- sound/soc/sunxi/sun8i-codec.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c index 9844978d91e6..4c0d0d7d3e58 100644 --- a/sound/soc/sunxi/sun8i-codec.c +++ b/sound/soc/sunxi/sun8i-codec.c @@ -1349,13 +1349,11 @@ static int sun8i_codec_probe(struct platform_device *pdev) return ret; } -static int sun8i_codec_remove(struct platform_device *pdev) +static void sun8i_codec_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) sun8i_codec_runtime_suspend(&pdev->dev); - - return 0; } static const struct sun8i_codec_quirks sun8i_a33_quirks = { @@ -1385,7 +1383,7 @@ static struct platform_driver sun8i_codec_driver = { .pm = &sun8i_codec_pm_ops, }, .probe = sun8i_codec_probe, - .remove = sun8i_codec_remove, + .remove_new = sun8i_codec_remove, }; module_platform_driver(sun8i_codec_driver); From patchwork Wed Mar 15 15:07:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176245 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3DE0CC6FD1D for ; Wed, 15 Mar 2023 15:47:13 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E606014D2; Wed, 15 Mar 2023 16:46:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E606014D2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895231; bh=fWZJsnGH2uLdHPwSxxFOSiOxqdOu0m80cnpD2MOxUNM=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Q4vt00gux+wQu9ZmhxlFcni8u/bwE5aZF4UdQyR1R9BtndUZNfql+bA1VdJu1ULGl sYNhE+6TUGBBB6aA55aFmyrTOKdMli+fpSB+ceBMEU/VqB8rjuw6dHGCr2ClJtuNt3 aJ1tpyeXx9fH+/xchIw7ffdF/IVBxTaczhwlYeQY= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 5706BF8962A; Wed, 15 Mar 2023 16:16:14 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0024FF8060D; Wed, 15 Mar 2023 16:10:35 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C087FF80620 for ; Wed, 15 Mar 2023 16:08:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C087FF80620 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjy-0000R2-8V; Wed, 15 Mar 2023 16:08:34 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjt-004Keu-VV; Wed, 15 Mar 2023 16:08:29 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjs-0057l8-SX; Wed, 15 Mar 2023 16:08:28 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Sameer Pujar , YueHaibing Subject: [PATCH 145/173] ASoC: tegra: tegra186_asrc: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:17 +0100 Message-Id: <20230315150745.67084-146-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1632; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=fWZJsnGH2uLdHPwSxxFOSiOxqdOu0m80cnpD2MOxUNM=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd7ny82Qx0kG9i3881DP3w0MzH0IoaBMpztfv /lcwA2cHYqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHe5wAKCRDB/BR4rcrs CY7UB/9WdGGSIQw8NtZbUPG4pp4H0jA/2ygBa/MNqOKrAOmGDw0VjI0K/SKB1DUSWVoh3S4p4FE MiE62ad48jJH3vro0izu8ympDsAlcnz0asT23wccnRNBJ1nTM2PbCYXnbEa6+shYBwHihlWTJKn O1O7LUzyPLG4kf0bpBBeEINv9slMrO1n2ypza9x3xy2V4mMGlDMK6jf4E9EeE+BM2gnlSW8ahmy LtC1Dzu1TVRi/jNaZgnTRfQMFZLR8s86mWx5d8NCLwRHFNrDTV9rhwsLhhdMk20QT99mOJnO4QG N4LlgXdm3mm7cya7+4ohrwcJRxG+WoR0FinszMNQvmazBQaf X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 6W35IN5AOEYK3YDQZ6EKNCUXWMVZ3HPR X-Message-ID-Hash: 6W35IN5AOEYK3YDQZ6EKNCUXWMVZ3HPR X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/tegra/tegra186_asrc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra186_asrc.c b/sound/soc/tegra/tegra186_asrc.c index 9f12faaa609d..e016a6a7f7c4 100644 --- a/sound/soc/tegra/tegra186_asrc.c +++ b/sound/soc/tegra/tegra186_asrc.c @@ -1016,11 +1016,9 @@ static int tegra186_asrc_platform_probe(struct platform_device *pdev) return 0; } -static int tegra186_asrc_platform_remove(struct platform_device *pdev) +static void tegra186_asrc_platform_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - - return 0; } static const struct dev_pm_ops tegra186_asrc_pm_ops = { @@ -1037,7 +1035,7 @@ static struct platform_driver tegra186_asrc_driver = { .pm = &tegra186_asrc_pm_ops, }, .probe = tegra186_asrc_platform_probe, - .remove = tegra186_asrc_platform_remove, + .remove_new = tegra186_asrc_platform_remove, }; module_platform_driver(tegra186_asrc_driver) From patchwork Wed Mar 15 15:07:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176236 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F2E8CC61DA4 for ; Wed, 15 Mar 2023 15:44:46 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 03405137F; Wed, 15 Mar 2023 16:43:55 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 03405137F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895085; bh=Ye5g1gghrV9Sm/9HNFXIbWrlR3eA628GPRnVOdt5+OU=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=cpFD80ghZPJ7lGhNf59r9k1lJD+Ajgv08W5JFm0CKs0l4KJMybqbOtkAtstcpGK0x x7U/X6mFKzTPmTRSZ9qzX47UkTk2rT+lBbtH1N0CKMW+uvhrPTgOXdNzJxSgsMC2WW uGTVdg0si4fp/oskPnQMj2RZ1zhVxbGfFLv94H/k= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 630EFF80CB5; Wed, 15 Mar 2023 16:15:42 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B85A4F80605; Wed, 15 Mar 2023 16:10:26 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 06A32F80619 for ; Wed, 15 Mar 2023 16:08:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 06A32F80619 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjy-0000RK-Au; Wed, 15 Mar 2023 16:08:34 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSju-004Kex-06; Wed, 15 Mar 2023 16:08:30 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjt-0057lB-3V; Wed, 15 Mar 2023 16:08:29 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter Subject: [PATCH 146/173] ASoC: tegra: tegra186_dspk: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:18 +0100 Message-Id: <20230315150745.67084-147-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1629; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Ye5g1gghrV9Sm/9HNFXIbWrlR3eA628GPRnVOdt5+OU=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd7qjEOW9UkHu9CmGlJjL8sn4Z0G6scI5G19t tXtr/r9WP+JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHe6gAKCRDB/BR4rcrs CWRwB/49eujdvervl9zc1OUrG/6VTmE8WmytgLVWJVFBxSfj/GZIWg4mysTYWn1DyWVPK64pexi QFduWIKzH2l/sxIoJvO1ZUmiihC2/Qk6mDOm+XPkB0kgHg0hf/itAFN1/8jQqpIjT396/3Ay+94 iuX7fr4AvFw/KtODi9+XZz04/EWLcdnQZwuXkFzDpNZfegsg+O305SAsmbKgM39+5ZEtUZP/ZvO WGDrplFQ5hunqmEEwuveVcgKQkxA1VTOHMi1ytAqkjvoLB59KDrhINwaXxCZXk8qmuO8TNyoko+ OU3pUG3K/HIcBprQKqgP4xZ2/VBMRydVFNPbkgryV8OAKiR3 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 5BE7AGWG2PUASZX3HUFW56WIM32ZTIT5 X-Message-ID-Hash: 5BE7AGWG2PUASZX3HUFW56WIM32ZTIT5 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/tegra/tegra186_dspk.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra186_dspk.c b/sound/soc/tegra/tegra186_dspk.c index a74c980ee775..a0ce7eb11de9 100644 --- a/sound/soc/tegra/tegra186_dspk.c +++ b/sound/soc/tegra/tegra186_dspk.c @@ -524,11 +524,9 @@ static int tegra186_dspk_platform_probe(struct platform_device *pdev) return 0; } -static int tegra186_dspk_platform_remove(struct platform_device *pdev) +static void tegra186_dspk_platform_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - - return 0; } static const struct dev_pm_ops tegra186_dspk_pm_ops = { @@ -545,7 +543,7 @@ static struct platform_driver tegra186_dspk_driver = { .pm = &tegra186_dspk_pm_ops, }, .probe = tegra186_dspk_platform_probe, - .remove = tegra186_dspk_platform_remove, + .remove_new = tegra186_dspk_platform_remove, }; module_platform_driver(tegra186_dspk_driver); From patchwork Wed Mar 15 15:07:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176267 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E706AC61DA4 for ; Wed, 15 Mar 2023 15:52:27 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D3DCC1541; Wed, 15 Mar 2023 16:51:35 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D3DCC1541 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895545; bh=PFMpSw9IGFJcEAKF3FeqPJ0/4In5fqn24McFFYwxkMQ=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=FFb/Y/jvmCotVrpo/TC0GwO21nxuMTdwopREKS9A9i0UIdWId0/6kUBawFXCMO2mL vwSUY8kjCKTzEGZdkpzOcIWKYBPfOXCpn0WNRfQ5EpBNesdLWedpMue7jwns63VOW1 uWpWAzlIg4xVZN6tSfiy72f/SgjnXRAyiQS5kDZE= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 88DC4F8970A; Wed, 15 Mar 2023 16:17:28 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C3CF8F8061F; Wed, 15 Mar 2023 16:10:54 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4D64BF80637 for ; Wed, 15 Mar 2023 16:08:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4D64BF80637 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjy-0000RL-Ip; Wed, 15 Mar 2023 16:08:34 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSju-004Kew-03; Wed, 15 Mar 2023 16:08:30 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjt-0057lF-9M; Wed, 15 Mar 2023 16:08:29 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Jiapeng Chong , Kuninori Morimoto , Charles Keepax Subject: [PATCH 147/173] ASoC: tegra: tegra20_ac97: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:19 +0100 Message-Id: <20230315150745.67084-148-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1829; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=PFMpSw9IGFJcEAKF3FeqPJ0/4In5fqn24McFFYwxkMQ=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd7tl+aWZTYs/bRbpOugPsYwDEEN5VG34wfeG q1FQOOuro6JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHe7QAKCRDB/BR4rcrs CXHHB/914JKOxvGA3HKq5KrEd9PgAZcCh2v+3oY90zL22a05NqX2YB3GtDogV2l6gXV+BGjgTEW XTR/qwxG2xrGohQkl38HvkVch9Zbg/nsHK1KnQvfb0Wyj5bXbAbwoUY95sJp6ho4m19RmwDXYar mXQip9Yjf4LriClgBYq58g0KzGOXht/lehdC+ie4A/hRcBdY8IKkOqDNwm9acGT7zq7oWt5x4Su +awEpdAPfTDJA8rLvl/ZTQm5arnbTB8VTdVW9iYKtohtLtbgLYoKaZuHWRXlgVkWzFdIjge3dxQ 5a+e0qaQHvwbej5eTQjYpIq8/KM3sQEvqToMkzerSRyQvbYF X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: DCEGF7ECUYMBWWHS2I3BOOOTNHNUWKLW X-Message-ID-Hash: DCEGF7ECUYMBWWHS2I3BOOOTNHNUWKLW X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: <> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/tegra/tegra20_ac97.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c index d23d88a10899..fea6955f7f43 100644 --- a/sound/soc/tegra/tegra20_ac97.c +++ b/sound/soc/tegra/tegra20_ac97.c @@ -429,7 +429,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) return ret; } -static int tegra20_ac97_platform_remove(struct platform_device *pdev) +static void tegra20_ac97_platform_remove(struct platform_device *pdev) { struct tegra20_ac97 *ac97 = dev_get_drvdata(&pdev->dev); @@ -439,8 +439,6 @@ static int tegra20_ac97_platform_remove(struct platform_device *pdev) clk_disable_unprepare(ac97->clk_ac97); snd_soc_set_ac97_ops(NULL); - - return 0; } static const struct of_device_id tegra20_ac97_of_match[] = { @@ -454,7 +452,7 @@ static struct platform_driver tegra20_ac97_driver = { .of_match_table = tegra20_ac97_of_match, }, .probe = tegra20_ac97_platform_probe, - .remove = tegra20_ac97_platform_remove, + .remove_new = tegra20_ac97_platform_remove, }; module_platform_driver(tegra20_ac97_driver); From patchwork Wed Mar 15 15:07:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176261 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 998EFC61DA4 for ; Wed, 15 Mar 2023 15:50:51 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 934B21526; Wed, 15 Mar 2023 16:49:59 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 934B21526 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895449; bh=mVXJOXDuFeTzes51+7d8MiUj7FG24ywPK9s9TnUFuFE=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=qmcJ+Ka2CHqhhLtArFWAms3E6FR2pzixaDNokH3loTkzEGKiv2cFwF8wnMaTCGQ12 bbpt0GvGAJdKFqwPgO+PBDrWx6p8VKUQj7ZZvj5zu9+MQfAzIhAASQFxVLUF3s/aep GCjtp1iJyNiBzX6s/9mQiXabW6lqvSJWEvY6pM4Y= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 94556F896EF; Wed, 15 Mar 2023 16:17:04 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B703FF8061D; Wed, 15 Mar 2023 16:10:49 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1C3C8F80621 for ; Wed, 15 Mar 2023 16:08:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1C3C8F80621 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjy-0000S4-MR; Wed, 15 Mar 2023 16:08:34 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSju-004KfA-AF; Wed, 15 Mar 2023 16:08:30 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjt-0057lK-G5; Wed, 15 Mar 2023 16:08:29 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Charles Keepax , Kuninori Morimoto Subject: [PATCH 148/173] ASoC: tegra: tegra20_i2s: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:20 +0100 Message-Id: <20230315150745.67084-149-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1699; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=mVXJOXDuFeTzes51+7d8MiUj7FG24ywPK9s9TnUFuFE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd7wGLWDcJEc9f9QFtB88ZKPhX8oC95Q8ONrm 6mMSQp6m5OJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHe8AAKCRDB/BR4rcrs CdeMB/oCbCUkbSbsC9qZ580r3ckNyWaU1GnWiyxqNVS2smjGwDETQH9ZuaintIUCdrQ/pSi7ZnP erzZROF804dASfPo4qQQTDgxyDPp4kSr8YCOg8UEc8WD1qz0SlFq+ufNRy/bxAu0jEe95DJxp+7 MUfZT5w8YkuPsxTuOHDCWAm22sxMaQJqevPiu/nvHkEW8GxNbJI87A4vTm3h1oZe5ytVBRLkPFG LT8klW+z5083Tne3yOAw5vuzfDqtPSaXQ8SFjK9Ozwtj0lXGD12KoPjPqRLwnVI0fJ0VwMa8FU9 Ann9HGdCZFRcIRG+Ilz8TZS3ZBjHJlqA9S+SSXFuBvl8arjl X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: YSNGQB3PKIU6OZ24F36H5YZTUBNKZK55 X-Message-ID-Hash: YSNGQB3PKIU6OZ24F36H5YZTUBNKZK55 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/tegra/tegra20_i2s.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra20_i2s.c b/sound/soc/tegra/tegra20_i2s.c index d37a9f2603e8..e1a0f50969c1 100644 --- a/sound/soc/tegra/tegra20_i2s.c +++ b/sound/soc/tegra/tegra20_i2s.c @@ -475,13 +475,11 @@ static int tegra20_i2s_platform_probe(struct platform_device *pdev) return ret; } -static int tegra20_i2s_platform_remove(struct platform_device *pdev) +static void tegra20_i2s_platform_remove(struct platform_device *pdev) { tegra_pcm_platform_unregister(&pdev->dev); snd_soc_unregister_component(&pdev->dev); pm_runtime_disable(&pdev->dev); - - return 0; } static const struct of_device_id tegra20_i2s_of_match[] = { @@ -503,7 +501,7 @@ static struct platform_driver tegra20_i2s_driver = { .pm = &tegra20_i2s_pm_ops, }, .probe = tegra20_i2s_platform_probe, - .remove = tegra20_i2s_platform_remove, + .remove_new = tegra20_i2s_platform_remove, }; module_platform_driver(tegra20_i2s_driver); From patchwork Wed Mar 15 15:07:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176241 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA44EC6FD1D for ; Wed, 15 Mar 2023 15:46:05 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1CFCF14C1; Wed, 15 Mar 2023 16:45:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1CFCF14C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895164; bh=ujWcgrFi4KsfS0xBsaORvQfzou45iwq4W+cZLZtf78I=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=tM+Fi5MzG19U1/9TPs88Pe+g0G0VjZh/bXZIBWxUtRiKq6qlNv5lWeYFtE96hOvgP +P7lCoV+fk67njsLHC3Gnv2TyFy86HlDA2yXZC1fVWSEbSEypUWauidunJAvCa699i n+LLFsc5dy7jyl/6o6YZkciMYIa9WfVtT1xkm29c= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7640BF80CC3; Wed, 15 Mar 2023 16:15:58 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6F6D0F8060A; Wed, 15 Mar 2023 16:10:31 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5E5FFF8061C for ; Wed, 15 Mar 2023 16:08:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5E5FFF8061C Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjz-0000T0-0H; Wed, 15 Mar 2023 16:08:35 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSju-004KfF-Gi; Wed, 15 Mar 2023 16:08:30 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjt-0057lN-NA; Wed, 15 Mar 2023 16:08:29 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Kuninori Morimoto Subject: [PATCH 149/173] ASoC: tegra: tegra210_admaif: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:21 +0100 Message-Id: <20230315150745.67084-150-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1633; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=ujWcgrFi4KsfS0xBsaORvQfzou45iwq4W+cZLZtf78I=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd7zfKFWA/MI8S/6DYDfM73PmC+sJKgaxQAp1 5SsaCfBxTqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHe8wAKCRDB/BR4rcrs CSrXB/9omCqig4IrymQlP9lYUouO557lutd98YgbA638LQIkPPUnUxmG0yWK8DmBOpLKfo2UR48 ApCKH4dxYuiLK2NKEwp7kaVNw5SV0+PNoApSAaM8UzR68DB5bwLnZyistaUYxLmv9QGuzFXHpEL Nd1pHbYtPkhHCwrVwFVJJmzdf0fCAh5+HCVKh+zEtDD8sj7hX++4+QSS3fVI09oOw2ADPnVBol9 2vf203kECPuZtENKZH9hYcpNJMCcqWD/1ls95F2s1S5TPzrb6LibsLkeX/FfVAu9fE0Q/3ci08B VO5dXsqh8MPWmeRnMQc3n5TZY5+D+oBALR2PlWskoRzMM7RU X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: PFUVVUIKAA6ZTMAAPXDMNYOEDOQX5IZD X-Message-ID-Hash: PFUVVUIKAA6ZTMAAPXDMNYOEDOQX5IZD X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/tegra/tegra210_admaif.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra210_admaif.c b/sound/soc/tegra/tegra210_admaif.c index 100a2b6e6063..6868508585a0 100644 --- a/sound/soc/tegra/tegra210_admaif.c +++ b/sound/soc/tegra/tegra210_admaif.c @@ -842,11 +842,9 @@ static int tegra_admaif_probe(struct platform_device *pdev) return 0; } -static int tegra_admaif_remove(struct platform_device *pdev) +static void tegra_admaif_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - - return 0; } static const struct dev_pm_ops tegra_admaif_pm_ops = { @@ -858,7 +856,7 @@ static const struct dev_pm_ops tegra_admaif_pm_ops = { static struct platform_driver tegra_admaif_driver = { .probe = tegra_admaif_probe, - .remove = tegra_admaif_remove, + .remove_new = tegra_admaif_remove, .driver = { .name = "tegra210-admaif", .of_match_table = tegra_admaif_of_match, From patchwork Wed Mar 15 15:07:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176237 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AD3B3C61DA4 for ; Wed, 15 Mar 2023 15:45:06 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0740414A4; Wed, 15 Mar 2023 16:44:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0740414A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895104; bh=5DZ4sS6m7IgbpNzhmpYuDG7oZZU4jta77aCtnCaMOuw=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=eQbT9KAYOJh/30RtlSgN+hbDzRPT7Drcu9WKzOc+iOeVeTyesMxfP/DlRvZStX1oV 3jxgvJWuAZ6qeN+HzNBF4UYwnyzO8OqporO4sysUoCx7/2/myQTf2cg1CweMIAdydJ qIYe4bHBK+fDLNUtzIJTfNxtz02yS+pOEat1WeH8= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 800A7F805DA; Wed, 15 Mar 2023 16:15:44 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7110EF80605; Wed, 15 Mar 2023 16:10:27 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5D124F8061A for ; Wed, 15 Mar 2023 16:08:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5D124F8061A Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjz-0000Tm-CO; Wed, 15 Mar 2023 16:08:35 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSju-004KfJ-On; Wed, 15 Mar 2023 16:08:30 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjt-0057lS-Ts; Wed, 15 Mar 2023 16:08:29 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Li kunyu Subject: [PATCH 150/173] ASoC: tegra: tegra210_adx: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:22 +0100 Message-Id: <20230315150745.67084-151-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1614; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=5DZ4sS6m7IgbpNzhmpYuDG7oZZU4jta77aCtnCaMOuw=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd72flUouur1pZDdxJ5BHrJTMVBG65d19+eVD U26c1/kLECJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHe9gAKCRDB/BR4rcrs CXylCACEz2RHn9L3FCYLOBfjnq2eQjxm8lzSLX4LyO97KYTa2/FakX+dKQ3grU5tz1XMbXx2lWC GSmolBoJhnIvxMW1cSGV/+XpGySBA20l0THFUAwH1I183rchmqDAaBJQqIAcm3lYQ3WnxC9G3bM ujlxpO8a+x8uX46KEutscK1Q3wM9P5arDoY0rafwYtOfvdk1eDwTTrazrV3vT8VlQcM9dyXJaG3 sFEteNVofWoOekHLc0XmfC9LXIf++jVJrAjRj/uftgkHp+/PnKZOmx24PSzU5jUUMdabyX4XPnK H8jIAF/PgM2s5JaRN4DUcmd2D3KZhgVwZrI0unVrAiWXsfOv X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: XJLVANS4ZDNL7W3SXMJVLBOM4JP3WTOE X-Message-ID-Hash: XJLVANS4ZDNL7W3SXMJVLBOM4JP3WTOE X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/tegra/tegra210_adx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra210_adx.c b/sound/soc/tegra/tegra210_adx.c index 49691d2cce50..41117c1d61fb 100644 --- a/sound/soc/tegra/tegra210_adx.c +++ b/sound/soc/tegra/tegra210_adx.c @@ -504,11 +504,9 @@ static int tegra210_adx_platform_probe(struct platform_device *pdev) return 0; } -static int tegra210_adx_platform_remove(struct platform_device *pdev) +static void tegra210_adx_platform_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - - return 0; } static const struct dev_pm_ops tegra210_adx_pm_ops = { @@ -525,7 +523,7 @@ static struct platform_driver tegra210_adx_driver = { .pm = &tegra210_adx_pm_ops, }, .probe = tegra210_adx_platform_probe, - .remove = tegra210_adx_platform_remove, + .remove_new = tegra210_adx_platform_remove, }; module_platform_driver(tegra210_adx_driver); From patchwork Wed Mar 15 15:07:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176260 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A76C3C6FD1D for ; Wed, 15 Mar 2023 15:50:38 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D646214F3; Wed, 15 Mar 2023 16:49:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D646214F3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895435; bh=+PSIk5ytlBUkrF6SL8Drk1L0HNHB7Ho/Dh/SUxPwpUA=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=P4A/5kxowj6UyKIN5F2y0ZDpKqcYpGeiujgmd2Mor7R2LKDDKIJ0CP8vnUdbQUrFV hv2mW09wnSCeFhajikS6l9y7EFk1HoPpjWTF+8v7u79SZgAdr7ogMT6dESrYsU7L10 DpivFr2zsT6/lRyMQAxsgO59Y6Wl+X4/2D6WICSE= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id B8DD5F805FB; Wed, 15 Mar 2023 16:17:00 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 07CA6F8061C; Wed, 15 Mar 2023 16:10:49 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EB770F80634 for ; Wed, 15 Mar 2023 16:08:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EB770F80634 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjz-0000UO-JE; Wed, 15 Mar 2023 16:08:35 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSju-004KfN-T2; Wed, 15 Mar 2023 16:08:30 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSju-0057lZ-4W; Wed, 15 Mar 2023 16:08:30 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Sameer Pujar Subject: [PATCH 151/173] ASoC: tegra: tegra210_ahub: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:23 +0100 Message-Id: <20230315150745.67084-152-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1605; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=+PSIk5ytlBUkrF6SL8Drk1L0HNHB7Ho/Dh/SUxPwpUA=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd75ftcPaSuLnJ9+1IvdMR8p4/+b9/mO5BFmr MosQaXvBV+JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHe+QAKCRDB/BR4rcrs CYBJB/wOwkLOw2nY3YYlL5u79nTvlbUZeyEVcksJX5FegoYVbEcVdRnQPGTMMC3Uw2724XPIZQg lrXSvMMaWx5OueJthb4/iP4HYesWanIw6vGV8WoJ4iN/ZSwRJhUP54uKg2q63EX4yO++JNnaBct 6cby1DXBd3ayURnhXPI+rW97LOK1pWt+dsX39ZRoY4V7zlQwIYdoNBpI6O9kRnFy0VDXoefI8Aw uP0nIbZbB6oXdbCfvmRyzMvRQHQ7hO6WkhTnShQOalB1ZVd1Z+VMhg3rjWZBx2PEADF61zANOIw cbV9Sdajns9et19G1kH998oQ3wlFqAgA6OzU3uUjH49dJJu0 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: PBQVPS4LNTAJVNFLIN2UR4TCMXEX2IIQ X-Message-ID-Hash: PBQVPS4LNTAJVNFLIN2UR4TCMXEX2IIQ X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/tegra/tegra210_ahub.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra210_ahub.c b/sound/soc/tegra/tegra210_ahub.c index b38d205b69cc..8c00c09eeefb 100644 --- a/sound/soc/tegra/tegra210_ahub.c +++ b/sound/soc/tegra/tegra210_ahub.c @@ -1410,11 +1410,9 @@ static int tegra_ahub_probe(struct platform_device *pdev) return 0; } -static int tegra_ahub_remove(struct platform_device *pdev) +static void tegra_ahub_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - - return 0; } static const struct dev_pm_ops tegra_ahub_pm_ops = { @@ -1426,7 +1424,7 @@ static const struct dev_pm_ops tegra_ahub_pm_ops = { static struct platform_driver tegra_ahub_driver = { .probe = tegra_ahub_probe, - .remove = tegra_ahub_remove, + .remove_new = tegra_ahub_remove, .driver = { .name = "tegra210-ahub", .of_match_table = tegra_ahub_of_match, From patchwork Wed Mar 15 15:07:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176254 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C2E6BC61DA4 for ; Wed, 15 Mar 2023 15:49:00 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B65BA1504; Wed, 15 Mar 2023 16:48:08 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B65BA1504 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895338; bh=5u2GVl8piAohwRn1rL0kfzv2Y+sIz9JntITmpaumick=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=FGYC3FD+ZP08SZ/bUnkIAn/JhKmFLSth9kFz5mIiITCtpJsq8DRkKJ5ovBAxK26yM FqMoqC4BYfYW4xNEW5y1K4uusCi1ukuZAy9dE97xa66VISwRwZp1evQU2+CNS48iDY 9PRK09QjWuwMu+Q51Yod80iQzBM3G43jnqtis6yI= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 98F86F896B4; Wed, 15 Mar 2023 16:16:38 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C213CF8056F; Wed, 15 Mar 2023 16:10:43 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EE0F4F8062D for ; Wed, 15 Mar 2023 16:08:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EE0F4F8062D Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjz-0000Uq-Q3; Wed, 15 Mar 2023 16:08:35 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjv-004KfR-1A; Wed, 15 Mar 2023 16:08:31 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSju-0057lc-Bh; Wed, 15 Mar 2023 16:08:30 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter Subject: [PATCH 152/173] ASoC: tegra: tegra210_amx: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:24 +0100 Message-Id: <20230315150745.67084-153-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1614; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=5u2GVl8piAohwRn1rL0kfzv2Y+sIz9JntITmpaumick=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd78bGMRuXdt5uF7BigHIS3o6Iq0gguPn5XDM 7XElpdHuG2JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHe/AAKCRDB/BR4rcrs CZjhB/4sADtTU7DD4lgMBqcfZ7qq6AytUW5Q++1VUp0/ShW90yjgl9uQstg6YB5coNDGAN9pH30 tzLOX9SuwmwQveQTCPy43swqCSWFX8f2e4kVtmeotPWCE7hQOfd8QZLkamw5WJ8Q8DGS6jkZFfH 95o+aouceerw6glVouxFBviip6zNtw+/gH2Jh/GK/F6plTedXuPl+RSsG1RIMbFANVOIR65wQd/ UCAgtagABNikZjq52TIE2ABme+SmVDnaheaoJPip0mGLuZ3GYBsWLHi7oouAhfRJS7a2ec5+GKK 0gRQ0iURGWPAM0c9cuMXyyl7aidR2Gzq56PAyJjxN06S0TVK X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: U7WIVFNAOGI3FAKQTHROJCJCXN6NTETZ X-Message-ID-Hash: U7WIVFNAOGI3FAKQTHROJCJCXN6NTETZ X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/tegra/tegra210_amx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra210_amx.c b/sound/soc/tegra/tegra210_amx.c index d064cc67fea6..782a141b65c0 100644 --- a/sound/soc/tegra/tegra210_amx.c +++ b/sound/soc/tegra/tegra210_amx.c @@ -573,11 +573,9 @@ static int tegra210_amx_platform_probe(struct platform_device *pdev) return 0; } -static int tegra210_amx_platform_remove(struct platform_device *pdev) +static void tegra210_amx_platform_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - - return 0; } static const struct dev_pm_ops tegra210_amx_pm_ops = { @@ -594,7 +592,7 @@ static struct platform_driver tegra210_amx_driver = { .pm = &tegra210_amx_pm_ops, }, .probe = tegra210_amx_platform_probe, - .remove = tegra210_amx_platform_remove, + .remove_new = tegra210_amx_platform_remove, }; module_platform_driver(tegra210_amx_driver); From patchwork Wed Mar 15 15:07:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176242 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5A59BC61DA4 for ; Wed, 15 Mar 2023 15:46:23 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7D34C14D3; Wed, 15 Mar 2023 16:45:31 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7D34C14D3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895181; bh=H7npmQKuV7FGBfIwn+Grey/gU+B9uuWXUrajDPKNx8Y=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=HS+LHlPW1Q9bcBu0i2ATBKIOXzIO/QYCxbjhtvz9fCtVghQlTD5mdLoMs6sLLvdI4 AzoeQKC/dWi4QgebqJCLp+FKq6H/2oOQ5Sc5GkwGrWQnoa/22b+9aWVggCCKPJLblU qvEvEC4Nqjf3FXZEAhWuU3xlhYYj3a0Q5j9LF0Tc= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7FB8DF89618; Wed, 15 Mar 2023 16:16:02 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D0EDAF8060C; Wed, 15 Mar 2023 16:10:32 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 57FCDF80563 for ; Wed, 15 Mar 2023 16:08:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 57FCDF80563 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk0-0000Vf-1t; Wed, 15 Mar 2023 16:08:36 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjv-004KfU-6D; Wed, 15 Mar 2023 16:08:31 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSju-0057lg-I5; Wed, 15 Mar 2023 16:08:30 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter Subject: [PATCH 153/173] ASoC: tegra: tegra210_dmic: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:25 +0100 Message-Id: <20230315150745.67084-154-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1574; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=H7npmQKuV7FGBfIwn+Grey/gU+B9uuWXUrajDPKNx8Y=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd7/s8KEtGhbsZDnVUjctr6uF0I8SydZgWUup nbbLP/W7TCJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHe/wAKCRDB/BR4rcrs CSWvB/4hyIl74ORJou5GCOM9Lt+LRnQFl/2pSsJukAdQwNzf85wzM5mqelEHAK9d4P9FO/KEHNk s4W1oMi921jPbeFcQd0xmWFknOMG1VAoVc5YpDKzsR2ivSE3TvYilRRuO2GWvBD5j17NCVu/t74 MNxZYevLxGK0S0q0U0NOe0hK6BFJNxP/A/vWCtU2VvcZZcsoa900GkLIP59E/HnMcDMBfBa/BfN cfvX17IENtKGdlVF6ddJMyTr4+jMSn/2rUiFmvHQHMqouBdfW6ww8DYnMCVwB8VGKsoZJOVbd9W SwRJ/Ggyx0GvQRovCA9GnkQvWzsaLeGp21tguP3zecTNm0lE X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: M37P2EUPZJNRHV34YPIYWPBZSPFWVYTO X-Message-ID-Hash: M37P2EUPZJNRHV34YPIYWPBZSPFWVYTO X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/tegra/tegra210_dmic.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra210_dmic.c b/sound/soc/tegra/tegra210_dmic.c index db95794530f4..763b206cd52b 100644 --- a/sound/soc/tegra/tegra210_dmic.c +++ b/sound/soc/tegra/tegra210_dmic.c @@ -534,11 +534,9 @@ static int tegra210_dmic_probe(struct platform_device *pdev) return 0; } -static int tegra210_dmic_remove(struct platform_device *pdev) +static void tegra210_dmic_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - - return 0; } static const struct dev_pm_ops tegra210_dmic_pm_ops = { @@ -561,7 +559,7 @@ static struct platform_driver tegra210_dmic_driver = { .pm = &tegra210_dmic_pm_ops, }, .probe = tegra210_dmic_probe, - .remove = tegra210_dmic_remove, + .remove_new = tegra210_dmic_remove, }; module_platform_driver(tegra210_dmic_driver) From patchwork Wed Mar 15 15:07:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176248 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6AF29C6FD1D for ; Wed, 15 Mar 2023 15:47:57 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7F26614C6; Wed, 15 Mar 2023 16:47:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7F26614C6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895275; bh=tH1fqkyGsGjPKdIEAp+LvjTKyjqxxpS1lexqFqgI+Z4=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=NsUOpySvWKLmMEMA2vsPeqjLJeojCPEtFFRIj24XE8pvkLcbP49agj2HbyRkpCHMA P2lU5gd/S8Nfe/f7dXYIT2gPLldwL8rG7YmQ1yO2jjamQpaP5y56hf/kMrziojXni/ qX3D2sSwwV0vHmQCXc6VLlUZXBPoCoH33aJcsFdA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 1427BF89636; Wed, 15 Mar 2023 16:16:25 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 54B02F80610; Wed, 15 Mar 2023 16:10:39 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id ED27EF80624 for ; Wed, 15 Mar 2023 16:08:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ED27EF80624 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSjz-0000WK-WA; Wed, 15 Mar 2023 16:08:36 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjv-004Kfc-Jm; Wed, 15 Mar 2023 16:08:31 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSju-0057lk-Ob; Wed, 15 Mar 2023 16:08:30 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Charles Keepax , Sameer Pujar Subject: [PATCH 154/173] ASoC: tegra: tegra210_i2s: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:26 +0100 Message-Id: <20230315150745.67084-155-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1559; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=tH1fqkyGsGjPKdIEAp+LvjTKyjqxxpS1lexqFqgI+Z4=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd8CrFXDH2jjw5yiOOFG+8tgO7EeCD77/oe3k eiD9DGU4d2JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfAgAKCRDB/BR4rcrs CXAbCACYH9ByLZqYTGX2IAl3xx9HTrah5SwbRX8IU31Rn3BosIZ3c0wxajoKuhqL+D26EfkCA8i dvI1OfJiXyUajycWo1TZESwkE75Tyu275zlWktGh8ouB9Te0FsNDDnNLtxi4XKoOLcbMuXsaBTX l7eEgeB51p+AveSf8rPnpuX7o/ygAFO/aHu7wHBhVuRvAygt6/xVP0KwuAbA+/mxp+swM5+4WY3 mmHMZXLC1XpkNTDEDpd8RJIxNYpR30sCidGLopDQAA6xq/mBRX1bL1SgyHj3PLVb7FCoRMjSxtg 25cfDrdmWsgO7eOc3/FjXQeZh15VmNgKGcBqNhq6iuW7mdEA X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: RGH6TUKZ4LZWVHWLCVOAUAY7T5MFEDXQ X-Message-ID-Hash: RGH6TUKZ4LZWVHWLCVOAUAY7T5MFEDXQ X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/tegra/tegra210_i2s.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra210_i2s.c b/sound/soc/tegra/tegra210_i2s.c index 39ffa4d76b59..21724cd3525e 100644 --- a/sound/soc/tegra/tegra210_i2s.c +++ b/sound/soc/tegra/tegra210_i2s.c @@ -931,11 +931,9 @@ static int tegra210_i2s_probe(struct platform_device *pdev) return 0; } -static int tegra210_i2s_remove(struct platform_device *pdev) +static void tegra210_i2s_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - - return 0; } static const struct dev_pm_ops tegra210_i2s_pm_ops = { @@ -958,7 +956,7 @@ static struct platform_driver tegra210_i2s_driver = { .pm = &tegra210_i2s_pm_ops, }, .probe = tegra210_i2s_probe, - .remove = tegra210_i2s_remove, + .remove_new = tegra210_i2s_remove, }; module_platform_driver(tegra210_i2s_driver) From patchwork Wed Mar 15 15:07:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176247 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F4020C6FD1D for ; Wed, 15 Mar 2023 15:47:42 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 008D114CD; Wed, 15 Mar 2023 16:46:51 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 008D114CD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895261; bh=GxII/nvZPYArJnMqJ8dAmT6txiblFGAvfzDIrAGHyUQ=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=qvunswRpgFnjXkAtcqPFuJRlZ0/z4r5S60EaocUIDvA2+ygHt1DrdsZQhP6NRnlKw i5loZas+ZP4Ts4QhaaPWz7WEd61w54FrFb4gDKV2q/zBVPIY3YH11C7QAm+m1tTSGI 6tR+dzHtqTp31TvqbIU6WB/gRkkm2ug43gscngFI= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id EF76DF805D9; Wed, 15 Mar 2023 16:16:20 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5575BF8060E; Wed, 15 Mar 2023 16:10:38 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C2F73F80622 for ; Wed, 15 Mar 2023 16:08:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C2F73F80622 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk0-0000We-Bz; Wed, 15 Mar 2023 16:08:36 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjv-004Kff-ML; Wed, 15 Mar 2023 16:08:31 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjv-0057lp-1B; Wed, 15 Mar 2023 16:08:31 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter Subject: [PATCH 155/173] ASoC: tegra: tegra210_mixer: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:27 +0100 Message-Id: <20230315150745.67084-156-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1644; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=GxII/nvZPYArJnMqJ8dAmT6txiblFGAvfzDIrAGHyUQ=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd8Flm0YyRUMtLsg0m7yMWyu57HqeulMwG9pe e8kw274WdaJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfBQAKCRDB/BR4rcrs CWz/B/43stO3XC/hA4eOJvhGYn9Wt8cL1hdiMhHF7Vo5jH1NVa7uc0mwA51nRr/LIRl9BZla/EB MZy2CN+GauiIUD7Cun4FUctYTZn8BjyGwtkKkL6zs8D71jZacXBWrB0pop1JqsR85/cYdiD5Hpl NU31V/fJPYmaw4/0dJDhunJvQ065vOEdW+JjgJuzE47JMDMia6YNNcbfxoQrci98xhNVXFIm13D p2J96qXPHycHAwYuo0a5COlNVTWmMJvybY4416mKtB+NdgEult6+5HM8uPdM87/x9P1ejvG2YXB 5Rrrd+hD7QWpudWSgmG1sW/wrnefnU6qECb137MH/EjShDFF X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: YT3NUWSPZEFHGFORGMTNYI4WJNC3NYDY X-Message-ID-Hash: YT3NUWSPZEFHGFORGMTNYI4WJNC3NYDY X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/tegra/tegra210_mixer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra210_mixer.c b/sound/soc/tegra/tegra210_mixer.c index 16e679a95658..035e9035b533 100644 --- a/sound/soc/tegra/tegra210_mixer.c +++ b/sound/soc/tegra/tegra210_mixer.c @@ -656,11 +656,9 @@ static int tegra210_mixer_platform_probe(struct platform_device *pdev) return 0; } -static int tegra210_mixer_platform_remove(struct platform_device *pdev) +static void tegra210_mixer_platform_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - - return 0; } static const struct dev_pm_ops tegra210_mixer_pm_ops = { @@ -677,7 +675,7 @@ static struct platform_driver tegra210_mixer_driver = { .pm = &tegra210_mixer_pm_ops, }, .probe = tegra210_mixer_platform_probe, - .remove = tegra210_mixer_platform_remove, + .remove_new = tegra210_mixer_platform_remove, }; module_platform_driver(tegra210_mixer_driver); From patchwork Wed Mar 15 15:07:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176264 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 526CEC6FD1D for ; Wed, 15 Mar 2023 15:51:37 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 853F91537; Wed, 15 Mar 2023 16:50:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 853F91537 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895495; bh=nl1Dnf+s5Tu8X6WGvy59dc1DShbxLRpkAp/PdK62ceg=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Lyh+gL7zbCutBWZT7CdzSyKEhmldwCiSpxmdNyexxxbpVg5LIwSS3cHuKG+VGWKpF r+NPQR05EUv1rJb1q7ZkbNNQwXUQZkFkV41aaz4DV8AX6alrAUAx9MKdW1Tatpe43M Htr0AkonMHf5OM+tscZjmH6rBovLJ5GWP8d3d5HE= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D9FD7F896FD; Wed, 15 Mar 2023 16:17:14 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 98A88F8061D; Wed, 15 Mar 2023 16:10:51 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A2D19F8063A for ; Wed, 15 Mar 2023 16:08:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A2D19F8063A Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk1-0000ZS-5u; Wed, 15 Mar 2023 16:08:37 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjw-004Kft-Ga; Wed, 15 Mar 2023 16:08:32 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjv-0057lt-7T; Wed, 15 Mar 2023 16:08:31 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter Subject: [PATCH 156/173] ASoC: tegra: tegra210_mvc: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:28 +0100 Message-Id: <20230315150745.67084-157-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1613; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=nl1Dnf+s5Tu8X6WGvy59dc1DShbxLRpkAp/PdK62ceg=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd8I1qyx9/YydUbgbj5XKT/ugSPE2nINsbyOG YbJUPCcsRWJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfCAAKCRDB/BR4rcrs CU35B/9HIlatHSmtAWe/BhRWWdFld4CvF2kVJZH72r3SAuPMcyuOUjPQ3wz0ZMnRwKNZUmXkhsd 0/UEGhqBFrjsg9MHUcF5dXODtYEC523tKTbwDWDlq623P8LNnjreIF+GQdbi/NPiLh1QBaloV1+ pznaHe7GaxfjZSp3VY4jvNT/iIG3+TFxZa2O34xeIlXlG6z6EhejgFO/lHfq90Ed+df8rVII4oQ oAMf0o9bZXd31UOx2UZcxBiIIpSBd1UvLcypceGtQXeCKlJ8jynw+GVt6EzkQ/rQ1ZL+sWvSpW4 u/igbBj5Xdy9efnHBu6Wm7ornz72SCcatOteeUtPmUcZ44yY X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: V2JTETKGAQYSLS57Z5IU2GEYA6GDK5OZ X-Message-ID-Hash: V2JTETKGAQYSLS57Z5IU2GEYA6GDK5OZ X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/tegra/tegra210_mvc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra210_mvc.c b/sound/soc/tegra/tegra210_mvc.c index 725385e17d84..44f465e11bee 100644 --- a/sound/soc/tegra/tegra210_mvc.c +++ b/sound/soc/tegra/tegra210_mvc.c @@ -748,11 +748,9 @@ static int tegra210_mvc_platform_probe(struct platform_device *pdev) return 0; } -static int tegra210_mvc_platform_remove(struct platform_device *pdev) +static void tegra210_mvc_platform_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - - return 0; } static const struct dev_pm_ops tegra210_mvc_pm_ops = { @@ -769,7 +767,7 @@ static struct platform_driver tegra210_mvc_driver = { .pm = &tegra210_mvc_pm_ops, }, .probe = tegra210_mvc_platform_probe, - .remove = tegra210_mvc_platform_remove, + .remove_new = tegra210_mvc_platform_remove, }; module_platform_driver(tegra210_mvc_driver) From patchwork Wed Mar 15 15:07:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176257 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 526AAC61DA4 for ; Wed, 15 Mar 2023 15:49:50 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5A4341506; Wed, 15 Mar 2023 16:48:58 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5A4341506 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895388; bh=UvNbuIChL43fRZbKAzAW9MXGKXGX7X94tgxcXLTFzjo=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=dou8XL2KwCR3PL9v/IVkEnQb3EQq5Tutc8YZRK4Dj+mWFT6XK7jRfQZZb4E/THEFW ZtC1zepHTWsdRnwNQq7r8kS3o66XuEEEfRRnLmMCvab2lNNU7Eipw+pRuDPnGMPjoX 9bgN940hLtk/Lwk8UdyRMKaI9Vh+AmbzVZOlABwc= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id B798FF896E3; Wed, 15 Mar 2023 16:16:48 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CA80AF80617; Wed, 15 Mar 2023 16:10:46 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BD385F8062F for ; Wed, 15 Mar 2023 16:08:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BD385F8062F Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk1-0000Y9-2p; Wed, 15 Mar 2023 16:08:37 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjw-004Kfm-71; Wed, 15 Mar 2023 16:08:32 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjv-0057lx-FC; Wed, 15 Mar 2023 16:08:31 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Sameer Pujar Subject: [PATCH 157/173] ASoC: tegra: tegra210_ope: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:29 +0100 Message-Id: <20230315150745.67084-158-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1579; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=UvNbuIChL43fRZbKAzAW9MXGKXGX7X94tgxcXLTFzjo=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd8LfHgorUhNb5QV6Hm3+5pSkCDFfBkIMp0T1 d4RU/Aw/KCJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfCwAKCRDB/BR4rcrs CZLWB/44sj6h7iefhewueAzEA0tz7Z3OWj67+60oiDCg57I796InWlyBbTiV3O237iU11ThmMuw T7jo9zoZKOoUsgn8BAQjSScSb6ny3hNqIE56KOBUaUAp+MfBIZcYsSimVxKZXpqteVWivcXkble 8kc452yqafZ9uw0DxydchR26S35KnQLfhiA8ucY+CEiNCuj0lPnGOiCs5QbP+enonDjTqwBJC15 nUKKshs8ExL7SNIuAzFvAmJ5/709rmwEaiCW/pBq0UI4/nWHbRvtEE/a6sngepOlrUbh6zpW2yy gjSxnVThjuWZ3lDEU2K5gufvuKCAsSlm7+0PV+jSpw67enct X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: NJFEGZGA72ZNMD7JODKCWRVVDVHT7V2Q X-Message-ID-Hash: NJFEGZGA72ZNMD7JODKCWRVVDVHT7V2Q X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/tegra/tegra210_ope.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra210_ope.c b/sound/soc/tegra/tegra210_ope.c index 3dd2bdec657b..98e726432615 100644 --- a/sound/soc/tegra/tegra210_ope.c +++ b/sound/soc/tegra/tegra210_ope.c @@ -347,11 +347,9 @@ static int tegra210_ope_probe(struct platform_device *pdev) return 0; } -static int tegra210_ope_remove(struct platform_device *pdev) +static void tegra210_ope_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - - return 0; } static int __maybe_unused tegra210_ope_runtime_suspend(struct device *dev) @@ -410,7 +408,7 @@ static struct platform_driver tegra210_ope_driver = { .pm = &tegra210_ope_pm_ops, }, .probe = tegra210_ope_probe, - .remove = tegra210_ope_remove, + .remove_new = tegra210_ope_remove, }; module_platform_driver(tegra210_ope_driver) From patchwork Wed Mar 15 15:07:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176249 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1E279C6FD1D for ; Wed, 15 Mar 2023 15:48:11 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4AAEF14CB; Wed, 15 Mar 2023 16:47:19 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4AAEF14CB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895289; bh=1jNQ8aJPympXQhLCELhFh5KmeCg6JpWfv4BtLrYLdDQ=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=V9JEFoNHyJeSg1ZyjvKHni/HopqpY8sX/N6Rhs4M6EpEBzwNaC5H01Qk3ahge8hsn SraoW2Siee82laZ7fyM5bpRAK5OB6QGSJLrTSQtsgeDG7X8ZPdHo2QWIlrpu3zb8i6 5Sc44DUKJ47RNNbOfSq9HUrAj5Bet1Cq9JvaFkbw= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 8910CF89670; Wed, 15 Mar 2023 16:16:27 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C7C3DF805D6; Wed, 15 Mar 2023 16:10:40 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EE3F1F8062E for ; Wed, 15 Mar 2023 16:08:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EE3F1F8062E Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk1-0000Zr-A7; Wed, 15 Mar 2023 16:08:37 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjw-004Kfx-Jl; Wed, 15 Mar 2023 16:08:32 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjv-0057m0-Lt; Wed, 15 Mar 2023 16:08:31 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter Subject: [PATCH 158/173] ASoC: tegra: tegra210_sfc: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:30 +0100 Message-Id: <20230315150745.67084-159-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1617; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=1jNQ8aJPympXQhLCELhFh5KmeCg6JpWfv4BtLrYLdDQ=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd8NLjPN00RrgDzdlkWOKpBZJmuHB1NTxvvql a/NNgFJWk2JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfDQAKCRDB/BR4rcrs CTDjCACHm0bdm7GeG2Lsex/bibW6ivK9oqmAadyxTpC54qiu8Y3f+gvdtlzLm3rj6B1fdYisLm7 ALZoLSGAwKnZg6ijyikzVaMhoKAVfpHlfT5eYatjiKVKqha9hNnvwU7W/YkxLbvYAr2Vn5Gf09i rj+pzKUY1eOrFKjlqSSi0txzCnnTK8xO6pz/WMhJralQFNL9GG4CZVStIp2L/8TEHySLj8di3oN QtOmfM5FyAZ3+Ixo5PAXxCcDVrfqbvG9taklflwOdELZXsTUA6HdFNGvUF6jyqv028S4AdR2LBF 7d7bTAYi6HMAPAhgDSytAmbLts/RTeUR/9p46UlLPhhSr1N/ X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: TB7SZLT7BRF3AP2VOGKXUU2EYIIPV3FI X-Message-ID-Hash: TB7SZLT7BRF3AP2VOGKXUU2EYIIPV3FI X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/tegra/tegra210_sfc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra210_sfc.c b/sound/soc/tegra/tegra210_sfc.c index 368f077e7bee..e9df1ffc8a58 100644 --- a/sound/soc/tegra/tegra210_sfc.c +++ b/sound/soc/tegra/tegra210_sfc.c @@ -3584,11 +3584,9 @@ static int tegra210_sfc_platform_probe(struct platform_device *pdev) return 0; } -static int tegra210_sfc_platform_remove(struct platform_device *pdev) +static void tegra210_sfc_platform_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - - return 0; } static const struct dev_pm_ops tegra210_sfc_pm_ops = { @@ -3605,7 +3603,7 @@ static struct platform_driver tegra210_sfc_driver = { .pm = &tegra210_sfc_pm_ops, }, .probe = tegra210_sfc_platform_probe, - .remove = tegra210_sfc_platform_remove, + .remove_new = tegra210_sfc_platform_remove, }; module_platform_driver(tegra210_sfc_driver) From patchwork Wed Mar 15 15:07:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176244 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7723AC61DA4 for ; Wed, 15 Mar 2023 15:46:54 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5B75414E2; Wed, 15 Mar 2023 16:46:02 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5B75414E2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895212; bh=mG2xnGK54c3gkW/J424fJ+pvT7zOveXy6saMBndeJ+c=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=TuqO5aqFM9AUIv0whfcMOu11NbBHEdgadcDRyq5alSQKzxg8KfBR6h33OX2q1gYj3 TsQIue6oSiQ46jJH+VAfbuF9LiRA+JsH8Mq/X6VC1GpqgCRFzE2m0wvUUhGGR0Ptq+ McORLJX8T+MSxTIj5FrtnaFQ3dA3tf3mmRqppXNk= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 51161F89626; Wed, 15 Mar 2023 16:16:10 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 22750F8060D; Wed, 15 Mar 2023 16:10:35 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A8922F8055B for ; Wed, 15 Mar 2023 16:08:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A8922F8055B Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk1-0000ag-MD; Wed, 15 Mar 2023 16:08:37 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjw-004Kg2-PG; Wed, 15 Mar 2023 16:08:32 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjv-0057m5-SY; Wed, 15 Mar 2023 16:08:31 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter Subject: [PATCH 159/173] ASoC: tegra: tegra30_ahub: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:31 +0100 Message-Id: <20230315150745.67084-160-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1631; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=mG2xnGK54c3gkW/J424fJ+pvT7zOveXy6saMBndeJ+c=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd8QzEiiU8opy8RYp3fNcee8lJIQ5bdkDGkZY XU1XbYXPCaJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfEAAKCRDB/BR4rcrs CcfnB/9KJz1M50Tu4usZY4MPTUlYp5yhkvN4jpmmLVx/uANQWiFIOMdPMzoBDo8FkEEQG3mpl6W 5UwOA3vLyS8gg0LIJssUu7GfJPQi5dq1eGPPQaoCy7dnlGIIItcms0GnfcBlSqAuH7mNbJdzoGW ClzbzwehwCBfzpJyh1CfSdnVaOAgqsmCdXyomKaYuxHaRAAu+oHWMuClsYVXavoN/HfrYr2B+/F BF9fKQxoFvpFm0DEj2hlquDhY+nAOfr5ltn1rBQjOcvpjOY/zxzVxaAk2N0DrBnGlGD+ZPst2LA caEvF24AqoEZ7vvB171AbB+AzKffwDO1R4J1zsTTQpPTWbwq X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 5I3774XKQJX2NLZBRU2QPXYA77PL4EWO X-Message-ID-Hash: 5I3774XKQJX2NLZBRU2QPXYA77PL4EWO X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/tegra/tegra30_ahub.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c index ef011a488ceb..d2e8078e444a 100644 --- a/sound/soc/tegra/tegra30_ahub.c +++ b/sound/soc/tegra/tegra30_ahub.c @@ -592,13 +592,11 @@ static int tegra30_ahub_probe(struct platform_device *pdev) return ret; } -static int tegra30_ahub_remove(struct platform_device *pdev) +static void tegra30_ahub_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); ahub = NULL; - - return 0; } static const struct dev_pm_ops tegra30_ahub_pm_ops = { @@ -610,7 +608,7 @@ static const struct dev_pm_ops tegra30_ahub_pm_ops = { static struct platform_driver tegra30_ahub_driver = { .probe = tegra30_ahub_probe, - .remove = tegra30_ahub_remove, + .remove_new = tegra30_ahub_remove, .driver = { .name = DRV_NAME, .of_match_table = tegra30_ahub_of_match, From patchwork Wed Mar 15 15:07:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176263 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AE06EC6FD1D for ; Wed, 15 Mar 2023 15:51:26 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 776801501; Wed, 15 Mar 2023 16:50:34 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 776801501 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895484; bh=npBJMPd3IFeWZFw0WkTbfz9os/Z46EIM0Dsc9zyKoEo=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=qD3tPgw27ZoPD5qKFCEpC+rgSprJrGpdrtv3YIeHV9pSfXx8FHbmTHDwRnRFN96Jm LHXXszykmqaOh9wWv+/B1YKphoxH4G7crFgNYZn/lTxngcN6jYPx4awDvm2LsB/eLp zeaO8DJcttIToq+ykbWjzPAPCQ9Spu8B1GoDPN5c= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 531FEF896F4; Wed, 15 Mar 2023 16:17:11 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D7027F8061D; Wed, 15 Mar 2023 16:10:50 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3FF18F80636 for ; Wed, 15 Mar 2023 16:08:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3FF18F80636 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk1-0000ah-Hw; Wed, 15 Mar 2023 16:08:37 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjw-004Kg5-Rv; Wed, 15 Mar 2023 16:08:32 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjw-0057m8-4M; Wed, 15 Mar 2023 16:08:32 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Charles Keepax , Kuninori Morimoto Subject: [PATCH 160/173] ASoC: tegra: tegra30_i2s: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:32 +0100 Message-Id: <20230315150745.67084-161-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1808; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=npBJMPd3IFeWZFw0WkTbfz9os/Z46EIM0Dsc9zyKoEo=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd8Ti2G4wbakGgEtihBPjmugkWwkKXSQtqDCk gtXHKxegUeJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfEwAKCRDB/BR4rcrs CRKmB/4zzZYENZeLkiEmNQ/tWNBLGlzJTux70yldsVkvTjOtwfuDuGhmhWvJ1IAx3uanyZTTcJn mmtD4oclm8qlAKKHNi4Pe8igjXQYjWsyZbL6nzBdReUCerq8FNyulQE4Q1K7SqcV4z4migwTtio Az7o68D5zrAbdoLm+soq9+m8EO7IrUzHRO3qwaEymYItoY7eco28JdDpYPiMUvVbcFtcV6jiIqX kQ0He3B9qx0SC1kVTDZ8HSHr+RkQSh8EyBWOPy7ia0+8NRINC1GFlUhCVsUMpClO0EZZWuuXwFa C6ILHMUlwMdx5r20RWOVxDZW1QIFt+9+UI9dU1JuZn3ZJTSm X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 7ZTSMYKITSZW2WCJOQYCH2LVNRKKL5LK X-Message-ID-Hash: 7ZTSMYKITSZW2WCJOQYCH2LVNRKKL5LK X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/tegra/tegra30_i2s.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c index c26f960c6afd..644280603095 100644 --- a/sound/soc/tegra/tegra30_i2s.c +++ b/sound/soc/tegra/tegra30_i2s.c @@ -531,7 +531,7 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev) return ret; } -static int tegra30_i2s_platform_remove(struct platform_device *pdev) +static void tegra30_i2s_platform_remove(struct platform_device *pdev) { struct tegra30_i2s *i2s = dev_get_drvdata(&pdev->dev); @@ -545,8 +545,6 @@ static int tegra30_i2s_platform_remove(struct platform_device *pdev) tegra30_ahub_free_tx_fifo(i2s->playback_fifo_cif); pm_runtime_disable(&pdev->dev); - - return 0; } static const struct dev_pm_ops tegra30_i2s_pm_ops = { @@ -563,7 +561,7 @@ static struct platform_driver tegra30_i2s_driver = { .pm = &tegra30_i2s_pm_ops, }, .probe = tegra30_i2s_platform_probe, - .remove = tegra30_i2s_platform_remove, + .remove_new = tegra30_i2s_platform_remove, }; module_platform_driver(tegra30_i2s_driver); From patchwork Wed Mar 15 15:07:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176225 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 95706C61DA4 for ; Wed, 15 Mar 2023 15:43:15 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 78C491493; Wed, 15 Mar 2023 16:42:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 78C491493 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894993; bh=IWEC0yBSir1p8qLKOBT9FidNS5hMJamm+O1rxQxC9OA=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=cZL8SqVdBJqQuwYf0Gf1a80jE4uvBQVsPd85icU+7YKNm3KpQfikNlNep7lg136ck 5P+SYBcsx/Xbcs4xhwVEgUcLr5fKsijAaa5bNvUa533uh3LsWP2JQANyDtotxqDqUX 0B6AiCavPv5G02Gu1XBz4DQI5r+G7N6W4vFLpp2I= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 3C413F80C7C; Wed, 15 Mar 2023 16:15:20 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 294A3F805C8; Wed, 15 Mar 2023 16:10:22 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CDB20F8060F for ; Wed, 15 Mar 2023 16:08:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CDB20F8060F Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk1-0000bj-KK; Wed, 15 Mar 2023 16:08:37 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjx-004KgA-3w; Wed, 15 Mar 2023 16:08:33 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjw-0057mB-AV; Wed, 15 Mar 2023 16:08:32 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Peter Ujfalusi , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 161/173] ASoC: ti: ams-delta: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:33 +0100 Message-Id: <20230315150745.67084-162-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1635; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=IWEC0yBSir1p8qLKOBT9FidNS5hMJamm+O1rxQxC9OA=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd8XZP699FFbBIAId68Sk+l4Yao4RLvfeFXqE y2rNfu6T+2JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfFwAKCRDB/BR4rcrs CTxNB/9hJ4vWL80nqJCPeBG4rsxn+2TIHM/DZiDvaakY7D5b8oUsmEKnX2/d0BkXMyKXSizMov/ KLtw9DJMmL5qNWCL3Rz+WQn4rXH2plJVosaJ2sNsYVVaEDC4RXNEw0FpEODtj+jQfZQDj6ScEs/ cDbrv2Gfowoz0RBGtXm9aBFby8rTnWwxPp73DPGNTpUl/kKC3TUFQH3uJ0rbT32/GX8NyuHPQPc YF2BXn5B034MbI9mMEP7i6Y/YgasehuwHIhppsvOTXYPoaycMlxCFhUReG7HEKlVA8aerdCrZ0o m/Lcf0DMfP9E7a/MS8Ss7B+Z9vBtwdI6+MhqX9OCik+x8dzs X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: XX2HHN2ZRALMFTN6CUMHSFV6QWGE7QOR X-Message-ID-Hash: XX2HHN2ZRALMFTN6CUMHSFV6QWGE7QOR X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/ti/ams-delta.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/ti/ams-delta.c b/sound/soc/ti/ams-delta.c index 438e2fa843a0..1028b5efcfff 100644 --- a/sound/soc/ti/ams-delta.c +++ b/sound/soc/ti/ams-delta.c @@ -578,7 +578,7 @@ static int ams_delta_probe(struct platform_device *pdev) return 0; } -static int ams_delta_remove(struct platform_device *pdev) +static void ams_delta_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); @@ -586,7 +586,6 @@ static int ams_delta_remove(struct platform_device *pdev) snd_soc_unregister_card(card); card->dev = NULL; - return 0; } #define DRV_NAME "ams-delta-audio" @@ -596,7 +595,7 @@ static struct platform_driver ams_delta_driver = { .name = DRV_NAME, }, .probe = ams_delta_probe, - .remove = ams_delta_remove, + .remove_new = ams_delta_remove, }; module_platform_driver(ams_delta_driver); From patchwork Wed Mar 15 15:07:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176239 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A75D2C6FD1D for ; Wed, 15 Mar 2023 15:45:37 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9448214C7; Wed, 15 Mar 2023 16:44:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9448214C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895135; bh=y/s+RRoA2IiAk/qyLVImOQ6TSqGIvVfLce0AoF6FbqQ=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=nWT8un+K0bV9raJv7seRciY5joTEwU2CM4rGRDT8NF/4we3BWwu47sOfSJXtJ9uih jdrJ+isNLUGqOKE2OIj0v1R5DVuh3/0wGdpkW69fKxwM6s2JP9ykQzw+vioqHzXfJt m7bs/DbjCCyipS2++RIDkX7AgpVWeUucoOSbwPb0= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D3472F80551; Wed, 15 Mar 2023 16:15:51 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B82BEF80606; Wed, 15 Mar 2023 16:10:29 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5D30CF8061B for ; Wed, 15 Mar 2023 16:08:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5D30CF8061B Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk2-0000d1-Ct; Wed, 15 Mar 2023 16:08:38 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjx-004KgE-Cz; Wed, 15 Mar 2023 16:08:33 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjw-0057mF-Hh; Wed, 15 Mar 2023 16:08:32 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Peter Ujfalusi , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 162/173] ASoC: ti: davinci-i2s: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:34 +0100 Message-Id: <20230315150745.67084-163-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1792; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=y/s+RRoA2IiAk/qyLVImOQ6TSqGIvVfLce0AoF6FbqQ=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd8aELTIIycaswGYsemJwIzY2TVJCmiOeBpYm x6VAiawVTWJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfGgAKCRDB/BR4rcrs CTVoB/9adcFk9dtHDBrA7ZTOfzMQPXugAjad18hSdgxJzJSio1NLB5kSNBOFEmYJFYz78GHD2mg 4jTHZU6Uw98WHXkCYZCuz9UOccubVIfuX5nTrbP4IJpFRwGQD0KhAmHUT8/jpXuAEhXWa05yTg7 6WWWVDEEHwcVn88kfrk6Dt3zirhpQ6f+vPIfnj+A9AwNvx1OoXI208kg2Nc36RcfThu5f5CGik0 UsM86EfaRRq2NutoitK+JRidweHRQAZiPuv29UEd2nmVlDjpfPSMEDWLecGnVmncxnDWl9A3mJF XawHK3Kk4wvfV4oUUopi1Hh1yLLy/hQziRZl11ErJiIQUIRF X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: DBL6BOD4SO2K4NM57S4UKT544MYQXO5J X-Message-ID-Hash: DBL6BOD4SO2K4NM57S4UKT544MYQXO5J X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/ti/davinci-i2s.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/ti/davinci-i2s.c b/sound/soc/ti/davinci-i2s.c index 3ccd0cfca008..97dd1634b6be 100644 --- a/sound/soc/ti/davinci-i2s.c +++ b/sound/soc/ti/davinci-i2s.c @@ -739,7 +739,7 @@ static int davinci_i2s_probe(struct platform_device *pdev) return ret; } -static int davinci_i2s_remove(struct platform_device *pdev) +static void davinci_i2s_remove(struct platform_device *pdev) { struct davinci_mcbsp_dev *dev = dev_get_drvdata(&pdev->dev); @@ -748,8 +748,6 @@ static int davinci_i2s_remove(struct platform_device *pdev) clk_disable(dev->clk); clk_put(dev->clk); dev->clk = NULL; - - return 0; } static const struct of_device_id davinci_i2s_match[] __maybe_unused = { @@ -760,7 +758,7 @@ MODULE_DEVICE_TABLE(of, davinci_i2s_match); static struct platform_driver davinci_mcbsp_driver = { .probe = davinci_i2s_probe, - .remove = davinci_i2s_remove, + .remove_new = davinci_i2s_remove, .driver = { .name = "davinci-mcbsp", .of_match_table = of_match_ptr(davinci_i2s_match), From patchwork Wed Mar 15 15:07:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176232 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1A39DC6FD1D for ; Wed, 15 Mar 2023 15:43:47 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E1E1113FC; Wed, 15 Mar 2023 16:42:54 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E1E1113FC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895025; bh=353bY49l/dkMVarksV1RC/m/kOWxhIRbESGYmQm3iVE=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=TshbRWhNAYcbeRIEVMFj6YIULl3npQ0KzNOlmvUfli4Slc+vc60qS2robRlqPywtK x2dnkQUQ3O1YrmTnqX1A2Afj0WIaCf5JHXbtnDwM+wsxfpPrm7Vkb2CgR0Kj8NLeUz f0ZBjkVlLwqdQJYGTD/tmQur+jkUWUOgkLnLEju4= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 43AFFF80C8C; Wed, 15 Mar 2023 16:15:26 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8F050F8055C; Wed, 15 Mar 2023 16:10:23 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5A370F80549 for ; Wed, 15 Mar 2023 16:08:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5A370F80549 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk2-0000ea-EJ; Wed, 15 Mar 2023 16:08:38 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjx-004KgJ-Of; Wed, 15 Mar 2023 16:08:33 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjw-0057mK-NY; Wed, 15 Mar 2023 16:08:32 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Peter Ujfalusi , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 163/173] ASoC: ti: davinci-mcasp: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:35 +0100 Message-Id: <20230315150745.67084-164-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1577; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=353bY49l/dkMVarksV1RC/m/kOWxhIRbESGYmQm3iVE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd8cVkLE5YE5+//JlJ/MR3AVlZGs5ari7NBA/ cPwh2Q9WiKJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfHAAKCRDB/BR4rcrs CWZcB/97T91Bl01ybJa1gwrpUzDin2qTQaLEJIvJnQoRtF6kvoU2eqnpM52lknDxs37oCuW6Lgs OIxR/52deRldZYcZ5BXgBPM6JesXxuc6U4ep2nApY4laZOvZ5jLZB/Txd7Y2Ip4gKHRwoCxzDDF PK1tuD6Wx7ynItpSsxeaPTDMatv3kWRuaaeFMMvrh0cA7s5vIwDrV33w8D6VUn4oljpAJgQ3I00 YqKEGYyBxGMzKVR8ioaHFYM9Psl1Vn6VtYWDekzQjWJtCZrh5oIhqHCEatosqghgKnrhn8hoUt0 +5tTHTtGurS/YMtedA8IDQTCzPQwNlp2J2cw005PuXWjiXKq X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 4FQGS5IQKRUU4NA7EZPTCOPYA6PT47NP X-Message-ID-Hash: 4FQGS5IQKRUU4NA7EZPTCOPYA6PT47NP X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/ti/davinci-mcasp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/ti/davinci-mcasp.c b/sound/soc/ti/davinci-mcasp.c index 578254549d2d..c0892be2992b 100644 --- a/sound/soc/ti/davinci-mcasp.c +++ b/sound/soc/ti/davinci-mcasp.c @@ -2461,11 +2461,9 @@ static int davinci_mcasp_probe(struct platform_device *pdev) return ret; } -static int davinci_mcasp_remove(struct platform_device *pdev) +static void davinci_mcasp_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); - - return 0; } #ifdef CONFIG_PM @@ -2531,7 +2529,7 @@ static const struct dev_pm_ops davinci_mcasp_pm_ops = { static struct platform_driver davinci_mcasp_driver = { .probe = davinci_mcasp_probe, - .remove = davinci_mcasp_remove, + .remove_new = davinci_mcasp_remove, .driver = { .name = "davinci-mcasp", .pm = &davinci_mcasp_pm_ops, From patchwork Wed Mar 15 15:07:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176238 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4DF5BC61DA4 for ; Wed, 15 Mar 2023 15:45:17 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2D0C514A0; Wed, 15 Mar 2023 16:44:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2D0C514A0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895115; bh=V0X26gJA4wFzkbA0wVMc+KOS97dbQ5KaT5HYnQz7Yes=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=HsQMv+v60jTsTQZaU9ntT3rGEkEFaycK9UYDaa0dmHlcEkCgjo4PV3cVmCom5+J8Q OfJJayyK+5gzBzRI1tqnus+VDGBY9enVIdpz7HUuHp/wqwBInfB0wcf5OCdM+zr5cT 718oAvNtIJ3XR2rHlcwrn6tdAgn1eDYQQdilwDjo= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id BBFF8F80CB4; Wed, 15 Mar 2023 16:15:49 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A8902F80605; Wed, 15 Mar 2023 16:10:28 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5E6E8F8061D for ; Wed, 15 Mar 2023 16:08:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5E6E8F8061D Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk2-0000ff-PP; Wed, 15 Mar 2023 16:08:38 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjy-004KgQ-3r; Wed, 15 Mar 2023 16:08:34 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjx-0057mP-14; Wed, 15 Mar 2023 16:08:33 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Peter Ujfalusi , Jarkko Nikula , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 164/173] ASoC: ti: omap-hdmi: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:36 +0100 Message-Id: <20230315150745.67084-165-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1594; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=V0X26gJA4wFzkbA0wVMc+KOS97dbQ5KaT5HYnQz7Yes=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd8ffnN4csMffKpvTJmawfvjum6ywVroUtKwY nYHlYnYQNyJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfHwAKCRDB/BR4rcrs CZsBB/40yGC+w/7LyF5TMCuOJCVAy5ZnJe74VRiuUFKZBhNocxZRlwTgleVmNh0x/Oun7q/FlmO PzQjHdNit00S4w8bqUt/MzQYvj8HcgviY9qlfCJTzpgDUuWBIaaIn1mipAwEVvkCUPqyZKCIr7z 2pqh5IERRoF2dcNhUYeOc2nEaOKmGyPbt4IbJskPbra8Gr85U/4eUyEi4uz0xKAClVI4k8HxYkK G6DZS/WaY/J7SfeY6PLQXqehSp74u2a/2HTX8uhyZp/3afYOFbvkREt49VEasWCE1WBg7tkq7Od FJKbHeljSBMLvzFCUgGPwgp5JvdfD9/8iSe5WVcuFtzy3QM7 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 2XRVVYX7267HQN6GNLTZPFTV4IVJAQMD X-Message-ID-Hash: 2XRVVYX7267HQN6GNLTZPFTV4IVJAQMD X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/ti/omap-hdmi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/ti/omap-hdmi.c b/sound/soc/ti/omap-hdmi.c index 0dc0475670ff..ad37785e05d8 100644 --- a/sound/soc/ti/omap-hdmi.c +++ b/sound/soc/ti/omap-hdmi.c @@ -398,12 +398,11 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev) return 0; } -static int omap_hdmi_audio_remove(struct platform_device *pdev) +static void omap_hdmi_audio_remove(struct platform_device *pdev) { struct hdmi_audio_data *ad = platform_get_drvdata(pdev); snd_soc_unregister_card(ad->card); - return 0; } static struct platform_driver hdmi_audio_driver = { @@ -411,7 +410,7 @@ static struct platform_driver hdmi_audio_driver = { .name = DRV_NAME, }, .probe = omap_hdmi_audio_probe, - .remove = omap_hdmi_audio_remove, + .remove_new = omap_hdmi_audio_remove, }; module_platform_driver(hdmi_audio_driver); From patchwork Wed Mar 15 15:07:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176243 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2922C6FD1D for ; Wed, 15 Mar 2023 15:46:36 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A6E5214C3; Wed, 15 Mar 2023 16:45:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A6E5214C3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895194; bh=yQ1XknE7p/oS0I51vfo/7IP5cM3Kt4RKihMsAPvgXlE=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=WQQogxr/DzG0N0co4nedwN8n76mytgdg4fG9NyRFG6BFEAKD45uhw5XMJJ4pgASwW 16vKTOg0KLYny4il2yQMvE9IoY3DZfQ8mlvNlb5J7UDIg3lesoS0KF8OtS0AXDPy64 YZ/RAnAtC71WCp7WoLOVCYOWivvk/Pw+ke0ef3TY= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D41C2F805F2; Wed, 15 Mar 2023 16:16:07 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 43A65F8060D; Wed, 15 Mar 2023 16:10:34 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 86A5AF80618 for ; Wed, 15 Mar 2023 16:08:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 86A5AF80618 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk2-0000fs-Vt; Wed, 15 Mar 2023 16:08:39 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjy-004KgW-6R; Wed, 15 Mar 2023 16:08:34 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjx-0057mT-7l; Wed, 15 Mar 2023 16:08:33 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Peter Ujfalusi , Jarkko Nikula , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 165/173] ASoC: ti: omap-mcbsp: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:37 +0100 Message-Id: <20230315150745.67084-166-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1765; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=yQ1XknE7p/oS0I51vfo/7IP5cM3Kt4RKihMsAPvgXlE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd8i5hZgl/LPMPfwcVicdJ8HTUmWFXV4yF7BL OSHTizjW6SJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfIgAKCRDB/BR4rcrs CXqFB/978lG52XAHzVPu6/6/f3RL3WSKChwa1atrIcEoXEKPt06SeGCFjLJv1k1iUs4YPKt1GIb hA/gf/SP3bbxNBEW8RaW1DC8hP53b1P471W5a+9ODpmCMmdAvectApnLBHmPUGRHbc+gkWEuyxg p7qxfbo+jZVzjDR6+/DmcwrT1CH7UYPvckiiwbtFo2y4miBufONFu/verwYybQTh9ZGF4iWwzm5 Vnr4j7bXSExqvX+eaYs4aG6DmgmGGvAHeKb8EHMX01fDuMdieHIH7iCKd7yptaUbYvsxuUC/5lK zpK0gRtoYU6/lu5gxUO4T8hdXN3MxBQbCNKiw0uqZBLfVJIy X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 6OB43CZ5GFGVM4BYPSRA2YK3ZGGUAQQ5 X-Message-ID-Hash: 6OB43CZ5GFGVM4BYPSRA2YK3ZGGUAQQ5 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/ti/omap-mcbsp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/ti/omap-mcbsp.c b/sound/soc/ti/omap-mcbsp.c index 7c539a41a6a3..21fa7b978799 100644 --- a/sound/soc/ti/omap-mcbsp.c +++ b/sound/soc/ti/omap-mcbsp.c @@ -1412,7 +1412,7 @@ static int asoc_mcbsp_probe(struct platform_device *pdev) return sdma_pcm_platform_register(&pdev->dev, "tx", "rx"); } -static int asoc_mcbsp_remove(struct platform_device *pdev) +static void asoc_mcbsp_remove(struct platform_device *pdev) { struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev); @@ -1421,8 +1421,6 @@ static int asoc_mcbsp_remove(struct platform_device *pdev) if (cpu_latency_qos_request_active(&mcbsp->pm_qos_req)) cpu_latency_qos_remove_request(&mcbsp->pm_qos_req); - - return 0; } static struct platform_driver asoc_mcbsp_driver = { @@ -1432,7 +1430,7 @@ static struct platform_driver asoc_mcbsp_driver = { }, .probe = asoc_mcbsp_probe, - .remove = asoc_mcbsp_remove, + .remove_new = asoc_mcbsp_remove, }; module_platform_driver(asoc_mcbsp_driver); From patchwork Wed Mar 15 15:07:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176269 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5C14CC61DA4 for ; Wed, 15 Mar 2023 15:52:57 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 93D3A154D; Wed, 15 Mar 2023 16:52:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 93D3A154D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895575; bh=WZ8I8STy0TMDHcAzpHBVyydFLTJ4lvqUYa9qvIpRpoo=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=PkaXgtpvDV6WoO5m8JT74vg5NnTm2Foh7xmO956R3akyKR23fPEF1tWRvIOkFbdyv jHlrGZimRcYMWZlLBGvypC7/3hh8Bsf20mdYLB632euVYcMQGFoPZTpkvT80/7ZLz6 i1Yx71+ZpS+i1MdefV57Yr0cRHSj/PKzMFJiYlkU= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 73D97F89712; Wed, 15 Mar 2023 16:17:36 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6CF0FF8061F; Wed, 15 Mar 2023 16:10:56 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 76A3AF80568 for ; Wed, 15 Mar 2023 16:08:50 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 76A3AF80568 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk4-0000gh-7s; Wed, 15 Mar 2023 16:08:40 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjy-004KgZ-C0; Wed, 15 Mar 2023 16:08:34 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjx-0057mW-En; Wed, 15 Mar 2023 16:08:33 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Kunihiko Hayashi , Masami Hiramatsu , Charles Keepax Subject: [PATCH 166/173] ASoC: uniphier: evea: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:38 +0100 Message-Id: <20230315150745.67084-167-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1697; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=WZ8I8STy0TMDHcAzpHBVyydFLTJ4lvqUYa9qvIpRpoo=; b=owGbwMvMwMV48I9IxdpTbzgZT6slMaQI3lf9K2Z4SrsrxyLrS7wY593NDgUxqydNmidXcGTbX B3ZwxeFOxmNWRgYuRhkxRRZ6oq0xCZIrPlvV7KEG2YQKxPIFAYuTgGYyK1D7H9F7maJqHt4lbda tB29yiJ65pe3n9IXe6HnB5lnBr3y+WnSlJP+4K3WtQ/fDTeHVtdJqLK+LGLRztgkKF+ybM2+qOf hP7wU98+Yu/rIwp8z/PQ2aiWmLIl1+t3c+cGmgl/Q7ozptgCH+Qs7BRRCo7taH/XKGBW7uvp3hn 35+N5B3vRjUc/X+AfBn7fHBmu8+Ly/6ni7wpeSidHfrOYaqXh8vGCh2OHodDCHqSPKjuu/9IHgz 5x33zzeXLD0bB9rgkLwiufR5Rl5KyVO2tY5uivo3dORlbvg8WfVi6nrv6fyiKZLzM47v0o0vYZX mLM/qqqNdelbXv2YqkeHnkjliOtOMn3YtZozLsxO12EDAA== X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: RMBBLEB4SCBSABKK4ROPX5E4A3BBTUBZ X-Message-ID-Hash: RMBBLEB4SCBSABKK4ROPX5E4A3BBTUBZ X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/uniphier/evea.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/uniphier/evea.c b/sound/soc/uniphier/evea.c index 42403ae8e31b..d90b3e4b0104 100644 --- a/sound/soc/uniphier/evea.c +++ b/sound/soc/uniphier/evea.c @@ -536,7 +536,7 @@ static int evea_probe(struct platform_device *pdev) return ret; } -static int evea_remove(struct platform_device *pdev) +static void evea_remove(struct platform_device *pdev) { struct evea_priv *evea = platform_get_drvdata(pdev); @@ -546,8 +546,6 @@ static int evea_remove(struct platform_device *pdev) clk_disable_unprepare(evea->clk_exiv); clk_disable_unprepare(evea->clk); - - return 0; } static const struct of_device_id evea_of_match[] __maybe_unused = { @@ -562,7 +560,7 @@ static struct platform_driver evea_codec_driver = { .of_match_table = of_match_ptr(evea_of_match), }, .probe = evea_probe, - .remove = evea_remove, + .remove_new = evea_remove, }; module_platform_driver(evea_codec_driver); From patchwork Wed Mar 15 15:07:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176270 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6D863C61DA4 for ; Wed, 15 Mar 2023 15:53:16 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 08ADB1515; Wed, 15 Mar 2023 16:52:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 08ADB1515 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895594; bh=JddAPObZ84lwySN6Be3w4pNO4/DsN0onY+NRjxyszl0=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=b+EwcucjFIUZnOIstkgBEa8ULInhziO2t1QeC7bK1sqVior6uH0qQ6AvN1ax0pvxp 6sBSXLQh6NmI522kEjJJA17QV9aCfkV0OfZltiKoQ3LA0QrAk3+T/d4pvJKJyA1ThA erxUSfWdN7TeUQbAHRPXkZjJONZGlVOed4gYhXnc= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 0E128F805F7; Wed, 15 Mar 2023 16:17:43 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5AD8CF8061F; Wed, 15 Mar 2023 16:10:57 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 750B2F80640 for ; Wed, 15 Mar 2023 16:08:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 750B2F80640 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk3-0000gi-07; Wed, 15 Mar 2023 16:08:39 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjy-004Kga-Cc; Wed, 15 Mar 2023 16:08:34 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjx-0057ma-M9; Wed, 15 Mar 2023 16:08:33 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Christophe JAILLET , Arnd Bergmann , Linus Walleij Subject: [PATCH 167/173] ASoC: ux500: mop500: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:39 +0100 Message-Id: <20230315150745.67084-168-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1709; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=JddAPObZ84lwySN6Be3w4pNO4/DsN0onY+NRjxyszl0=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd8oxZgTckAsvrIqJC2Ne2tiMQ5DnLRpOT5VV nE+ssE9YIeJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfKAAKCRDB/BR4rcrs CQxWCACM94onzu8df0Gu/DJs9+jzthDtmUGfb7Wj7m2+hLF28Fmc2Qu+YOTyOdC6ZjD1nZsn3d+ dxfC6WQw2DFPWV4J4EVD3Wd/Y3kNvoX0tyUHrbZ3rg4ist/d6NXlmYPoRH+65NtB62hbIdp8kho +ZLKTpl3EfwFhzWfyX3WlYXfqVMPG69RftSbIspGPqYlrJEuHzCq0DHflOn2hywEV3UTi8DPz4+ MTvMsKzYfi03ZhedRXDL4ld4crUiPXJYf8u8EcwMN6/GJ+J3zc+WH4uFXjAtsUXXcM47vUi3smB x0UVRRtRY8o1XjomwXVSJl3HEtrJRnoZw+nvGguY9TrvqhpL X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: E2ODFTITJW5MOFSLRDKQFSLENLOBKFSW X-Message-ID-Hash: E2ODFTITJW5MOFSLRDKQFSLENLOBKFSW X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Linus Walleij --- sound/soc/ux500/mop500.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/ux500/mop500.c b/sound/soc/ux500/mop500.c index 325e75e96136..e0ab4534fe3e 100644 --- a/sound/soc/ux500/mop500.c +++ b/sound/soc/ux500/mop500.c @@ -134,7 +134,7 @@ static int mop500_probe(struct platform_device *pdev) return ret; } -static int mop500_remove(struct platform_device *pdev) +static void mop500_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); @@ -143,8 +143,6 @@ static int mop500_remove(struct platform_device *pdev) snd_soc_unregister_card(card); mop500_ab8500_remove(card); mop500_of_node_put(); - - return 0; } static const struct of_device_id snd_soc_mop500_match[] = { @@ -159,7 +157,7 @@ static struct platform_driver snd_soc_mop500_driver = { .of_match_table = snd_soc_mop500_match, }, .probe = mop500_probe, - .remove = mop500_remove, + .remove_new = mop500_remove, }; module_platform_driver(snd_soc_mop500_driver); From patchwork Wed Mar 15 15:07:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176268 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1EDB3C6FD1D for ; Wed, 15 Mar 2023 15:52:52 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 25B6F1540; Wed, 15 Mar 2023 16:52:00 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 25B6F1540 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895570; bh=7USvU135cOdMfZxPZX1uoGBaB77bhxDQ+YQtX09M9NA=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=gNMREdN/hTDoLKAfa1s1D3o4hwi2CKCLlTCvSaXs6FufjiSIRQZS3gfanh5SgKP5I L7WKoBtteCh/VsF9ouiVAazkssA5bQHBG88TkBzO15adqjocmaVNlDhI1/UQKZ6ZJs 1gtkK1c5+2u8Lz6n4DzfGBONkD1e9dk40kX0zuEE= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id CEB97F8970C; Wed, 15 Mar 2023 16:17:32 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D8B08F80622; Wed, 15 Mar 2023 16:10:55 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 22A25F80578 for ; Wed, 15 Mar 2023 16:08:50 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 22A25F80578 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk3-0000he-Kd; Wed, 15 Mar 2023 16:08:39 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjy-004Kgk-Ku; Wed, 15 Mar 2023 16:08:34 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjx-0057me-Tm; Wed, 15 Mar 2023 16:08:33 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Linus Walleij , Arnd Bergmann , Christophe JAILLET Subject: [PATCH 168/173] ASoC: ux500: ux500_msp_dai: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:40 +0100 Message-Id: <20230315150745.67084-169-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1822; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=7USvU135cOdMfZxPZX1uoGBaB77bhxDQ+YQtX09M9NA=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd8refvFsJBIhmCOvVHK68wC0bYMrAK5mk3hg gyc9HAVcVeJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfKwAKCRDB/BR4rcrs CRE/B/9CkHshP20/Dhv05Er3t+pbe97uoInpoLrWcpJUpEkhvqFSAys+FzdzZVtxIcQLobWWm6O aeYDAr5vYnFC9G0oYNo8dXjI4YpJ0Jvmb1O6jfYflSaN8SvHNQ19Ay9GoUhHP7I9J8sFTiAINgg zR2N4teY4+XBWtPj9KMIj0nIctnlBGSoHVl5OTX+VSyZzXOouzK/74y86PKwqUp4WclUQK/e21A VOqo/F1ALwc/TM2aCOxxBM5Aw2T0vgzqWmgmAxY/M1b5zat25qiCc+bRMUuMAoodPDiQ0wuOx7n doxlsEXsXvaUsnGLsK91hIPv1obWp9tqQeYLkcebDaapjfqs X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: UC3L3XEVI3SGJRB5AQ5VKSWPKCS5HPTN X-Message-ID-Hash: UC3L3XEVI3SGJRB5AQ5VKSWPKCS5HPTN X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: <> List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Linus Walleij --- sound/soc/ux500/ux500_msp_dai.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c index 6fb1a5c207bc..44e88dad8584 100644 --- a/sound/soc/ux500/ux500_msp_dai.c +++ b/sound/soc/ux500/ux500_msp_dai.c @@ -791,7 +791,7 @@ static int ux500_msp_drv_probe(struct platform_device *pdev) return ret; } -static int ux500_msp_drv_remove(struct platform_device *pdev) +static void ux500_msp_drv_remove(struct platform_device *pdev) { struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(&pdev->dev); @@ -802,8 +802,6 @@ static int ux500_msp_drv_remove(struct platform_device *pdev) prcmu_qos_remove_requirement(PRCMU_QOS_APE_OPP, "ux500_msp_i2s"); ux500_msp_i2s_cleanup_msp(pdev, drvdata->msp); - - return 0; } static const struct of_device_id ux500_msp_i2s_match[] = { @@ -818,7 +816,7 @@ static struct platform_driver msp_i2s_driver = { .of_match_table = ux500_msp_i2s_match, }, .probe = ux500_msp_drv_probe, - .remove = ux500_msp_drv_remove, + .remove_new = ux500_msp_drv_remove, }; module_platform_driver(msp_i2s_driver); From patchwork Wed Mar 15 15:07:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176265 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 98582C61DA4 for ; Wed, 15 Mar 2023 15:51:56 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id AC5FF1538; Wed, 15 Mar 2023 16:51:04 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AC5FF1538 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895514; bh=cMAYeO0+VOjeXrDjSWG+h8vjSkeIg2bFXTwzxl2A03s=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=TzfI1iB54ObI05nxMcWW9raNvzLYYluvG5yLU4BXfJwVH1+RQLsHyQYqZxG2Kzb+w 752e+xS0BfaMVxxcM6jVHVyeE8PAPn5Q0HseBjJlWIqdHb7wufZzShTUjxSyeTTCgX aUDr7IJIpxj3USvPq0/rcurQ7pzSMJfjAdESZHDw= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id EFCF3F89700; Wed, 15 Mar 2023 16:17:19 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D4184F8061E; Wed, 15 Mar 2023 16:10:52 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A2C13F80639 for ; Wed, 15 Mar 2023 16:08:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A2C13F80639 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk3-0000iR-E1; Wed, 15 Mar 2023 16:08:39 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjy-004Kgo-Qj; Wed, 15 Mar 2023 16:08:34 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjy-0057mh-4b; Wed, 15 Mar 2023 16:08:34 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Michal Simek , Charles Keepax Subject: [PATCH 169/173] ASoC: xilinx: xlnx_formatter_pcm: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:41 +0100 Message-Id: <20230315150745.67084-170-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1939; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=cMAYeO0+VOjeXrDjSWG+h8vjSkeIg2bFXTwzxl2A03s=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd8tsix8ovPHcmjSb5WVclIJ95cZKMK+OceDz nLaCPrg9UaJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfLQAKCRDB/BR4rcrs CTVNCACVVcokxyJ7l3AoHUx9lUobRwIhEh6GV4g1GH0LN7PeWAfFMeYe1hxiO6aUIQgTZ2HDeXL O3muvWNnSsR5QxohocGTXkr2C4oOhwDG2Ei+03ZX9gSMMGeQ1bgdHs3BmPgEII3H1T+JhmIzDZB TnoQis1OtZLkPhiMzyndVfI9shJmJSTsumYe4nrM8V15Oih2LkLKJgx3n2WsfGPyqPXBz+NbkBE K7cLDBqD2ckZqeiF6/UARLhQ7PWJ7feFTkQWz8eOEw6pwg3Z7EmH5bwF+hru2yajZnWaGE8eA5R lLyy7W9emKNswiBFRTan926NoOBOm7Aq5wYdTJrG7llhPSTh X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 5DFTBOK6G3RF5P3QQ2Y4HQ62TKNRFOL3 X-Message-ID-Hash: 5DFTBOK6G3RF5P3QQ2Y4HQ62TKNRFOL3 X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/xilinx/xlnx_formatter_pcm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/xilinx/xlnx_formatter_pcm.c b/sound/soc/xilinx/xlnx_formatter_pcm.c index ff1fe62fea70..299cfb5e2022 100644 --- a/sound/soc/xilinx/xlnx_formatter_pcm.c +++ b/sound/soc/xilinx/xlnx_formatter_pcm.c @@ -687,7 +687,7 @@ static int xlnx_formatter_pcm_probe(struct platform_device *pdev) return ret; } -static int xlnx_formatter_pcm_remove(struct platform_device *pdev) +static void xlnx_formatter_pcm_remove(struct platform_device *pdev) { int ret = 0; struct xlnx_pcm_drv_data *adata = dev_get_drvdata(&pdev->dev); @@ -703,7 +703,6 @@ static int xlnx_formatter_pcm_remove(struct platform_device *pdev) dev_err(&pdev->dev, "audio formatter reset failed\n"); clk_disable_unprepare(adata->axi_clk); - return 0; } static const struct of_device_id xlnx_formatter_pcm_of_match[] = { @@ -714,7 +713,7 @@ MODULE_DEVICE_TABLE(of, xlnx_formatter_pcm_of_match); static struct platform_driver xlnx_formatter_pcm_driver = { .probe = xlnx_formatter_pcm_probe, - .remove = xlnx_formatter_pcm_remove, + .remove_new = xlnx_formatter_pcm_remove, .driver = { .name = DRV_NAME, .of_match_table = xlnx_formatter_pcm_of_match, From patchwork Wed Mar 15 15:07:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176258 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2868AC6FD1D for ; Wed, 15 Mar 2023 15:50:08 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 33C971508; Wed, 15 Mar 2023 16:49:16 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 33C971508 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895406; bh=Iku3I77HZ0sgVoOuGEEbei4XlKGKaxeyHQbkdOGZIfM=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=IjlltgPwNMbPF/BQHxNXzSkfUCJh1fd02p127e0Ifb26eb9W8FbI3ARK2+0E1JqES MMzCICUgXHyYU6VPMdQ1CcJWObDm+9D7odB9CvekIQacFDXzfsMI1WsEZUGkA5S6vq AzeUeRuzG9yaNQzoE0w0ety9GETedFoBu3xgb1xU= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id F143DF896E7; Wed, 15 Mar 2023 16:16:51 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1C693F8061B; Wed, 15 Mar 2023 16:10:47 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D1439F80630 for ; Wed, 15 Mar 2023 16:08:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D1439F80630 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk3-0000ir-FE; Wed, 15 Mar 2023 16:08:39 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjy-004Kgt-UK; Wed, 15 Mar 2023 16:08:34 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjy-0057mm-B8; Wed, 15 Mar 2023 16:08:34 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Michal Simek , Charles Keepax Subject: [PATCH 170/173] ASoC: xilinx: xlnx_spdif: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:42 +0100 Message-Id: <20230315150745.67084-171-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1615; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Iku3I77HZ0sgVoOuGEEbei4XlKGKaxeyHQbkdOGZIfM=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd8wdrG7Ew2/HIZZFRGdBqWXUpYCbOyh8MdEk J0faUl8aPCJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfMAAKCRDB/BR4rcrs CTvhB/92P7LtVtuxCw6olOi57lWMPcnaSRmzLPCR5cIItc3wDn6/7LSUhx+CUf5KdBT0uudeVLo VvNsdLjGvksKzd61wbYjrdcnocd71nuZWvnYJObd9NCTPZ/LkNVQ52U7473pcrY7nY2W9QrWcEl E9k7GRTZaQ58Vyc0JbZJ4YUAJgXiXAJOuef9ifxMpw+X66PrcFWb5rxrMz4wQNCa9zNTzAAwIBe KZ4apoOpZrkVBPqeWHj4NjtplWJUMYvqkEj77bccUi5mEtBYWC3ZDsZL0snD0FxvQ3mwfByuc4Z 8wPkeEytv2pKRk/m8OwwW01KGTyyJ6k3DxNvwhyJkKCf+kjz X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: GPFPVI3WUTGWMBJCAHCN6ZHXEOUKF4BA X-Message-ID-Hash: GPFPVI3WUTGWMBJCAHCN6ZHXEOUKF4BA X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/xilinx/xlnx_spdif.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/xilinx/xlnx_spdif.c b/sound/soc/xilinx/xlnx_spdif.c index 7342048e9875..d52d5fc7b5b8 100644 --- a/sound/soc/xilinx/xlnx_spdif.c +++ b/sound/soc/xilinx/xlnx_spdif.c @@ -312,12 +312,11 @@ static int xlnx_spdif_probe(struct platform_device *pdev) return ret; } -static int xlnx_spdif_remove(struct platform_device *pdev) +static void xlnx_spdif_remove(struct platform_device *pdev) { struct spdif_dev_data *ctx = dev_get_drvdata(&pdev->dev); clk_disable_unprepare(ctx->axi_clk); - return 0; } static struct platform_driver xlnx_spdif_driver = { @@ -326,7 +325,7 @@ static struct platform_driver xlnx_spdif_driver = { .of_match_table = xlnx_spdif_of_match, }, .probe = xlnx_spdif_probe, - .remove = xlnx_spdif_remove, + .remove_new = xlnx_spdif_remove, }; module_platform_driver(xlnx_spdif_driver); From patchwork Wed Mar 15 15:07:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176252 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 89045C61DA4 for ; Wed, 15 Mar 2023 15:48:31 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7988414EF; Wed, 15 Mar 2023 16:47:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7988414EF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895309; bh=iAXa+gQ5+QmAZ1eedjZp+aDygsbSmdKjE3s1Tf/TVrg=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=QWvsJ1syuSe+KXy1+lM8uM+Ivx0f9vhHbXSKAtXJnSOnSjYV4qG6waZK8My+8L3A8 FiKRnefNk9wozRlEVUt6QJnE24bmuRGS43xzwlICPCF5kG+uytj3nUDpq4W4b9yyVL VwsAacU1phxQawZAsreRHkgvqMzDYbZ9IK5V+aD0= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7330DF89693; Wed, 15 Mar 2023 16:16:30 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 23BC1F80611; Wed, 15 Mar 2023 16:10:42 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E830EF80623 for ; Wed, 15 Mar 2023 16:08:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E830EF80623 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk3-0000jj-Om; Wed, 15 Mar 2023 16:08:39 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjz-004Kgz-8L; Wed, 15 Mar 2023 16:08:35 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjy-0057mr-IK; Wed, 15 Mar 2023 16:08:34 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Max Filippov , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 171/173] ASoC: xtensa: xtfpga-i2s: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:43 +0100 Message-Id: <20230315150745.67084-172-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1800; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=iAXa+gQ5+QmAZ1eedjZp+aDygsbSmdKjE3s1Tf/TVrg=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd8zyr82aJTdQ8YOVFWIy0tRydHZgVoe8tqp7 HTWNDs6I9mJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfMwAKCRDB/BR4rcrs CQfgB/4i+oODZpz6sNeBnIrqgIdQArDSMtn+UMC8O7CDoowi1eOt4+x03juNePL/rAuLmcd6RIz hiJxs8ir2YUIRYTLLVA1GBvEy0jcqvIN9GxX73EgMkm3rlD4YMm/MwKzbjbzohDuXegtq6/Yk5o lyfkbaOCvydFhplpg8KUs/V2q7Yb+EQMmcAixdfjmG0ZWmOo3dbod7NNP381wMWEq2r+3tYFYjZ sEiAKhoF+qMa5kIriczBBZnyY0lXA1jgXh1VYbN7ohO7EnbHtduiBYGYuMH0oC1aP0iLuVX/ZB3 PaCAAy7WocwqM92udaRS7WVyXb734JxUsQB/4XnXW49tIglR X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 6BUPCL35CGAAOTYPAMZJJFGZ4VTGBL2T X-Message-ID-Hash: 6BUPCL35CGAAOTYPAMZJJFGZ4VTGBL2T X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: linux-xtensa@linux-xtensa.org, alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/soc/xtensa/xtfpga-i2s.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/xtensa/xtfpga-i2s.c b/sound/soc/xtensa/xtfpga-i2s.c index a8f156540b50..287407714af4 100644 --- a/sound/soc/xtensa/xtfpga-i2s.c +++ b/sound/soc/xtensa/xtfpga-i2s.c @@ -605,7 +605,7 @@ static int xtfpga_i2s_probe(struct platform_device *pdev) return err; } -static int xtfpga_i2s_remove(struct platform_device *pdev) +static void xtfpga_i2s_remove(struct platform_device *pdev) { struct xtfpga_i2s *i2s = dev_get_drvdata(&pdev->dev); @@ -618,7 +618,6 @@ static int xtfpga_i2s_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) xtfpga_i2s_runtime_suspend(&pdev->dev); - return 0; } #ifdef CONFIG_OF @@ -636,7 +635,7 @@ static const struct dev_pm_ops xtfpga_i2s_pm_ops = { static struct platform_driver xtfpga_i2s_driver = { .probe = xtfpga_i2s_probe, - .remove = xtfpga_i2s_remove, + .remove_new = xtfpga_i2s_remove, .driver = { .name = "xtfpga-i2s", .of_match_table = of_match_ptr(xtfpga_i2s_of_match), From patchwork Wed Mar 15 15:07:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176231 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 23C69C61DA4 for ; Wed, 15 Mar 2023 15:43:29 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 016B4141B; Wed, 15 Mar 2023 16:42:37 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 016B4141B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678895007; bh=080/Jp99onUt6Qr4yc0EkF3M/pkODAXQogbkIc0PYWQ=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=r2VFK9MHbEnmK/nMzjPBqsD6fdlxbIqNUmTCy69tH5wsyYfDQ1ABbYdCDNtis+ftu gvGAQF0AuMPRJRbdmbvue3FmMOArQQt/xEhA68IoodGgauHc2PX5+PKHvHc0/MY24p HZNB3kAnngaJ/Vq9XWHDH/BhhJ4LltjgNzc/+RnA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C69A3F80C87; Wed, 15 Mar 2023 16:15:22 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C13A5F805C8; Wed, 15 Mar 2023 16:10:22 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 16ED9F80614 for ; Wed, 15 Mar 2023 16:08:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 16ED9F80614 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk4-0000kH-19; Wed, 15 Mar 2023 16:08:40 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjz-004Kh2-C7; Wed, 15 Mar 2023 16:08:35 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjy-0057mv-OQ; Wed, 15 Mar 2023 16:08:34 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Jaroslav Kysela , Takashi Iwai Subject: [PATCH 172/173] ALSA: sparc/cs4231: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:44 +0100 Message-Id: <20230315150745.67084-173-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1524; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=080/Jp99onUt6Qr4yc0EkF3M/pkODAXQogbkIc0PYWQ=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd82YExnbuSixDsNF0HHLCqy9SemtNGJY35nb HuB6Me8mKGJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfNgAKCRDB/BR4rcrs CdqzB/9lmVrGayNjRErUfxzxQUZDWYURKdGf47rJ8jgDLKl/5Imc+tgLx/tymmkRFgGjAckfJyZ CE8qtuo9qA7oTqCmDVWRvec9NKGirBPqzFJW4HQ8RyhpqEkTEqsQF4Llw23aywTprXBy31bhn+O VvAEmkpomjfEfRJrwZY7EWF9IgJAWbUQT2TRpnTOgsGQShV7R5QiycqjZycYG/E4dWzsPx18zgs nKRL60Rv/uUKtcnTxQ3Zxl2AxXInvLfb41OK3UiExntLY3OLvYyTT5K8LJkr8Id1n9wFcJnn2HK 5VC9/xKtzrx9yyGZj8FuK9brL2bTSTIV6kOH1WQsVAJ4aTV0 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: 5766A3EHKWTXRUPQHCYG4FHGKGWLH4YG X-Message-ID-Hash: 5766A3EHKWTXRUPQHCYG4FHGKGWLH4YG X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/sparc/cs4231.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index 2942c8c7a236..31bac355ec4d 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c @@ -2069,13 +2069,11 @@ static int cs4231_probe(struct platform_device *op) return -ENODEV; } -static int cs4231_remove(struct platform_device *op) +static void cs4231_remove(struct platform_device *op) { struct snd_cs4231 *chip = dev_get_drvdata(&op->dev); snd_card_free(chip->card); - - return 0; } static const struct of_device_id cs4231_match[] = { @@ -2097,7 +2095,7 @@ static struct platform_driver cs4231_driver = { .of_match_table = cs4231_match, }, .probe = cs4231_probe, - .remove = cs4231_remove, + .remove_new = cs4231_remove, }; module_platform_driver(cs4231_driver); From patchwork Wed Mar 15 15:07:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13176222 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7CC4EC6FD1D for ; Wed, 15 Mar 2023 15:42:28 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 354A613FE; Wed, 15 Mar 2023 16:41:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 354A613FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678894946; bh=tnODiljTLK15/CS2OsFoa5VvK7w5J4TXLKQzsjADB4I=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=MplKTmo+1PnXtvCJz1dZuCMC1fxs1jqxMw591gwrAdMUQCBR6qrwLnDGSE2Tj/2gX RTipOS3lxKf7cncj5J2wKMJkTP6FAnEnP5m1mCck9ZTaMEyjSZmCMY4Tm5r5/quZ8v gDNEyI7OdWJvpm1r+00CvW+rEQ60nxQXjHIfsIQA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 68512F80C6F; Wed, 15 Mar 2023 16:15:11 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A39EFF805F8; Wed, 15 Mar 2023 16:10:19 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 03E97F80611 for ; Wed, 15 Mar 2023 16:08:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 03E97F80611 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcSk4-0000lh-Gk; Wed, 15 Mar 2023 16:08:40 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pcSjz-004Kh7-PY; Wed, 15 Mar 2023 16:08:35 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pcSjz-0057mz-06; Wed, 15 Mar 2023 16:08:35 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Jaroslav Kysela , Takashi Iwai Subject: [PATCH 173/173] ALSA: sparc/dbri: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 16:07:45 +0100 Message-Id: <20230315150745.67084-174-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1530; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=tnODiljTLK15/CS2OsFoa5VvK7w5J4TXLKQzsjADB4I=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkEd8524mR0C9pJ38zGVnTjjy0E8kbujcu8I+Xw MNtKRP9+NCJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZBHfOQAKCRDB/BR4rcrs CYYRCACDH2o+1hGEaoMSI7cCEytkeycvy2up/uigiH7ROimgeJumYuQGR0nPDHN+qhmcBq5DzHh 0Ql371359kW3rn/3P81yMmhSRyTMj9vJCty+FynVUnGq1Y89WR1opyvMu5x1EQPdzgKr82uckYA rr9OIciBQpxRVhLh5Uo/mhRlIJnaEX0GlXYL6FW6Jffuk+heNGd+X3zLRtFy3d0zvRE1m9Lg7QF 0oXYYoPsO8LoHoG0iWshJiaFnqq3mI0hDuz6NQV1onfLxLAs/ZqkhR/2erT+90G8DWQh/+KzLaU JoIY2Oxd4ShbiBlQFvwO2aYqNT1ejWTNikrlimAObguXZp1L X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: alsa-devel@alsa-project.org Message-ID-Hash: A7BBCS67T2MY7NNHQYQ5NBQAFUH7PWWE X-Message-ID-Hash: A7BBCS67T2MY7NNHQYQ5NBQAFUH7PWWE X-MailFrom: ukl@pengutronix.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, kernel@pengutronix.de X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: <> List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- sound/sparc/dbri.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index 3881e1c1b08a..376aed136a45 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c @@ -2656,14 +2656,12 @@ static int dbri_probe(struct platform_device *op) return err; } -static int dbri_remove(struct platform_device *op) +static void dbri_remove(struct platform_device *op) { struct snd_card *card = dev_get_drvdata(&op->dev); snd_dbri_free(card->private_data); snd_card_free(card); - - return 0; } static const struct of_device_id dbri_match[] = { @@ -2684,7 +2682,7 @@ static struct platform_driver dbri_sbus_driver = { .of_match_table = dbri_match, }, .probe = dbri_probe, - .remove = dbri_remove, + .remove_new = dbri_remove, }; module_platform_driver(dbri_sbus_driver);