From patchwork Wed Jul 26 04:00:09 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: 126112 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp191981vqo; Tue, 25 Jul 2023 22:40:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlECVLaXULmVN0cwixUHB2U/HrsbHsCEj1MGOakQAIibfx/9+2WRykurMkOEEUKCQl37BTXc X-Received: by 2002:a17:902:da87:b0:1bb:a941:d940 with SMTP id j7-20020a170902da8700b001bba941d940mr1011544plx.15.1690350056158; Tue, 25 Jul 2023 22:40:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690350056; cv=pass; d=google.com; s=arc-20160816; b=fHpf89hpRUxAHYfdKx6nDKKbvJZYp2gB6rs5J3M9etHcnHXSWjZcNfYGQSN1IoXY5y Y+EMAMtXUQEgEZdHxFui1q2px/2uE0y+bVJvGafhvUAFKk8JuUxErkUfW/IoTWQGXby5 BubZ2Wb7RNPR2E5wZa6NpFTX04psu0hWS1iU6HThHeurQu5wuh599sEB0boRWedUdxDY gDWAz0YuYIELk+DzqFZ9ppfDDg6LWsLJFYlorN891WGXxdsHTEYDTj9FRL0dYd+bTRne OlFlVw1HWNxabXiw8SW2potzcWuqBulWQzS6dR28cK2Zb9CQfdg4+YYeAN7xfKKfbFac e1aw== 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=Aw4Pv13PwJyGo9i5NmSf9Iol6jil3qv/WJ4az+CnkgE=; fh=9CpPSVh0SzFo0KnH3YRmW2WZmdBNCBKVHGYrAagGn1g=; b=LIKuHN7yzw2FsGsekxD0RHlfh2AlczQ0njJnGy0TV/jrzaE5/ZU5i86afbjjolY8zA AHOD9yXYLlkfkZD2b5O8Sc678FKLYKP9htR1uPxcZZii5X/yqjUW1+KrND3qas5Rts9f OggI8xpG3Y3rac/n5bgr41hiBQ11xrh5ZQQQPpY7FvRnaaaBFe+lMG2IYg6kBh3zDLq3 AS4YGKebBOucMDBjwQK4UVg18r509RsKDL3OQjDA41lEmvqLwoNi8hdIwJmIRL8pVtje 9e0qRVBzRHO4cEawkH5oCMGr/xtuDldeb92tQnvAbdQd2J5Iql/PrGDbuqvcfNXO2KwF n9qw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=mt80DIyy; 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 h17-20020a170902f55100b001bba894ac4asi5511205plf.274.2023.07.25.22.40.42; Tue, 25 Jul 2023 22:40:56 -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=mt80DIyy; 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 S231341AbjGZEH3 (ORCPT + 99 others); Wed, 26 Jul 2023 00:07:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231690AbjGZEGi (ORCPT ); Wed, 26 Jul 2023 00:06:38 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2120.outbound.protection.outlook.com [40.107.117.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29D5D35AC; Tue, 25 Jul 2023 21:03:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kMJCCLHIUxX/P9pwZSRiiiRcehnRO/aA6BdO6hdBArv9dSP26j7DO1KFGA52lVvg7p74VvJRQ17X9ZCofyEaWZ8KW0ZCYB4Ox/XqM8MPTHfT8a7XOEVyx33T7vIamcfRIam4bnfZDd0vjWilpOm17KjakKT/0+WFmfKsFF+uY4EzWx+6LvUMgjm6kM+aiI5YoBHkgfhLm1RbEtF1LScChH+YfUTMUhi0JZsmUrro/iWqBXTd52mWJGOpued437gxQUo4PsK4OFE8Qv97lzezd3jFBpl3VC80Onv7rKKlxf+BIVO+BDRgzbUoWEB6HnRn3FKn7rpdtexAMUMFiwpBcA== 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=Aw4Pv13PwJyGo9i5NmSf9Iol6jil3qv/WJ4az+CnkgE=; b=VoCUTV9disEx0vj9y6Ifj0+saVZCsf2W6jI6FPT9XGaoNMwOQVm/uMylEj+NEdaYyU1zoluXNtvJPvnNzhxz0MFtBiaa/h1q8sBxxcV1c3DQMK51z6ZwbP2Ts2MCp8HLuc1Kz4aj0ESNk3T4kAgNfA3aOoVhIRXXyW6xrgYCf1L7zELUZtitqUyU2hSuvY707j5fqLFuq5UizHWyYghioRcOzO/h7NB0lLyiA1FX0iTj07pVurM6bv7dG8rsBz5nkyQ1hX0yCVIUZbc359zcfAlikb97Boqgdy0aEXep/N42fTv6stl7TuKTce+HnL1wAWpumZSJEHsdEK4txJ3bFQ== 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=Aw4Pv13PwJyGo9i5NmSf9Iol6jil3qv/WJ4az+CnkgE=; b=mt80DIyyjCEnTeGX13DfV4Zmh5Y4mJu+xam9z3acOMppNAh3K1F2DNHwI5VFD8eeEnylG4roATSnTl9oIJ2FEPB2ue8IM/CpcEjDynUlrpjutCRxzcAdGgSorUHD6SRVEehN0qe2Nv4OJeEtePSzaNSPZZo38ekFU+/P7HU+te3GPaZ0fM0md0ZVEfTqW6AxNqwjzT7v4/BflKymveDR4hb7A3O1YzTU/l7UAqOTobSX32Fvz9PTJ12d/VmvwSqnJsEMtCkADGKXpbQAPSV2lPpp+njOPtf3IuS9cfI3EHH0e76IvCdShtGiiZO1hKLkZ3XpiXIYbA8bTZC3rfw+xw== 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 TYZPR06MB3934.apcprd06.prod.outlook.com (2603:1096:400:7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Wed, 26 Jul 2023 04:01:48 +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:48 +0000 From: Yangtao Li To: Robert Richter , 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 29/61] mmc: cavium-octeon: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:09 +0800 Message-Id: <20230726040041.26267-29-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_|TYZPR06MB3934:EE_ X-MS-Office365-Filtering-Correlation-Id: 54fd2186-051c-485a-0b18-08db8d8d08ed X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gn6dE3PGSdLd1nq5MrzZDyvJ1H1YLjL2kkOA3xSb8c+lxQS2olF2dIuKzYvgn+Qo65j81vairkZWKeROH7HNwI134Ync1oTMg9Z8FwLkb0jZpBIdhvFDNVZ85yfMhhFSjIXIyfkfslHl7Lb7la+XEnKJgQ6EpTSv+oyzxGoN5k/IsGBsNfR7x/OrCF2Kf95Y0ERPITS1B9aVdzquPYtAK7xSJ16u6dO8DvJefUwvjwMmTukFRdsHIfHL9enkv3TSfQGk49BD/zKHu3Kc9ovu1AAMxat951M93CJ1mTla48kAqZGcVOBt4pQRFuCJR2KPfZxTiokC+xe5fZR98EBNguB8xhnlcYlhXLhNzky0qRL8NzH8nb4QheEI7T56AvDMod5U7L0qeEXJpUkEhhslK8rUskZ+OdnI1v+FHTUuoMrwYokTjoUD24aoNGGK0oErFqJZ5BqGIqPBQZJ1BgRqA1953ctays8I58lEvXd4Ra1EoMHorN1eZbR7QzLsSmBAFl+4yQzHiV6cgMTwefe0jE8hsikf+Ub1NU1co8UQc+W6N04oH8DBeAZdyJQ9DaFRBGtCGKC+F0bYUSUW1n5ZciLIG5UtgY0F+Jju9ARZSEYymnKyIAQlPSysmzzNFjSz 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)(376002)(396003)(346002)(39860400002)(366004)(136003)(451199021)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(110136005)(6486002)(52116002)(54906003)(66476007)(316002)(4326008)(6666004)(2906002)(6512007)(1076003)(186003)(26005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?kba8ShVZWwMS7txCdT9X74oMohZE?= =?utf-8?q?zOj+F8bMNTuipatqQCf9n5G7Lzxu6/HrQhYFsFHBKsUhHFuga2YxacC8sgs2hWnks?= =?utf-8?q?/oSug2Zo8Hg08cA9HThFKOSVeCJWCnMrmQoZBQL75QlR63N7BHsev6o5pb0eb3w6P?= =?utf-8?q?EK6OWw7se4bSqwuj5v3ciBesIQMWzrNSWaPYxZodt4frNPK8byCsW7r8cMzcGeffp?= =?utf-8?q?9KP5gDLYe85A/kO6IZPUKWWycsbQm3KZpsBDwIswhFaR4Eo81PZD6SZ1kej7IZq2J?= =?utf-8?q?2Q8iX3lUV+jN58c2OkLk/rtkb0cGK57oQrbTR/AvOFPja/6g6/phD68VthUetrPAx?= =?utf-8?q?7QuZgB9a5EzXhS3T9SVTP2ELinS9+IkyuB7w1N70mJscb8djgX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3r9ehMfmA8e4U?= =?utf-8?q?6Cd0rH3NSxbmysc4X4oKArakeM9HxdbxPYwIh++B1A0zEcjjF0B4OnlqC3ZD14B+E?= =?utf-8?q?89bEU9fXiY+u9pp2eVrVydo9xKEfTR0VrjDPthV6Vpmy5D/HKijneDVJo4lcrG6rm?= =?utf-8?q?FIKQDEbD5js2VSDUiLbEQmAuntOP4ff6opRZQ03K9Ir7qtF8QJekFlhl6ApOIyC5D?= =?utf-8?q?ljOc5ekM/lGgsH6yCw8nXull9HsEZ71RRUpRkieAVIQYWaUBeOUt9Uzz6JBZArh3b?= =?utf-8?q?98mQZ6l0w4hQ?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54fd2186-051c-485a-0b18-08db8d8d08ed 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:48.4276 (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: r10X96zQI50bckvCV/62xAPExYVFpqRdSeL98EIJfWdM/uD1xQmqEG0U/IznoqkbhiDt4cIwJ8F90sb9D8qNRQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3934 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772460500639508308 X-GMAIL-MSGID: 1772460500639508308 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/cavium-octeon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/cavium-octeon.c b/drivers/mmc/host/cavium-octeon.c index 12dca91a8ef6..d526868b30f6 100644 --- a/drivers/mmc/host/cavium-octeon.c +++ b/drivers/mmc/host/cavium-octeon.c @@ -294,7 +294,7 @@ static int octeon_mmc_probe(struct platform_device *pdev) return ret; } -static int octeon_mmc_remove(struct platform_device *pdev) +static void octeon_mmc_remove(struct platform_device *pdev) { struct cvm_mmc_host *host = platform_get_drvdata(pdev); u64 dma_cfg; @@ -309,7 +309,6 @@ static int octeon_mmc_remove(struct platform_device *pdev) writeq(dma_cfg, host->dma_base + MIO_EMM_DMA_CFG(host)); octeon_mmc_set_shared_power(host, 0); - return 0; } static const struct of_device_id octeon_mmc_match[] = { @@ -325,7 +324,7 @@ MODULE_DEVICE_TABLE(of, octeon_mmc_match); static struct platform_driver octeon_mmc_driver = { .probe = octeon_mmc_probe, - .remove = octeon_mmc_remove, + .remove_new = octeon_mmc_remove, .driver = { .name = KBUILD_MODNAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS,