From patchwork Thu Jul 13 08:07:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 119613 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1668364vqm; Thu, 13 Jul 2023 01:14:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlHpgLUwq/+p/0rWLEtkJrm7I2knDMkqJt1pmykEkrKqGCrSlIpO7kZwXHNfMlf78EiJTC7u X-Received: by 2002:a05:6a00:2d01:b0:66d:263f:d923 with SMTP id fa1-20020a056a002d0100b0066d263fd923mr567038pfb.20.1689236090598; Thu, 13 Jul 2023 01:14:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689236090; cv=pass; d=google.com; s=arc-20160816; b=agtg5g1X02qF0oYpG1K4ELFixyd/vqcw1gH78r6wuESIEYWZlN+CPTcX1XJL96rfs7 7pyPdx44GQtLA9N9m4RvpmzklJxKOUHorxTqOOty9jvEd9oUq9bottSVYC1Om1GmTGdh qfnlmPtmyOUgNRJHx/QjXZl/iSsVMolZdGet+GAyHU7tSl4uquzdvhreE38LvVIWA9Bk oUAQEpOXD/KkhRdac3hDwqGC9E+yoRty/8TXYfesJwmwdC1RafMKl5eZkoJpxvsv/uCA FI7k2NSIazM1Wxkgz3os1QgFlMjDriJO5fcghsR/fTtw305QTn74RvUbm1KeriNQtkM2 NT4A== 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=fGKTRYq08V0JvxsGHP5msYQNQ4gzgDy3xPfXbsZZVBw=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=RgMMKQqfRNDj/IS//op9Xb849HPa648HJL6EOERUwcOy0iLhdLDp+Fr2EPN4LdLIBs dgAC71Q48DWhVY/Izm+HyiE9Qb7ppJOhJ//Ay/enBtyGgs7tGCRAxVpxVM6Z4lq76W06 5aIcruZbQ/IgK3E6k6h9vzawifcpfargugttOTJbVXXHoN6lfOMO0dAAcGcLntfytTIv vW/Bi3lW7fc5Iudo9BnAcpii9TTpfDBimPFqFzmhfyMw6FstkdtjdA7C4AntoaK8RW3u Sgq4ifYvz19b4vS93WbSrCsJZxmj/kDvA4jp6+XgttqHgmHuS2l3/z4K8Wu/aG336NIH 2bTA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Q0VymLNW; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b13-20020a056a0002cd00b00682d831af28si4574855pft.348.2023.07.13.01.14.37; Thu, 13 Jul 2023 01:14:50 -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=Q0VymLNW; 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 S234197AbjGMILd (ORCPT + 99 others); Thu, 13 Jul 2023 04:11:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233842AbjGMIKU (ORCPT ); Thu, 13 Jul 2023 04:10:20 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2115.outbound.protection.outlook.com [40.107.215.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7CCD3A86; Thu, 13 Jul 2023 01:08:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CqXRLArFgAnr3xRxhFqSPk8q8bYuQc+Mt2B9ZfKms2Obrue78OiGsi53mvuaLLYCAUYIctEfS5bJSewHn4+LuQhhEF5JCQkzjTTL99Qva6KmtrqQuxLkscmOGN11Wb2qMghTLY21VUUjByesMlrFcdQaY/+gOt69M49c/UayHAabiZb2vBFfYTRI+lE37AOBUd7q3Ak4RBHgBZUizDYBfSTQBac/ArLlu9KEX/cwAi8X2oVR92xbJg2mcrk/wCiSHWlgDVa3xZX9qgkXk0aQGd5e0UKFDEmo5aQHyzsXvFGDxEOGSysicSD9HmagN1RjtzwgpM8JfNdTJBEjK+ybDA== 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=fGKTRYq08V0JvxsGHP5msYQNQ4gzgDy3xPfXbsZZVBw=; b=NM1olmGIG+mWw5zZnl0sBxZNHupDT9LAgnTboxZyQL5cSHCpE5fL7CWDA3TsbsWt0FVEUiSK6Es9+gyRDKpkhFXrjzsddH3yPFMNAVMwdGJa0aJ2MQ+hhx8GqDXCfpwt4KEzdFilY7zGFjA5OWja5ZHeFfMToPHoyc74lNVcqnpBQbz2xgyflSq/ucAJBTjYHBB+IGo3tKRdGmaAX56f6SOjoT9OfaiOO/LTPydI+hxdaGVFG/8w192YvFnJ558hykngSOTXE4+4hNtAa1gH5ZvRpQndm3NTsbsbKDiJrGWs/kPLNv/OPHkTduPzfjqthI3t/sFch2JUd31T94HwXw== 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=fGKTRYq08V0JvxsGHP5msYQNQ4gzgDy3xPfXbsZZVBw=; b=Q0VymLNWjYdXUxlnR1L3p/aDzrV9Zbmd4EaGoMUkMmapxJuP6iqLB2bV+V1vibU+BHOAVqRA2lKgY+PDpMGW0jG+tS/OuS68McZCXFt+dGLHkmaIZMYLGn8sLXwp2vQ8kJLlUlGMpny9K85Nf3XNMBVEInN1i7r32jK0SME0+mhmC61oKE5ygo2ICNsFbhydV7rzM0ADDSF5mZ0Sdj7CEy1DEYP0ylIV5WfVNvDh6Li0JAkqJSVcGEDJ0OQ4850RfqLt8eaghNl2p5VmX7NXQ9YwkW5d80w8LP4h9hNglkqfzqW+spxhf0GG1BJLnvWVDHQCZGhBYm3aBUjIpAQYlw== 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 KL1PR0601MB4371.apcprd06.prod.outlook.com (2603:1096:820:74::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.22; Thu, 13 Jul 2023 08:08:45 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Thu, 13 Jul 2023 08:08:45 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/58] mmc: sdhci-pxav3: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:24 +0800 Message-Id: <20230713080807.69999-15-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230713080807.69999-1-frank.li@vivo.com> References: <20230713080807.69999-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR02CA0091.apcprd02.prod.outlook.com (2603:1096:4:90::31) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4371:EE_ X-MS-Office365-Filtering-Correlation-Id: f95b1423-929e-4641-5dd9-08db83786168 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L6ElLLyIIX1SrnUPbavt18ms4VENk9Q9UlOrP3vQ7QlAt+Z6OP3Ml+lbRB6ADvTTMDqF4mKdqRuOl9eugdun56a5ssDw/SJXmag02ilWtieXR0nixearuNKjvXOppyYeU+2/YYuuntTcnHTvP+sSfgbVcts7QL4pYZFqZx5U6oEww6uF7OZD9j/3Rtm8xsx2XgEsZPHH2Rgq8BWyZPeN6VwmAjnbCM/WoXOocYOwM1yqG6sokQrKoekRZJor49YKguhWvJiOj4yNrABeS1WUa2CAI5DhVsCJX5BfHchZjzThBX4VeYmQGu8YK0sJttzckfa9vQtH4vGWFRCh6U3meGOQOD8XlRuFvRnGHyh0jW6j5RHfbaxb0U3czNzsEao6Rm75fcFGJzC0bOOeRzylvZXWUDeKYJQ4X+1yDwm0cl/rVzL8tdguF3IUXsMYi2dUvvgByRuhLzQxm8MoucL3eaPlpvAhETgBzYdyKWNl6s7Gnv4yPeev62d9ys2GVUm3U/PK3bYoWnGOyCbI2madqljTS1uMfost/fynfjWljxiG/4/tECrSv4U/l/xP97hQIhk211tsyJwigHWEw+ws90DF1ZF0XGPrGze8cJ259N8t2f8UxyFFy0SCNagBCsDJ8DNt6ZZptHWtLbbsXNBfFzYsQn1fhBKr1jHk4N0abVM= 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)(396003)(136003)(346002)(376002)(39860400002)(366004)(451199021)(38350700002)(38100700002)(478600001)(4326008)(6666004)(86362001)(52116002)(110136005)(6486002)(54906003)(66476007)(66556008)(66946007)(316002)(6512007)(41300700001)(83380400001)(186003)(2616005)(2906002)(36756003)(8936002)(8676002)(26005)(5660300002)(6506007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ASBl8rYI/EI0DuT5YunSRs33p3Ea?= =?utf-8?q?zSSR7vWrTxqWtjZpkR/7n0rhTWfl/qMrT83Txl2ehwpBqIK4s8wWsxcXvjgH0Vm9T?= =?utf-8?q?ApxQphCncBN9POuLyPSLJaKK5EbuzlGWLL2S2VVsE+rmucTIWTuiq/iF2K3gWmreZ?= =?utf-8?q?OhXkW3Cimh30TwW5gKPof31KfI23vJRz/TRcoaj0EcKFMlEsxzL+jKfz/RYf8E23O?= =?utf-8?q?DS2azhjmV/MfrAN7hKBJ1FChNCydwihv4KX2ei0I2Mm+1PpcLOyZDFWSP3hAo+ILE?= =?utf-8?q?IUah0+Si8oqVgcIs6/pVsnvEwZXoewexciggxSKVcTn/bOYRaZyFF4cFMjItd8peB?= =?utf-8?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S8OtMqT5CI7Gx6Y6l6fYxyRoynnTH89VgVkaHN0DacVnNST4aBfuYhF13++zO?= =?utf-8?q?B3AMyp+9yeCibz1C07KrZ6ANt1yt286/6KpXaaEym8gOI70wDKyBlGFNGPZwgjWt6?= =?utf-8?q?gfLZ9VadB/7+mrl9nHECmlo5RwfGEqOLMjl8IL5T4jkXJlq4czVrZOH+nP9lpPZt2?= =?utf-8?q?PM+GTmwMTGs8q4Cj2kUok43pg+DUcuavt18rwm3bk0bOsF9SoMivZm1zZU6G8+Yc5?= =?utf-8?q?XDAQuV9ftPhvXPw8FGKos9LX2fZChl/vQCZ6Io9RKKzZO2Uq7oh2njjFsrZLlz+Km?= =?utf-8?q?mqgZzxUd81D6?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f95b1423-929e-4641-5dd9-08db83786168 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2023 08:08:45.7958 (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: qXaFxOAdWfzGwrBw7VpJAbdig1Wo2kT5z1BAMpDA38b7dwsulzPOyrounYSbZR7ZtPJgpkMYA6xDIAZuklyW/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4371 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_BLOCKED, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771292422781028251 X-GMAIL-MSGID: 1771292422781028251 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 --- drivers/mmc/host/sdhci-pxav3.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c index e39dcc998772..3af43ac05825 100644 --- a/drivers/mmc/host/sdhci-pxav3.c +++ b/drivers/mmc/host/sdhci-pxav3.c @@ -470,7 +470,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev) return ret; } -static int sdhci_pxav3_remove(struct platform_device *pdev) +static void sdhci_pxav3_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -486,8 +486,6 @@ static int sdhci_pxav3_remove(struct platform_device *pdev) clk_disable_unprepare(pxa->clk_core); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -570,7 +568,7 @@ static struct platform_driver sdhci_pxav3_driver = { .pm = &sdhci_pxav3_pmops, }, .probe = sdhci_pxav3_probe, - .remove = sdhci_pxav3_remove, + .remove_new = sdhci_pxav3_remove, }; module_platform_driver(sdhci_pxav3_driver);