From patchwork Thu Jul 13 08:07:29 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: 119645 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1678795vqm; Thu, 13 Jul 2023 01:40:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlFGKGvQUHGmIGYgr8jTyxiYwxklD1RR0OkdDY3Q1JPyOWzAm7GK49xwskSXPbP6UpoDth6f X-Received: by 2002:a05:6402:3513:b0:51d:b184:efd with SMTP id b19-20020a056402351300b0051db1840efdmr5786386edd.20.1689237655959; Thu, 13 Jul 2023 01:40:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237655; cv=pass; d=google.com; s=arc-20160816; b=Wzd2ks6lnP2KQ0FHDCTP4BHrUUxZqKC8/AVuszCZB6DdfZ3z3NHbgrqojKPiJNGA7K cGDbvAqb+paIHw7WrPwDJkAg+PopwR7BZ7hxd3C+a5zrMRB4JTbm41PeyQnDucOTX4uK QFSIL4ohsF1hcoluDt28TPXC4iK+NbiB6Hn1XsmbAjEF2SWykBeUZVdqJ1kk+I/it+rV pHTSWNB58teWDoqhImal53PgoscCTNCytSXHRw2oWB2RQXpaRUzIOpbx4D6UwLdBO47u C10c+LRF2flTssPgJTUXCuB0OWqBfzlxlNlOnw4oZNVNaIE0tHifg7bqmUp1l72Mzt7F XSCA== 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=bj+WD0ujQJJoGOzm0bS7zDFDRH08DzA9OwwXsON6vZ4=; fh=l0HlFrqvfXwjMey3ILWTX9zTnLzDojMmdWOwR25kxd8=; b=Ab5kFFcKQuFMa9wTFcZDm2Z+SwZoaSXk4LFgudpUVR8goU1WBRL0QSFRiU7SZIzlH8 wGLtLE6lnUEI4+H0XomJ2hi3vxnz1p8haxNxDEv6978w+FhNQSq4ALz3ggO0bhq6S8Qg o1CtSgUHNoY4TistcNnUAbRN1Iv4OsUdqHGsI08RsgPE4yuV2hHiVgw45xSBi++kigaE UKzTL5KCXUXL7Mo/v0lxRnktTNqsH/I3ZuZqFg041WSDqw4pEliyi8Bo0ILsi/R6Bkgb YZRB26yuO/hQf8vSuBEUqorSnJMQ5GmeMtUk1QXhjvgNjuHFPsll3iltAdBsKuUyMvcm T3xg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=p4SVItlm; 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 i11-20020a50fc0b000000b0051e041a38f0si7200547edr.596.2023.07.13.01.40.31; Thu, 13 Jul 2023 01:40: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=p4SVItlm; 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 S233916AbjGMILg (ORCPT + 99 others); Thu, 13 Jul 2023 04:11:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233859AbjGMIKU (ORCPT ); Thu, 13 Jul 2023 04:10:20 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2119.outbound.protection.outlook.com [40.107.255.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76EAA3A89; Thu, 13 Jul 2023 01:08:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hns1i5pe9/OdACZoN2eCbxr0gBMJOW5UxkZUrw04842zFoJpeLKhK/5vU36pHdmmldt1Uym7MNA2B32c55iH6DYhBK+n9N3uqhLMqXNdU+ILvq62ZX0gHW7xIFYdAzDJKWE4LcNX6dGhO/IId0bvitOZsE17+2kcR4qQa8jYZyxJ6Vu13qAK/g7RmCUcKFiWi0CYFY99QsjuSYegy8ZD7hnJI45yDD4p05Im/PsM1unONkTpij2LpTyq/voCs6g2dkSBH62HZcxZw7V0Ce6UsDWTgIRvA00fpOtJIR7BG9HKF5py13IoqSUcC/IAogwoR8iKoN3Mh/kv6QzUT+Xu9Q== 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=bj+WD0ujQJJoGOzm0bS7zDFDRH08DzA9OwwXsON6vZ4=; b=gFXJ+LRDowomXfxKerpwvVEluxv7iish3VwoJYnWDoPNlp4xYK+jXclfFP2ni+1sW9OFBzc/iEjMSCEPgwx9OnEBMutp9EQ7BpvJ+XQYZ28xU6GjAAPBVzdWeh5m0Dt2uCp7F6mF5rDZDp6HvsseTiSqEYwPwwjRxeQYUnfyk9K9yoUah0yrKhWigGxTT/QxpNoHADez4XpHOfhIAbYFiFhWb9vr8Mmcl3t0hzfyhBtkncp3ONH8UfEDc93xyczoJWuqHWTpmUwgmX7jxMdTZUbuNZk1X8Z2+MJPVb/8yX5r3agsZrdH8B9J5nFHBUjJtnS0nKjhbxbr9mlpJ0MTsA== 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=bj+WD0ujQJJoGOzm0bS7zDFDRH08DzA9OwwXsON6vZ4=; b=p4SVItlmCwLHxYEmtHBY6K9BYUROGW4UPrxQRkAn40ij8e8Z2qOfvvXpN56jEJFeksyOJr8VyYgMfwLhwEcE8NNPObN5nbGmoRxHlQN0ZYe/rX39hDhj2xa2JxZ2TwnxsWFWyYYQ8m34rB5O8gB3MXnmRyGh2POtpDkiT74r78rAXJmYgoDhEoirfqLtSNnTt5kl0GGDGNmu2NH1o2yKs8UfZdaI5S7KYEIaJRixh6MFoGEsef5iK7ABLNeWFqn0Ed/Rh1M8jCeTqqejlDM2Wyd96YYXtnrKXQvJIAkXlMaTkEl11uJmjoVXybzYY3QbBg4zH8Cxa/OQ2eVV0vMWzw== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:08:56 +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:55 +0000 From: Yangtao Li To: Ben Dooks , Jaehoon Chung , Adrian Hunter , 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 20/58] mmc: sdhci-s3c: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:29 +0800 Message-Id: <20230713080807.69999-20-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: fad94694-dbd7-468f-c2f3-08db83786705 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L5M78pAHMTAg9MEBEyIAOVpp2xzemk7fXkhf1TM1KMA/C1ulOe6vAhx7HeSJ/z2+0AZgW30tbjZsIzB6X52xyMV7wqF7kglsbW9uIhzvwN3PLxihhc9AOfz9S1tQNp1mu1NJD8BtyxcWaLEF7sjvgEUg91/AXiPUk6qVzGmWcO6RJD+U4yrZgbYgiMhelBNa1ITm7y3lxWbbtPhdq7JyaoakLSlsAy9z9wQ9x2B6IEFEce5w7RcwnAS/P7ae21D9NPqY4Vg7yq3/Du7oyybwwKpM/y4SsrCSkc8Gx4hhZjxs2BNXW5Us1RpJoAj3XfZ2hvjptpT8QItMG4V6UTAZz35wB9oYsOx2exekq2TbtU9dZF6Eb9ZpggkDQN/TU70oFOHWb1lHaFowtpSnfKHzDg8MEp1m02Ik8G5aQcm2lvKxZ2VNdP6ErPwPNS5tCvfxCV9M32ac/FiXHGQ/fZiWYJStHF/EHa4iafV6fZQIOVFbMd8Ziox4Dtry4jVJ7SQqesVSAPTYNl7cYJHdxftnPshsP68HiorFu1KEA4R3AEzC71O5Xuy7qg0uq+dlAN5DCtlq/UcxYnopPOorr10dptmFEmvNz+o8aPbQn0oBGPKhnrwsBvw7Qqk9F2HKyjGc 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?EC/9J4Y7XufBZZmd2fXhonDTs5FZ?= =?utf-8?q?tbBzcBW5F3Q4Db1FBkDA0MNkljcIIqYR/Tf+LNCtoJJFlv04Nkaprh6nDEmrBT8A5?= =?utf-8?q?TzaBPYJaKkaiH3EIhpJvrxQsS28tmR177LIpCY3vmV3Iz8Oj/YSwwJnoHAJEBmY9h?= =?utf-8?q?FBSsrM/n8/3y8QJFW69lMWR9/YR67OYyVi+tsbSUvF4ZvJR4nywlU0oe2H9Tb0sVw?= =?utf-8?q?25OUHKCTaYCz7WmP3LBdwRCkK5E60d90qRGevjrsf1EIIELCn5QAcPm7uUgnfVWUM?= =?utf-8?q?LlD+2WaqUXU3Hul4Ur6hLvXiKIYFhBM2F93wDhPAaZ4b21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InwR5qtFxziq7?= =?utf-8?q?/r4zhKDUaApcSaH1a6urAKHqqHWuXfpU1l2XCwtb0x+bt8NodMq5MEJ0VCKXwHjPm?= =?utf-8?q?Pic1oDPJzkwliO0ht59GiRxSLzgczIqjhTcVtKuhA6IpyeuKSVuDn1xRwayGqN89a?= =?utf-8?q?ZqFf1MaNQF04umfGvrvxqZohZxrWDw2PHwkhqfLiCE75UzvXNZuMFmQunmLC2upYI?= =?utf-8?q?ctd8akXdFr2/RRu5Bek0Zg8a3HpgLZc32KbrizaiAoFPHTuw1Qdsk0O4jLorM4bR5?= =?utf-8?q?qZe0Pot2cz26MYs50T1Ifq5MawW8O+0Hp80sBTI4e3QUcMVfDr/w8lzlWSE5hzCuF?= =?utf-8?q?5Y8o9l9ICMw/?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: fad94694-dbd7-468f-c2f3-08db83786705 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:55.2638 (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: Lp396nc/7IgariRgPUVWfL3jCTr9FNf+G/0uF8mSZu5N+vbQjRw0S8A5RXNWbo60LnwaP1R3Y6lFvGoS4I62wA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,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: 1771294064282559900 X-GMAIL-MSGID: 1771294064282559900 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/sdhci-s3c.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 504015e84308..b61f12d328e0 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -668,7 +668,7 @@ static int sdhci_s3c_probe(struct platform_device *pdev) return ret; } -static int sdhci_s3c_remove(struct platform_device *pdev) +static void sdhci_s3c_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_s3c *sc = sdhci_priv(host); @@ -688,8 +688,6 @@ static int sdhci_s3c_remove(struct platform_device *pdev) clk_disable_unprepare(sc->clk_io); sdhci_free_host(host); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -776,7 +774,7 @@ MODULE_DEVICE_TABLE(of, sdhci_s3c_dt_match); static struct platform_driver sdhci_s3c_driver = { .probe = sdhci_s3c_probe, - .remove = sdhci_s3c_remove, + .remove_new = sdhci_s3c_remove, .id_table = sdhci_s3c_driver_ids, .driver = { .name = "s3c-sdhci",