From patchwork Thu Jul 27 07:00:35 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: 126717 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp915118vqo; Thu, 27 Jul 2023 00:23:05 -0700 (PDT) X-Google-Smtp-Source: APBJJlG9GUdlYRRW3YNgq42zn4O1H4H3cGlpe4AdhCwm3veAIjNY06ezF8vwqR1ZJ+ZXqlvX+d43 X-Received: by 2002:a17:907:3c1e:b0:994:5396:e32c with SMTP id gh30-20020a1709073c1e00b009945396e32cmr970374ejc.3.1690442584926; Thu, 27 Jul 2023 00:23:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690442584; cv=pass; d=google.com; s=arc-20160816; b=zCQx5shtmd98jXvQJEPDoCcdk6APdo9r0HnT1S3eDgeTVa1DBVBJ2Ey3HP8dSrrLBh cRxsTWyiM4IgnYsgSVYzAg51ZWV9q9nVYsgMOZE9kHPEgG5kNBrDlEN5YQY4tGUTZAGd V26PqMnVXdrYCWUP2ExEBYwVgh+0vHkxEdCF3+RTqn6U0p3T3LbpG1d7NjkAYPZGDAho nTb6NRozQ3aR5wLiavbOO0eFByCdFCbyG48VnIIEgqeZiVQLGzaUVVIRJ7zCRa0jrC5O nOOT/B+BxtwGOIO2S3iaAskHKXrktvwNZ5D0UUuJ1nGQcxDOw46VT74QIgB3hnqiGq5m MK/A== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u22-20020a170906951600b00992e0e54464si643555ejx.254.2023.07.27.00.22.40; Thu, 27 Jul 2023 00:23:04 -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 S232943AbjG0HIs (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_Kleine-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> 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?q?Q9Et+HKlU/prCEfRyCwzI+v2ymPJ?= =?utf-8?q?+NafUr9l1cWjg6gvRpi46a3rFFaGb3YuFwIOw/7bWbpNKMKEfrNDaJqkMSOhK7XC9?= =?utf-8?q?FdGJ5B5Y2i/G7d7N44dX/yAFfubvUeP6UUEHmHCW1wSiTn9aJunbiIO8E7AgX2mUa?= =?utf-8?q?5jga+kS7OGtlYEGdmQWK2YY7cvTvF+Gbw8ze30Rxbdmrje3eNgSXaAogc5PTGab1Z?= =?utf-8?q?qWFoIMdd3K6CiQfd3bhBFAhaG1siwsJq3v33pZGpnPfLuSLuwbaLq9Fkf1V4Lzj2o?= =?utf-8?q?q1RCTQ9x+C8CLE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ogdFKNkCgt/qWRSJMm4xokJrryokI/SqpJgjF3vB1do?= =?utf-8?q?VRwP2D4co/MdFDwIAbOHXK3hLaxWBQsEtDGL4RKE9p+HmgriqPMWAXoJQjY+nDxOQ?= =?utf-8?q?bFakYpPKElaCfJOJ0NiGcmZbA9gWmc7OTfSiWQNRZtUr1o8kNrtXgPVrDlx45X+CP?= =?utf-8?q?98SmQrFWCsRSI+OVOmb25edF7RAkRHQBr9XCZE7g0KzTfpiXlgQEMbmSrOO5MxvRY?= =?utf-8?q?n5FgSW+b9jxDF8O7P6kZpHgSe6uw8Yaj+Fn2p2TojMZZQZdqNS+ydvgapu5j4pcmZ?= =?utf-8?q?UXhDoFi/OCkX6MiMDVvn/MJocmPs8zRKkARtpNAcVULYVaLEy9c/OtYcCh/LageHH?= =?utf-8?q?xt2HwTTWZO+D?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772557523691889361 X-GMAIL-MSGID: 1772557523691889361 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,