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 89761C6FD1D for ; Wed, 15 Mar 2023 16:05:36 +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=mQv/m2QNSi3ZuaSK3rroG6rsG14H/w4dYSQppyMH2q0=; b=zQx7fbbAatO6oK ACg6d1yr2ViqOn/4JP9gI01ijFkd0bQZab1pIpkc/E5yC89NnuKUQTfP6o54Id7HLr5MSvOHseg48 5ObJjDMcNdXLvYP1V61ucUHCKAykF5vVGBW7VZi6qVorD7L6Hi9CXg2fo7phWEhBSk9hrcFt525/m o5j4mfCSMGSBKWXzxu2JPc362+K0wvV0iXnaCLZZFCTdtxh11fYkSsapB+XrFu4K5uF8xRAhCPZas W7y1B/wbiXSf3v8d/6ALY+rRidO+/gtvb3F9qLAeS2DmD4oyns1pxGRqk6j0vGV07dzbvIFOZU4j3 LV2rrjR94fgARGWPIp/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcTcM-00E03y-0v; Wed, 15 Mar 2023 16:04:46 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcTcJ-00E02T-1O for linux-arm-kernel@lists.infradead.org; Wed, 15 Mar 2023 16:04:44 +0000 Received: by mail-ed1-x529.google.com with SMTP id o12so77487420edb.9 for ; Wed, 15 Mar 2023 09:04:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678896281; 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=VTxHDgaVdAlRa2VNlay45Oqnyvz/HhDbjYf8cb4/2Tk=; b=azeJduTbNEMY6CR9BFCqeeLgBLexitLByxnpnV13tmgavA7XljemiuRLuaIrb2J2X+ aVS6uT6F5i6q9yg0tLIp3fPqCab/6eksH76OTBxdlDIo9uS4GWPUntxi1U4F1f4eBzx/ G6uSdBpQMBZ82s46c/mOZItV+HP1Box//P9ivizUhQgyeOsrst4nBAABEaa7riNWf6De pYNeVuIqX14OWaaW75erkaNMwx3MoRdLxY5z8eXws2ykS0kRtVPUSlzS5upy7NlT/muS XrP6BQeONHuCWpzvbijbCUtTjdZGJJyE27VGIxwYyw/JE4tAQKMtZh6BqRattktMQ8oa io1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678896281; 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=VTxHDgaVdAlRa2VNlay45Oqnyvz/HhDbjYf8cb4/2Tk=; b=X7CSJmzCHaatf//QVReT+rOtZyVAez5b7fCXQTnFBDR0kfNlh7yY6JW+LX32ts+S8r qDtIWBv0T1o5ZcuPo8y3JwCGLjTQP5r1ws5kTYfEKSvBiFbmS/HKg46ZnH3X6O5qyzFk JUyJzpI5D9/dWO0/7+sZtZtXIkUvdTdAr+lQ1aR7t0DJfCAicpqUSxITdTr6LAzS9Nxu SssKT7ijL8PT1SMoE1tIdHtyY1cJB7f1qiFT37XDvjBtYlaKbAJt41Ul2EhcvV1L+x+P JCmBx1ZA6rqcxg7EPLhgsjhu7hiByc+IXS2bubXQvOgQOjsBirPPGbu3ReEsOqh3OwoD GkiA== X-Gm-Message-State: AO0yUKVOGyjCkzMA9e6Mq6znk3NYao5TerNlaLbbtve+IIHatEyH2Hv0 AoO47GoYKWajnJuKNELobIk= X-Google-Smtp-Source: AK7set9exElF6sSx9RJmJhi/SicijsfPgz32u15q4hOmHY8b4Mo6bccbZ6ceF0L7H/PW+5M7ydAmxQ== X-Received: by 2002:a05:6402:1b07:b0:4af:6e95:861b with SMTP id by7-20020a0564021b0700b004af6e95861bmr3215998edb.2.1678896281005; Wed, 15 Mar 2023 09:04: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 l9-20020a50d6c9000000b004fc649481basm2672529edj.58.2023.03.15.09.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 09:04:40 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Samuel Holland , Charles Keepax , Kai Vehmanen , Ranjani Sridharan , Bard Liao , Pierre-Louis Bossart , 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 141/173] ASoC: sunxi: sun4i-i2s: Convert to platform remove callback returning void Date: Wed, 15 Mar 2023 17:04:38 +0100 Message-ID: <2100888.OBFZWjSADL@jernej-laptop> In-Reply-To: <20230315150745.67084-142-u.kleine-koenig@pengutronix.de> References: <20230315150745.67084-1-u.kleine-koenig@pengutronix.de> <20230315150745.67084-142-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_090443_470901_B089EA7A X-CRM114-Status: GOOD ( 22.81 ) 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:13 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/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 =3D 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[] =3D { > @@ -1660,7 +1658,7 @@ static const struct dev_pm_ops sun4i_i2s_pm_ops =3D= { > = > static struct platform_driver sun4i_i2s_driver =3D { > .probe =3D sun4i_i2s_probe, > - .remove =3D sun4i_i2s_remove, > + .remove_new =3D sun4i_i2s_remove, > .driver =3D { > .name =3D "sun4i-i2s", > .of_match_table =3D sun4i_i2s_match, _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel