Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp547929rwb; Tue, 25 Jul 2023 21:33:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlFl7gQKcKFg0HTNn6mExBXP1wqWq3eNY9MISFVsWEgfflUJqU5VsAtEjMUHkzd8HNdeUKBD X-Received: by 2002:aa7:d784:0:b0:522:275b:3af9 with SMTP id s4-20020aa7d784000000b00522275b3af9mr613145edq.35.1690345992516; Tue, 25 Jul 2023 21:33:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690345992; cv=pass; d=google.com; s=arc-20160816; b=lC/0zIDDP+umCFpDDmJe7jO5Z/IJjPKjx0IBRfbeOc1CDcXvabBtqXRkjLl7Q9ri1b szhOCIwih9dKtX3gNg46JzEFQT/CDW19m6OeRGAJWcOrDk+R1L1XwJEZMOHjBTCoBPau PTbs1HdTU9FFXPQhgpHBB5Rf2s9MyIhtpgtwdecbeT4DmZNpyPkE2ST+xkpY7lI6gaSA dpYm8fLWSWArAouofynZtNf61x10Rj1UKEARSUrmWk3lj2IfCXN+tIqUEcGMK2h1GRK9 r5jJ7ghpzPgwKIqvjc/L7mr5J7ygYCBXtH6pbfrmvhIvGZPwjhhKF2CCYjEM2A1dhOfw 62Hw== 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=/zfGaaJRqU+i/vJRxACVy8ivU2sos+SCFqN4m+wofmM=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=Ue2G522qIbHaZLtICbBiReVBasbPzRyT3PzTZMMl0TJxdSa/czYQl779T7DK1jtvZ1 KryYMGmHXZfjJZ+c1t4btTtlsHr58O8d2NZHmDqW712x0WGsbv/osSgeGVjPdQ/5HEaH yZatU2MAH8Lj3t32j7/kZ0LhxrvZ6CAZkVrZfTYgNNtQ4AtyhWAMPkpuEKzFfpDGRNcy ju0cEIKd7DXL170TNIP6L4qwi7Dif8z3MQ9R/ZAnSxbYu5+xGKVLrcOGaXrDfMPOg2sT NEuhP6sWs+R+sT9gZ3qvRZhzqFnqOxiqr10c8C+siYnfBdK5LTCSwGuuHqmHQuIgxflt xFMg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=mC6gWS+s; 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 b26-20020aa7c91a000000b005221dcbc362si5732016edt.321.2023.07.25.21.32.46; Tue, 25 Jul 2023 21:33:12 -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=mC6gWS+s; 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 S231656AbjGZEHP (ORCPT + 99 others); Wed, 26 Jul 2023 00:07:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231671AbjGZEGc (ORCPT ); Wed, 26 Jul 2023 00:06:32 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20718.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::718]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B7854C03; Tue, 25 Jul 2023 21:03:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sf4VW/IwItlxlqPBf+tZBdK1G2yi8ix7xMMPTcVc7Wz/Rz0arEOyhSehr7xAPU2KfWLM22PeNu0HgnUk3jgxDt75WDYTefB+Yjpjsm8JnFOrPO8FTIJvzrGWtQnvQ1wDw9PoVD6Ud8f/fE0f+rS08KpwR8HtnjxZ8Zc25WH+x1fPC6p0sIgFiTa9s+BowTSn3QFwiGGSlS4fwAD+iOhU6g9GArt4GYu5LTiiS23OL5i7m7ZuHWMROzFyGuflkgxd/7j19TAap1IBO7zivlfnaOPeXBoDxqhnUN2t4x2Ib2hq+YtOKsOtxGEbWUlov8wmMYeQ1jDkff4BcNc6SllOsQ== 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=/zfGaaJRqU+i/vJRxACVy8ivU2sos+SCFqN4m+wofmM=; b=ga7xew43ZZXS7k4sBq3hIxYjFURXSfJv9XbcSjhQLAKpFNdlEQVTc7hz0C8KtDLUrlydXHFqpx3kn2WuYxqKCzxryWyzrncQd5k5CUBl9YnLxVOH5WD4eUIfgt0DfWwGMK2P4VXlYsDswuKYLN8UvPQjYmzulTOpF4QbGh7rpnE2prk6O+HfxhdpQpxfZeXBqwpXmBoZiRSIJ/DgMA2A9rc7fnE40JZufCQPTuiTf6UP2AMKFjESKIQZGu33sD5tBWTxmbRTHVxhpfA6hKfvHlJ37HwP/l7rjAxhEtmlMn09bPI8pnY5+BgUhE1mRssyvNWCD591QoKhD45RLKOerw== 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=/zfGaaJRqU+i/vJRxACVy8ivU2sos+SCFqN4m+wofmM=; b=mC6gWS+sTnA/1gTGU/g2eovkSxYP8+fs5E9fHAsY6HDkW+je8OBe/VmQGMgDZT7uW4LG87D7QRJX553/SLE8nMSdZl/tfM1lDHSE1jlzdGZ4qYbgQPCJZcLh4I6fTZd5cS7EJARNHx1rJ+Iafl0KvgLmL+LgkRUua6xPKW6skehrfN2c39956HQ3OfglOOByF8xGAJqllO1BYzmCf+Nr6KaLCE71ocguQ8eCsUhdkV/m0oBICdv28gbXvvx7+54CzPkj6JbrdtJCe9JO+lXAuiER/f8e752qbppybvDy/y107EZIglOXqH7oWTvFg4VXy9TIqycBpfRTjoQ2JKB2BQ== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:25 +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; Wed, 26 Jul 2023 04:02:25 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 38/61] mmc: sdhci-acpi: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:18 +0800 Message-Id: <20230726040041.26267-38-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230726040041.26267-1-frank.li@vivo.com> References: <20230726040041.26267-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR02CA0093.apcprd02.prod.outlook.com (2603:1096:4:90::33) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: 4c3e8e53-42ed-4f5c-5196-08db8d8d1265 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: keFaUUfoVmkW02imy3IBFCz+CgUgFH9gb4P06VMO7EtRgYsx3kF+/swF5tIJpbRF2yn9hoscmjsnAZ9iBwf48xdf4RClGzBxai6swen4eMzbCQdv90n7/XaXo4WrmMa1YwglpMxVgvTh+TwCbD2UFhk6+kGfgyV2VyRb/E9ptH1awXK65INXQyILMve4fj7rFVaGIgRcSUQzB5b1GIL2QgVPFQ3yIeHwdlKhXuTMsXFPbJIZrMTecOswcTvxN9sWVFOCze8pgmyRVlgnzAmSQKKFAWscbfVrANN9dyv2f2gUI195SK30P5qtlQ6mCwn0Ct0HUkSfOgNhPnx1mOrPicv0QpnlJDGQc6pkieVjuzAciaQLmR2qDmsSlGxXvrQUsdQ+stsj1QxAdr4bHtBHpLk0khUQNdmrIQffvKf3eK7a/i/n/90DMApzA3z3itj0d383TNahN1N/ijy1luzRRbUBuHYlDUAmEEtiJ/hZcGufOAkO2Ik7RoPNpUeT1xcUeacUQtOrfEAxaNN5FVxKiz30SoyZf3cIjmaeWddLfpD49vUytzNuYHvo/j55Avue4CwqiMBGIpNOAzqTLNQEIVvxZV+J+im5/RClo+n34R71LlTWGMvsHW2dpcHzC2s8 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)(39860400002)(346002)(366004)(376002)(136003)(451199021)(110136005)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(6666004)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(6506007)(26005)(1076003)(86362001)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cWpTSnlncytVZThOMTRFOC8zejhPNFUxZXJtOFVVbzl5WXJMWnVmSkZFU1lu?= =?utf-8?B?VzRIdHZla3YzMHp0SVdoRmpCYVEvTG9aWllJVDA5cCtwYnNhZUVqQWZsNkpj?= =?utf-8?B?Um1mY1VFUDlJRk9RdkR2SlZwb0FxcndsTzB0VXQyOFB2WEwwaW56Y2RZb3g1?= =?utf-8?B?ei9oV1kzWXg4cXBWWTFMTlEvR2ZTSU1La3hqOXkvSk8yaFArOVN1MkJEMUt6?= =?utf-8?B?Q0I2MFJKcEZ2aEQyd0xXb1dIbWhKM0c3R2ljMDlGSXRkNUk5UDJnMHNlYjNm?= =?utf-8?B?TkJWdmF2WTEyVzBPSmtYR2hnRlF1cXFsWE9iZ3dubjBHVGljTjU2RkpnSUVj?= =?utf-8?B?bVJnZ3JLb0lOSEFWRG9laTFiK3NIVjRRZ2FhZTI3aDRKWDg5YW1ZL25RcUsw?= =?utf-8?B?UVprb1JZQUt2NzV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ant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 04:02:04.2835 (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: GdWGnOvKlOfg8RJRgquJS9y92JvK89uPt3E8Ysvf6IeEtaDo8ods7Nk6ZATan3dlbQwQqxXXFaDIaSBbGy48ug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 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,URIBL_BLOCKED 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 --- drivers/mmc/host/sdhci-acpi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index edf2e6c14dc6..acf5fc3ad7e4 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -917,7 +917,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev) return err; } -static int sdhci_acpi_remove(struct platform_device *pdev) +static void sdhci_acpi_remove(struct platform_device *pdev) { struct sdhci_acpi_host *c = platform_get_drvdata(pdev); struct device *dev = &pdev->dev; @@ -939,8 +939,6 @@ static int sdhci_acpi_remove(struct platform_device *pdev) c->slot->free_slot(pdev); sdhci_free_host(c->host); - - return 0; } static void __maybe_unused sdhci_acpi_reset_signal_voltage_if_needed( @@ -1033,7 +1031,7 @@ static struct platform_driver sdhci_acpi_driver = { .pm = &sdhci_acpi_pm_ops, }, .probe = sdhci_acpi_probe, - .remove = sdhci_acpi_remove, + .remove_new = sdhci_acpi_remove, }; module_platform_driver(sdhci_acpi_driver); -- 2.39.0