From patchwork Thu Jul 13 08:07:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13311458 Return-Path: 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 3D949C001DC for ; Thu, 13 Jul 2023 08:11:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234140AbjGMILC (ORCPT ); Thu, 13 Jul 2023 04:11:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234005AbjGMIJy (ORCPT ); Thu, 13 Jul 2023 04:09:54 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2115.outbound.protection.outlook.com [40.107.215.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACD00358E; Thu, 13 Jul 2023 01:08:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lfPAw7FDxJqtTd3EOlYvSvqY2okeKJAXK/eEcRYoOZTCpiaR/VYoKa/0SLkdGO4IHOsroiTXZqBNJ/XlspcGi/X0LTBL3oPKxfvOgnDvw/CXf81O7oaSG3cnUILb9Qm72DbAnXnhHSL8BdGEwYFdIC/MsuG78uGtOSiUSz6f+63fRNWDgkrfuvEh9PbQFf5kGlTXxPbLVWusZVOqHqP3BdIklFlHjL4+9buGHFXEGu5JRp5RhEqzLBAAv1hMaF3/WUVxYm1qS2gNeabbI3/p3BnUI16AAe4gVVNNKyY0OMDxLy1U5BheWyyN/sCIbyqU9NRXjKuLP4zdrPNcBH25yQ== 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=BmsUH21Sitgu80/p1tFfJIH7tg7gkEnk91pBdItWAUc=; b=FTEY3w+V8q8FGR3VDgeNTlOi0abdobeyjNL9e/3QEn5Tgspb7wQ6hFdYdqNZj6qGI/3q55gMx2MAOt5u7bUtIrtgvhDstqbW1zCwR5hBpVLUhG3vDGPR+BUyZc1rKCQIkyt75Jl1JQT1PX0ZQ1FJcDjc3TdmR7n2QsCGUMBPSylCjukBZwZMu7kd+89yVzGwhk0Fv2yKo9dUGuoTHNbrRtDWuQq5X7/wwe62sY7O7aWYJzK1VaOlX91JwxiQknu4KCd6x+BUixJWCAH6unHYuCFm4a0BiPJgYw0KY95pjPO6L/0Yiu6zQTXviRLm/poW/Cyo1Cujr9Raaelmz6iWXg== 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=BmsUH21Sitgu80/p1tFfJIH7tg7gkEnk91pBdItWAUc=; b=ebJZxWGlQJc2f5xMiqvZu/kKtt8ehVUiHy92uKgOHvuv6hZ9fxyYa0NLPK57eQsd1si1xG0p9k4vAwXZTa2YJezlXvFm1V8Xfq5zkL6/wSdDOSitlEkzYUBbSsEUNNV1QWgrwXOmzGsBif15Ur/eVUfntpYXyhhq/t0Yf0zcgtRgV53EsPJDyAfOg2ti0PDDciB6TqFsksBMoWFHUjOFP7avWmJAfwHGLRQPqd8hnr6m6x+yzq6jvtcbsUPR3TtmFoeQZ110mwrk00NsA4X3JkrXIKghPbUuQgiEBscrUYspWqC5wPbSsE4UAebMcfwg+GGKIbbcNQxpOc2hQ72FLQ== 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 KL1PR0601MB4371.apcprd06.prod.outlook.com (2603:1096:820:74::13) 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:08:38 +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:08:38 +0000 From: Yangtao Li To: Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/58] mmc: omap_hsmmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:20 +0800 Message-Id: <20230713080807.69999-11-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_|KL1PR0601MB4371:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a1e2f10-0310-42c5-f347-08db83785cd5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Bh22jU7U956oW3Lxr9ThNSwu7z5J9UjDN98GtJgCY/JztAFx38OoxV4PZEZ/28NM2WUyjNS/vWma+hF32eZK9T8G8xpc6QDau66b4yNLTg6UrZdeTRrawnya0qKvRuZ6nCPSGflepqdunc297Qgncl+++MyCBl0w0/Yd1x7dOuSZp8612UjFMvYUANUwCSGWITsEwHbV0WQpT6Svv4TBEBKbAFgnLjviPom5PuGPtthkEhMmaPT0ELQiUsUSBAcfkUkw8iLTsHATglsZU/0D1CeGqqo6fymj3m2cpyiCyoCH24zerKUk1TajIhIZpCI54C4KS8Mi5JdCotX4/eJ1mgn0CxuE3okBGLinWbFWoqc0H2Lju+0M7FKdvqD1Xm4znbMl4/ZWBL0dl2jfkkzF8PVJ+CQrYBhDBwfqoAKFfSsFROl4P2AZ1ykk5iaffEDfDf4TnqqU+nkGRdWdvaLDk6znl8+1s/4pEMKqAIhQm3iCUX8c0YU9kd/TBSJL72kC/WuQA6HDypUv9lDWQhQxI9JrhKq94UZrzEAwb1OkDRq0jRMRhNvsVTsSjVDHxH9oMPYdjdV8vQ3ncbChPTR9TRECkHy0QZLjEk27YuP3M10CXps+W5MPr7/BGxBm1ylXlYBXiKMuSjAtorsg1NEeZvBJPMCdxu6Oh7J+/rOWf6I= 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)(136003)(346002)(376002)(39860400002)(366004)(451199021)(38350700002)(38100700002)(478600001)(4326008)(6666004)(86362001)(52116002)(6916009)(6486002)(54906003)(66476007)(66556008)(66946007)(316002)(6512007)(41300700001)(83380400001)(186003)(2616005)(2906002)(36756003)(8936002)(8676002)(26005)(5660300002)(6506007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?0mdBWuMYjlKgpp9gSeazPPY9fN+b?= =?utf-8?q?zr6oVVgmhL648JRMy5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iTIlqTknW7GlDB7CnPsx2ItVkZjz7ptYe6CBJVe?= =?utf-8?q?416ptunyy80oAvYY/lw3V9AiktkHYrfG60wEMzjuY8WTT5Wodomk0KG3XuH2GxAM5?= =?utf-8?q?ELOWT462d7QCgabnYIbrYh7DuJ8cA/ePOyyIkSxR7dVWnkBS3rgBaU+cp+ggZwJ9n?= =?utf-8?q?92qmz9D7lPax8alPf/+wya9Oo7Aje1I95da0T3zzPrMiyBsbztSCGAKxU4kbUWWqp?= =?utf-8?q?sdRjinTFU7zJWUvyEKv2bImMGOW6P5tSFWR8/R/VUyEJcIE3C4tL408oVAfqZzuZP?= =?utf-8?q?kq2SBH6qLid9o0NMzd214RcIoLCW7u0ty7XOKuIOq3EytvTj3soyNpEQUEB3Uj1cR?= =?utf-8?q?H4X06Qd4WKnHK/87Jf5MIk32l73KwGRnjxKOh+9aR45hdaMsO0mB37F4/eIuS3ZMs?= =?utf-8?q?BXnSlcrkyxE+P/bjQuwSf239foXPXEFUZk2VcTd0tRgfBn5GRvad4SAJ0FqJGPYl8?= =?utf-8?q?uAKENq9zSkpYAUhQow/+JLpJ3XbuOdqLwCEdnfOKRItSenmZ6DT7jvAr/3ypwYzXU?= =?utf-8?q?mcuMpRixvWUoVR1AbwZLmbrLly+eDlFBRlNpPoKWrizBuE1ZVysBGdagmt8I4J7c8?= =?utf-8?q?PNO/PYa7IdkF?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a1e2f10-0310-42c5-f347-08db83785cd5 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:08:38.1693 (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: V1L9GhxRrKx4CHXcQO+2NBzZUrXhj1s6tXrJ/z4ZmXDWRi7LOgyuGtvkPE0TydMma5lRopx45EU7lAQRq7P8sA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4371 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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/omap_hsmmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 1e0f2d7774bd..c5a7bba3549d 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1982,7 +1982,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev) return ret; } -static int omap_hsmmc_remove(struct platform_device *pdev) +static void omap_hsmmc_remove(struct platform_device *pdev) { struct omap_hsmmc_host *host = platform_get_drvdata(pdev); @@ -2000,8 +2000,6 @@ static int omap_hsmmc_remove(struct platform_device *pdev) clk_disable_unprepare(host->dbclk); mmc_free_host(host->mmc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -2126,7 +2124,7 @@ static const struct dev_pm_ops omap_hsmmc_dev_pm_ops = { static struct platform_driver omap_hsmmc_driver = { .probe = omap_hsmmc_probe, - .remove = omap_hsmmc_remove, + .remove_new = omap_hsmmc_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS,