From patchwork Thu Jul 27 06:59:55 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: 126733 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920570vqo; Thu, 27 Jul 2023 00:35:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlEBcfzPEPDcvTXGLSoZno5+Z3YwyP/Zx81MDOOrI2eO/gTKZATPhTXq37a/yEW9dvjjHDSo X-Received: by 2002:a05:6358:52d3:b0:134:dee2:8c18 with SMTP id z19-20020a05635852d300b00134dee28c18mr1971255rwz.27.1690443352261; Thu, 27 Jul 2023 00:35:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443352; cv=pass; d=google.com; s=arc-20160816; b=Ribt6zzxNli7xD9h8UvbjrYpF6dtIg+Nj9kLOSzcleobJGvOdnx78eW0EqISAmfG1+ 9P/YStcCnFwxdIJIHITVZzaS3LIW+YsJhm0XUi0U1BS8CXkDRjQYDWObnl5uMEN1tAW6 WRWY+YrufUhZ785sa3jPcZPdy0yql2csZ+bycPqj4IwLkWfm/rfrBZVHn8q0Rs/mZH2G KD21NhNa0VnmYN72YU2V17PUFxXTRw98SsVXWAuWX/oNkVUzAfBhaQ3/Rc0fjhoEHtoB WP69ukr6hA9V1kvgfQrq8nl6esaaoAIqthaQ0bIdWfdHVeUlGf5/pp0RNWxlgEH78w1p ddKg== 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=cO/T/iqSahPS1fYBVSCrfdexxtG7yArNkbxS9PglIXI=; fh=E03QyiWENBCRDAuP5hv9oopN2sdsL+hYvdCq53xM60g=; b=0+3n5fn2IoZngB6Cc3Kclj+LLnDmum0i3O9OADfIUwBsvaMDDrEGFJ+FAa+oalE9To 9KQ2u3S9XyKNaYa1sHxe0zMOv4QCqsOlLiMBkxPT0SaTSYAiV7TDxddJOYZnFZhoQrJf BAKkGzq8reOtADWyRjuAoFtFAkL+20WdIygwSNeVinP57cQ86yHJhBymOXyRndr4kXaB p0oJn3f0oXHm04H+cOIClCqCPSJLHZDUb3Ciw0y2l+RuZOqAP5MmWVh48Y2tKaveLLg7 kWAsdHlSWd53OW8CqEJLClhcjXYEqdUlaV4OTzlFqpyIFG1SFTKM7OYp+AgK8XQdwTHI sAHw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=NQkBog9N; 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 k189-20020a6384c6000000b00563a8c6a843si888096pgd.178.2023.07.27.00.35.39; Thu, 27 Jul 2023 00:35:52 -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=NQkBog9N; 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 S232847AbjG0HBj (ORCPT + 99 others); Thu, 27 Jul 2023 03:01:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232799AbjG0HBS (ORCPT ); Thu, 27 Jul 2023 03:01:18 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2093.outbound.protection.outlook.com [40.107.117.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4A58268B; Thu, 27 Jul 2023 00:01:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XQP/RTkGo7KbEUeRfuPlqsM0ugp4OCR6FKxgjzET3gP+/7JksPK97skLGKa2Ih3znlKPCeCAaytaYtzEQmcNVfah7QTZXhm8Hf1Y9e1QD5+PbQHIGQ3dSNTe2KkwRdWcX52vjJlnZNM3d1wX++rn/EphNHv3XuaZgJE/QgjPEbOJNx8xTRbZgpxl9F8xtCDfVWrVQ2b2q1poqLq01mTcNhr5BxLtohM1PHOqEL451HMUqjBsLV/knA8IkFIAqD78CNqVibWdluI2aiQ6U8Y1qCrhQmm0lnyypSMOWQUU34B37NMI6OsoEGUlKTXgGUuDNcAaVY8KvlFoA85DGO34aw== 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=cO/T/iqSahPS1fYBVSCrfdexxtG7yArNkbxS9PglIXI=; b=bA8AjvynDULvDsz6KZaJ2XhLENaJ1uyFl91T2vjUxDZoNd8XefsW0cGmo8ncsUtQ3LQ2YL8t9nDbHAIys23oE/aJ+QcbPGnOYBHwYWBNRclNhE9VqDk+i56i21QvMXGUtoPkPXQhzW7fe0c/plqT3LcjvI5l8jnjIXdxo9kjKtoWkud8+56IZMcu1vY7yvAXTIJIOEqmhFWOgp6YqCZh212D+lcJtjPD0a70IbCRCoYHztIoMyy1NdQsn/vzGnCQOkzBIPo75tRxykbUfibk+H9/kljj6s30RVZ7GymNtL4rSvQLhDK/JtV2LjDAlfGejqS8cdcizYAFwZK0G+Ff7g== 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=cO/T/iqSahPS1fYBVSCrfdexxtG7yArNkbxS9PglIXI=; b=NQkBog9NL8GmejYk8svz5s65swDEuDuo+qbOlV2vHZaRs43uwcPoktfH31ioaWuwb7FeGURAC9m7LF3ftJ7CfzIMPAYgpH9zWvxWa21vWgUyoZ/Xd6LONUoGuK77vde4vRV/ezU6Lak954jZedAlr0kWggU7F0pcGH06KLDL2uDW7sendWbEE4H+F3bQo1Z8JNyVIWS0Vjx5EC6pXcOMVc8vWIyLmHCMAobYVNS72WJokclWfczPkiNUvIIVgXhqn8v7hPSDHd4yKlEVzX+FVT5CMuAlsJxV/s674DE6AooRC0etgAu706SZrHh9rErLudwywkgLGzEbIm07BMws7g== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:12 +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; Thu, 27 Jul 2023 07:01:12 +0000 From: Yangtao Li To: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= , 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 v3 06/62] mmc: cb710: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 14:59:55 +0800 Message-Id: <20230727070051.17778-6-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230727070051.17778-1-frank.li@vivo.com> References: <20230727070051.17778-1-frank.li@vivo.com> X-ClientProxiedBy: SI2P153CA0017.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::10) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: 5b16ede6-6950-489f-c588-08db8e6f4335 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iae5BqMxTaO6TRR4Wlvl7uSeHnXg7Tg37b7XCyOV4Qh/AArj59jFzW7iKauinnOQO8d4hOBTLr2R5qqcPZFxuterIGO7/Z2MM2wmebV1I/A3ZP0La+tTNCPDMomFhp0hsCIXCZQZ3zkcfPqUJavVH8fGF8wQeVcC3c+nlClwlbj7aFNz5x6MeI7WM0iAa0rYd1CRj6+6/mgV2H9rTaU1r5iolAmSBq5nWjFy8l/OfPdECfOuxhl4pj4HOHYgZnNav5T9x6H7Wct+Kd9O/U24rEKzZMz1oP5fyjU42xdoOGoEsPgjaWovw5PSaLpUAoJdoo8AbEd4GbR7nYdMmk/O31aV9ttWu/uiLMFPOkpVfQQe9/2E8UcjJwQ1QK16anxQDE7SOL1ADRuqv7qkBx4P2I1y4GVTcG8CpZa58ZyigKDG00VVopGl0CsHlENtKOoaFf4ma69XS//38wwapcbvFCt14by2ggOMUqnAsz3g7k3M6k23QN2INjENP/bb56Vw8gf7DvQGMahzcfQHBFzNSF/yRf+ii00sr4Y+32YKvlNJoyQk4Zm5b/rk8YZPxcQlBAYMokZcepcZ/XmYs4PfUgBteh2Z9HREQAr+wakYwnKWYBZfPUtUmpD6bARnJx4a 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(66574015)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(8936002)(52116002)(110136005)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?bi8igpBKrCz/jW0SjbxUH9CDFtS2?= =?utf-8?q?jK+12wEWavYO0nqiVP20kTXQd2yvZbPa0zY131x0cOhWwaLziPu6oolN4JdmRatCV?= =?utf-8?q?FOdt1fOHbCAX8sbmNTBvGu4kDNfrw6xygOTcTJA7ldfYGYx1oEzRqIHYiu0Iobi+S?= =?utf-8?q?ZmmlcvUVDQdcWVJWJ1KMBUD5BXMGxF6cLHN++aaFuktk6EOje21EYTETqIAAL1fFr?= =?utf-8?q?F5tSCI4quz3eredSMHUhNBy7WCB3AAupkMX64vH/wtBqJ0LYL+CYVd6zrxgchp3s8?= =?utf-8?q?JXOLTaKX4IM73gX1yfXqBBydEIgASVG+LPWw4s4vx07VMAm0ZqUsThs6nCPT65ADN?= =?utf-8?q?r9DYoC/NrtKTCMA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8uf6nPAHQ3aEzOTLFEWu/KgoWQMwmwougLq+jDcTtlW?= =?utf-8?q?mlzGAiCwtpsha1oyu6iProTs1ke/7Y8r91OqiG5xwfnR6KBLNFll5HFiWLVeb0BiD?= =?utf-8?q?M03qcDwaAQbTg8lobKlTNMf43BLBcYivf+36EQH/DERwxEyZMiW7D2WPVfd2ZxGrI?= =?utf-8?q?7+RrFeQ0Qz5T7HGdciH8Vv5m4cPjsRZcxBoLRmIjOHjZgTWkcu+rRD+kjgXM/cy0Y?= =?utf-8?q?eQIlnyjDJACFMj1Rb72wkyGmWscJNp3R4F/2ddin3pPQOe1GIDqapau6IRdY6auAF?= =?utf-8?q?n3gM0Gnq8itD?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b16ede6-6950-489f-c588-08db8e6f4335 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 07:01:12.4357 (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: NFH4Ij4vjc8vtMqnGXfx4OOcG7ddD/3kEyBe25rN4m4ZWlw6jIouVWsV8IMYpi0t4s1hjXPv+lVYwLkZCKO9XQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 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 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: 1772558328846434482 X-GMAIL-MSGID: 1772558328846434482 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: Michał Mirosław --- drivers/mmc/host/cb710-mmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c index 6d623b2681c3..0aec33b88bef 100644 --- a/drivers/mmc/host/cb710-mmc.c +++ b/drivers/mmc/host/cb710-mmc.c @@ -745,7 +745,7 @@ static int cb710_mmc_init(struct platform_device *pdev) return err; } -static int cb710_mmc_exit(struct platform_device *pdev) +static void cb710_mmc_exit(struct platform_device *pdev) { struct cb710_slot *slot = cb710_pdev_to_slot(pdev); struct mmc_host *mmc = cb710_slot_to_mmc(slot); @@ -766,13 +766,12 @@ static int cb710_mmc_exit(struct platform_device *pdev) tasklet_kill(&reader->finish_req_tasklet); mmc_free_host(mmc); - return 0; } static struct platform_driver cb710_mmc_driver = { .driver.name = "cb710-mmc", .probe = cb710_mmc_init, - .remove = cb710_mmc_exit, + .remove_new = cb710_mmc_exit, #ifdef CONFIG_PM .suspend = cb710_mmc_suspend, .resume = cb710_mmc_resume,