Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2035870rwb; Thu, 27 Jul 2023 00:37:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlGDdHoT2t4H6X8z9aQy/0bFsnvbXa4OITFArHffvlT13HARJ1hHCzsVodbQjUxZVIE255Km X-Received: by 2002:a05:6a21:3d87:b0:12f:382d:2a37 with SMTP id bj7-20020a056a213d8700b0012f382d2a37mr4978935pzc.15.1690443449946; Thu, 27 Jul 2023 00:37:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443449; cv=pass; d=google.com; s=arc-20160816; b=UFZPIgyW6uXcI5D+w0MiXKlTWVGXX8fwKRblOFVZHmhGMLWCP3HyzAfB8fyXpEcqOg RBG03s/NV0ZNn5BE63un09gvwDru4FeQ4HVD7Bfu2GxJqHxZOlXcnZjpsjNF40j+TPnT +V83f0Dw3sm9pKi36nw8acbArE9J/l2LxmXfcMeoWIgFyhsRS/+3Q/6rGnKOpE3gAV52 bjq8AvltKTjijJnrhUOMvbcY1gvWt+xKD11ak/TSX+ETm8WEk3Z34x3TKqCwwaOApSvs hX6p+dUWGo6XRCtBDi+pMR0aaJqRbacYvBhQMmL5cGgywTUXnQkJq4EflU6aNea/XOlO j9CA== 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=1xLwqq0e9Ue8vmkwjT7LOOQK2kVdeTE1Pd0css584r8=; fh=qYKcpxoW+O+dL/lpX5ppS70VDzcSQglRrCk51gd2vYk=; b=ybNp9heGBsGNJAfXC7s9Pn8emEZGAOMEYrH0TsK+eggGv5RIIApu2hffFaZ/NrJccD 7t4qMhy2RoTtwhmvyJwcmXBwMOTL7m0qWMFslsPhoGGA31T5WYYvI+fWFeTAia8efZdZ xLKk7q1x+J17WHnDq9EzeSOKwiKmyFts7/Yf/pWurnCgCQELdJxh3LIsHqjr4KHb3W1s jQlUUYA3kqOZEdFBu54PHHHn76CybVQMa54VqPkSTQBTz4NmsX+Bo9LssW6j+2c3oaR4 3OzlZfenZLz5h1/ym4l8vbCQPR81AiulwOOn8hjLrpOIhxXPnhQmykt80saQUi/xys2N Hnrg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=cqzJjbv4; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a24-20020a637058000000b0054fe2dfaabcsi839336pgn.526.2023.07.27.00.37.17; Thu, 27 Jul 2023 00:37:29 -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=cqzJjbv4; 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 S232894AbjG0HIs (ORCPT + 99 others); Thu, 27 Jul 2023 03:08:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233134AbjG0HHx (ORCPT ); Thu, 27 Jul 2023 03:07:53 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20709.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::709]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E323730DF; Thu, 27 Jul 2023 00:04:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Enp1XhEDlYrkv/h3QE5DaUeIayhoJZ/pQvjvbuOdH+x3VWHjkmIsr6Xz7EAbasn6Dnhwsv5Q07bF300lKnH0xwPGS2TRZRJrZ/1K5Mu6Vmx1/GYRB0A3DyyjIYZ2x/l61RFexYpP68lwiceyzdAFXgVRdeIPtPpMl/ZXWxuvWLQ3Yy+JHGswe7N+XyHgPaA8MIaKV1+qLxWf3cMOhJ0Jge+xk7Xq1HbJHklsHG2HzktyAMx6kuFWT0DUpRSuoDgEqvEz/9SKe603CNvcEzbZGasvpNdiNktn2edE+6+Wp3TgVLDuBUDKBsjcmqcTOd1kSqQDK5D9vL7sCFNvNdwS5A== 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=1xLwqq0e9Ue8vmkwjT7LOOQK2kVdeTE1Pd0css584r8=; b=DuDsIm0cFvOfSzoe7fj7MTsBXlGdFXD93kVkDJ0WuGYK7OmyXal717SIG0fz6jVrvLDp1V7WL+soNLAbfSqLkPuyHnhDfrAa7UcnnYstLz/VUaf25xUfKcNVnW+QWHUDD+JPKQE0uY6I0LGTslM/RIO46OgqLA591SOtKSfdNV+SdkvNkWtqgwf+3KCrg4dJEoZBfRszcRZZRt4kGpyrZ3pDM5aTRkW2pn4r/ve+XR1N+SgcJHgrvdOv/FXVSvFdwyGBO1DLXAYHl+VMcGp5spe5eqnO9S1gB9Xh/8d48YgBfzUP3Yf4Pdqz2M/PT9wJrEFuff5Y1Sj3I9LVL24nAA== 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=1xLwqq0e9Ue8vmkwjT7LOOQK2kVdeTE1Pd0css584r8=; b=cqzJjbv4y1ZY5wjIy8bC7lOrzwiAJTh0gPJiRcKwzWoGFstlwExrMTC9KIPCU6oMmX1CPpob0OUeBhWWaZUMyxKxlYfp6exevVK8LkJqezAoWBtFCphtmbbn0QF+MyAgYLXz1JxQO4dGqayoH14344rELMhpjjRmnh1SaoymGwxT7XqeRoP72BtqdE8G5NiKpYMIhggTyhdcHDfBt07tJfo5cZe6JTUweS8+oNH7+6QGzV7JGMukV7CX7h3DGTYVFNItlOA9X/8oQRmwZhJq6x1d14xJLWr2eAvgUyICB8thCSlLSdnSwg7Lun+x9QI5BqjuFkA+RxtdB7iIXDcfgg== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) 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:02:42 +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:02:42 +0000 From: Yangtao Li To: Patrice Chotard , Adrian Hunter , Ulf Hansson Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 46/62] mmc: sdhci-st: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:35 +0800 Message-Id: <20230727070051.17778-46-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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 4beb5dea-850b-4ba7-4283-08db8e6f6bf0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rPWFDHrokiGbubHqfRoK7qx2Wi93VrWk1jp9wzcbR/m+huN79EA/ZcZYT27LivEdRimQkxC8bBOTeTu5hNYBtLcGIuN7tixLgjLDPE8xn7UnNfmYriOnzdVktvlBaFKyIjmvl9BDSQ6Gx2Glf8IU/linERj3yDrhCoLX2LImDA9rh75pdZ1K1gIIWXqdcZdqVlwPH12tEYf+APZhOfWVcJBcKB1f4Hkf2mzPmiyvZj+Sy7M2XaojIr9oN48I4ULomGmzSPVhXtEHOzUzi83ssejZV6nJbflmmH6gEzQRqVwBrWapEfkfD+e+2o3eXYIXksIDmTejsxsToSE4gpvPn0y7Y4PAZTBmsVzGeqgzrBLJUGXdf4sci/XL8+s6vOP+vYdYcVI0jey9wMB/syBkhbsnvOw2f6qvNGP49tICPOv5iKz32kOQ2nEj9X9qxYsZ2uiuuwBNx/PLuljqiJvRhcNdyvrgtXn3Iz/GFsbOzELRVOqC/+EnkYieSr5HeZ9xGEPQIweXs+FANs8q+j2sHB+IlC2xLRmTdqTD7aXzDxuonC95FdbbU8Vg0vrzHuDd3LdK1EXNtqYEdeBjarbQO79GMSNrQCZ/kHJgtrBaSAEW33xMQjk2igMaEnmoNloJ 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)(39860400002)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UTlFdCtIS2xVL3ByQ0VmUnlDd3pJK3YyeW1QSitOYWZVcjlsMWNXamc2Z3ZS?= =?utf-8?B?cGk0NmEzckZGYUdiM1l1RndJT3cvN2JXYnBOS01LRWZyTkRhSnFrTVNPaEs3?= =?utf-8?B?WEM5RmRHSjVCNVkyaS9HN2Q3TjQ0ZFgveUFGZnVidlVlUDZVVUVIbUhDVzF3?= =?utf-8?B?U2lUbjlhSnVuYmlJTzhFN0FnWDJtVWE1amdhK2tTN09HdGxZRUdkbVFXSzJZ?= =?utf-8?B?WTdjdlR2RitHYnc4emUzMFJ4YmRtcmplM2VOZ1NYYUFvZ2M1UFRHYWIxWnFX?= =?utf-8?B?Rm9JTWRkM0s2Q2lRZmQzYmhCRkFoYUcxc2l3c0pxM3YzM3BaR3BuUGZMdVNM?= =?utf-8?B?dXdiYUxxOUZrZjFWNEx6ajJvcTFSQ1RROXg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Network-Message-Id: 4beb5dea-850b-4ba7-4283-08db8e6f6bf0 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:02:20.7916 (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: R7PTYPZXEejbzdJHsIIrQ2mL4wimfWybK7lHLv69lw0YbKyi5ktvtwijLBCNA82d7grSZyVPc/RPybC1FnnXWw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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 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 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: Adrian Hunter --- drivers/mmc/host/sdhci-st.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c index 6415916fbd91..d955b5f4b7e9 100644 --- a/drivers/mmc/host/sdhci-st.c +++ b/drivers/mmc/host/sdhci-st.c @@ -434,7 +434,7 @@ static int sdhci_st_probe(struct platform_device *pdev) return ret; } -static int sdhci_st_remove(struct platform_device *pdev) +static void sdhci_st_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -446,8 +446,6 @@ static int sdhci_st_remove(struct platform_device *pdev) clk_disable_unprepare(pdata->icnclk); reset_control_assert(rstc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -510,7 +508,7 @@ MODULE_DEVICE_TABLE(of, st_sdhci_match); static struct platform_driver sdhci_st_driver = { .probe = sdhci_st_probe, - .remove = sdhci_st_remove, + .remove_new = sdhci_st_remove, .driver = { .name = "sdhci-st", .probe_type = PROBE_PREFER_ASYNCHRONOUS, -- 2.39.0