From patchwork Wed Jul 26 04:00:31 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: 126089 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp178568vqo; Tue, 25 Jul 2023 21:59:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlFaIrXc5X5uC2ZOPpPacV7bQSJ0nHkZmVjaxqzPtxqo1DL5uC230WKGW1pfADcac20rjEAK X-Received: by 2002:a17:906:3ca1:b0:973:fd02:a41f with SMTP id b1-20020a1709063ca100b00973fd02a41fmr664327ejh.40.1690347595068; Tue, 25 Jul 2023 21:59:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690347595; cv=pass; d=google.com; s=arc-20160816; b=r3TiByVf5OSOkj3A93hf+jfKZ6qyfyLRvzBfmpZDPXwgxRsywPNkUv0otXAJExgk3m kCRXr0zzr5RchzxcqmCrLl6ceFhfU5w/YK4qZveXgqhpmQD71Kupqgs6kf8OmJvYCTpz ph0IsK173cGCuOlpeI27/XPUeqZ0GZEFRgST6sMAbfptO+/gH4bzKF7pakZBnLHEMEJl VuDN3kN9Yukxvpgxq51YTmDeIoTn+7bGRI5De10l48j2k1BF1cDOev2oJK0bsgYBuUr0 1rQ25T/SCFPq3kStKH7h3cp+i/vBvNCvv70aqSdb5DajjXx8i4Qzc7//FvN9fiGVjpFz 66aQ== 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=TEBm7LsosykrIZ36xdCU79ltEaLYPmnrbi8vErCUUN0=; fh=M5PJ0QPvxaEtzFzT/QWaP4ZjWGMUHe+0XLMcM/KMfKM=; b=efSjVcbuscG6mqHJ9tVa3IEyKRUUY8vjcl+xUtMytj8pUifI4yVfK5OHl2acwLrpSw A7EQq4Shfl28eX2ahaYU4sjNnSu73HO4DDEzXsX40cdZxuNpP96MnqpcN+TBeahs3U7i 22VloXZhV3EjjTHfWiAdYjU9Aap/zpbjI6CrEobpU4W5txlT0UuLXSho8XU9DiSjJ4W/ iN6wMkgVXnFBLnkj65EA8YRXuFBS88IjE15IesWZwO0yO+3rG+3rfDkw4zLnpUne3Hh+ 6dEIVZn/PCz2/g0K//ssL3LghW58i3upTUtnEYsZW4XVFy4mOOJBrEAXnznvql9ISVMN YUIQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=atPNBvvY; 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 me25-20020a170906aed900b00993fe9ca8cfsi8607288ejb.766.2023.07.25.21.59.31; Tue, 25 Jul 2023 21:59:55 -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=atPNBvvY; 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 S231815AbjGZEKT (ORCPT + 99 others); Wed, 26 Jul 2023 00:10:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbjGZEJf (ORCPT ); Wed, 26 Jul 2023 00:09:35 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20716.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::716]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEA5E5275; Tue, 25 Jul 2023 21:05:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h4yQtpfsikGP+qZbYLyEYz9uAzb/jC9SAK01Rt/9z5Cd+MY9UzLMIlyFDzxOROgB1PSdrQ6dZxlAf9YXFsdEaCTzoOPgpHmuH7/Aa7FDrjdxZxmIMhHE8NbCYKs7MUfM1ZG18gyOS5q7cFesp97+VTtvYUdNAEd2iLHi9Li0eAWc+FKnHUcZhqEjpea72IBhqi00Excc6D3fPSwb6fn5jUWxOiChJ8OYzIlufBmuST3Xxr+dhzdb34cfzcxC0oNL8G/3RLuJ+x3LaSdonvB6FeImneCbpHqBJ5m9vOaH0vlURpZZp1RvoKbA4L4DHjXqWY4FpcgBFnlAIoYKT4kZsA== 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=TEBm7LsosykrIZ36xdCU79ltEaLYPmnrbi8vErCUUN0=; b=jTk45OyIKvO41egTVt93tjH70t73Su0CsVUi+xRarkJXe74Mh/332u+Bwy3f28pmLLV4IHrc+SyBiXqBBxienGjEncByZjhH15BYtTRQcygEMPkq7LAw2SBuB/tg+wT+hVnC8kxi1MMmjf530NAj//p8ai/+Oq3Tm276Pv7mNKsbKdiK0BduDKTl1xJ1Gh579mcieLdcOYVKTHJMgbr0bCc8mwEw/oGukMlceHD7khOBkzSF3opF59nPylhycS/baQ/0K8Y2IUls3qhiNqZhVsFQIaW/Ew3CEyYJSqNBE/MI0ziVbG+mWm+m2FW3yrODpTC+vJ3c2UmyKC9DhE+Liw== 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=TEBm7LsosykrIZ36xdCU79ltEaLYPmnrbi8vErCUUN0=; b=atPNBvvYs64LVQUOmNacUMTLfBb5kF10Uhiyon2Vgsi6QI9qFcAVdzoT4OTAljOnZSj4v3XLlZIlJLik6YzOHvgIVwjgRlH+5wXtqvPU8xUpLzjwmAJYR4RKt1gzA2jnED/pfHUTnoD1W3tg1Yu2rfItenUxT6IiZYU4xH+xpU9IdDlFwqWrFbH5SPFluX9vxRjgB1wM+XfgHCAH2/xiNBRgVSOYG+ya5t1PfcDSLEKzn4oUHetFV1JQDbS1GpK9sE2PNMvS3wi69AQUGs+dLMZEotNjuL0dO392zR68l3+wUniKGXjFDj6sDXvzwfHWpgUVI3vez+bk6Mncc9Xx0g== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:33 +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:02:33 +0000 From: Yangtao Li To: Adrian Hunter , Viresh Kumar , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Viresh Kumar , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 51/61] mmc: sdhci-spear: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:31 +0800 Message-Id: <20230726040041.26267-51-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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: dadbe81e-e41d-404a-8c63-08db8d8d2079 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: j33NjLcSB0uobzIPCJJvC/W/UE+awO7J6fWB7Po0shoGQ2OWULPU3Y04tYNiVLr6Zffp7P7PlSY5UYOSC9Ppwmpf46ExJJcPDV78bMSsGzwfZoflnG5c//zfpujiYvUmVv9P/AGfe6ShAFEc4TfCXRyq7Wwpsw7lP/5rjM7ZeQM2824YRaL8gJ64uu2sCAN1RXKaFI2Sk2uYZ18KBeQ2vslZNNDnKOcO5LcZL4rVVz249u/pBbp5jCRcG7x5QZ9ZHFflxR5nfOE8W1q+TvF4TOWP4BybGxMqUG7kv+cVY/eDfTnoSkX2u8hDdsiPEblID2KryE5DR+cgm5w+tzJP5ru0hL6TAS9tKallcJmMs8ZxR1U7xFTc5Yw9h8BY0x3ybqUn6g8ZQQqQFnbRmI/Y+NqiPCOPSRgNcd3ItlSTNcF7EZV+M+hy7ep7GZ3iGBfJsWJq/EUihfh0rJH7aDkIseTAoWd/wOgRsX30/AlLkBTLWULuiy2S6oDjZDbHGSjszJQ9fSyq8hdheYHCnNlq6zq+cKVe/qPN/H0bVV9mGz7guT02lhCARhp74t2nkppTl8C7rlAwDcA06cFGcRmWZfAtnAD8epwAOdmLTJzNV3fOhErcBHGVjQYibVP8ganz 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)(39860400002)(346002)(366004)(376002)(136003)(451199021)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?YWAt1dvYWadZ/gmz77Gw7QoVdUWh?= =?utf-8?q?u88NhwLTV8g9ODlphXs8RGiF20nJ5jVL82HEcVGT13gNypk3/RviW8W3CXb8RhOu9?= =?utf-8?q?hmhSpHYXGX9bQ9eIyk5lFQsI3ua7NE0NfDn0p62Wf1a6rOeDvjAWSpoyeW0WaGBLP?= =?utf-8?q?MMkboHrP0Ey9mfoAh3t6RqbU8bARD3ANy5R2WS+TliWXmm73J2YJACskXxN+M39Wr?= =?utf-8?q?Kms9DCuBMba7OTypEvEquZqqB0PkxwdGJvoSLuey8dMKk1L/DzkTbvP0ut77byWzz?= =?utf-8?q?Vk5H2NqyDHdL0IYC1quH1ABXn9U6MtUrs+9Jtqa4YL9SbZNNB45jJacpYOBGrHvXl?=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NdD?= =?utf-8?q?tfcuGkMwoiC3MF/+/jZl5Q7GTxiXdYYOwLFZKdk8OI2a2EHzsfhi1sWap5yVCxvzd?= =?utf-8?q?z4Ff7mYIJFXxmwRe10dVrejlKX+alH4V8WEgSkX5byeKHCagp0eqPIEdBfvASn7Tm?= =?utf-8?q?5gzcIvgxuRVnTWDloWRrBCXWb4sLxufIk6X6bnNwqPSokfXzJ91cQWNsYl6CkEYUS?= =?utf-8?q?F0o3VpqIca9Xfr0XP/FiuczJWr8PE9+tyGrGVTa45TUsn5MXA01ez+6OMb+tPODP9?= =?utf-8?q?qGMneDifM21/Btkr2PvqTCNJMdh2iyDFLdN1v+b9py51DrRfW9qqw3FEdneZeEaz1?= =?utf-8?q?qr0bvtM/qR50?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: dadbe81e-e41d-404a-8c63-08db8d8d2079 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:02:27.9395 (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: Eby7EtEoMiuMK9Sekm9VIb48YO2FHXu3GizbaJ+wF4AwLsX5NX9hvAytANckVV+XczEDD5gUnpfAeo0t1nkJ9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: 1772457919618080991 X-GMAIL-MSGID: 1772457919618080991 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 Acked-by: Viresh Kumar --- drivers/mmc/host/sdhci-spear.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c index c79035727b20..ec6c7d8e3736 100644 --- a/drivers/mmc/host/sdhci-spear.c +++ b/drivers/mmc/host/sdhci-spear.c @@ -117,7 +117,7 @@ static int sdhci_probe(struct platform_device *pdev) return ret; } -static int sdhci_remove(struct platform_device *pdev) +static void sdhci_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct spear_sdhci *sdhci = sdhci_priv(host); @@ -131,8 +131,6 @@ static int sdhci_remove(struct platform_device *pdev) sdhci_remove_host(host, dead); clk_disable_unprepare(sdhci->clk); sdhci_free_host(host); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -186,7 +184,7 @@ static struct platform_driver sdhci_driver = { .of_match_table = of_match_ptr(sdhci_spear_id_table), }, .probe = sdhci_probe, - .remove = sdhci_remove, + .remove_new = sdhci_remove, }; module_platform_driver(sdhci_driver);