From patchwork Wed Jul 26 04:00:34 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: 126094 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp180707vqo; Tue, 25 Jul 2023 22:04:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlGhjZRyZWtBfaimHTGg+ZHM1vGjcQkK5AMwhW1lYz2GxCM4rzUUj87PVfuN+Tf307YWBw76 X-Received: by 2002:a17:906:11:b0:993:fba5:cdf1 with SMTP id 17-20020a170906001100b00993fba5cdf1mr775319eja.22.1690347895769; Tue, 25 Jul 2023 22:04:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690347895; cv=pass; d=google.com; s=arc-20160816; b=JNYlVsV2O10YbgNg4Hf4mWMsC66fXjPGgNUvwaTMQZEd35NJaOaB/G6L0TflPZ0X5F XscsMdBMKNj1/W8/2pqLfFw/oIRDxCY9d0xN3s2MSMXM2SsbZtlVJklik5zz1B8bpYLk Vf2RpPHoZ0SHzYZYEnguxXXm04bht01w/76ALym0EkcXIMJ3z2TZGedv46tA9ZUoAHqB wj4hv1EBZ0Hw8eM+2XbQzZenR05M1A3TACjkU9DTb300pikvV4aXdiL8f91f911VFc1e P2Eyql2kJYg5KADKnkL1yrGBnsTZF+6LmX28QZx/1Pvgc3uHnql7552kLpKZuXr/P7ao Fr2w== 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=+AftkKfw0z8AD4ham5M5MC4dYIWJjDbvgy5EIjA9X60=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=Dbbr8KDxnCk0x/EjhQFPxHsWk3sUVbk6E0nfdBbwDAXL2syCDHWcWtxNsaT3OdwSf5 6cGvJsUXCOTnV4XVI1e/AOY2oVMC0VLrE17lpXFhi2GS21OIabEpzVvjmRHNSFLITDDy jzsD2D9MpRnVHZ3KPkH7aTjTa6br1nmJuVsiR7A8jo468xsA3BAVQhg0+Bfxn+2lylog cw1MVWfi2vYw8YJ2xjwVJXYLSg1xHJKdsxLUVrwyuR8bbgoTAH9vFWgK20dq5R3VnkGX yl3pR4+dmu/A6KiMqrsIkHKsAibMF27jrvM6IdL0cjYLx62NDOFxXoRjTKowRQtpdEoK Q6FQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=G08KKUJn; 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 g7-20020a17090613c700b0099bc0489b51si611685ejc.28.2023.07.25.22.04.32; Tue, 25 Jul 2023 22:04:55 -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=G08KKUJn; 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 S230205AbjGZEK4 (ORCPT + 99 others); Wed, 26 Jul 2023 00:10:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231293AbjGZEKJ (ORCPT ); Wed, 26 Jul 2023 00:10:09 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20718.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::718]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58E855597; Tue, 25 Jul 2023 21:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XFmMdUfZcer8QCUxOwK2nMC9rxtXiQhg4jX9OU94+CQAAXGu52sdfrDmCAMjwlOBngfoFjl99FkNIBdW2zZWKLK7MU8I1BAHTzLtSNZWjoPwpdOSELgjflrq7hMF6arzpCVC1+7Yflxt76PpgG+QJNRmcq53MD1D9K8RE/BmLuVI0kNFP7MM7Dr8dZDJIBg8dMBaqXXdWKl4k6StkDrXdNh3MY6tuPmp4WYyb8vgSEGEWFFYJN/mrwXbl+S+JhqSnuyoNFf+Yk/z09HuEiJFMe2d/yCFRh8sL1PktCq4nqoiVKaoDS6NKoU+CEYfOEKq9OdVjqjDOC9bh+uigH5yXg== 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=+AftkKfw0z8AD4ham5M5MC4dYIWJjDbvgy5EIjA9X60=; b=GWXLfAG1S6kESBGdTD9VZmWV/kMShWnFnDSSMUWg2Mrvy3hjfZYpfjf+R7c5P5cObDPyG3Oumwc/y8vswg3lOoKUzFbRQS+o/FjZP06UPZ19ZE5AEq3Qex+pbGRSbc1vPM7lUH2srvED6ww5PsFzqnhveyQqw4R0Wf3feh8kAJui8ZzKhb6wYY52RIiUhz6G2US2w/BIYYGpItz25PZXCLB1TyrIxOGnFulm6EuWSLz5zHJ5aaviv8I/SsMlRw5riLmsMn/D8bHtNZrJFRh+ZG2aDc0WJ0OsjiV5J/vQ7/O+qazj3V39AU3yXErMT613uW6VSCUyPDLVzD9DiT9joQ== 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=+AftkKfw0z8AD4ham5M5MC4dYIWJjDbvgy5EIjA9X60=; b=G08KKUJn+edEq2g+ZE6HEBzCRmFbjsoKZWhPlgTtJ2fo4oa/Ug+pzBKzkDAVU8YcrRMQjsOoxTMQzgkfWKGQcYNCPVu8pmdBrXmmNpgY2ba8c4cdJWfEby3mvpFY/Tt3tJpFBXdooBIGFH4dwoMNrR9+MqLlBv7QcOjgnxPv98Qo5R+D/jl0nylY7FD4/QYYChrRbDY6dlutf9hiD6nz8BHOinaYx+o6fZ7Uw+oBkjSC6+/oynt6SY3JFsXT/8AiizYiG1088500Wvjmv/Qrvlx1ML1qGqvYyjB3OR7Tf6r6sVVbtHOTpI9PHfLuyYGI/4Omb7Ok129SSPmvAcEwNw== 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 SI2PR06MB5139.apcprd06.prod.outlook.com (2603:1096:4:1ae::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Wed, 26 Jul 2023 04:02:35 +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:02:35 +0000 From: Yangtao Li To: Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 54/61] mmc: pwrseq_simple: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:34 +0800 Message-Id: <20230726040041.26267-54-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> 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_|SI2PR06MB5139:EE_ X-MS-Office365-Filtering-Correlation-Id: be08069b-72cc-4222-2be0-08db8d8d22de X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OSCh1UtellOofNo+Md4b8dvXahhYvaU6WQE3fxrtQzkKIsuRjaqwXcHJy7NvamCBgAxpmyZp9+3mYxPnM6DgF71bJzKG/xXjNdFAHVFmPpy4o9ahkMCQ7ifTDC8eNq6qkL4OlNooqhrvnzePnJ/CJs30XvTcEM9c3F/EFfxmUmnpPPUuCM2YC4XNP/S6GPSN9h+BatDGqkZaxlZo3L1qCzsZf26YPbccMyyJ9c79/jDNqhgnDckoDFOX/U7Dbed79Tcu6HeIZUdYWhGzt70x0jKnkYYAtUomB9JDfMwSGoKXzlIhyGz2RyA+BksUDzIf/JguWmZ3PyV4csJzMBJ+AL/OMNzXJ+JcLk4KtOPHBxJRO15LnsQ3K4NnbV3vQlRLieHKnVn1vB4I12kaDJVoB9cVQ0tCYVw46j5f1WilgYUnAXaxvrtXjsThFglVgE3GPD5ZBa24ecK70ndG0UFr8R16NpgAyz8l3sJC+9E6gPBOnU0lzsF0aEYn8IOq4cFaHZyIyf8kB+iiReefID+n82M7mbbqqq7dJJORaBX32Cd7wUVUGdxu6B8XkmZfgbWvZTnLtUkk5ERW4RxGjUcAUf4e/TeNYDPD6zWx0AFwLFEYIsdcCAsiogxQsUWy1Yty 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)(54906003)(38350700002)(6512007)(38100700002)(52116002)(6486002)(478600001)(41300700001)(5660300002)(2616005)(8936002)(8676002)(6916009)(66556008)(4326008)(66476007)(66946007)(316002)(186003)(83380400001)(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?XDOm3rZhbqfNfaTVzkhXHr3WlZHK?= =?utf-8?q?SY2ayM1pXEli/zZCSk/fGwyrdeKmYFayW2Fa/4xIedWrF2oZmdEfxwzo4TCesNeFi?= =?utf-8?q?Gbnl0A4zKrspku4TtrDpMf8xmZ4BcHi3jrxd6m8lXBIgaN8Edg3zIsLSKt1vS/YVU?= =?utf-8?q?hvf0/WuT8CLuOfxOOG6blFWj7u8HQhkq9xiwKX0QiNPsyvRzd6Nfd5A5g5OeZCFyQ?= =?utf-8?q?x1la2F5tvxaJEH/bf6bdY9ByhDAOPGuRiwEfbXBY9vy3y4rWjx44toldXb1Rr8b3B?= =?utf-8?q?lLVpXdGSWRiXLUYQjoK1OBMvavNDH4BJB5BQIGfGM+Gx0FowLt1YhE+/i06gBFFTP?= =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3Jt2IItMwcMaGHbGNojDwMsHgkFHdJwg1uxGGvS76+03Eo5/d7p52?= =?utf-8?q?nhupWktgf9PFJKxq96Zf+Mk22cPHkQUETmYuefyHwhwrJaWaIk3mY2HPKBN2NoHMW?= =?utf-8?q?nsUCH2PYAwh/9VchnRIY86WhM95E7LNY6RihqYe45DSC7UL/Arn/EuUINKXf4KBz9?= =?utf-8?q?/SR41YhTw6bGO5s41aZvA7t3188mTZ+i3dzNXwhqcb9sYoCIP/MMe38U0xWx4M1Bu?= =?utf-8?q?nZ0au9ZG6XTmk6BPiWiWtKiFJZHjjceZEcCfMIQyOC7acBt2qv/aS/RJjHkqJkTfm?= =?utf-8?q?KSR58+J8uv4B?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: be08069b-72cc-4222-2be0-08db8d8d22de 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:02:31.9691 (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: /UBu3dpkP/kDBx+xLlulznCMYQH+G4PIug1L7UHHM6qDq+mPZya+W/m2VofhRHEsJ0GxPLYK0ZAjCmG+jQHHgw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5139 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772458234951948347 X-GMAIL-MSGID: 1772458234951948347 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/core/pwrseq_simple.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/core/pwrseq_simple.c b/drivers/mmc/core/pwrseq_simple.c index 3bac1e71411b..df9588503ad0 100644 --- a/drivers/mmc/core/pwrseq_simple.c +++ b/drivers/mmc/core/pwrseq_simple.c @@ -142,18 +142,16 @@ static int mmc_pwrseq_simple_probe(struct platform_device *pdev) return mmc_pwrseq_register(&pwrseq->pwrseq); } -static int mmc_pwrseq_simple_remove(struct platform_device *pdev) +static void mmc_pwrseq_simple_remove(struct platform_device *pdev) { struct mmc_pwrseq_simple *pwrseq = platform_get_drvdata(pdev); mmc_pwrseq_unregister(&pwrseq->pwrseq); - - return 0; } static struct platform_driver mmc_pwrseq_simple_driver = { .probe = mmc_pwrseq_simple_probe, - .remove = mmc_pwrseq_simple_remove, + .remove_new = mmc_pwrseq_simple_remove, .driver = { .name = "pwrseq_simple", .of_match_table = mmc_pwrseq_simple_of_match,