Message ID | 20230713080807.69999-17-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1675517vqm; Thu, 13 Jul 2023 01:33:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlGUGHg+qXkt/oBqH5zK5q/HTvtMJGgidQllrChE8Q4bqG9TiUnMrO7tOfUzEbdckxNvh5US X-Received: by 2002:a17:907:c84:b0:96f:1f79:c0a6 with SMTP id gi4-20020a1709070c8400b0096f1f79c0a6mr684032ejc.70.1689237192333; Thu, 13 Jul 2023 01:33:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237192; cv=pass; d=google.com; s=arc-20160816; b=tCLIRbP318gjhtM/RQYnu+rhIPydM13cFAfjxMNDtcputoHFNMpbYdAGNOrO23lfYc VJHKgcDbZQWLIE/XZpmrdjvEph5vrNhy5XOzBQScdH4nJudkD+UgGEoTvwQP6rtfcNyA H9kpi07st/8Nwz5xA+CMInv58sBjqeWks1kxNduThpD249zf6kZJS1mz+XIC3wg/44O5 WS4qRf5DTmEjTfv4sOHOjMZtsV8ijYOAqp87G9RJJpYolXDmuGHboN2WgM0NQNGz0JUH 9ZeKpPjwAZN9uaZyZoLyz472fn0lB3dbd4BjU8kY+kImfOy4TpVBET4aX7tFfIHCBcXS r/uQ== 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=w+CTem6dHExq17DY+SzLyRt98v7BugU2JDEv1g8WLeI=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=XJC7IABQHjxSioEmNA6PxzqzRgmGdfR/9+Un/PR2U0TC9983mV5oWe9Qewdw7ndqC8 euEsc7+c2gIrbivSr3wpTQ5DzqAqbvp5AtjssJ6C0vED4lblmg0jxGhClSLNPVkuNO5v eMq7QEK/Ea2X/Yit6gWZ8iZVL1u63+Azt0YHthH6HfF7NcFq87SICIyjcGxcF8zNhLQM ubnjm/BUYsIGhR8thelvz9uVZkM1QUe02K0rwrBgrmrXIqt58NTmW6C1m7SMi+E6ae6f kpaiNaDMqtIDs7XzorsxtoFZygBYlyty3eZ6GJB9RrrMpVC96XSgnbyc6YKEaeP9ODyt Rb4g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="h/7+/0Jg"; 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 v10-20020a170906858a00b00993860a6d39si6773491ejx.355.2023.07.13.01.32.48; Thu, 13 Jul 2023 01:33:12 -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="h/7+/0Jg"; 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 S234247AbjGMILx (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Thu, 13 Jul 2023 04:11:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234137AbjGMILC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 04:11:02 -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 116D93AA0; Thu, 13 Jul 2023 01:09:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bYpO/4voLcWTi4d3dfR28v7GaLXJFeL2HqUq2m6EPonIUstHex20K9Gt0KKvzLpFd/rYLWhz8tgpJj6kq3HBMKwRdtG3o5FY7tgoB7e0jBHzMyF3ZBNVsOqwZo3rGkdbvcumpSrWzPaxkiuBE2AR1TgWZD2yBk/ZDn/iWB7vFmUYhvkqjpPBFYy6T9k6zbUK/gg7q/9doRBbNIStS4JZlGJhhMOw6UEJ6pKZTUwNZ7OQdwYOIQYoxlWkoxg0fXHpM9/ph+SdpVXRu/gA+RlNJQHm0JFtZZFtI2/vNaW5DsG2afCs4hFTNjcZ25na0ah3KNl757L2n9i2DhdyGqv2OQ== 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=w+CTem6dHExq17DY+SzLyRt98v7BugU2JDEv1g8WLeI=; b=Aly+bj1IrrkJUer5Fsc/iPrBjSGls2jd+aLDjmFQbcrT7R/9tz/thjUAwFQ86wSswOVXCY/I0X+FpQnK18lP6t1OxGEJHZzeLIPDBAogJZTuc7Ir9YVwa833SPKFHpARZXbCFLPgnMdNXk2vosSDeee9je52oGxo9pifwhC7zhZv6oUXVWl0NMblhU9vASTuvJZXtVL0hVvhF9GsG42RypIOta8Z0XU3rzKsIfLU4ZZEWteuC54yJEkwnMljtaPYBOnJsoylrRPqLKp22jzaB0Q0nVOUT5Kr/MMifbKm1BhIdLEUHIl1xjad3hQxWWXuzml6ITNrn2Ct43LUB03HWg== 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=w+CTem6dHExq17DY+SzLyRt98v7BugU2JDEv1g8WLeI=; b=h/7+/0JgQfgu8PqnwAN3vMYAR1BjH84LRoIHghilhp1RspockeWHBqvytpZj9u2e89jqYC+bOyVG5DkcGOCecmIaB7uuZ8RWZbUE2dw72J/uo9sS7x29zcQIuDoJlqG8lqnL5vKbrgn4uLMN+mkW1AC1D3ijQIStR1LlReStch84sYbn47gi+esyHGlQsZm+UqweeCL3uxOQZgBwuoUxTCmUDjs0P2aRLZgnhtexQAPmouj1VBZTySR89m/8ib8fJzr9dK1UrpX5bdDOeBrYEQrHsWBLG2LbnUUNPYxGGsY7NU9DkEbyrT4JlQ5S4gKkJTwz4ddKSF4szW8OaJsrrg== 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:49 +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:49 +0000 From: Yangtao Li <frank.li@vivo.com> To: Ulf Hansson <ulf.hansson@linaro.org> Cc: Yangtao Li <frank.li@vivo.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 17/58] mmc: sh_mmcif: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:26 +0800 Message-Id: <20230713080807.69999-17-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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: f7977818-571c-4e80-1a67-08db83786364 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UG+y0B6CsZiWDx2Nr+tsmSY2w9rEgBOa9qgi13h1JERWMR68R9LMcwuSl71Ju59OjUEm4oljPYsx7/h00DizwmkJRS+Dq3fv6fclBtH8+TPBPJ4AX/g+8MXwr1IDng+svqQV3n40ZmxPu3bwJdeh/qTKRd/9hONsywbMgPDEhE/5gjlh2vqK6BKN7/XLdQe87NWF/C77e9RleVfFGYCtPbt9Mxs+sEWF3g5bw7IHZGKUCfMM+90p1SMstFcO1DlJgOGiExYXa3aL44AkQifOrrdVZy4kKf5r2JnCQDdJ+ivD9qohhlLmbeWduUDz8eSJHtti1rfMCMBPXLJcdIcn4CSarAl6BDAq6XfrYV6nEFJsSnU/kHH1xPEWMRWVQQM8G9gXHRbzJO45pjZaKsKjOuUv2NHKvylnhGELK5852KlLJGPRbcbzTAiOvwljoSNMxAOtwYqJiX+A8/BIP4wjiuOLpmOaTRqSkmuGNftC6PWOtCSX2q9WzQhp6ckAjvJcM6Or8foV6HbjyzTvOqvNHEBXGak84Y4gP5kVv7bmNn7wID/HYkTG0pzt17P6R5Nu7ZSrPTblF36tJLHBBH9TnB0uztPiBmjIwa3p27eVFlJx0lXWIwdHYgJPorD29NyFW0+l+cvY425qfVAhXQ9/XwY732QWkUc7/mSgvxWdWt4= 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)(6916009)(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?//Bq9NxBMOOAvIIfNduIZIm6WUjI?= =?utf-8?q?DFPvMQVXE+MdYj1whABPUyqS1bLVADk9JCNrMZIdv3veO2PSkdEddVkjI+5I42Wr5?= =?utf-8?q?gYdfWLoXkhgZR0LXo5g02UnFqF+iFW5CJNmZajENMnMMc1zvMV31UvqtXnJ0Ibzbf?= =?utf-8?q?wFimM9cfagjS7OghXFOhEWclQds8JXShq05VTfTWyvi6DlwIqQCFOAoAchNacQeAW?= =?utf-8?q?2hInlglmADM1jqdQ6/fTRg7b52QJDc9TaCqtPLzVHHESSqitnSPglcAn95pzva+Q8?= =?utf-8?q?5FXZc0a79kB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LUQ+3GNAatjZX96Xa4ilnMO/QYgLNkS6?= =?utf-8?q?APi9e952ppL3cRHNTaXocHueHDUu0BpzZ2RTu9yH/jXo+S7QNnKwBKsSY6hP4fpuv?= =?utf-8?q?Dkma72oP1J3OYR5Si4IOlL9IwJdrpGQD/byu6Ks0T7SvOvykKnCn3dtx8EGfAtBQw?= =?utf-8?q?jzJOOV+4UzK87jnxqBOadSGvdjId5E7lUVpoMwLSMDxhiIsKJDvJH8w3K5KDuFHUi?= =?utf-8?q?pwKFbBYb+sdYPEHYtZNJd7Y21qYfs5x2dtP336ZKOs7rHgX8UTk7CxRta4NXiRFnW?= =?utf-8?q?/NSo6KpchAlMoGueweIzLCbGEkHXY+Ny7h+vCBrkBbFt1ywy8MyqgpMW6S/YJoB41?= =?utf-8?q?KdzAZMHeCcU5?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f7977818-571c-4e80-1a67-08db83786364 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:49.1487 (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: KUszJBISyrIyN+EAK49YUDYwQbF0dgwZI2LTdLTXQdiZheqsRW9xxAtvwY01CZf9ZNiAbSxQxpMMsodHgFregQ== 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771293578253384001 X-GMAIL-MSGID: 1771293578253384001 |
Series |
[01/58] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 13, 2023, 8:07 a.m. UTC
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 <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/mmc/host/sh_mmcif.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 5cf53348372a..1066e0c2831b 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -1509,7 +1509,7 @@ static int sh_mmcif_probe(struct platform_device *pdev) return ret; } -static int sh_mmcif_remove(struct platform_device *pdev) +static void sh_mmcif_remove(struct platform_device *pdev) { struct sh_mmcif_host *host = platform_get_drvdata(pdev); @@ -1533,8 +1533,6 @@ static int sh_mmcif_remove(struct platform_device *pdev) mmc_free_host(host->mmc); pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -1561,7 +1559,7 @@ static const struct dev_pm_ops sh_mmcif_dev_pm_ops = { static struct platform_driver sh_mmcif_driver = { .probe = sh_mmcif_probe, - .remove = sh_mmcif_remove, + .remove_new = sh_mmcif_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS,