From patchwork Wed Jul 26 04:00:04 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: 126127 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp216804vqo; Tue, 25 Jul 2023 23:49:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlEjJs6GwJjalVqgHgUXUtQVgYwQL8zuk1Yh7i9v7RRQZpz4ZNUSp6KXyedHiPUqPPgZWCFb X-Received: by 2002:a17:902:a710:b0:1bb:a882:c3c9 with SMTP id w16-20020a170902a71000b001bba882c3c9mr787061plq.65.1690354177060; Tue, 25 Jul 2023 23:49:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690354177; cv=pass; d=google.com; s=arc-20160816; b=LjtD4ZR6jPE90tWMGErJWjTTUiLu1iTdNZFqr4C5+oDeQMKaZwZLLQsNRo+k5YZMsm ojzpNqOGpUMlBZGrjyukoZfM8x+Q3Rcg10ERNXxT6v6OD4PUhsFL2olE7koy9QZPoVn2 q0bHWQNScVRmPPLuGrEOutEwFJ9MFMsNhKJfBcpCiniz8aGGU8sCU6/o6j5i7suA45om uBEuXn/qzz8qZ36o8FR2p7S+PVcLny+ShLcCjVepmSzhDnjhq+HEFfFURNkHuJNBSO/v W/QFlVFDwfddrsJTvAhPfiDLXlPdOn+yo01830ieJPk/NkqHUEKAxrVfzcPc0OkGDx6Y TS3Q== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; fh=wkz2ovt44M2hf1vcx/1C2T6B0OZQr2IK+YjLz7QXoPI=; b=oVzpXJFmj1Wyea+kG80okv/PLdvzEPb8/XwyS4s9lUQs19SSHXa17fy9lvj1uYkz6S WCBpryS4bFisIcTfPcQGeGB2KqyLFs6/egNoQZ9h56JKw8YE9w0tEAHMj7ZI+fDGA4L/ lYQUu+JOvVkwli4QB/LYPfvncW/D8/3AeIkr3IoWOQb1iKpLACgJOCPotUwe88wG7Wkl kjQUra5f1oKQ3cCbu1XIHTkrswVDi/6685y2tuhURY2tOV4hfXeZ2CTHhGnu8VybUmVo TwuY2J+0znRNNO1yDhEvJ8mRh2BFmNqPOY+YV/bvfHjR7ZpNpIWgNnVpDACHbNIcB8By rvpA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="j9R/JW1z"; 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 x1-20020a170902a38100b001b8a70d11e4si7499740pla.529.2023.07.25.23.49.23; Tue, 25 Jul 2023 23:49:37 -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="j9R/JW1z"; 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 S231689AbjGZEGR (ORCPT + 99 others); Wed, 26 Jul 2023 00:06:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229778AbjGZEFX (ORCPT ); Wed, 26 Jul 2023 00:05:23 -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 E4507273E; Tue, 25 Jul 2023 21:02:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M13qXiC/LcyMkfESAVlG6XWOnbjryIziGoQy9Gd2tsBnVwz/k4dO0GAmXGGciM+Swb0Vgp5jRgBJUgOIlj1s1ZpQ8PX+xQVYYuK8WaHe2lClL7qdSDsC2hg5tZOc+tTxuviSnWVYQ1i5EKIVnEp165pQQyDDsQ3Np9lVsZVyeNK+G6HHDHiXemgRkLoxw6Ikf/bJFO16fmlbSZ53+VV4UwtDNlhtkkJjTgiqM+J7gCEi4xMWFI5xEx8P2g8Ao9vBhc4ifVFkII5MJVXIhEkhgH5KmIPzFRCZnqT9DFpcvhvBkEzEZsBkfagGXLmWDbxR152TQDZcKiDx5Ogb2FZlTQ== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; b=QuQg7+w8iA8dWJKMcg4pY01yd5Rbu7OqEH/wUQgECK1pqOjsJt3yY1573LHAZsHsRSObW20u+Vq1uSrvJdtBItCci6upOMMLBda4uvwQKxZm4cRI1dl/pMClgC/pX0oVKMhwW/ofOmEOqnUfAYaeCUemVXVKKC8Xq+PPvb0ayfvBCetuRf5IxBPOQRlBPbKoml2MU/r8tEkaJ+5JIGLM80dd2s/61gHPUZm6sPFuB6VW/qTNE6ybwaqiAKaORPugJ1f8pSVSQSHQt0Kf+nC/4bWh/PjbSz2/crbREMK2NGTJ8mBDjZRr/czKxqoi42sYn2j7XT8YdouiKexf0Kbg/Q== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; b=j9R/JW1zeTFlPWC1RXn0XiBjKmHlarat2SF5An6UGNPX+BLzuVCkMkz+earYOtaqPu5qQDVoYQWLCiYnxlPcYiYzmR0XrBO1CTxJlPh3UROqX5Xo3qywFopoZgaf3jfvsUtPP3x4BseHMXUocKzKP53rnotJWjn1wNCB89ud3UaHJV/0mag47vzpZl2fMmFLkjn9P8Rz4UfeI3WqrovpR/Qcx/h+GE6d+sbDTJ8N7UGS+D9NWGwu54tQFF07OUejUZWnigIrQIzGu5WsBpOzjF6eNppJGwP7XjFrkKuTRsGdi4l3EBndvhbWXinBLh4S0SdDsNZCfxPqThxBnDjZYQ== 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:40 +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:40 +0000 From: Yangtao Li To: Ulf Hansson , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 24/61] mmc: mxs-mmc: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:04 +0800 Message-Id: <20230726040041.26267-24-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> 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: b78077ad-7320-4ac1-f21d-08db8d8d042a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CcT4S8uAF4USK9v2vG56eRvFfmJOToOdOUxUT21ak9rBVKKXbBrRLfD/y5GFqUYYqUPylbzMsGmRUGgsMkUZz0/MrBQ9yOhN9JaUXsw8T7Al3hYCv1ZlSf4Bj5L7qg1n6xQ4EymioE5ee2751j0xZC3WMBiRGd+r5fAhvDwFUZ1ps0dVZ6yglZ8pbpk0XbEormY//zgfzKosknd7ZqU4VubQgtEPsbD0PX9PDEJDtA4CrMcllVhjE/08L+ggmCcQGe+KqX0GCF2XKkJOy4Jz3TovoHTsxD+oTgLe5a+nf6mbp0mZhfyBw99jj+0nnSnL1pGY+laiJqEoM2Wjr3gox4VFg/Y5sI4w628xlnH5Qj39vQqSV+7K7ULLxbzhLmtXXKfVl5KhWyE+HARY3iBwRtUzZDyNDYHE61XZbbPFFtvb22EyrXV5ioySrcQ53KNyEgcegYm0roOYSDCmZw33aDT0BYbLXqo93Wuc2rIiyzlefTZSjebCm4/FJEE3S1KBVD0AieGe7AaM/CZIGMnKlV2eE4rVCTxLRg9QhLG85GgLpxHBCOmMcDgO6NzX5N3qp1R0ufKv3g0LrvsjVRN13WtZd+abNo+7rfg9YMG965h3nT1e+AV9EDPW3QenkXSD 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)(66574015)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(110136005)(6486002)(52116002)(54906003)(66476007)(316002)(4326008)(6666004)(2906002)(7416002)(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?tsbpk3vmZkF7nit8Np6NKozKXnTv?= =?utf-8?q?I3z5L+jd0kJjXtUA17TqJaavk2AeW2XoKPDHxfs87+h1DQ+niasBHnkcvrEL7ATaH?= =?utf-8?q?RrqJw7dhPX1pew52LkmDygv3s6GilEFKM88Z7nUywhSaZsQqQmIHkK/cVtON8C9dj?= =?utf-8?q?eutjD5h54iqnNNoDbNpIr2k8Jm0tjk7xcWKg7xgAEbNJmnsMcGTZsIz/BfpAPCJsD?= =?utf-8?q?HqIa3cKyuKKnagRtMUySOr0THUH2QVkcHLLipoLDICR52zKcnrO644DGnerXgldv7?= =?utf-8?q?eGTcaeBKKXmARFE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L8nrnb+xoPhhC3H/pr4ayJf9oebsCt9v3Hjp?= =?utf-8?q?YqOAe3EV02x8vBJ8xLxW15FzCAaZp26Zr5bSCeTMxEuceEvMcCgbOIJyymK5mM58Z?= =?utf-8?q?DP7hxMXlG6dx0VLtAE/iVlMYnar4eUbwvJS/yZYHa4kL6K3r2slh2HsGpnvVhBKMc?= =?utf-8?q?/3Ti8KW2G/f2R7KTYH+4AxP2kRTg/bLOEyRZw1QdlcKNJnnXwdvx2hVez/42x7unG?= =?utf-8?q?TwxwwppjiqSQFRBtLDaDG2hONiI1nD4+t2vAISX/7PLDDV+Vj1Wf5Mnfzl00xlqhN?= =?utf-8?q?m5R4OKlZAU75sXa6a6JL6G6dNIFxb/VQQfKj+TsVPGn93IyK3FeAlDgNIbhHkvMS3?= =?utf-8?q?Hl3rx3HG9AnB?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b78077ad-7320-4ac1-f21d-08db8d8d042a 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:40.4205 (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: Hp379q+pZabz9riJk6/T+/h2FM0Dzxl04AWv0xYDgFVkj6qTFv94wwhfx4Qe2P3tVeDiiaTO1EvcchYRNUZInw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3934 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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: 1772464821680004952 X-GMAIL-MSGID: 1772464821680004952 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/mxs-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index 8c3655d3be96..9abfb169464b 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -674,7 +674,7 @@ static int mxs_mmc_probe(struct platform_device *pdev) return ret; } -static int mxs_mmc_remove(struct platform_device *pdev) +static void mxs_mmc_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct mxs_mmc_host *host = mmc_priv(mmc); @@ -688,8 +688,6 @@ static int mxs_mmc_remove(struct platform_device *pdev) clk_disable_unprepare(ssp->clk); mmc_free_host(mmc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -717,7 +715,7 @@ static SIMPLE_DEV_PM_OPS(mxs_mmc_pm_ops, mxs_mmc_suspend, mxs_mmc_resume); static struct platform_driver mxs_mmc_driver = { .probe = mxs_mmc_probe, - .remove = mxs_mmc_remove, + .remove_new = mxs_mmc_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS,