From patchwork Thu Jul 13 08:07:55 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: 119657 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1680046vqm; Thu, 13 Jul 2023 01:44:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlGdsmcOP35TGF7pO+QROlmjr6QuTCHw99v2IG4Ssm6jhwy73JrhggG/HW1TJWEGP8RLPQP9 X-Received: by 2002:a17:907:a428:b0:988:d1d5:cd5b with SMTP id sg40-20020a170907a42800b00988d1d5cd5bmr875040ejc.75.1689237843108; Thu, 13 Jul 2023 01:44:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237843; cv=pass; d=google.com; s=arc-20160816; b=XRhX9Oha+QN7iwjnyFPsvhw+NwPzDLqCULfVZPQLl80hIr/yjkPYSy+StrfUhB0gc4 v/o9FnxMg6rWkn87KEFXEDQ2qQTyQnvMsbc3hebeOfWwGy8BXBV56TqEOyvQzqI6TCd7 V2s1oKQEUCLGr4+5/ExeKBk5fqO27Ae0pyL1Lp5yAQYb+zpnmdpNU+w/vCU3hNOXHe+a VUg0H2kS/yZZ8qHhp7zTGdMYvWr0w1/jr3cTFRFwBcbW/uEpj1ojD1ySFIdkA7J5axlW symme/Nlxxh3NUcjULEw15d8zada/YuIlYQx6MuZSuU6n7cm4FIEN3BrUfNaqQOMX0qp vEEA== 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=TLrIU4EUdrLqb7T0bkwRGkvgLMm9bmDLScwtsrZ+fTw=; fh=/iS3GMUzRg2/LaJKGORKyjWGeAQGYKw/hpkHadSzFUk=; b=U74X9hzsffNxPm0r6Xca2utMhNZ7BAUWvvUKiGtmTABc4HXOTmebybCAJbDbXnerAV hZ/phOs887enIMWW4wuAIiw+itnCOdluJeWHr7VyvMd4FrOgmjdOaxtefsakXTTn1JPm c1Za1SpP+ny1kIybTJgfyBwH/ZGM0epQfe/Rjut58mNHy9yH9rF/KZsiHkXWL68IJ/9R JzQHWHFJCHBBuJqrKZCKEALnCEyGSdIkUhoIVMg2SzgD/5u19k/3EikrezA4zyw68kqn 3YO/lEqqQ3AWur3T9cmNehOrCCLHgcQo07CjX6hqxAfPGGjMr7Xmf2Z+Djb0sKhYPP5+ eXnQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=dgTMNzw1; 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 k18-20020a170906a39200b0099396546fffsi6641346ejz.782.2023.07.13.01.43.39; Thu, 13 Jul 2023 01:44:03 -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=dgTMNzw1; 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 S234041AbjGMIOp (ORCPT + 99 others); Thu, 13 Jul 2023 04:14:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233842AbjGMINc (ORCPT ); Thu, 13 Jul 2023 04:13:32 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2120.outbound.protection.outlook.com [40.107.255.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E723270F; Thu, 13 Jul 2023 01:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e6OFLE5USJPw9cGX18srZfGrG/3nWgXybbDaT4l9fgDktTKaklW2Pt2eATcM+hY0Rr1vvym8dGd818tEOvicplKbs46ZhSEIp4BSSd8kt3Z8PMT4oVIhb5kV59ANLLXGtmKXfMX4Xk9uQLBVMOm75uW9rxETTM0S8NT56bCfZEG7g8aksn7+n4IhqQNIQjAaWibwbUWbc89Pt1R22KRvh1NKdIAHgDqeL5E2ffEW9EPGW98zH6hCohF89OTam7sLnSvZsgerQEyNM+X1BKNHwBJ6U4OgPrkevWSN8d5Y1xpA75ynDp7YY4VGsbjnXuEO3+OAJ/ZiOxlXo9nEZ9I2Zw== 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=TLrIU4EUdrLqb7T0bkwRGkvgLMm9bmDLScwtsrZ+fTw=; b=MSYdDCEYdBTXxyZ8jJ7hpgfyEoOSwKb86B/uN91CaR02/e7LyHlpF9RtLtX/7iD5qZF8eSm3NV1ciE13oEnRKf5yClJRqicbYmNqbHiqmiI8uvjsWrzJ+ZVnaAXr/khtC1d11+Vr2/Y+ngVvarSM4qjhy2TqiHTEu2btf1ESNp2dkZh/9chPakOwRdKbSSMVQ2ziOBMbG/e43qaT9q+YFCYIDoRNP+QJa4oS/kibQsw6ZT5hMmS2uE/nxY8j/hAgI1UKpDCoDX0DVuNIazQsrqp+eNoqIePdC5pYaPINwxE4saSfSDCEDlGjujqcxSnPmgRZUDj5h0EVrfG5JriSig== 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=TLrIU4EUdrLqb7T0bkwRGkvgLMm9bmDLScwtsrZ+fTw=; b=dgTMNzw1Op9zdBxKZW/L53YneOtZNoGIgN4KVim/nCq/XKz+Vi045cAR/RrJJFB++CsAT2wBqcDghHhLuGK/OR1wVO8raWJckCp6boLy5OxoggaSONnQfE6fdpaz5jxjxiOgltUG+8/mA25srXuIvmapLa+qmGjIJhFhVQRgli2rXIv99FsGjPsBwHkIOcbKSiYnEHlv8dxUtHzXAuVJz6ZcDzq8en9LvH3/oHMGfkaG1UMBqx4ZLuTNn5c78LP8kpMApzxv0zlpplt+nZZGQvMnfLnX/Tht4FscTyyQOgSRZXGLx/u/8yCydrUbV7FBR7mO1qT1vXPfCD0oz4XZ+Q== 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 PUZPR06MB5984.apcprd06.prod.outlook.com (2603:1096:301:118::6) 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:10:00 +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:10:00 +0000 From: Yangtao Li To: Ludovic Desroches , Ulf Hansson , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 46/58] mmc: atmel-mci: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:55 +0800 Message-Id: <20230713080807.69999-46-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> 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_|PUZPR06MB5984:EE_ X-MS-Office365-Filtering-Correlation-Id: e1b111f1-20c5-4eb5-5a34-08db83788316 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VgKPut229kyjXbczrK9i1FHBdKSoUegiVz8WoA4LNFyeLQ4cXJ8ZibCSlQ40F6WGBwAZXPr5hKZ39aWfyBOQegZVU2pJzmuvQmx0xtUFwQSVAPvkpd7KoUxcF7u9jnTSdB/b+bcuwpwdjPYOjdYM6R61bm5CDPlCBdVnUwt7tqJIs8uIKJz1AqvZGb5RpKkS+WA6kuqbrPRER/0AnUfmog9ZujuR1okSNyvcAjhssoBGO2eKM4s+Rc+NxkAIdIaFvLw7Ip9L1PDLqTofCEs11v/Cwdng7pnjJlUY4FDs2XBCc1Pa4M1I671NoZ1ffFRqgFmHmX8yDqtCjQw30KyS4jqxK1ED8xJa3EZcgCbpumVBE1lJ9hWUkGBaTqbvzff809ZrZsjgiXiC76PeYW4QDoKMNCY6NGmsVaD0+G5pMrIDyRtNUUv9iBLcZtAZBa34ChaBRgn25zmctqr3sKh4QUqLgWu0rCQFFnQ2y51orlK5SpmGioZs+CLPivLNlzday//UG3uVuMfoC5v/rRSFgEi/HTmMYHY0bSJs4IacXAHV+KEh4KsVqF73GCN5p9DDSTMWmIbW3BUkBhc4CFyPhGv9UM22ZBD09CGWLBWr4cAsGrR+IGStJSGw4wl1dXrR 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)(136003)(346002)(376002)(396003)(39860400002)(366004)(451199021)(478600001)(6666004)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(4326008)(316002)(41300700001)(2616005)(186003)(2906002)(8936002)(8676002)(38100700002)(6506007)(1076003)(36756003)(26005)(5660300002)(6512007)(86362001)(38350700002)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?FdUpLWrAU7llhdV5FdyFHedvY7m2?= =?utf-8?q?+3o/KeBDXqmSCwDCKEKJRvfrIBjcfVq5ziGClguk/FqMDm+xDnVey1c0oY5pMoyWa?= =?utf-8?q?xaaCrfmEX9teME0TYFvIH3nJucUnMjJ602M4U6kbhzUXlI28EgkwSVxSvmO9iZDdP?= =?utf-8?q?wOEOZ8ANytQKkWDZ1J77yTXWOxpNSn0EcVQC6NmHHdM+n0BL/A1u0IGTS/1rXuC/Y?= =?utf-8?q?rFMkcefNMB93OyGMa4gh0Po6KlzuaKRSJ31eHQo6B/1X51ZqInmSKLOk855wn5gkh?= =?utf-8?q?0DeSxjeN/1XZuwV3/2H3klGki3SQKUn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X1FohPT8MjBSlLsZlAE32E9WslQ?= =?utf-8?q?ryeKBv7lcUM3uSby6e4VzMfC8RdGf/M9JUIu/6R2F25dJrtrOc6HXSCz7CLz0KAGd?= =?utf-8?q?gEKiaO/DQceRWskEw8qJHisQDl9+3LBTyulX9FOfRjc1AaNDFEKNbc8Qn6SFF+YbR?= =?utf-8?q?xl27Zg1DgCLqjyQi98H886JY+wjX5khgMV57vdCoCzFZ9PxVz97GtlSB6g72nSRIr?= =?utf-8?q?yiZQNjMT1ejJRDDWYRluQeqPGJWVNvilDQeuNA1N6x1A7gJXj479vFhVlVjFhYWbj?= =?utf-8?q?0iO2xDjaJVh7JyMnIB4Jc60CRYhWRi2Z5kz2uMeFb0MXrT5ykE6c7xbWcv7aUnEeP?= =?utf-8?q?lXKWFwXKbhQm?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1b111f1-20c5-4eb5-5a34-08db83788316 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:09:42.2953 (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: hbSvHRvCLx/0I3gDa8idvi6VCNqMZkXDk90YDzqPaN0KtCOWzNGhpM4ogbT1Hdn/1XtTZIkeXvzkJupS1AeVow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR06MB5984 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 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: 1771294260505574824 X-GMAIL-MSGID: 1771294260505574824 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/atmel-mci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index dd18440a90c5..b4ae9aa939a5 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -2600,7 +2600,7 @@ static int atmci_probe(struct platform_device *pdev) return ret; } -static int atmci_remove(struct platform_device *pdev) +static void atmci_remove(struct platform_device *pdev) { struct atmel_mci *host = platform_get_drvdata(pdev); unsigned int i; @@ -2630,8 +2630,6 @@ static int atmci_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); - - return 0; } #ifdef CONFIG_PM @@ -2664,7 +2662,7 @@ static const struct dev_pm_ops atmci_dev_pm_ops = { static struct platform_driver atmci_driver = { .probe = atmci_probe, - .remove = atmci_remove, + .remove_new = atmci_remove, .driver = { .name = "atmel_mci", .probe_type = PROBE_PREFER_ASYNCHRONOUS,