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: 663478 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: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: 663469 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: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: 663482 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: 663475 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: 663481 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: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: 663474 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: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: 663476 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: 663477 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: 663479 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: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: 663480 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: 663473 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: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: 663461 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: 663457 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: 663463 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: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: 663455 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: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: 663468 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: 663472 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: 663467 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: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: 663466 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 --- 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: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: 663470 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 --- 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: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: 663465 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 --- 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: 663458 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 --- 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: 663471 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: 663460 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: 663464 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: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: 663459 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: 663462 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: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: 663456 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: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: 663451 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 --- 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: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: 663453 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 --- 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: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: 663454 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: 663452 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: 663448 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: 663450 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: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: 663447 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: 663449 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: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: 663446 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: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: 663444 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: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: 663441 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: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: 663445 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: 663442 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: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: 663443 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: 663440 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: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: 663397 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: 663437 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: 663439 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: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: 663396 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: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: 663438 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 --- 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: 663432 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 --- 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: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: 663430 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 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: 663434 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 --- 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: 663436 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 --- 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: 663431 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: 663426 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: 663425 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: 663416 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: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: 663435 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: 663429 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: 663433 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: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: 663428 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: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: 663423 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: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: 663424 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: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: 663413 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: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: 663427 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: 663421 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: 663422 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: 663410 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: 663419 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: 663420 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: 663398 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 --- 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: 663403 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 --- 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: 663406 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 --- 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: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: 663401 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 --- 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: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: 663415 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: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: 663404 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: 663407 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: 663412 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: 663409 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: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: 663402 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: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: 663411 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: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: 663418 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: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: 663417 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: 663414 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: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: 663399 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: 663400 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: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: 663405 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: 663408 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),