Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1945812rwb; Wed, 26 Jul 2023 23:01:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlEeegdxd7EOPh67KigGo4++4R2p8p1b9wudiSS8fJuLFE9x+D1tdJQ2RG9q4gpx7GB/NlNw X-Received: by 2002:a17:906:3086:b0:99b:dea3:8d4b with SMTP id 6-20020a170906308600b0099bdea38d4bmr30937ejv.45.1690437674336; Wed, 26 Jul 2023 23:01:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690437674; cv=none; d=google.com; s=arc-20160816; b=w+kg9VvF8qsYsGXn7nyVaYOHcZg7vrmr8p4fgjCLd+7lxVyGEQwGrw6VjOkjlsQ28h Dczi/jrTQGMWwA3ED1UK6SXD+CD36lQ4eMnC+28k1aHPVjwo25P9dhtDV3CdrRiOuds0 1aVZKnrvw7dnrFgcxK19Bk2e1+pVymD2QAbW6nOONkoBS6RpUusjfPHhc8wAthj7LFgE cU551yXE0uB1IGIPsI31VQbbI7jrW0U8LN/uEplj0m6t7Cd9F7iocGXsNkqK/lPnmR+T EcbSrGax1KppdZE5sWU+t8Emjqs0teoFmbsnGRU0E4BvUZRCEdY5wmhfQcMdnDbnXvT5 PGoA== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=yTNp0sYgD5zMdnjd5nivhzfUxDOUpHBvlbZBBUuBSK8=; fh=SZ9CWe15LXYNxDW3TYcHGb4y1qMXNaCyZMZZfCQh0Oc=; b=KFPZP9TmK+uoOL3a6f6rNRUwbhrncPoyEJkTd/vkNKKDrVngTGpDjZ2Hn8ZQU5ZJ1H lizPHRLfBrH7FZcWZT/10HLmcORixfywmUlq6kbam0DBGVdEQWcgNfdbztfQ/pCaMcQ6 5Ggapz+2yeskB//x7klG4bnHzt5D8sU9a0w8GfP8f6Ve99MeoNe+UwHgv0iwCdUzXC/w MVBi9h4OSMvjES0cJ+si12zVMc2fD4+xkFgJsm9dfof1oUF1O3U+9M1J32fjjJ9Gf0T7 daNehqo6DoJjuvPh31u9WECMNyyGkh9KWSp3YA0NsYhwXd9vgcdNQi1yTVpC8VOWMQwF NP+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=Do6o4dH6; 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 q23-20020a170906a09700b00997e71d0377si478071ejy.366.2023.07.26.23.00.48; Wed, 26 Jul 2023 23:01:14 -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=@tuxon.dev header.s=google header.b=Do6o4dH6; 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 S231451AbjG0Fn6 (ORCPT + 99 others); Thu, 27 Jul 2023 01:43:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232688AbjG0FnQ (ORCPT ); Thu, 27 Jul 2023 01:43:16 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAD3230D6 for ; Wed, 26 Jul 2023 22:41:55 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-686ed1d2594so581957b3a.2 for ; Wed, 26 Jul 2023 22:41:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1690436458; x=1691041258; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=yTNp0sYgD5zMdnjd5nivhzfUxDOUpHBvlbZBBUuBSK8=; b=Do6o4dH6SqtgInZupQNgE3LGRebmjvQq9ntW2BM+eF/Fn4qI7L4SSBZz4SecjUCEFm 3F+5gqWeNjsBAAJ+atklVaHFRcTGG9V4GZOr8MJ9jAcpIMdvTVC2bRvYnqXz4vuEErHj 17Fw3zufiIbDMR63WQ2uJub4pY2s31+l7Z8nAvGAVcKoesI7gT5MFJw5GZjFUtV2U+S1 hMlTBuPftFbUIlUkSwirMEFA3kTW6tIGz6YxdqyGSe80a9CvKLlYq+xRDjDvU9m8yk2h 2/ekTdctVvPa5HP2Suf51o50NcC+0bqD7DDvVp9jWz8MO3a4EtqA1g2E/wayY7zKJMjW 9Atw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690436458; x=1691041258; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yTNp0sYgD5zMdnjd5nivhzfUxDOUpHBvlbZBBUuBSK8=; b=MMmWZkdQ+uOzymqyqXJcZZSIedXqIGeLbZTyUgdE/sxNodo2oAmH6LI+zFHzSd75T5 F3SbU2gbdrCt+4RahZe2c2SVTbHywtbUTwwK+xK2k8HeNzZcBBzeebqbtGA8KmFqjsep 3AijeubR50GjvtvfFnWpGLhki2lwmedjkw0XiCOc8GevPnPGg3csFd+d4qumATAqimXW GM+pUgQjC4O01bcZ+vFGO86YRrx3hVLhM4akflHcz5+dPlCxK2lZtdeJFd0YqlfqdBhj mt68oeww6KWYRsi5AzB12y8JRh6HxSEcNTKFpUXJskYMQvBm5n4ILj9qZReno9q935b4 V6bw== X-Gm-Message-State: ABy/qLbe6z2ab1mSsW0fRYLMEfF9X3Mw+tKlxrQOwWDR+P3/vW1P51IU 9Wbnjqt+uIvbKwEt8rVyE5GIUg== X-Received: by 2002:a05:6a00:2d8e:b0:682:616a:f910 with SMTP id fb14-20020a056a002d8e00b00682616af910mr5155408pfb.20.1690436458474; Wed, 26 Jul 2023 22:40:58 -0700 (PDT) Received: from [10.0.2.15] ([82.78.167.79]) by smtp.gmail.com with ESMTPSA id 17-20020aa79111000000b00682a16f0b00sm538227pfh.210.2023.07.26.22.40.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Jul 2023 22:40:58 -0700 (PDT) Message-ID: Date: Thu, 27 Jul 2023 08:40:46 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v2 12/61] mmc: sdhci-of-at91: Convert to platform remove callback returning void Content-Language: en-US To: Yangtao Li , Adrian Hunter , Eugen Hristev , Ulf Hansson , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230726040041.26267-1-frank.li@vivo.com> <20230726040041.26267-12-frank.li@vivo.com> From: claudiu beznea In-Reply-To: <20230726040041.26267-12-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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.2023 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 Reviewed-by: Claudiu Beznea > --- > drivers/mmc/host/sdhci-of-at91.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c > index cd0134580a90..af5bc0caf29b 100644 > --- a/drivers/mmc/host/sdhci-of-at91.c > +++ b/drivers/mmc/host/sdhci-of-at91.c > @@ -443,7 +443,7 @@ static int sdhci_at91_probe(struct platform_device *pdev) > return ret; > } > > -static int sdhci_at91_remove(struct platform_device *pdev) > +static void sdhci_at91_remove(struct platform_device *pdev) > { > struct sdhci_host *host = platform_get_drvdata(pdev); > struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); > @@ -461,8 +461,6 @@ static int sdhci_at91_remove(struct platform_device *pdev) > clk_disable_unprepare(gck); > clk_disable_unprepare(hclock); > clk_disable_unprepare(mainck); > - > - return 0; > } > > static struct platform_driver sdhci_at91_driver = { > @@ -473,7 +471,7 @@ static struct platform_driver sdhci_at91_driver = { > .pm = &sdhci_at91_dev_pm_ops, > }, > .probe = sdhci_at91_probe, > - .remove = sdhci_at91_remove, > + .remove_new = sdhci_at91_remove, > }; > > module_platform_driver(sdhci_at91_driver);