Message ID | 20230726040041.26267-3-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp163561vqo; Tue, 25 Jul 2023 21:10:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlGXNE5o7BV0bOrLpRZz3nBBQkArQrmuasPenkKHPwptH+3ijPTjgzg+H1gZK62JKdCXI/6d X-Received: by 2002:a17:907:2bc6:b0:991:c842:2ca2 with SMTP id gv6-20020a1709072bc600b00991c8422ca2mr642064ejc.15.1690344604266; Tue, 25 Jul 2023 21:10:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344604; cv=pass; d=google.com; s=arc-20160816; b=ZIrwU9HC1LeBeN6iA69HeMZQAlJi7TjOLbbm6ANguElXGFQ9gtBWsgJ5h1aKYj+EHN ALe50TIwczvGGFgw7iIkjXDwDdFvcndO12DdoXgLp3zw3S/JoBy8lHxMRC12DrsLA0tF H6Mfc9WQN3VBIfkUloe3jVNA3RSQfB7udYWHwFE72kY5JRHxoi96l5niBpYmPNSYaTx3 0+74Vqwy6JwcIvF+iOsz2ESVkMNHY/aKrLUrZV+ypWgTpIv2FMmXoQZIMAA/lv9mneBf JmfHAdLnArJWB1mzxVkfBV5KlP4R9mjMv3sGQ/jrcL+Qj04+VPfybhXdG4LFtuiVpUKx 1ngQ== 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=vqxSuEFdgd7k42jXTQq9t2x1NA379+lBETFrgOHf+Eg=; fh=RRst69AylAmQjTenUg5G1MIx2YhIHWYClupGBxgNKIA=; b=E1HPphppus0K3IUl8WuTZhtz5lH2iAC5zpgVGLQlpa0rKfX0syd9KU3qgF9v4Is/VO DuLehR5f3i+ZmEgQYNrqawW7cSPlP9IFfL+ECmxZDxnlnCzzsr6A98RQfK3LS1UQBEFV d2+qDaq4/cG9guuf20REU5mKcxuIwWGOPZjAMEDmMFYJPvWW3CJ8tKU698B6D3VjMFnR ZI7hr0oPGxaxAygMw0Z3vSy4wKjjFwRgoBfd3PyQwdHWBWwwCh4VI67LBzhVo1OysSZ9 d0O94QCjtZ954BDEolRztHgYZAybVVd9Wqk8TEsrkFd3HxWj4Mm2tCjFQRSMW8thDKDE dZrQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=mNkz7HsB; 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 qo25-20020a170907213900b0099318060d50si8820433ejb.463.2023.07.25.21.09.40; Tue, 25 Jul 2023 21:10: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=mNkz7HsB; 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 S231162AbjGZEBY (ORCPT <rfc822;kloczko.tomasz@gmail.com> + 99 others); Wed, 26 Jul 2023 00:01:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229664AbjGZEBJ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Jul 2023 00:01:09 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2131.outbound.protection.outlook.com [40.107.215.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14F0826A2; Tue, 25 Jul 2023 21:01:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AaNajTNzecTM8WTYp8Q7ggNgloBcHTyG93CzJYbVKfHZyHV0iWy1UXGufVKBuHskBofYmunKAVSM3W8F/W3saEBt+k6EGtx6XMgces26wq/gNc8Q8o1kqvn6tftETpvqij9BDaNxZ2q5k9I3ChwdQw61/7be+diJy8wMjJG7UH9CCC2pgNp01N5K5aFGukFPK9ybps+BQ26PgijhyMaipVwBeYE+GomeTH1FmVbLNHNLW8BmgHfWcs99cFw/SfFrqlyEU3ti5wt2nvfnLPlRvgx59AO3c4CvBjWt7+zMx0y1Vf8BkA9xJy3CqUpyD0cDMb7pN5/Q6jRjXw3caWwc8w== 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=vqxSuEFdgd7k42jXTQq9t2x1NA379+lBETFrgOHf+Eg=; b=i6EFv+qwU+uuo7cmIoGIhTEjpgpCPQr+tmVfsoNlWgGSBpuOpAahKYP9ctr1btuhsdIj7rrE8fz1MstCmXf/DHdn+cigDdruYX3uHq3v7wOEDIG5dgz3Xcd5TgM+nNcxY244C3+AdsBpHMiZYbKF4hrvkDQSIYsa9RsmnRWpS9LMyjsmaSHSlE8gpr1a3qy5UOJZsPhJ56xUDRHETRC7ijaKJDdHE6EPakZFN9BIPBvRyJuz7rqNiGwR5I5Ltu/wEAnaceDC2CL7nBj8y52MRBXTURabETyx42Zsq00/wE/PzurFYESEbmoH1cwOsPLiEC6p3LTR0eiMGQnf+X/CkA== 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=vqxSuEFdgd7k42jXTQq9t2x1NA379+lBETFrgOHf+Eg=; b=mNkz7HsB50waEWLYCCDZ4lHK8KC7EAdImAclZdANxM8hB0X5BzCAoyVc5xo4GxQjhVLrKoudulEjhNHGXjXJqnDHOrw2Then9ylWvvKXemaMuwIZpxdRJcu6Z4FqnQPQACMAKy/ZbPaCJzurG1cvoNX5Kwi7SQJb+HMmc8YBXdX4NyBOSJcch6N+iU0O67Zljn+XJkfy4BlLUTjeBSmIfOTu8GtaMw3f0YZ3w7m515ABmSa8qiGBB0PsJm6rEwpXY2zLmIl3E4FFJAH1/zdDSP2crt13j+HDhhNenr7ccLv/pvpGOoGNvzFrPLglMJsIAVRw8fREos96kIVADqj3cw== 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 KL1PR0601MB5463.apcprd06.prod.outlook.com (2603:1096:820:c3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25; Wed, 26 Jul 2023 04:01:01 +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:01:01 +0000 From: Yangtao Li <frank.li@vivo.com> To: Paul Cercueil <paul@crapouillou.net>, Ulf Hansson <ulf.hansson@linaro.org> Cc: Yangtao Li <frank.li@vivo.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, linux-mips@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 03/61] mmc: jz4740: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 11:59:43 +0800 Message-Id: <20230726040041.26267-3-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_|KL1PR0601MB5463:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d78ad3c-d4ea-4000-6519-08db8d8cecfb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5ZVTXxhx6zdIjFiFtEu92/9J36py0b4YQqFP15JBJkV47lsW7L8ga+LnEMzZleMFwcflg87XO5CM/sgR33pqTneasAkKq+qfA7cxZVqGWBG0qqY5z6YK8xHlT2Usf/5tI3o81Mn5S5t3OnI9gLN63fu1ycHuiV2I9SD9qiRwklkZmBwLHxsEPIZD+Z+huuE0xVnPnxS5VZgigEzH7lW7sj25C/RlOQvsUlmpaCMdi2E9+WQJUZ7moEiUq5Q64iejpW435MqgpIgpAnHz1qu02E8hIzIwHRqxCbh4Sz51YIX87Phf6ZyT2s4kXjPVAghEPJUyHftePbQ/N3VRXa4sH60nONpbDKlx+U4rQw/FtCJG96O/AliMfjy/UXcvAOVw6EfvIwB9T5lRDoSz6t5iHeB2GS1sGxBfse3aipOd8QkBr8Itqyn6iVCoV52koSePjJMDs4jm02zPL1Ti7V/uVKds9fq2AHURxHmhlMQiX6n0XS1fPSTOXm4xpmVdY1M0C6Mhiafa+qnDC6MoLcDN+bMSrNcmr2wGKey9Q0ScfcY1vPYPniVXaqMsMMRcUnhe6KDpFt9TG+frqaK7QgwUzqkk6H6RNQMYn0o25/ZN3PmcPUEJ7WY+4b1YOR/IBJsp 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)(66574015)(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?q?adAwsSCPcWrH/jU/8sXMYrLCoidh?= =?utf-8?q?dmbshNXH1/u+k97nvb5o7M60O7HBbkGXVKo8uavzrKbx5sr2GfXzmEMbV+nBEPw3e?= =?utf-8?q?Vmye7goqEnbhxURy56S0CUqa+of/bN/ox3/vOL0WyPkbjU+odAJ0ltaNBZP44BcEV?= =?utf-8?q?aPY+jGq+vF44wO3meGLoc9/iL08EEdUEhZp/M3aS0JlzFn9FhnFww64ZI0Y9krwY6?= =?utf-8?q?d0JPYaZHgyv+VGxzK1JG3D8Z1T3xCbjzgg1A7GYptH03c2SOPfjazwgh47U3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p1M?= =?utf-8?q?HeeLvU/fbjinK7CtT7iIHOq525QWe5My7J1091R11YfwjuJtOff+JA8B9HbY9gVY9?= =?utf-8?q?4jWSv+EqCWVwxpD/xU4zqUspmuzjbToAVMoxqjjldSn1y8W3J/uHLBb962idmRdE2?= =?utf-8?q?KeEf/xVsRfTnZGmezIwExUNMh7Kq3tC3+W2emSACSlL4zzJYhHl12cle7nnd7kSpF?= =?utf-8?q?NNFH9mdiwUfqlKCAb0ubkbWjlqAEBdk6Z4FMoeKEJdet/CEx+FB8/nvTQPDubCEeM?= =?utf-8?q?IqaPMLjH2r2fimDIYxyqFlwfEtgGF/R4WyC84suO1wV8KWFfAxNGFA2zamvo8cEdT?= =?utf-8?q?C+NiXmkKZRHsFhPmBFZklRoXEkMSSy/y6JX8Ws4kpmAOT8FJWKchvnEZSjRqZyuik?= =?utf-8?q?SqZdc+K7hBmv?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d78ad3c-d4ea-4000-6519-08db8d8cecfb X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 04:01:01.8636 (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: xV1hMIxwM2JrRqMZX7jHCoUPI1mAed3nTcgQqQPk8zKre7scsyFmTKCY4Z+e+uzugRjVzHcL2smdTUkxmVIAQA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5463 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, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772454783672438096 X-GMAIL-MSGID: 1772454783672438096 |
Series |
[v2,01/61] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 26, 2023, 3:59 a.m. UTC
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 <u.kleine-koenig@pengutronix.de> Signed-off-by: Yangtao Li <frank.li@vivo.com> Reviewed-by: Paul Cercueil <paul@crapouillou.net> --- drivers/mmc/host/jz4740_mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c index 1846a05210e3..f379ce5b582d 100644 --- a/drivers/mmc/host/jz4740_mmc.c +++ b/drivers/mmc/host/jz4740_mmc.c @@ -1163,7 +1163,7 @@ static int jz4740_mmc_probe(struct platform_device* pdev) return ret; } -static int jz4740_mmc_remove(struct platform_device *pdev) +static void jz4740_mmc_remove(struct platform_device *pdev) { struct jz4740_mmc_host *host = platform_get_drvdata(pdev); @@ -1179,8 +1179,6 @@ static int jz4740_mmc_remove(struct platform_device *pdev) jz4740_mmc_release_dma_channels(host); mmc_free_host(host->mmc); - - return 0; } static int jz4740_mmc_suspend(struct device *dev) @@ -1198,7 +1196,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(jz4740_mmc_pm_ops, jz4740_mmc_suspend, static struct platform_driver jz4740_mmc_driver = { .probe = jz4740_mmc_probe, - .remove = jz4740_mmc_remove, + .remove_new = jz4740_mmc_remove, .driver = { .name = "jz4740-mmc", .probe_type = PROBE_PREFER_ASYNCHRONOUS,