From patchwork Thu Jul 27 07:00:18 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: 126708 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp909472vqo; Thu, 27 Jul 2023 00:10:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlFN1rJ/6KeWXhhTZv/AVDdBEEU86uLV1cMqvkpr7ZH3MPah2JNESbn9IJ1wLiWM35B5N9v3 X-Received: by 2002:a17:907:9881:b0:997:e7ce:1e8e with SMTP id ja1-20020a170907988100b00997e7ce1e8emr1243413ejc.55.1690441847705; Thu, 27 Jul 2023 00:10:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690441847; cv=pass; d=google.com; s=arc-20160816; b=VLd3u2j0dKIoKc5zmJxVflrepuv8bLZHg4O2vBVHerSxikdMkhw+4GElhPpFOh3i71 EYBqe+H/8MYwAXdcTdXgrlCj9CwOFUnunan1LCc3dXrhFxOxLCat98CY0iDIYtt9wffz lypYRWWmITeejPcGr3QVhQDZZZKwmMmXHoYBn/tFzmNEtsbY/5E4x2Bi4YSYEIpWh8xv RMXvtPeTvJjfBydQ8dR/dfC3zF7EnXwkcZ/EOjkquzwDEnezVpBglJHYRDOR+PnO25Bb 7gila9CIoDhcPQM8HR25AcEMBxE+CsFb+cMWhmN9C817NrXtQM+FhDeQcKc68YwiZOsb QGzQ== 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=5dtSozXRpKhBSknQ+s8s/18Y8o9VbBvC6Adg572ej9s=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=T6PBrn9rg4VTP2lcj8po9HFbSSE2WELlh216FVzQKcL3POOs3V4YYYWhz+4W56ZWm3 pI9V80OU67uF5Dnsw/8AxkGEFI9yD2wEwRC8bXhaD4Dl+4BPyIIqfz1DTcbI2MAGkS2w zlBpxT9kWHqobTcGheiJe4s+6VUoNjLJ2pWFoTAccysPOIwMqh6/aIGwZHI+YxckCjOI kuDfbKMyh8ePuqljz6hDtueM65Cx1H7jJn2QnEPgVTTRtYNAw+x/wmYpbunrGdbSeotW RgjNV7nCcYvq+Ce/Uv9sWHeWYPiQ942WYaRBn3atNAjLwJHTG8Acl+qQv6YP+gGupZtf SLAg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="o4ww/8id"; 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 u20-20020a1709060b1400b0099bd5a646c2si602368ejg.271.2023.07.27.00.10.24; Thu, 27 Jul 2023 00:10:47 -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="o4ww/8id"; 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 S231664AbjG0HE7 (ORCPT + 99 others); Thu, 27 Jul 2023 03:04:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233023AbjG0HEL (ORCPT ); Thu, 27 Jul 2023 03:04:11 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20700.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::700]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0263435A9; Thu, 27 Jul 2023 00:02:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VKaFGLFwzVmtpL6ek/Z1GEoNnP1dytgJ4yYWk38GmwoPlNlaD+Y3dBp/Xt/5ND+TA+3rAWlegGeBGISmIKpY/qjA/zVZuWeWb6jIKCQmSvqIZXz3qVdEj2924qQxqULT0dXelt2gCLIPeYR/vaOaa2gQkGMNJKDmYn1jyfNQ1+HarhkPjf+4dIf5qAvuv7YYvI/yqFypfTjPlt0tLOzskmVRYFpC5F0J7mmmlWIeqCdiJMXtBPb0wxTQQU3vU56U5XNRKiVy9++Lg2KFJA++yOAloVnZEYPYo+FQ/fbnPnwmoX2wfqbPMKbneFGc6Ki8ipP30AkERkIgH2nKEMHuJQ== 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=5dtSozXRpKhBSknQ+s8s/18Y8o9VbBvC6Adg572ej9s=; b=Ze8s9YTJDVAcT9F8S3lKLvFlN4BD1uQDqmLvaJirXroB5ZToviLE3pCnVSucdnRFjWBxkMZoloe8sReBxngleLbJAfn5GKmObzk6IzT2QlMUZRdtkqi2x/hMLI8/t3FQXDEvOTaTCYhtsSE8kV9arcK0u81+xMEFrkFbgFPAFZEyIuHXgIyYnOZZ7jH3+J842FX3x0NM8HL65gQty8KoA8Fafl3JUEmHZS8gN/pLjv2x3HlEgKEY85ASzL6qS2CWK/RbfQOoh8cy8aWREi2c3DkOVDEyfzRAiMXG8xhCQkHKVMZ4PGLn2MmPCr2/uexqDh69h6GBk/rayJ0k6GTvmw== 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=5dtSozXRpKhBSknQ+s8s/18Y8o9VbBvC6Adg572ej9s=; b=o4ww/8idn4fZeNcS6w2D1nrVz3mZzQxkNKFxNZTd/5snV66QFD2LoXf4WvFPafCzpnkkHyZdXMl5ZZ2rPvdMkaw1ozdExYoSec/mmerwxRJdWt21bWykOtV64e2WhaD1QAFWPTMieqPcJ7H4TRCsz54KTO6WPGJbSfcSIPgXzQtn7Prh9kL5L/NDan2zWc8YUKltNeki7Ig4m4+JJ8DxHutBJ7MfKy8OTUsXeY8KTphWwI0E3oVmgiORvPvTunkuxJSSvxYWesqvIW4CYUDsb8MAqXd0c1F9Ea+oyWrK/KOe+HP4LpN+++yEmWZvG/Cy6UQHrt0kSJrui2rh6h/yIA== 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 TYUPR06MB6027.apcprd06.prod.outlook.com (2603:1096:400:351::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:50 +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; Thu, 27 Jul 2023 07:01:49 +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 v3 29/62] mmc: pxamci: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:18 +0800 Message-Id: <20230727070051.17778-29-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230727070051.17778-1-frank.li@vivo.com> References: <20230727070051.17778-1-frank.li@vivo.com> X-ClientProxiedBy: SI2P153CA0017.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::10) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYUPR06MB6027:EE_ X-MS-Office365-Filtering-Correlation-Id: 2172ce7f-8f20-4e83-3818-08db8e6f5985 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uR0C6So0XWwJZCrHKyer+wHkY86vKSNfCC4iGtu5gFDGqyvc+DdOHhphBJFivqsfjggE1x4pMaHj3+A+7/0b/fgNVzMqa0XiFZ+Isrbjew0Y0YM0bSLxOdYgknc00anXklGeYdOUDsEFuPBwFFSRSZPgJfBtZoRVlu+5vqf8uP+HDORluFPl2vg+VgcTdZ9lOB2NdGLzTqesTtToA2bqKXIMHKJvC6D+3FORhaSeydcN1AZTkMMl1wL89GiHR0dAoxVQ3jONNZyVejIuWUMV6bbps8C6bN1a7zvxapIJ5c7oAusi/G3V4yg5puBvnYxcArYojSbATX5bueQp4gcICPjwU2d8jldk54XIxfzdg3Sh3gC0oibp2mEsqQ6IZfaC4dcCSbBH4oPvqvEZwm8L7kkgiKQt9tKRESK7iIbQ7AWbfaWSvD2wos/QC2zW5kfzYpNLjP6yHP+Q1xirEKqSVU19LKxALmSIqyaQwvc6kxoLn7shpyCHBebg2jtz+05uSasZz5ZMHBudYPALcJv08PAZADT1o3xXklQM6Tiv5N/3BF1B2F7JZL+JxQQuHjoQIvF6M+2WgaOpums7SsNxXy/JMzMW82C7b096urpqYyapsppaOjTDAIt5Eqw7CLgY 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)(366004)(136003)(346002)(39860400002)(396003)(451199021)(2906002)(1076003)(6506007)(26005)(186003)(86362001)(316002)(38350700002)(38100700002)(2616005)(83380400001)(5660300002)(66946007)(41300700001)(66556008)(66476007)(8676002)(36756003)(6916009)(8936002)(52116002)(6512007)(6666004)(4326008)(6486002)(478600001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?xPmdsasOhFeCRmzQanteeWia/llx?= =?utf-8?q?zCe9c1mFEl38x64TpxGUdrpW4yCSXc4r38aDVuchPv0s0o1pB7AZmopTtaqvGm5gi?= =?utf-8?q?/7i2MPN9TXt9l487srk0NvZUryx5r/VHrDMwwC7qZblglJcSEdKRT/r2xbAMXsm2w?= =?utf-8?q?LqTogiT8PmfGos4B2QViMZ77Vh0l66d1htiP1OpJ9S9zgE/rGRl+elzisT9hpgbx3?= =?utf-8?q?R0W8Z9qgRJy1eSJN3bV+fOdIZF8tSZzWdEfXhHP/Vl1qEmpZ+0oANBTOUxNcoQJv0?= =?utf-8?q?6N3qBl2BGf2fX663L5UN0j2bpRvLZjovhM9z+5fwLxSi8gI4fwMD9WEEl9F9Mb0u9?= =?utf-8?q?NQpVtMMnaYBG2KvJ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VNsRDCFsHTvADoNPYnB4cQn8zjED5VM2Is7QF8u/Px?= =?utf-8?q?hWyVDnjD7nAdWrncm5OHE/q6OmHpxBb7YQaBtDAnbH3yqpdCnDG1j6HGH5CKzT9+T?= =?utf-8?q?9w2NCkl5Wv9qOdtHAF/sk60QrcK1zOOC0AiUtlP/1Pu0F9h4WdX9BrX9tR3hY2tYY?= =?utf-8?q?n3Y4WyxuzuLXGAftARi9Lr6QfNzx31BMprxgssWrl4owmDKpmWsrEJTF9kAwes0hi?= =?utf-8?q?ETv2pwnWg37OJ5RNXPpRpVGm9S6BNY+4Z7VUW1k76etOgNSCcTxdqY4TasD4qmyB5?= =?utf-8?q?wucwQvWj697G?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2172ce7f-8f20-4e83-3818-08db8e6f5985 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 07:01:49.8747 (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: qlkYbRHWb9hdqYaoU0HGrz7Rwxq7ug5pMiMAthsESv9E0NoKW4cBFiPUx9bkF6FInmqX+OYfgVnxGWl/TJCuVQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 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, 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: 1772556750793639338 X-GMAIL-MSGID: 1772556750793639338 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/pxamci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index 1142cd2368f6..e44c8ff6b303 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c @@ -783,7 +783,7 @@ static int pxamci_probe(struct platform_device *pdev) return ret; } -static int pxamci_remove(struct platform_device *pdev) +static void pxamci_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); @@ -807,13 +807,11 @@ static int pxamci_remove(struct platform_device *pdev) mmc_free_host(mmc); } - - return 0; } static struct platform_driver pxamci_driver = { .probe = pxamci_probe, - .remove = pxamci_remove, + .remove_new = pxamci_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS,