Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp533603rwb; Tue, 25 Jul 2023 21:10:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlHSrpIqKg+RNVRZZYfNZi/ZpkunfcmD9s2lBEK+2u+2FU16kMxKqsCbpY/LxOx083olx6X9 X-Received: by 2002:aa7:d1cb:0:b0:51e:22dd:5e90 with SMTP id g11-20020aa7d1cb000000b0051e22dd5e90mr628438edp.4.1690344616020; Tue, 25 Jul 2023 21:10:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344616; cv=pass; d=google.com; s=arc-20160816; b=Qi3Dqi2vwD2yuze4xU5uE8SJ6yOJxQxPN1sYZ4SvAaWBqzfe/X08z4o9BDjluNW+vG 9uU/2X0+dbV3rm/uEWBv67zgR9npGjhkTlfAlqjoU4CCuzATX/NkCYxAIjG73uNtffrK okk6wF8CgwcYXzIYeMnBz9nGgnzT1HkzfS3D2YqjH5KB4U8VqvE0UE4hv4xq735OrJ2b A3ze5nbk14Ocnd3DlQtUep04kiGNSeDlbgcwV7nlRl/wlFD5n+wHHcLpQSOGVOi+7fZZ 6qm3nzGou/kR0jF9rBj2Cs9XicMuBpQ++j+sqaBhOElZUn4nWlfmEJL3FDALMbssVvo2 t54A== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i16-20020a056402055000b0052228b42848si4609986edx.60.2023.07.25.21.09.52; Tue, 25 Jul 2023 21:10:16 -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 S231140AbjGZEBY (ORCPT + 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 ); 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 To: Paul Cercueil , Ulf Hansson Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , 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?B?YWRBd3NTQ1BjV3JIL2pVLzhzWE1ZckxDb2lkaGRtYnNoTlhIMS91K2s5N252?= =?utf-8?B?YjVvN002ME83SEJia0dYVktvOHVhdnpyS2J4NXNyMkdmWHptRU1iVituQkVQ?= =?utf-8?B?dzNlVm15ZTdnb3FFbmJoeFVSeTU2UzBDVXFhK29mL2JOL294My92T0wwV3lQ?= =?utf-8?B?a2JqVStvZEFKMGx0YU5CWlA0NEJjRVZhUFkrakdxK3ZGNDR3TzNtZUdMb2M5?= =?utf-8?B?L2lMMDhFRWRVRWhacC9NM2FTMEpsekZuOUZobkZ3dzY0WkkwWTlrcndZNmQw?= =?utf-8?B?SlBZYVpIZ3l2K1ZHeHpLMUpHM0Q4WjFUM3hDYmp6Z2cxQTdHWXB0SDAzYzJT?= =?utf-8?B?T1BmamF6d2doNDdVM0dleUsySm0wYzBtUDhhS2p6SHMwbE8xM2g4WUZON0NK?= =?utf-8?B?ajFoVHIyTzA1YmhYdlhRemtR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?B?L0Y0OGRkditzRSsrdlpMQUdXQ1F3ZkpoczBnMnVhS1NQRmErV3FKRHpXNXN2?= =?utf-8?B?TVpCSWVRamZKN1RtRDU0QmdCTmRxQTJsVkEyNnRDY0hveTY2SGoyOEY4NDhs?= =?utf-8?B?aWZBaStoR2JLNXd3WW14VHd0a1dOWVo1WkhXQk9xaVN4OXBVR21KZVM5emJx?= =?utf-8?B?dTNtTHZvbnhWMmVaNVdKeHFJU1dZNlh3RlVRd2djT21VeGZKOTRqdnZiT3JT?= =?utf-8?B?dk94WE9KSVpmRHdDaHFQdlUxbmZqTkc4UnAxTUhlZUx2VS9mYmppbks3Q3RU?= =?utf-8?B?N2lJSE9xNTI1UVdlNU15N0oxMDkxUjExWWZ3anVKdE9mZitKQThCOUhiWTln?= =?utf-8?B?Vlk5NGpXU3YrRXFDV1Z3eHBEL3hVNHpxVXNwbXV6amJUb0FWTW94cWpqbGRT?= =?utf-8?B?bjF5OFczSi91SExCYjk2MmlkbVJkRTJLZUVmL3hWc1JmVG5aR21lekl3RXhV?= =?utf-8?B?Tk1oN0txM3RDMytXMmVtU0FDU2xMNHp6SlloSGwxMmNsZTdubmQ3a1NwRk5O?= =?utf-8?B?Rkg5bWRpd1VmcWxLQ0FiMHVia2JXamxxQUVCZGs2WjRGTW9lS0VKZGV0L0NF?= =?utf-8?B?eCtGQjgvbnZUUVBEdWJDRWVNSXFhUE1MakgycjJmaW1ESVl4eXFGbHdmRXRn?= =?utf-8?B?R0YvUjRXeUM4NHN1TzF3VjhLV0ZmQXhOR0ZBMnphbXZvOGNFZFRDK05pWG1r?= =?utf-8?B?S1pSSHNGaFBtQkZaa2xSb1hFa01TU3kveTZKWDhXczRrcG1BT1Q4RkpXS2No?= =?utf-8?Q?vnEZSjRqZyuikSqZdc+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: 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 Reviewed-by: Paul Cercueil --- 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, -- 2.39.0