From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8682BC61DA4 for ; Wed, 15 Mar 2023 16:07: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 811A51546; Wed, 15 Mar 2023 17:06:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 811A51546 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678896419; bh=CQhAb/TXQLM8hj/BLJWeMOVKvtG1+RYMzcw2PHCeKdM=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=XQwuhedxIhNbu7bH/9XbTrIdtzMA+C6ApKf1dHSwWroJonUpCBRkHXmRVHnOOqTJx N1wfalfTZdc9VPfJRvXOfbkuu5By2p3wmIcsAEvf6hkak94ds1gvmcRJfjmVZA6xQj y4Bpux8H4sAEG/Wxyzq91KlYMzquJlkvmBbZbZ9Q= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 4401DF80529; Wed, 15 Mar 2023 17:05:50 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3D26AF80529; Wed, 15 Mar 2023 17:05:46 +0100 (CET) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BC407F80093 for ; Wed, 15 Mar 2023 17:05:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BC407F80093 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=Py9CPpKM Received: by mail-ed1-x52d.google.com with SMTP id r11so25867029edd.5 for ; Wed, 15 Mar 2023 09:05:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678896341; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=myjMOOaJx/Yyy4X1X4K5C1WLJmP+rbBydBL5hzDI24I=; b=Py9CPpKMCCbnztwqW3NSxXw3CBM+Stxv1hc87DRMM6fy7O5/1CPhw2+eQncKjw6fVp tM1am1nqJCvoYP6iPyx2lGZEh3lcq7MHqnvMUOUTbWJaesmjCYW02fOsFWrgY2BcFKIX TRTZfV/2sL4WLZztWZHQxW1OtDSgkvELiLBeRugs1UKp9r5JhPGNvyORfT7nARDA3Z/1 9UqqHhG2vUhrqULX4sXASbyPPrDHwcYbHH/5lHBDwsIs6MHkmCFxpcz1NUOMNSe8LX7X XaEFrimDa/2tAAvyF93DehWX9SfbYJ5lFH4wsNC16FS+4oxvh44ajd/sTHDmn108Y+Ki Xg9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678896341; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=myjMOOaJx/Yyy4X1X4K5C1WLJmP+rbBydBL5hzDI24I=; b=lEa+igaXreVhc2dLtvtUfxQlxhlhb6w5Xa/CBmrSE2vXQDjXd1p6a4timWxa7Wcgcr 5EgyWpXQ6vs+Ht3fUGQc/QFiX67frPEjVyE7sVxIZEJeF8xJQQHV6G/qDOJ6QjwWIZCy mV/ovKGNK1pxabKxMgjcm2tWoPkZAdATC4Rw5Z81wMYJqW4/unpraYNdmovk8fCrwJRX cAA1SDCfDn7jKB8pzfjkWxZWKfm/HVoN66sx5YKSEG0F7qsiV75uhFBUtPAXGbd4Y3Lv mduiCLhmdwScqaOnqLFUJSI89dEidIi4YRHCHRL9YZFez5BBdCJVTK1KF4oJBBMfuyi4 EZpA== X-Gm-Message-State: AO0yUKXXv7T0VkN8JYlRwTMPn56oBvZoSt5x0921QfcuA2yFbm4IGpxx 8rMpsTHah+RnQwpfEBt617o= X-Google-Smtp-Source: AK7set9DU+m9BN6GX71+StLcOLYTPk/4jOJqYqVt5X6yccV+p4wkWAkWqBWC164NI+nirv6R2J+sgA== X-Received: by 2002:aa7:d49a:0:b0:4ea:b218:f7d3 with SMTP id b26-20020aa7d49a000000b004eab218f7d3mr3524450edr.10.1678896341758; Wed, 15 Mar 2023 09:05:41 -0700 (PDT) Received: from jernej-laptop.localnet (82-149-1-233.dynamic.telemach.net. [82.149.1.233]) by smtp.gmail.com with ESMTPSA id j29-20020a508a9d000000b004fe9253e923sm2188748edj.83.2023.03.15.09.05.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 09:05:41 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Samuel Holland , Charles Keepax , Uwe =?ISO-8859-1?Q?Kleine=2DK=F6nig?= Subject: Re: [PATCH 144/173] ASoC: sunxi: sun8i-codec: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 17:05:39 +0100 Message-ID: <1771389.TLkxdtWsSY@jernej-laptop> In-Reply-To: <20230315150745.67084-145-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> <20230315150745.67084-145-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Message-ID-Hash: ALG2UPM2TU2I5I2MSGE5VW4BASX6BXQT X-Message-ID-Hash: ALG2UPM2TU2I5I2MSGE5VW4BASX6BXQT X-MailFrom: jernej.skrabec@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-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: Dne sreda, 15. marec 2023 ob 16:07:16 CET je Uwe Kleine-K=F6nig napisal(a): > The .remove() callback for a platform driver returns an int which makes > many driver authors wrongly assume it's possible to do error handling by > returning an error code. However the value returned is (mostly) ignored > and this typically results in resource leaks. To improve here there is a > quest to make the remove callback return void. In the first step of this > quest all drivers are converted to .remove_new() which already returns > void. >=20 > Trivially convert this driver from always returning zero in the remove > callback to the void returning variant. >=20 > Signed-off-by: Uwe Kleine-K=F6nig Acked-by: Jernej Skrabec Best regards, Jernej > --- > sound/soc/sunxi/sun8i-codec.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) >=20 > 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_devi= ce > *pdev) return ret; > } >=20 > -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; > } >=20 > static const struct sun8i_codec_quirks sun8i_a33_quirks =3D { > @@ -1385,7 +1383,7 @@ static struct platform_driver sun8i_codec_driver = =3D { > .pm =3D &sun8i_codec_pm_ops, > }, > .probe =3D sun8i_codec_probe, > - .remove =3D sun8i_codec_remove, > + .remove_new =3D sun8i_codec_remove, > }; > module_platform_driver(sun8i_codec_driver); From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F2019C61DA4 for ; Wed, 15 Mar 2023 16:06:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CTs9cP21JWLks9TUr59ke/6F/r3PQwVFJH5XyrI2bXQ=; b=B4DEZvSsK+TsD4 bkpGNsFQmP8Pyyq53WDtPBT28OVcb8FLzPoQcQEzcuPn19MZrhdy2zG1F8OkHoJoqhE64Jsit2VJ3 hEtEM+ipM8haFMRRLkInRoevU3O12r28zoTrCO/5R2TRQi1wSZpeQn4lDcJN88lBGyl6qe8uVIodP fFFpsYuqbVDJddsvooT0WJvUnWpuofygmZvFmbB0UuLD4G00dkY4Pl+aLmVakMqjrJdHFT0gsmQjt a5fUarVPOqtntC1sZvIXImu53/cyJIQ4nLG8rywOTvFj4Q4lU7JgqlcHq5n3I6hTaNWtOHVEpkK51 Mi1YHmJRKMZMNKfGzM1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcTdL-00E0UH-0O; Wed, 15 Mar 2023 16:05:47 +0000 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcTdH-00E0Qz-2r for linux-arm-kernel@lists.infradead.org; Wed, 15 Mar 2023 16:05:45 +0000 Received: by mail-ed1-x530.google.com with SMTP id cn21so47347703edb.0 for ; Wed, 15 Mar 2023 09:05:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678896341; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=myjMOOaJx/Yyy4X1X4K5C1WLJmP+rbBydBL5hzDI24I=; b=Py9CPpKMCCbnztwqW3NSxXw3CBM+Stxv1hc87DRMM6fy7O5/1CPhw2+eQncKjw6fVp tM1am1nqJCvoYP6iPyx2lGZEh3lcq7MHqnvMUOUTbWJaesmjCYW02fOsFWrgY2BcFKIX TRTZfV/2sL4WLZztWZHQxW1OtDSgkvELiLBeRugs1UKp9r5JhPGNvyORfT7nARDA3Z/1 9UqqHhG2vUhrqULX4sXASbyPPrDHwcYbHH/5lHBDwsIs6MHkmCFxpcz1NUOMNSe8LX7X XaEFrimDa/2tAAvyF93DehWX9SfbYJ5lFH4wsNC16FS+4oxvh44ajd/sTHDmn108Y+Ki Xg9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678896341; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=myjMOOaJx/Yyy4X1X4K5C1WLJmP+rbBydBL5hzDI24I=; b=n+pAlXO0UwcYTFoquZd+E6IoViNDYBzozgviSIA9wHPB095vr3WatHKsj/TURAOohY Aejk1G2IjELrPi/5s7bKYmFnugAinwQsKU9CBA9ElPeYRPzPqgs3nEgamrE377/pt7oh ytExeKa4Pp9zxMlKIGKnELizhKnz500wLcblbqy+QE/2QYlrsOghyS9Ms7sio/7OHOpt jbtLHLjXPlPrgBdwYjKrw/QjeMVqQkriKf9VhtByQzdk9MOC3l1fs2K/EssS2avIM/wD ZqoymDVVuGxYMQ7/CSzLKlYUSfx16xHuYmprCuV9sn2/piQviGi3Bs/zaRT122y4hsZT HoUQ== X-Gm-Message-State: AO0yUKUi/PinL2fcSzxw6YlIT/toov+T+Iwp9Z66hwD4nESg3gB7bSaM nehvqADjghPZ1rMgkxbHhgM= X-Google-Smtp-Source: AK7set9DU+m9BN6GX71+StLcOLYTPk/4jOJqYqVt5X6yccV+p4wkWAkWqBWC164NI+nirv6R2J+sgA== X-Received: by 2002:aa7:d49a:0:b0:4ea:b218:f7d3 with SMTP id b26-20020aa7d49a000000b004eab218f7d3mr3524450edr.10.1678896341758; Wed, 15 Mar 2023 09:05:41 -0700 (PDT) Received: from jernej-laptop.localnet (82-149-1-233.dynamic.telemach.net. [82.149.1.233]) by smtp.gmail.com with ESMTPSA id j29-20020a508a9d000000b004fe9253e923sm2188748edj.83.2023.03.15.09.05.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 09:05:41 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Samuel Holland , Charles Keepax , Uwe =?ISO-8859-1?Q?Kleine=2DK=F6nig?= Cc: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@pengutronix.de Subject: Re: [PATCH 144/173] ASoC: sunxi: sun8i-codec: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 17:05:39 +0100 Message-ID: <1771389.TLkxdtWsSY@jernej-laptop> In-Reply-To: <20230315150745.67084-145-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> <20230315150745.67084-145-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230315_090543_924298_19BA0228 X-CRM114-Status: GOOD ( 22.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Dne sreda, 15. marec 2023 ob 16:07:16 CET je Uwe Kleine-K=F6nig napisal(a): > The .remove() callback for a platform driver returns an int which makes > many driver authors wrongly assume it's possible to do error handling by > returning an error code. However the value returned is (mostly) ignored > and this typically results in resource leaks. To improve here there is a > quest to make the remove callback return void. In the first step of this > quest all drivers are converted to .remove_new() which already returns > void. > = > Trivially convert this driver from always returning zero in the remove > callback to the void returning variant. > = > Signed-off-by: Uwe Kleine-K=F6nig Acked-by: Jernej Skrabec Best regards, Jernej > --- > 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_devi= ce > *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 =3D { > @@ -1385,7 +1383,7 @@ static struct platform_driver sun8i_codec_driver = =3D { > .pm =3D &sun8i_codec_pm_ops, > }, > .probe =3D sun8i_codec_probe, > - .remove =3D sun8i_codec_remove, > + .remove_new =3D sun8i_codec_remove, > }; > module_platform_driver(sun8i_codec_driver); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel