From patchwork Thu Jul 27 07:00:45 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: 126781 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp938625vqo; Thu, 27 Jul 2023 01:16:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlGR8FYLwweaTjGoASSUgC+i3CKj6ykl6WDmo51rfUQt8aT5Y5s6d3OM5WRWRtcfCAbm7aVv X-Received: by 2002:a50:ef05:0:b0:521:d1f0:3013 with SMTP id m5-20020a50ef05000000b00521d1f03013mr1169713eds.33.1690445790841; Thu, 27 Jul 2023 01:16:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690445790; cv=pass; d=google.com; s=arc-20160816; b=yJAaQR8Uj0a4CBCmNDZyyS79nECFmiJfTtXSv8V2MBqGBBhEGWAeCY4uaVcR5iTE7m lmZDqK2cWhyCTfKpZBJII0wVsVxT0lpaLnQfJewfFz7+fODTErLopMWL7eULS/UZwimG +Vp/+oUMvOahup058o0ry1/CjzVtVUbhNEFm6f6x5PP8bAxbQN6PRNqkQkYH7taYatQm cxwVs1t41ZoiELL7eJpgY/qgXRi8O7AvujB/ScDL3wF1OZuLGWRb7ndQUTdLEU6FrSBM Yf149RbmY49XpTd3gnxHmNO2WIxaZhjUNcuHkCX3pX43HQ8FvcRJwBtoXz2v2/Y4b/Tq SUkg== 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=jiMupy/2gpTgAg4IecGGpHWMYbsCUu9rI2DrKBUHpxE=; fh=qaoyuzCS9Qfot0ptYzM89NjDvwtd+S0K0JfQxr5yr94=; b=1DDae1yCZ+aL3Lk8HjF/dZAx1cJ2vF/hewi5e+dfFKBeoNUF1N5+YTcG6cO1voUnep yJoemwJeXXYyNia78FlyphJ1Qxelqpu0PrNcaZIOb+h480VBRv5KOwGh3iL+nr9sM+oK B/F+o6GN9ipoKhj5PAO8yWddxR4noHl1kBRqKRxwW+Kdn7mX2+FtUNSsAp2NADAY527U +MkBGRY52jrfxy0w8V7SzjMemsaghcYrzvGFgx/Y5uoTgCHJX90YJ5yDIBzmnDiAa+Hv +jb/HEA3jr4VwkB1o06ZKgUbu8qZRthnuJCD8RWBwbj4ASSTHhIlQus5lbmrHI6VYYuq KV2g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=H8rxWy56; 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 bc15-20020a056402204f00b005222c16046esi609340edb.55.2023.07.27.01.16.07; Thu, 27 Jul 2023 01:16:30 -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=H8rxWy56; 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 S233083AbjG0HKP (ORCPT + 99 others); Thu, 27 Jul 2023 03:10:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232227AbjG0HJR (ORCPT ); Thu, 27 Jul 2023 03:09:17 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20725.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::725]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FC514231; Thu, 27 Jul 2023 00:05:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dfzChjqBbfIqi4Lsmdd/kNQx+FGdLKuFjy9GvACWIowbk3HNBCPH2rAQXiqcfOAyzoAqWr+2yPvP0ljK6GGkIqMSpxpGmlLbSKD6xhvnR1vJA479oV2mky3J5DBz10K5CkRTIdL5WELgfZl6e1NhtufiZcFgLnVRHcdzNHQ+vl5BUL3E5ZlloXv4jYQuioyMyRJKlajY0GOEh9UZ1xETrFycgkEvTMxydKLgGq8ujesEUAcnJ0wk/cAnmSO1a+o+eTeDqqYzuccdp52fu61Hqeh4FexLsjcbEWo7H0u0g5V1/yQVt4+Tr1CCkx9Aj9o0yYo4LgGs5RzHUwEx6/jG/Q== 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=jiMupy/2gpTgAg4IecGGpHWMYbsCUu9rI2DrKBUHpxE=; b=TMuzxHDpITtc8dqMTsDSES2UIe9xd/hkmbhI3+tTkVT++dl8M1FLGFhS2XlIfbRnQPTgWGwF0l/Gtc3zpqQjribAzWrEK5QuAyThiaUeMSvaZ0dWt2gS255kkv4zPOuJsmdrwliMDRRFY+nkWYRvMDpDPPmRC2LUOKUeNLnIxoORJOQsFut994+qGSUcALhMUatnHqULQ/o8P6xS9imDCo8k2kABVkmOLQvKN9Ktle3fIqmkoxMgi5ZtX+HSsfzbZsOzgX8M46ufsFj0gPR2snXi/LfVLri7jpmVPcXOF5ThDnmZqAsCnlL+5HPNx+diStw2ZEK8aeA78LIu1cOYqA== 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=jiMupy/2gpTgAg4IecGGpHWMYbsCUu9rI2DrKBUHpxE=; b=H8rxWy56h24l4Tpd+STKcLcob3hajxrgWLDRf/PEBcllg/gwtUXl2UfMnOlFpZfD33oxCsG4//rabds259EUm73nJywQytpD53jQYedE+4d+rBnmqhM/AslBe5aD3UHr2DHQ2QJaer4/ASM4d4/WvdQ9I8GX/3e+hgGqcDid0EXrhzHGbW9WJeQg/8TTCa3WIDbvufWBHfIqZA61iTosYuwjDyeuV4MRP7wtwSfJ+IbhmXbNRbKoclE8Wr16EWeRei4ATEI2mF0P7tUxW0xoOGq8xRHS5Lxutwur6efOvZvOHR+mg9ZNOG4MWnx4vHGpyB7UBcOQsMKSWHSuIvg9Cw== 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 SEZPR06MB6644.apcprd06.prod.outlook.com (2603:1096:101:181::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Thu, 27 Jul 2023 07:02:45 +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:45 +0000 From: Yangtao Li To: Wolfram Sang , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Geert Uytterhoeven , linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 56/62] mmc: renesas_sdhi: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:45 +0800 Message-Id: <20230727070051.17778-56-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_|SEZPR06MB6644:EE_ X-MS-Office365-Filtering-Correlation-Id: b45a852c-ee7e-4af2-6273-08db8e6f7542 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5xtIChDEQvE+RCJoRtpDjBTGb5Rj++t7ORJtFRqNqSbwx4PV2Mnbq+GEJa6YzCR1pFtOaySRZU5zda8fBx2fi9YERffq4PyOGUcp/Vz9DI9nySd//MRZmU892l+sGoPVNIgyQxcs9uwySlsQaSnnCuNQG6K4XlxVAJR5YbELReJFDVG8bVJ0/hOTL/RfXuPwaDP6MPxSA9pDLZxNNaA3nLeS0WiwQnpiJukIBZDFXMl8fp8iqT6IkvJW3FML6hbv+22V5/88h7/SgQrN7CB1p4+6exGYdJYcsGc/9Gb4WEdQhmKBUMFsfslLmXdEdmKL/DCiMZhkLMDEJjSxWvHjKJfWNyDVi80JgqkDvPW3XyQrVwajQbLjNe81FSgCGEbsCM371MKnr8dMwOPe3ZIXMrggJs89vAE6PN3eyVXIKwfmeZTxQInnBC+kjhrc88E4N65wiUaoZulIMylqOfi/t4QKFMCT0Gp4/5DCiNKDGWiQ+gjDO1ZmWtiUUs0ChjgCnyj6wMB3YLKtqxnX123j8tNR0zZYtJpvathS4d8MDxd4Hasiis9Ew6NODTbJDgtHYh23v//MO4t4Szbwm93pgYWL3j4aT0in3vWgzLF4JMPRahIWihfANs0EraZ34SX0 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)(396003)(376002)(136003)(346002)(366004)(451199021)(6506007)(1076003)(26005)(186003)(54906003)(478600001)(110136005)(6486002)(6512007)(52116002)(36756003)(83380400001)(2616005)(66946007)(8676002)(2906002)(5660300002)(8936002)(38350700002)(66476007)(4326008)(86362001)(66556008)(316002)(38100700002)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?rxKcj0w2qHB36TnqC4MWJar5L751?= =?utf-8?q?Cd+L+wQ9dUEFlbdaE+0MzzGexTpW+HenRo+3SuJJ824YaTXI7L5Zq/iOF2IUnNhJh?= =?utf-8?q?fme7Gs16NKPHA+Tb3RcgweJuQ1avZ7tqFOJk4+79FKpOcPhaoT5ap/EADFAvzXGlE?= =?utf-8?q?Yzs+arrIDDzgRR80RhGS5lIJciGQyXHmvHNoQ7fn/lxdW0ADckvfBanur4tS4tMSb?= =?utf-8?q?o+NtdR/CgbZ/pxC6KzI5foqe+Xw6Ycfa1i4VBidyQKpzlZn6wGlvO1LdfCmw4Br9N?= =?utf-8?q?GDCOeLoBaCi8MbY5qSoYLArIeeCOLwkZh3fB9oipMpdrbmMit6lSi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qLCC?= =?utf-8?q?gumN5ypjWXdrgZ26WX1jUK6xn6ie9yPl26Zxne6eQY1OPRpeo8rdai4tU3SZS8mtF?= =?utf-8?q?8nazlSkpzjw9nV8JVQAyW7fexoteEW8LPixpKu4HNa57y1EvB1bfdZrt6lXdi6G0c?= =?utf-8?q?M0dwxPASuTd9VQ+TQUwesLPDjnfbPIdfMvBt8HXHbIE6+eCpf3KjfaweKEtrfXLtJ?= =?utf-8?q?Cq1xrsoUBP3Hgg7SYbk5lO4fBldbshVXRvBqEILmJvzfjwIXU63+9E9759InhYO1g?= =?utf-8?q?hinzgMIaTPUpW2EQvlO8spUnzpCRTbQ7AH28LZSeQ41TtXUDaRX6tIXDidDns2G7p?= =?utf-8?q?ZtFcbYvwhGVP?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b45a852c-ee7e-4af2-6273-08db8e6f7542 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:36.5178 (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: xKprV2yE9sx7P62DoKB59z0D/zW05DYucwBBfawGHYrx7rMveSvq33zmLaziypk2fNjoDBbqALeW2+1RuJ1bBg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6644 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_BLOCKED, 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: 1772560885942329544 X-GMAIL-MSGID: 1772560885942329544 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 Reviewed-by: Geert Uytterhoeven --- drivers/mmc/host/renesas_sdhi.h | 2 +- drivers/mmc/host/renesas_sdhi_core.c | 4 +--- drivers/mmc/host/renesas_sdhi_internal_dmac.c | 2 +- drivers/mmc/host/renesas_sdhi_sys_dmac.c | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/renesas_sdhi.h b/drivers/mmc/host/renesas_sdhi.h index 68da3da9e2e5..c1fb9740eab0 100644 --- a/drivers/mmc/host/renesas_sdhi.h +++ b/drivers/mmc/host/renesas_sdhi.h @@ -101,5 +101,5 @@ int renesas_sdhi_probe(struct platform_device *pdev, const struct tmio_mmc_dma_ops *dma_ops, const struct renesas_sdhi_of_data *of_data, const struct renesas_sdhi_quirks *quirks); -int renesas_sdhi_remove(struct platform_device *pdev); +void renesas_sdhi_remove(struct platform_device *pdev); #endif diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c index 10dbdb4abc93..c675dec587ef 100644 --- a/drivers/mmc/host/renesas_sdhi_core.c +++ b/drivers/mmc/host/renesas_sdhi_core.c @@ -1149,15 +1149,13 @@ int renesas_sdhi_probe(struct platform_device *pdev, } EXPORT_SYMBOL_GPL(renesas_sdhi_probe); -int renesas_sdhi_remove(struct platform_device *pdev) +void renesas_sdhi_remove(struct platform_device *pdev) { struct tmio_mmc_host *host = platform_get_drvdata(pdev); tmio_mmc_host_remove(host); renesas_sdhi_clk_disable(host); tmio_mmc_host_free(host); - - return 0; } EXPORT_SYMBOL_GPL(renesas_sdhi_remove); diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c index 9ab813903b2c..d8efb8035b1f 100644 --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c @@ -609,7 +609,7 @@ static struct platform_driver renesas_internal_dmac_sdhi_driver = { .of_match_table = renesas_sdhi_internal_dmac_of_match, }, .probe = renesas_sdhi_internal_dmac_probe, - .remove = renesas_sdhi_remove, + .remove_new = renesas_sdhi_remove, }; module_platform_driver(renesas_internal_dmac_sdhi_driver); diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c index b559ad38b667..248dfeef942a 100644 --- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c +++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c @@ -470,7 +470,7 @@ static struct platform_driver renesas_sys_dmac_sdhi_driver = { .of_match_table = renesas_sdhi_sys_dmac_of_match, }, .probe = renesas_sdhi_sys_dmac_probe, - .remove = renesas_sdhi_remove, + .remove_new = renesas_sdhi_remove, }; module_platform_driver(renesas_sys_dmac_sdhi_driver);