From patchwork Thu Jul 13 08:08:01 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: 119663 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1680477vqm; Thu, 13 Jul 2023 01:45:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlG43MDXCfFeeQMQaTf6p45cttD2ErL/Fe+/X6+HjyoFroiPecreWuNGqi9EhTdX2NiyPdx+ X-Received: by 2002:a17:907:1011:b0:97d:ee91:df83 with SMTP id ox17-20020a170907101100b0097dee91df83mr768768ejb.61.1689237903132; Thu, 13 Jul 2023 01:45:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237903; cv=pass; d=google.com; s=arc-20160816; b=Uae6lD+zVbMyPJUh9D2XluceDjR/3AOq8/yVcavE8m3kHHaSC2qFySLXRT5fnZ7wu5 K9upo9vLiuFH+nkwwDpmFfsHxLEhsWEb/NbbmUDG3DlgEYKlkFDd8Q3mwUGDpgMVY21U 3sjDDG3zAbrbcQQI8m84Y4pqBXEWcaHweg/iOugfFGRCYwlS63Us5U9MavGDXbsRqIKD p2xEMxjsXmdrKf/XI2mgrJOnDzWJ4y4jUJDZ/bDYYxqHzPmJ0L8EhtjNyrKJooF9uIXn Y9qjY8/kTdVonzZtjnHkw625G+48f3fom3TTPsish+t3J23rftwn7ceL5Evk2MTnLDOi FTgQ== 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=gufcrtSc7ru1/F0WuXeyzF62082GBJEpWsdrwZ/EIrE=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=QteX9CiAkfza0A0QuzMSOkQbMbcYvx3PZgAEC/xTe1nf+2rpJvEJsKCHTgHAXt3+Ty X7GPQ6VKGIbs512QQ5aaVhdMnNz/rNZRmHufbFK30aizcLWAM3OSzsRKKnIhauaIrI/z UBif96VxMnf9kT9ZjZTBbUEfVMc2HcSTnaEwrhSBDi+pOaQc/ARYDkMt/79F5s0B3LTy XVsy05lRhV9BgkG9HfeVhyiqy4B8RaJqvTmjgm/4CaWf67VWnAjoa2P/krVlK1D3M/vw Omb9eUW2vPc3DLeY9SV/u7qjPuETeWpIqHkVqOZM1IFcXzp8rsGIqabERKQ3DJpb9Ocp Ey1g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=nU9NtELb; 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 k18-20020a170906a39200b0099396546fffsi6641346ejz.782.2023.07.13.01.44.39; Thu, 13 Jul 2023 01:45:03 -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=nU9NtELb; 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 S234343AbjGMIPP (ORCPT + 99 others); Thu, 13 Jul 2023 04:15:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233141AbjGMINg (ORCPT ); Thu, 13 Jul 2023 04:13:36 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2123.outbound.protection.outlook.com [40.107.255.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC36D272C; Thu, 13 Jul 2023 01:10:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VqAMPMlPlBQCWF7NTB5SSxSqLcjQKNJicwcXR3/2BE3mesAgG2bi3aroYSAxxnCOxv+DnVCknriacpblSreYbM9ABxw7soxinN49EE4AA58vpNv58PiNsEFIIkP3cjtS2AQUgsYls4/t63NUX1SJCyase4dgecI6QAy28jlubPEduKPS6Ti1ZoRxHkwsBYEvyLpg6Zg3vZdoVimT9giXd38FjDgDs5sye2zhYGRQi9aR71VVV4PUaQbm3dDFCmaXIeJHCOt0u0ptaEaKfRlVJqvAnmrnHoWTPzp9KSILnOGvBrX8IzBnDcdYEFsskqYnkbdjNkM+0hCv9LBtCEUBXA== 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=gufcrtSc7ru1/F0WuXeyzF62082GBJEpWsdrwZ/EIrE=; b=F3yDA9wUxKdLUdC0Tv8TxQzg7H5kscuwn5OSr0ainEE3AG6lBWGlcr3TUShp5aCclbp4CGjVToRRjDQFwv5Blz9zeC1DgFbsJHHjOvIjYKJYlb7+torN/piZOhrG8b4NqoHkVXqrtp/1W/C4YFpDvRyot68iY9WN4mu34VRCB9kQPIA08/S5PXwRmXqku5kQU1ObTt2/E5jBtXUM4QZ12+xEU1BjXl3+AjVt7xE+WxGmAQAa3JSJhtejYIExk9VqEA2p3DkFKU+u/B18SbUmjR8g4RDLbZKUf/SDC9lwwDp9zQNGf+IgRxR/Oivj4Kdw8B4ghtmKWy9hLKsImUOA/g== 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=gufcrtSc7ru1/F0WuXeyzF62082GBJEpWsdrwZ/EIrE=; b=nU9NtELbuMTVU4/gqQ5Rhl2l8FxPMJfu/QB5QZSlF8uMDhlPsOKGsBGqZ3IVqvxEwnDqxDk6gbevid3RkepzweQqeEYOGhM8KXPN+IaJ8PPX/73zgQquZEUCYgWncWOzNPPdepaAmwQCh/HsWGwMqynGeNvtKnDe66J9lvJD5Kh0khxX8fdpkGE8LJ2n/bUXnriBlEMxJuqZQYzM3557l7YoIVc5Q5PPOAZ+exqXW/nTz6VDXGEECcloaV8iXtPl+G5uFk0udaY6LbUuVzHp0Qz2keHzSO5a32ewNTmZx/JahhOXn43bY5P5JoxvbtbB1y934HTsymS7nUF1MCtkgg== 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 PUZPR06MB5984.apcprd06.prod.outlook.com (2603:1096:301:118::6) 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:10:03 +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:10:03 +0000 From: Yangtao Li To: 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 52/58] mmc: mxcmmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:08:01 +0800 Message-Id: <20230713080807.69999-52-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_|PUZPR06MB5984:EE_ X-MS-Office365-Filtering-Correlation-Id: eb25ffa8-e46c-4ebc-8cd2-08db83788928 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tC2P5CFRChKkNBAg8h2KSIxmHO+uENeFUjd67eL/9CUV8TzyG5h1E0uAV3vIxkQKHqFGwjDS38CJq5r7hsD7jpLJs1YA9GdpqtTgeJYVdh8F35kQUiMcwYW2HWU4on8ApMfvHfVDAJtW3JuCIVpUhEsvZ4Gk4IntafvEPPSsL2aol7XPZsLOFms9wiH1Vso/OzFfRPpfDdlB+J0P89m+yMRoOC5ucZKLilMgj9V39DwKpZM+hYSn2JcPf4uxdbTCmvYH4ce6tAWqFGhbBkDOCjHXj/3kN8dRNPDFhcjX6o3jTyh+r3ZYtfKJjSIvsI0YNU90QtKtm5B1zawAcrbALIBWRh7+A49RtGNZnGoKCKtANIdpELK8K0DCCdyIbzo/D+nguIbx4BTJzt5LjgMQ7Ut/CYyEBSoML7U6nTZeLBARnP8IHpDMVySS0woRWYUuFKsXbNBa9PnJ+YF7j3Yqwd4RkwUTnasUhRPayM41SS6jeg8FFO/srThDzWnxuDHSyLKBhJULFLthlQOpyck8FWHesUxc9Xtx9A9OCOcrHaN98x6Ik+YiM91fNZbZfEFT7TbPfhP8/iPpxght4+0gxq8dCN/3IHaE9zyEfWs7rNxE2asnRpTqPw3w+cqlxky4 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)(136003)(346002)(376002)(396003)(39860400002)(366004)(451199021)(478600001)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(6916009)(4326008)(316002)(41300700001)(2616005)(186003)(2906002)(8936002)(8676002)(38100700002)(6506007)(1076003)(36756003)(26005)(5660300002)(6512007)(86362001)(38350700002)(66574015)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/HrhEFoRZbJYRmrH1lc8btgvMCTG?= =?utf-8?q?CzX34joDNvyyykkDwAAi4sI1XM6h4Le0lvI83dSTjnFcdj8v3nK5emrFGOQIlfvvi?= =?utf-8?q?kRY8Y8iQuXwglAFBLtsBASUHevyTIj26WW1moGCFZPA1L1vLJFfXDj/eeV5dGYNTs?= =?utf-8?q?hmIFYxYeMmQtXwqtyaKNoFLxPv1lWio3FeWYTSrGqp+5yes3IlV7ihZDFTYm2gyqD?= =?utf-8?q?PlpGgMYfJyY0cHTp4ylfDDHWVs+hRTahEKVJxf9AEEfvLsDAq3qJhpinannEYOa1T?= =?utf-8?q?clO34zl1D39f47be6yK30MgUBOBOTeLrolLgjCPDmiiWBuAxv9KEw4G+jL2O8Kwtf?= =?utf-8?q?8EW98tKPaoyWfFwESvVEMxqajA7XAOS7RHdLpzOqeOS+acM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= =?utf-8?q?VrtUdy+Pg+nRiHt2HmQZFim4/dxPdTTnvHk4GIL8uzvgOXYnWYDhyzEQv232VMKaq?= =?utf-8?q?CFHQcKSUgGEGe9r21TDMuPSHCbiSJJ4oEP5OrQXhYUay5yF6ECPHawkhWmk6lqKQ2?= =?utf-8?q?1KxgUkpbTmevY8OlvN2lFG9p+FBiw9K21S8UNwbX3i5v8fVqJpLNSwH0d3/E2S9Ek?= =?utf-8?q?g80LHfkUZAe3K0vqv1N5WUlGo/lTOhokljMFQS9lRgfLa7qXPImnl444IFpf7ABB5?= =?utf-8?q?DDpNMTskokBk?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: eb25ffa8-e46c-4ebc-8cd2-08db83788928 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:09:52.4880 (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: 2QTu+e9zs53vgbmOGX2Rvio35189z2plDzGcZoT8pzz7WxhmD/qfpRvGkMgiLInefETl/SP8CLhfk+su3HN6Bg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR06MB5984 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771294323386915382 X-GMAIL-MSGID: 1771294323386915382 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/mxcmmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index 668f865f3efb..c46276bc21cd 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c @@ -1164,7 +1164,7 @@ static int mxcmci_probe(struct platform_device *pdev) return ret; } -static int mxcmci_remove(struct platform_device *pdev) +static void mxcmci_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct mxcmci_host *host = mmc_priv(mmc); @@ -1181,8 +1181,6 @@ static int mxcmci_remove(struct platform_device *pdev) clk_disable_unprepare(host->clk_ipg); mmc_free_host(mmc); - - return 0; } static int mxcmci_suspend(struct device *dev) @@ -1216,7 +1214,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(mxcmci_pm_ops, mxcmci_suspend, mxcmci_resume); static struct platform_driver mxcmci_driver = { .probe = mxcmci_probe, - .remove = mxcmci_remove, + .remove_new = mxcmci_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS,