Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2036305rwb; Thu, 27 Jul 2023 00:38:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlHoXGwfmUFn50rVQAj8FHSt2aZr18M6WowY9Dmu1jSKuLOnHgIferYOvtxpRWRiSMFJe50W X-Received: by 2002:a17:906:3145:b0:993:d7fe:7f1d with SMTP id e5-20020a170906314500b00993d7fe7f1dmr1192454eje.28.1690443482358; Thu, 27 Jul 2023 00:38:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443482; cv=pass; d=google.com; s=arc-20160816; b=UszB1crnW8k+aypD6lsJkOC1dUxAq14+d9FsNGRV24UEesfVrjIU2kyBoJ9Nbt878a +bQPdMjBw6/0+MZM6D+OUTNkKhgr84Hj91xQ2D8CHsRkMY9uUaazAYwRlSqfxkOJGVzu 9GBRAaTCvkJyqq10FjIeL7MpDjDGxBNjzRGC7tjqp4AfuDigPqf80bB1ULqrmwBzE2aa 1Er0+651Cfw0HxBHp494HLuISkhigtEzZ1ZWyFaVpZCaFsZOW7cr40ARsle5apihWVFu hfzZO3J0lou13eS/38HAy4vo/oND0mZUfb1SFcS66R5FRZ2qmTH61QppFwsuRgfPqmwL IfPg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rSWnsNd35kiXhc7HW4zXFBezZKYWnpvDY+cv2Mi5G1U=; fh=oM1Zd0ktKl5FNilAel4zgra9YhN+SYjIN4vt5uDnwJo=; b=vlVUX6M2iPQhBAXEkHRfCcQA6O2Kc2c7FRT3PR4ixN1Fagh+ZdI8ERqwE7rAznMX+c UvsAQx1MZYo9MRFR+6GVnd17ZCvItXhl1br2Hqxsgpk0aIo7Y6WHCqpNeZ8+r5oDjmDk LP1vyA9eSt0skSGFWcengM06RyJbhDVXiSR/p2nQ1PR/chD1pGZuCKNOaiwqMyivoeGq 6I49++iSHnS7Z8Wlpx7Aoq0dObBV5AAoSVJggmnyWR3z1XDBOK9qIV2D3aXaTVBK+r5s 64H0oYxf3KoWVHnxST5p2ykC+c7bsM4ICOnLCoB9ow1hTHFEBA64T/CcBw+MIRI9X0+y m6Tw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=PcNHUFsd; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t25-20020a1709066bd900b00992fef5cff8si652064ejs.552.2023.07.27.00.37.37; Thu, 27 Jul 2023 00:38:02 -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=@vivo.com header.s=selector2 header.b=PcNHUFsd; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232478AbjG0HIj (ORCPT + 99 others); Thu, 27 Jul 2023 03:08:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233007AbjG0HHp (ORCPT ); Thu, 27 Jul 2023 03:07:45 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2091.outbound.protection.outlook.com [40.107.215.91]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD91D421F; Thu, 27 Jul 2023 00:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cdMpu7/1Vo3J2bet4cJKHrcaLz00BozX2r+vUTbDZ2WTjZh1nPYAqZsn4SJLfYvv+iXnkyBcr/dr7M5B1UYDfUkfPkItmKt7WeQdaoWv3k+OhaxggND8KIJ1aEdxLfWzBuusw5W+xFNEbW3Oe6bM7mqmWeuw0XDuzIvGLW5bgYrWapl+LIsiz+3MSXVVapSssrBi0c1flxKn7VZLooDs6PQ+3prDO+2RVsaNGged0fQb4yizDQAaaYgzPHJJBq1vyGAQTpQAwhYmdPizPth8UBoCgq+mguBnb20q7dkaPNP3Xl3NsmMHZVEh31cxQuz2OnK0SmS/S3dyMjFKoc+UBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rSWnsNd35kiXhc7HW4zXFBezZKYWnpvDY+cv2Mi5G1U=; b=RBPpy8YPSKIOy+lZsxBvGHoztLCSaKqst38YYodkE7wgPbMC+E3x16SYqQmA4p7itmQWHqLeeGzGpPc+T4Jzt/m0Bbd01doYQCGejgxVvDXxnVe6EYzLwFTDwmXebMfNsER5CwgzZ7TgJ+in9eLUInvw2zu5PsGWJ3rvlvOXOi7gVtueEiXMzfDJC5ENEuqsbUGkxp84+4qkn2bxI2IwpLCyQFOZB2ouhhDu07xooNUtJJ+SLbgZF7pMmWbXtkrFGcuHCZ+gqQlhqhAdpebr3POecDlvb64jzJJbY2OhOGH7Jikcp/4AoJFqldcqgjDxHWNxTVMHoIiD8/3gelghYQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rSWnsNd35kiXhc7HW4zXFBezZKYWnpvDY+cv2Mi5G1U=; b=PcNHUFsdriGLO2L9WjhTQrSrdnLUKa9JhqOZqB9+srnTrL26io50Dqlrh7+7oUrzC0mdfA+5LewTyzKY2W1SuRVcoa4vzxWRNJWrtOfDOK5QJ+A5yl6xPNwGQJ8htDXJDuFidO1BlXUSPYFNp/ag6M514Nqfn1PAlFmuCizUPIuZEX/VcS8CPXGLhHLjpSeyNiYzazJDAxMK8BnumcNof0jtsiN81NlJwZYtgBQUw6yaUqQcR8U9oYPGOjkpPQngL5skXnS/ytccEkkJaCR1STlFh48wjjdQdzi83HVfKIbU1hIfWqIdUx0fN3ExHIWr6ixn20rIJVX1GBbFpt6J/Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:02:41 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::732f:ea1d:45a1:1e0b]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::732f:ea1d:45a1:1e0b%3]) with mapi id 15.20.6631.026; Thu, 27 Jul 2023 07:02:41 +0000 From: Yangtao Li To: Ludovic Desroches , Ulf Hansson , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Claudiu Beznea , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 45/62] mmc: atmel-mci: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:34 +0800 Message-Id: <20230727070051.17778-45-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230727070051.17778-1-frank.li@vivo.com> References: <20230727070051.17778-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2P153CA0017.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::10) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: b105bba4-5434-418c-9566-08db8e6f6af3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8Y/vM+abh0U6LcXQosZ+/PIZmt70CaZiVtG23gssbaDqsvFu9ZmSDtcnIJ6EQVlQiwinbLbZAxbiMLjSoLrzoZGKsI4nXkT40W+6pBzl6IaNFwfez0MjJ0gzGrH186vjWm9ybJ4LmGO9zohTAbkNun8vynfJDJd37jRAK8YhDJhdU44k9+DPF7hWwKIb638HO13Z6LAkw7E+bbf/Tel65pMNqHh6S11i33WfBmHr+pLh9DVHaZKhjjDvLrRJmONia9t9cpKqUFIz+qy0VKZDkdlAM2X9n4mCbg8fbSCg//hpanD6fYF3DrXaxOYLfZ3vans0VgisFj8rKCPt7u61k10710vgOtvbpKL/usII3PFipPoZ7aoPg891aREfx0L5+gLoP+IeaV0eriJOreHXVD9Y/g+ktNX0LZ4Ry7ZbVKCpoJJBbteGQ7HfhZlPIRw6OIxYRJ3ZdZoQXLkWC61CYh1S46USWKc5yOfuLNnCMC3eQ/IwPEjmchCBPJCWfir6ppYFSxOA/IEOdYszm9OHYi4uFHIC2wf+IjLEA1KW6YNHFu/WLYNSLkJR9ajQxsG315xZOAHQT1H5/KN8k3iTwMQZHX5f96iK04vjLT90lx6EVo49Kj8/OINduStv90s+ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(7416002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WklQdHEvZjA4QjlyZ1JKL1pPeTZJRHlwVnhQU1p3OVpyeTlXNUh5Z1hicnBY?= =?utf-8?B?ZGNPWm9WUDlDRjU0czA0aGhaQnV2eHJqSC9BM3lFQ1dTcmhhWXhnYW9mT1hJ?= =?utf-8?B?Rkl1ZUxpNUpjcGlBWk16di9INTgzZ00rTkE1Y3U5SlYwNFZYcElQekNxMjcr?= =?utf-8?B?ekhZUkp1SjVUdjgreHJrZ0ZMTjFKZUNaTjBRRmFUWStVVjdLUEdjT1NFa3B4?= =?utf-8?B?MkFBN2VSL1ltdFdxTTNnRmpVVU40MTFvNTVTZHhnZmt6d2Q0MzcwOGdGUGRs?= =?utf-8?B?NmNzaTErRmhSMCtISG82SW5HYXJhK2taRmdxanB3QkU3UkpKOHg4MFprc1By?= =?utf-8?B?NWJWTXl4Qk1YU0hhVHFDL2Z2Tko1aWR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enant-Network-Message-Id: b105bba4-5434-418c-9566-08db8e6f6af3 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 07:02:19.1168 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lxRkLBY7cG/FuHd1Uw5ri5T9PQXV6whYh43faoL7Xm8bPG7No7GvAn3eaETHzd8fWgRalAhFtmjywiCHASIKsA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 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/atmel-mci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index dd18440a90c5..b4ae9aa939a5 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -2600,7 +2600,7 @@ static int atmci_probe(struct platform_device *pdev) return ret; } -static int atmci_remove(struct platform_device *pdev) +static void atmci_remove(struct platform_device *pdev) { struct atmel_mci *host = platform_get_drvdata(pdev); unsigned int i; @@ -2630,8 +2630,6 @@ static int atmci_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); - - return 0; } #ifdef CONFIG_PM @@ -2664,7 +2662,7 @@ static const struct dev_pm_ops atmci_dev_pm_ops = { static struct platform_driver atmci_driver = { .probe = atmci_probe, - .remove = atmci_remove, + .remove_new = atmci_remove, .driver = { .name = "atmel_mci", .probe_type = PROBE_PREFER_ASYNCHRONOUS, -- 2.39.0