Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp650967rwb; Wed, 26 Jul 2023 00:02:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlFFv04R1GFQKOnvVNxJA4zt2ItJw0AnscnUcoULZwUAflxlcT688heevG1kmlxYI+mncnIs X-Received: by 2002:a17:906:cc13:b0:992:61c5:dab0 with SMTP id ml19-20020a170906cc1300b0099261c5dab0mr687867ejb.62.1690354965934; Wed, 26 Jul 2023 00:02:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690354965; cv=none; d=google.com; s=arc-20160816; b=QeILnkImbfRXAJF9DY9IFQ/82Ju+zqwwChK208LsOHIh/WDVYej/9Xjm1kjiIEEbTp fkR88wSA+tXcmmV/TCt8gysuvsWbfQcaT9jBfZJs0bfoQifmhtGIrGqWkSftmnIdhktL Y4zPVEET6edbati1WJ62Jm9wPcBf/PG5CVsyJCfoEPoopSTHQGSNiXXW1fQTSk5rbZ6I qlCq1xa0W1CpzbDAa0CACxEvvbynbY4k52y+BfkKEUxq5qM1dGUBOVGwkKHAiAgW7P+j fpRTPWmpEE3SKXD2qgbRVrnX5GCW/jnVVHaF8KOFxE2SIlThrCP154x/Go+nA5xArzp7 CypA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=P6Z/FSdA6SSWLwvFoduS9ot8DW8FabQxEIFV2iLZWBQ=; fh=xgGjFeAFFR2D3YLKiGUsIMr4j5zqDxnD6GltCTo5928=; b=L52rizoKhiTBOXVh37E9kWGKfNbYAdXsDF8rQ3p/X4qfN3157fuYctDV6cwe8TV7QX V8aRfqhH8D/aPSTGIQN6pZtxFuSEYWbh11Z/ehH2Mh6cKuc/LWFkGGgosYPNkM5TcKnP oEKeU7XSiMI06c3DW6IFw2xoiad9goPvZg73wbdVVOTT0bBlCT/SFdUnsdVXB+LSPtpg 9jVU8L2tR9NouPbytxAWdpReNjhVX4LFPSPG7LBNNu7nKNNV0Lem6VCeiurGu6PyjZr7 RPYjStUDPDW/Z1nvbAdn2+cSL6LuWgoNUJlyBD3USz5lSNbvaU1TDsgm5tQSghVZ/TF+ Wsdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=m964JQlJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lh23-20020a170906f8d700b00997c25decfcsi8525096ejb.187.2023.07.26.00.02.21; Wed, 26 Jul 2023 00:02:45 -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=@intel.com header.s=Intel header.b=m964JQlJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230076AbjGZGUS (ORCPT + 99 others); Wed, 26 Jul 2023 02:20:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbjGZGUR (ORCPT ); Wed, 26 Jul 2023 02:20:17 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6811510B; Tue, 25 Jul 2023 23:20:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690352416; x=1721888416; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=1616SoPZSPatTpMsZhCUXl8Yd3XySJvItC30dHWAI8M=; b=m964JQlJlpTBx+jPKNeKDqQRx9JQMoDckldAEXRNRLQ2bqDBOrOV7Gm3 fhJPBUNCUAfN2YKY7DisTXWCf92i1fHSjFbAd15wJUNcqN2oHMxpDJoML KiXmcXze3n64ZjrQDeJu9cDeguUPZTVisA5Vl+wSyZF2IvSYrMmApiEBw oIzPLanPsB6VRlZktpzoBtrPy3JiBj2+O9Fmigtx/ZSZ6g5yDeuz2CC58 QpDdqMV5TxmyLRUJmnMIxhSU6Cxk7WmyCN2BgmLszIKVSiKIJsrmFVLnj vU9nsVvTJPpgM0DEcO62SDqgrEwQzFENUluPzGoy7zGgk3aX81NFM1Yio Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10782"; a="352831324" X-IronPort-AV: E=Sophos;i="6.01,231,1684825200"; d="scan'208";a="352831324" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2023 23:20:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10782"; a="726384390" X-IronPort-AV: E=Sophos;i="6.01,231,1684825200"; d="scan'208";a="726384390" Received: from igosu-mobl1.ger.corp.intel.com (HELO [10.0.2.15]) ([10.252.35.75]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2023 23:20:14 -0700 Message-ID: <3ec97a7a-05fe-3a77-bde4-ec37419ce090@intel.com> Date: Wed, 26 Jul 2023 09:20:10 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.13.0 Subject: Re: [PATCH v2 09/61] mmc: sdhci-pic32: Convert to platform remove callback returning void To: Yangtao Li , Ulf Hansson Cc: =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230726040041.26267-1-frank.li@vivo.com> <20230726040041.26267-9-frank.li@vivo.com> Content-Language: en-US From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki In-Reply-To: <20230726040041.26267-9-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On 26/07/23 06:59, Yangtao Li wrote: > The .remove() callback for a platform driver returns an int which makes > many driver authors wrongly assume it's possible to do error handling by > returning an error code. However the value returned is (mostly) ignored > and this typically results in resource leaks. To improve here there is a > quest to make the remove callback return void. In the first step of this > quest all drivers are converted 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önig > Signed-off-by: Yangtao Li I already acked a number of patches: https://lore.kernel.org/linux-mmc/af01d060-dbaa-aa54-8203-3da5fcbc0a79@intel.com/ Also there do not seem to be any changelogs? > --- > drivers/mmc/host/sdhci-pic32.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-pic32.c b/drivers/mmc/host/sdhci-pic32.c > index 6696b6bdd88e..7a0351a9c74e 100644 > --- a/drivers/mmc/host/sdhci-pic32.c > +++ b/drivers/mmc/host/sdhci-pic32.c > @@ -210,7 +210,7 @@ static int pic32_sdhci_probe(struct platform_device *pdev) > return ret; > } > > -static int pic32_sdhci_remove(struct platform_device *pdev) > +static void pic32_sdhci_remove(struct platform_device *pdev) > { > struct sdhci_host *host = platform_get_drvdata(pdev); > struct pic32_sdhci_priv *sdhci_pdata = sdhci_priv(host); > @@ -221,8 +221,6 @@ static int pic32_sdhci_remove(struct platform_device *pdev) > clk_disable_unprepare(sdhci_pdata->base_clk); > clk_disable_unprepare(sdhci_pdata->sys_clk); > sdhci_pltfm_free(pdev); > - > - return 0; > } > > static const struct of_device_id pic32_sdhci_id_table[] = { > @@ -238,7 +236,7 @@ static struct platform_driver pic32_sdhci_driver = { > .of_match_table = of_match_ptr(pic32_sdhci_id_table), > }, > .probe = pic32_sdhci_probe, > - .remove = pic32_sdhci_remove, > + .remove_new = pic32_sdhci_remove, > }; > > module_platform_driver(pic32_sdhci_driver);