Message ID | 20230726040041.26267-18-frank.li@vivo.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-mmc-owner@vger.kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8EB5C001DE for <linux-mmc@archiver.kernel.org>; Wed, 26 Jul 2023 04:04:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231449AbjGZEEK (ORCPT <rfc822;linux-mmc@archiver.kernel.org>); Wed, 26 Jul 2023 00:04:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231443AbjGZEDU (ORCPT <rfc822;linux-mmc@vger.kernel.org>); Wed, 26 Jul 2023 00:03:20 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2131.outbound.protection.outlook.com [40.107.117.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 908C23C34; Tue, 25 Jul 2023 21:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JOuGWEIf4z7ANQc6Ww1CBYhujHy6sB2JTOgV2MjXo7YEhN6EEFzw/o/bfxra6yv6bPVK8KpL00C91tVlg++tJ2Bh5BSfxUip+zHzihaJfif9oar+se3KdHoce/l6N4WMVWxCK3lYPmOpHDz+8KBNtuuHstlHV1XSFzalnr9562CMQ6Pbk21uv5HIIfp3QgPMRvANiiTIP++wbEcRJM4enSvcj5G9UI19BgqFBf/jOH6mRgVE2Z43dCD4c+NaWMMqHCXOTg85JgYMGkshVtGdRbvH/44SoEMPoVYgBVDXviHvSko3BUetXv+aYtRzsvIMCBXdJYgm6gpt3Srx33erJQ== 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=J7vD7Vp4I8SdWjlY5+/f++Y3kXqtv8pRSHTy3B2GSqQ13jBDDvBb2vCg6a9MQf3069UXYR83iiICaKbIQUdC0RVaSJjDmDR/GxCeyyYiEAcVXxAp/hYZ/3TLXDdu2884cHaTLC/14D4l+6ah+QLbd8g6w1JjdT0byENme19O8xWqIzq3zde2JrktVDhhR7vpTv1TQyZhRzNXIuQ0Rbd/N6IOR7NqWIKxWhvpG7Dp3zACSl5jgtFda5LxVzk4FJFaSFFwZ0fCtqZoSuc7M3UZj0xFRgKCw2lZo9pQWDQKtd02GnslEo3/SCs7hWdTNXYhbnXDHDm4zgFiEnIIxoadzw== 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=HeVOa974vcZRLKI/Ih4j+/45gLspk7xMVl6nAEvmcKOQbe+VRYzU8pWKql/YBvlxi5VHL3HtMHRPBEkP4e3W0743/CWQkBB/TfxRSuKkMLzzJciTmdkuXuSmDi8UoCsnlKU/ZUCdvDC8NHuSlmVG6Tz5Dz9sJB5rLk/9gqez1wFxQO9tGOB63IbCg5ATVXt+pd54dFj2rkxRKmqXJ+5OR99qNZrFhab1NDeU6PF7bUyCjXlcAFfbFN1CaYUhtfEiY+k/3bV4GIpXVk5Ku0y+fsXxX1KAyVPNwi7V3+8l2u2MYC6OdOObhE9J9zzEm6xbaY2ZxtStK4t9MyVqlutGCQ== 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 TYZPR06MB3934.apcprd06.prod.outlook.com (2603:1096:400:7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Wed, 26 Jul 2023 04:01:29 +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; Wed, 26 Jul 2023 04:01:29 +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 v2 18/61] mmc: sh_mmcif: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:58 +0800 Message-Id: <20230726040041.26267-18-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230726040041.26267-1-frank.li@vivo.com> References: <20230726040041.26267-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR02CA0093.apcprd02.prod.outlook.com (2603:1096:4:90::33) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB3934:EE_ X-MS-Office365-Filtering-Correlation-Id: 5866640d-67e3-438f-1b9f-08db8d8cfd6d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L/8K3AEWZVJUKb/Zz68mpWSQSMDGAlYgqjWFrcyXp8FLeAcXYyg3GxsXiAN/pfEay7EXEl9wqS/pN6w6mqmhnykprlGucXjjIChDZA7UDMEt3BgG51fm+1art3HzYYpJJazj5otejxYCsFCCgWZVwZkZRb8vhOLGT2exhTJ5wuhC3hDsMvOWOXLfp3/OYXlfLi0f2ZblbsujMRq8ulEfnoPEY51RyM0XpbmoslurBN8KUKnr8guRHmZ4U4exPScPYQnCA8rpaWBPGDfQ/BtsKSS4RCPf+eqGn2+PLDsNgyDoee4sbUCRLujtc+WJMnLp3Iae21LKGWZL3VuCRUhv9/cicZ5474ED0IM6mH+twEoWZZSm0zO+0KGMblYxWPZFPvC/hUSARJELr92ZdzcObmZa1usoVHf2zCjB1EN3iYci7m0fkw+obQrZ/DTDNUMDyN0Hf0LefB3nTFRjWORfUs1L6G4hB6tnqVPCi9osH9nbuVREgTe3NaeCQPsqsMuqxlxY73Sqww+Y8NWIGGSYGvNu6JaxsadqmcNMqvEHfJhjsZyMjnqayve6wdUzbr2B1KXGWo04XRA3ojEGpqXAZAK4ICKDUtgsFeUg8XEvQS0eQmdwOpVdOyPhApBdQsl+ 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)(376002)(396003)(346002)(39860400002)(366004)(136003)(451199021)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(6486002)(52116002)(54906003)(66476007)(316002)(6916009)(4326008)(6666004)(2906002)(6512007)(1076003)(186003)(26005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?o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lu2j7Dz6y6YJsJ/UyquyiUS6?= =?utf-8?q?/+xSBeBRi1eGZFZRdaAipq13V9ErdKZgXABw7H38Ec5/PafOtuxJJvWPkp/pbmKMw?= =?utf-8?q?gCTfRaSpY9GL9ssSnpz5O7GXGUkzWvEmR9cZwLKQmUCGGChbIP1v7DoDayQQqUuPY?= =?utf-8?q?0cxp4eTJITyWQdhcJZwUG1GARt+hdFM9t1dvIZnGD0yLHV5z1ACiloHOq7JHN3IKp?= =?utf-8?q?1xhNzSAkdmvxBHJX2E89YVHwKhOj4U+/3RkZQOi3ln9u9fO+Mf+IZAj5gyxyNNnYp?= =?utf-8?q?0/ntDMD2C3uZPD6LQ6+ZaFUkXeBHPDX6rBamburJEWxTbPucNJAyiMl2saXZJmt+O?= =?utf-8?q?b9tHTxDL920UMiC5SJyl02auxV1bvYIzmNCzug+WusPtBRorRw1ohDJ6hsrtRg6SU?= =?utf-8?q?Eh/+mAjNmR7epDVwzmUqnAxx7hFOdXVBBwTAFV8W+c/4KAYpkkEDp/pCTX5Fm2otO?= =?utf-8?q?T5CMCPIhi3jMhY6d7uwxgonKLnvicDj+/M1/SOVOoSmw6p26oPEqzrVVJh3bx7RPx?= =?utf-8?q?GgWpZtf4PZNZXaQvt57vmY07X6pmXg8VH5xKT6iQlD2Gs9DS5EdW0WcjBaPA/mopm?= =?utf-8?q?YuSfP9v6Lr8pe9OooJgRxzR/3TwrBjJe7mUmk8iNAQ5bCbejJjnT1t5N/yyuLL5sF?= =?utf-8?q?6mUif1Wb4BXb?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5866640d-67e3-438f-1b9f-08db8d8cfd6d X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 04:01:29.1309 (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: IunwaduPF2ElWdgq+y8oB6lXUjS6FL4QIhtVrhCKxEvZgDoNM2A+E+fJ5jHTA7/V0i8vXhnTh90cxSaDsiv/MA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3934 Precedence: bulk List-ID: <linux-mmc.vger.kernel.org> X-Mailing-List: linux-mmc@vger.kernel.org |
Series |
None
|
expand
|
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,
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(-)