Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp644197rwb; Tue, 25 Jul 2023 23:54:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlHfbczV8des0XAKeqygId5eqjlYMjb7n2w5stXRziOlw5WUKxsr6JIaYsKxwYKYVscJILks X-Received: by 2002:a17:90a:680f:b0:263:68b0:8ca5 with SMTP id p15-20020a17090a680f00b0026368b08ca5mr906567pjj.43.1690354493819; Tue, 25 Jul 2023 23:54:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690354493; cv=none; d=google.com; s=arc-20160816; b=uU6wEuw3smvEjMMgqiKo+rWR38i/QM0t4RjkjgSBD5r4d6dCeRxqu9UxsYN9je0Yd2 Rq1aIZuobvPWO5Xgdd/WLD8zQLmIW+fucdQcAbFmTUiuv7oJz5aJ4/B8Nr0SG5cdFFjX NrU6ATokMU8NtIVMM4JX3PN2HB6gFOHgl6QfWdD0Bv7g5v2LUgcaoo1d7GhHkndFjcjF IaUZ+CgbVO0jjjHQoM1vtONAAsw8fPIQkY9Addh+6djNx6ouVI2M1Kf1dLaY2PWuYoCU /tAYv4fvdixVtI7To3YYDw7VMQVDHBladGH3pm95t10IqlHN4pqMByUZezZUfotnCOij ZINw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=0A3+e5jMcK3kCR/jFtoYg9fS2BZt61xXvykipeK7BQ8=; fh=sHPtQZ9kB5B/VL/WDsg1E9hRC4W6/dfBAToARL2JnnM=; b=DjI3Xqw9wCA3YP2+rFObm1rpITMRV9dMLY+oNkxyS8ttQq34HqlNdMtPEKIoGPPKqz eJ1jAilp6W1zGwKYETHPcyIsW2oloEc2QOmTV8T98k2zWwWzLrqwJSfW+9FsMuMBlYJ0 cPIMd2UCs2UycJ7yJ14AJnDYch7Ga3hMz7YUqC2IK3qkwJLHUQOCNTvd8tSTZQgFN/MQ odP2kfy57ZFFk4mvwkg6Vmco0i5UM5Je4TMX78k7xePb/BcqahSSgw5SLVeYCtSygEI1 DOCLwgt0jVi2Ju+YL/8D4xLx1NnkiRA7GMpkhtMUDk0KOC4wwSweeHKU9Bb9oqYZglw5 bgdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@timesys-com.20221208.gappssmtp.com header.s=20221208 header.b=sxyvSu3w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m3-20020a170902768300b001b035ce0649si12220265pll.372.2023.07.25.23.54.41; Tue, 25 Jul 2023 23:54:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@timesys-com.20221208.gappssmtp.com header.s=20221208 header.b=sxyvSu3w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231925AbjGZGPY (ORCPT + 99 others); Wed, 26 Jul 2023 02:15:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231815AbjGZGPL (ORCPT ); Wed, 26 Jul 2023 02:15:11 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 499FA11A for ; Tue, 25 Jul 2023 23:15:01 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2b701e41cd3so92624981fa.3 for ; Tue, 25 Jul 2023 23:15:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timesys-com.20221208.gappssmtp.com; s=20221208; t=1690352099; x=1690956899; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=0A3+e5jMcK3kCR/jFtoYg9fS2BZt61xXvykipeK7BQ8=; b=sxyvSu3wcgyD7VnJco1Gq+4hYK876dooXo/sd2xojq/OZaRTST42OZQ4AqAN3Yo09M fbFjnYlXDetjGZo+vfaHHmQ+z+AYcrRfLjDnt/zz8wWKs3ho7+iMBxysF8tWzfn/7fn8 ipwMH2UR0Oji1wHg4JwYTE+se+reU4vLodLR3pl2od8AZh1Hq6bDxXGs7PIswVbriTb8 MGdiIVPxPxJr3dRw1ffRxyZ35dSgc666ItrlyP9fnpDiUYoKNysLwRUIalo3QxFeYzJD TYHk9zxNUvLDmy/spYlTKEvt4CRzNOq7A9k8+5oETnaQxGUS43RlzWbpirRFtqOnyfJk cygQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690352099; x=1690956899; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0A3+e5jMcK3kCR/jFtoYg9fS2BZt61xXvykipeK7BQ8=; b=EXo5ttRJ70pZHXPqHdlt0WBQrfChMZoH4liBnRNVEMn4Mtb48Z/WKkMyH/te2FPV4e ExteD7qXiRrtgQOM45DPpUCpM4rg3xJGGl5KOX+OjWEGDl/PaMxyBRaOu+5K559txUsO zrrPX3EUmTRbWsSmTWWo2taenNqjKINvkORWuMmKY3dd93pyRAMlwFR5dqSG15byR2NE 2qZ0uhetuSZLm2BYTrHZRBKgvD75jZ5h11k9oviSW0oH+Pp6jMOsiFr7fW93fiwoUncg VJatWBJfWtLRBc0bwBB1QWfREnMLwuHurnNMY2kt/cncWV5oQzXf2Vi9ZoxSGAn5B291 cvNg== X-Gm-Message-State: ABy/qLZRcrTAvv7YUtJhksoqzS7nB2hdRCyjwNviZ76lOg8NSnVlp7X0 4zG7Ga7HjNmYfSSiLD4zq/QkBeIor2JwZegLoItk1Q== X-Received: by 2002:a2e:3c09:0:b0:2b6:e625:ba55 with SMTP id j9-20020a2e3c09000000b002b6e625ba55mr669897lja.41.1690352099417; Tue, 25 Jul 2023 23:14:59 -0700 (PDT) MIME-Version: 1.0 References: <20230726040041.26267-1-frank.li@vivo.com> <20230726040041.26267-49-frank.li@vivo.com> In-Reply-To: <20230726040041.26267-49-frank.li@vivo.com> From: Angelo Dureghello Date: Wed, 26 Jul 2023 08:14:06 +0200 Message-ID: Subject: Re: [PATCH v2 49/61] mmc: sdhci-esdhc-mcf: Convert to platform remove callback returning void To: Yangtao Li Cc: Adrian Hunter , Ulf Hansson , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Yangtao, Acked-by: Angelo Dureghello On Wed, Jul 26, 2023 at 6:02=E2=80=AFAM Yangtao Li wrot= e: > > The .remove() callback for a platform driver returns an int which makes > many driver authors wrongly assume it's possible to do error handling by > returning an error code. However the value returned is (mostly) ignored > and this typically results in resource leaks. To improve here there is a > quest to make the remove callback return void. In the first step of this > quest all drivers are converted to .remove_new() which already returns > void. > > Trivially convert this driver from always returning zero in the remove > callback to the void returning variant. > > Cc: Uwe Kleine-K=C3=B6nig > Signed-off-by: Yangtao Li > Acked-by: Angelo Dureghello > --- > drivers/mmc/host/sdhci-esdhc-mcf.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-esdhc-mcf.c b/drivers/mmc/host/sdhci-= esdhc-mcf.c > index 05926bf5ecf9..a07f8333cd6b 100644 > --- a/drivers/mmc/host/sdhci-esdhc-mcf.c > +++ b/drivers/mmc/host/sdhci-esdhc-mcf.c > @@ -489,7 +489,7 @@ static int sdhci_esdhc_mcf_probe(struct platform_devi= ce *pdev) > return err; > } > > -static int sdhci_esdhc_mcf_remove(struct platform_device *pdev) > +static void sdhci_esdhc_mcf_remove(struct platform_device *pdev) > { > struct sdhci_host *host =3D platform_get_drvdata(pdev); > struct sdhci_pltfm_host *pltfm_host =3D sdhci_priv(host); > @@ -502,8 +502,6 @@ static int sdhci_esdhc_mcf_remove(struct platform_dev= ice *pdev) > clk_disable_unprepare(mcf_data->clk_per); > > sdhci_pltfm_free(pdev); > - > - return 0; > } > > static struct platform_driver sdhci_esdhc_mcf_driver =3D { > @@ -512,7 +510,7 @@ static struct platform_driver sdhci_esdhc_mcf_driver = =3D { > .probe_type =3D PROBE_PREFER_ASYNCHRONOUS, > }, > .probe =3D sdhci_esdhc_mcf_probe, > - .remove =3D sdhci_esdhc_mcf_remove, > + .remove_new =3D sdhci_esdhc_mcf_remove, > }; > > module_platform_driver(sdhci_esdhc_mcf_driver); > -- > 2.39.0 > --=20 Angelo Dureghello Timesys e. angelo.dureghello@timesys.com