Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp818744rwp; Thu, 13 Jul 2023 01:14:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlHyWJZPZ8RlZeaLINXJMuF8g0SMUKs829rwGW5frBgZ5zrpbnkhNyY+76ExjoLzJoxfyIt+ X-Received: by 2002:a05:6e02:d0c:b0:345:ad39:ff3 with SMTP id g12-20020a056e020d0c00b00345ad390ff3mr693908ilj.3.1689236071369; Thu, 13 Jul 2023 01:14:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689236071; cv=pass; d=google.com; s=arc-20160816; b=z8Oax2n5paXGSp4fKPB+qtKRAtayq5whs7sxKB1mf8GiY9tuF7htocjqrzYpHVQFOq uoxHw8IVanNEzcoGqUhVJsvoJRaGmSBTlEiK6DKHqmP7qal83HMB132zj0O/9mg1uxdn ErHVbRnqQROzaRhULAxLbBMseohSZ2fUs8y/kX7Qgy9oG50zEPR0R+HHiZD5aS9gdLY4 jbYcCu1CkQdr0HLHV32KfvzmcCNg7es7RxgSPjooeUBve4GjewqxPSi23yMt3a8vHpiW +kPcTm/7TuVM5AMmNkKTZRDmzdhJRpsTfV5juYOKpNG+fn8iDVHnNKN3E6pXYz+0XmS2 vwQQ== 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=rP1v+X2aVc4DKwgxtQDwQRCU/JULLF8ZyOfeP9A2ytw=; fh=RRst69AylAmQjTenUg5G1MIx2YhIHWYClupGBxgNKIA=; b=AERM3R2UHV89sUDT8Yjy9cnsInnGA7WfiqZlbOvccq8WIpAfjJSAZ4ZVfyejyz/2a7 fbdb+ms3jCjiN2nbjbNXes0cz94wgNh+fE6MeRJGXMJoRZmT206mN0DL8fEHqicuDfpJ DZ33EbMN/XSqDrDcDE/HrCaLcHYW0EhZ5RTc6r0cf3MaJ/bpMH1ZqDU8ZLkCQhcNEzOu dJsY8+dVrLdAOKeQKAd4bqr+A5x/ZOd66gpzSrQzrKxnK7HLmOjfqGzZnA+iRyG9HbIY gfa7y3yFq+Tq2MQRAS/FHG5eCjw+28LJNPbp8jSBv0aFdGbVCraT87JLZB/QXpBBWvb1 +cPg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=bl59gsSt; 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 go10-20020a17090b03ca00b00253555e5f95si4694065pjb.153.2023.07.13.01.14.19; Thu, 13 Jul 2023 01:14:31 -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=bl59gsSt; 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 S234025AbjGMIKR (ORCPT + 99 others); Thu, 13 Jul 2023 04:10:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233842AbjGMIJp (ORCPT ); Thu, 13 Jul 2023 04:09:45 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2115.outbound.protection.outlook.com [40.107.215.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D7DC2728; Thu, 13 Jul 2023 01:08:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RlCbDpAc+xsIqszROf2QZ5pqYJ427AWUKvXrYS87BqVp0IKmoTM7nMt/eFd/jjeI9Cke7nQ/nArg0T4Cwana4Og0gzbAC2Kd7taucRIZVL5czAb5BKCbX0Ddck+B4gJKTqItkIqAFYNPkh7uTlwPRrnj5EP6fbCNR5WPduLpegm5cpU1lhg746iGdtBIFbJHx0tHdq7fVVlVU+6mKBY8GBc97z1z341H1cTCZnmEcGzrSw1C/pFX2e2/z65riS6Kjk0ZGN2oeHHZNRH22zxmeb9yMray9bHF41vWMyCFI4E8b+OVB78YAKimSm6ipLl8EXsZI6GG7MrkHk0+13IIAw== 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=rP1v+X2aVc4DKwgxtQDwQRCU/JULLF8ZyOfeP9A2ytw=; b=mrq8VGk4rwHYA/Uud4xIY3UiK38UCPeTslQ/pCb9eG1fve2NsKpXLNtoAzpy8z7/KHCXU3gGqNVw8eMkJbLX6tczs8EGvaCelpSRJN9JJp3Fp7PW8/EihP7x40doauYDs6a3w31ig9qYoxhgRlgeQAtUhc0IT2/+Ac/7VKV/tMujPUygeAIMjmpCh4PVO67ExPeI9vlBlUOx0GxhYqCkANcBdFrdacqwCbssj3ngQ/425Yl31Mhr22uNCQdckjcvZ8PkXyn+zYknrvaF5PXICivVVIN4+syoFVPNrM2Bw64W4lrzdMLJ2B0CSJWX0W/849sAk8i4qY4vEOw5ljBWwg== 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=rP1v+X2aVc4DKwgxtQDwQRCU/JULLF8ZyOfeP9A2ytw=; b=bl59gsStgmf8yApfy4l221w0ABUg41HAXgn+YTwnB1z57EnS+FaiB7DpFKc16yQqc3ikfu9xPUloBCGxoBWAGGus0MJVAIhQdDX0pB+UGLkV6zmGO+5Eqh6xvXYsxNoVkC8mjtlaa3S75rzcEANVExyqYINWibev2nbiaVUYFlUSqooASX+fuOAIQLqs2FmmmEoxngn2wz3hhEYAk+GExm6akGoaZYiVEptk+IJML+wmW5wYIloE+SHQUbp86WsgynwJLvDYFyEbSuEsUgiL0kKOpLzTMQ66iicxHDVX7ICbltAQ86hGUUUTubCRS9mpDPO5nmiPp/poH34ra9Xlfg== 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 KL1PR0601MB4371.apcprd06.prod.outlook.com (2603:1096:820:74::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.22; Thu, 13 Jul 2023 08:08:24 +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:24 +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 03/58] mmc: jz4740: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:12 +0800 Message-Id: <20230713080807.69999-3-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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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_|KL1PR0601MB4371:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a9563f4-e10c-4f98-03c0-08db837854c8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: glPuWNhoy14xkL0JNnwn44B+DTbY05ZBvefxIsJzy+/8czzFsfNVn3VjzZXVg4atyT1vEBOgIZbawspXnEQd1cE81ZaKapQ8xlgS7e4wKJUvEOj01+DacZFzJpkn5RsKq0zT35xlnKrhWdmn4pxbP3j2mNFPrUOHG5Zz7AiUbNpTHcByMjCo8DWNwPoUWuIwY5c4mDLN55KB4f+Z7b/FZnLssbhQyKe7sDQ5gtGGvDNIsQUEG0OyRClA/d1p5VxgGNI+YhkLLvVo6owwaH183P5Y2LJK7vB81sF3Xfhsyw/HLLE7nVtD+HZNqh0zJWul9dfKAVkz9pm0wa/eU7v8KG7UVbrE98KYXZjkyqcXPgkZQbRG54hhCNW/XQOIRQ/+nVZZuV4gZYIgddVVlAshfT1susdRONvTi+FfAC4K/jf3B5xcPNLmuM7uThpKaDfoV9x9yW9IxuSZUGXj6PWtH7/nu6bNA9mQdD0tttAP+Tyt8B72VLla8zDyF2K3Y/JiHEIZaqSykYFVpn1zIFZ/V05zIUHoDR7TiniJ9o1EkVafKvYYMIxkcuhcSkP+fGIeGtMs/HL9qwrsQ27RC+MkIWtJMvrbQZ4Bvh6TjwqqIwAK8/lWvSR2ub8xw+iu0pa4LEBqzwgbZulXZIxd/br+LrQ55q/SIEqpbfUpydUnEbs= 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)(136003)(346002)(376002)(39860400002)(366004)(451199021)(38350700002)(38100700002)(478600001)(4326008)(6666004)(86362001)(52116002)(110136005)(6486002)(54906003)(66476007)(66556008)(66946007)(316002)(6512007)(41300700001)(83380400001)(186003)(66574015)(2616005)(2906002)(36756003)(8936002)(8676002)(26005)(5660300002)(6506007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ckFDMjRlSWxYNnRnQjVYM05DVTUzaGM3WUR1OXo0ODU4OFFGcnh2bkxOS2xp?= =?utf-8?B?UFV0ekxHZ1FSS3Rqak96MEJ1cXcvTldNMG9nV1I3MWowWDdNQUtKNUd1Tno3?= =?utf-8?B?N0VPTmFiR1J0ckpGWlpNYlFwMk9QcU93NDdlVGlaVFk0akNTMXVGUzZZZ3M1?= =?utf-8?B?dkd0QnVwQjBsTThOdTlTd0ZCKzY2UUxJUGZTODFSNElUVWVNcVFWb2M2THo2?= =?utf-8?B?Y0phWXo5RUZqM1hIQzVmUW1sdWplUmFlL1RqRFNCK0RRWHZGRUJkRTR5YWpW?= =?utf-8?B?KzBBdjE2Y2xQMDlWVi9iSFJtc1pNdkVkM0djeDZ0Q3IzNmhFa3ZNTC84SmFJ?= =?utf-8?B?eG1NMjNoR2NxWWxJaUlQMFhSKzR5Tm5YRVpIR0Vq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Network-Message-Id: 6a9563f4-e10c-4f98-03c0-08db837854c8 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:24.6276 (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: wBiotzHYLx8vHDoNcqWQuzVU1zAXCQY37rW+nMusE4Awn4y+mbCWDmuLcWazztk+cPJgI7NbZik7x4PKmde5bg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4371 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, 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 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/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