From patchwork Thu Jul 27 07:00:41 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: 126718 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp915357vqo; Thu, 27 Jul 2023 00:23:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlFHnt7m7recCa+RgSNO5DKqzuqRFiTDkE8HDaWnkJeL/YMehZXUEL+NeP8bZXDqNyqr7FuV X-Received: by 2002:a17:90a:ea0d:b0:268:3582:a6be with SMTP id w13-20020a17090aea0d00b002683582a6bemr4131765pjy.33.1690442610606; Thu, 27 Jul 2023 00:23:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690442610; cv=pass; d=google.com; s=arc-20160816; b=LU1HuHtmwnaPEdYkUjzo/QA7hVdx+APEir8cD7zIOLzFbp4SWMOgcbC6NDZhVTqt3F KXCErULe05EgTtnsb/LHbFkzVhiE10aEE922C4B1lt5qeBks8kjx8S9FgP0uA0bDI14j JWuw0BZsQrnFyuOnVX9dxwPko7uZ4BX3YsS0KYsuBy8yx6nt78xNvcZjXAzIOuqgjqfT IkVdNFcVZgqGIMPMCIvUrLuQTLOz1AtGbBm2zsomUQfMl2zU3Ch+GB9fZU/cqNOenKtl WNbgQqbtokkeFli4U8rsKcgV/0u719piD0ghUDeB1QGykp62Ncy9yEKPA03N9yJ6Ymz0 kBLA== 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=Wphu4Q5Iae50th4Q/VjZF6H8HkQGUHhGQ950+qm5eQs=; fh=WUayfhwsFyI2R0meOGTXjXcOW9Lju/3B5D3r7aLramk=; b=ysNDF7aptp/DM5NyN4j/tpe0TjdBPywarOOKpZrochD2d+4tcD1Ovc23aY42bEYnwB uIEQJSQJM2qw5xVU26WxcCNEaZsT44akET7/AO7kFKW1+7TynPLnyrcCKX6DxsvlcfW6 wO7rMubxmefq/0S8Kp1HS/g9FE1nD+xLMqVnBkBeNLrqgbzXbZlo03J0jsVcvpbhQpu+ EBBPYUNCxk4vSNl/Bu7UH62Zbnv4oAmEM+h9twVkJFkg45meyn9d0pzRVAcNdEj5gZFp +S9XMu2PIVotJAW0f1I3bB95g6LB31JwTy7w1LsqY+UC0PRTsSQRE6c2DBlIlDAw1G7s xTKA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=HKm1SqQq; 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 nu18-20020a17090b1b1200b002680f4e8969si1041742pjb.95.2023.07.27.00.23.17; Thu, 27 Jul 2023 00:23:30 -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=HKm1SqQq; 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 S233003AbjG0HIw (ORCPT + 99 others); Thu, 27 Jul 2023 03:08:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233208AbjG0HIA (ORCPT ); Thu, 27 Jul 2023 03:08:00 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20725.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::725]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D92422721; Thu, 27 Jul 2023 00:04:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AYvPRACFFpTo8RdWOw/ZCUzU17TctvwIXVnepEh/7r+Y7qv/4dXYg4I9687kIHp0Yl4diqj3VWrC7sQK81OU4+AHyuGEegh2+whOSahtdVVAwQvmIgGhabLkQ2FHZE3cU7WwXc289ucSzEDOJo8Ujs3Pn+jo1xLimbe0hFha2MrjJSLt/qQ76lHd5P7ZFibaq7AnN5kKYjiTcmlwY4BGx38l2tQQCk1/FZm6tL2lrSSLA/UuH7KaOwA6CJzfjXt32vMBMlmLzlXV1CMtwpFhYS8MmKPSAReeb6t7JHbUe3S16eVB5vFBuFo3gl86PjJQzU89hNAzylQmf5ylAzeADw== 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=Wphu4Q5Iae50th4Q/VjZF6H8HkQGUHhGQ950+qm5eQs=; b=jiMJFnUgLNYR+cLOM1eglUa3hXRXBBJKNZNlbBurum2wR63LCCvV/uxMMVZAm8uGJ2bmq7aIymAYHcDkjpJZn1D7/NR4NmF76w0sQEIWaSRDRyl8etLDYg6dMaoAzKujN+SYOciNXEoGcuufZnaP5vSpJsUlaKJZPPrQfPqa0EnyH+OjdQ/TwixuozqpZ5WBshpAuMsJML++MmGrsCi3SM0aOgiBlYb757SXl/k197JHOoBZF3qYHcBYqGIXSNfGj3LNxklPRs3wamE7fCAPl7DEo5QhiAlB1354JuxYRlsLKRy0E02Lghf49ftrMcZf8X4n21BaK72R9thLnL+3fw== 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=Wphu4Q5Iae50th4Q/VjZF6H8HkQGUHhGQ950+qm5eQs=; b=HKm1SqQqjoHEi7NFFOkCBfz6B/3Tp7A+dULMC9SBDWABxMe+kWzYshs57c8OMEFS6wXS448Akynjz8oyT+Ks9VFmikqwPbCicacOZUMc25lPI96V05gZiFO7OBYQPgHlWs319gBnLOkSAaA0HS8fL9AmLNg9J1vHVutmPXvUsXIeMCLhtYXytZpo44fcD4aruVGyzv85ig+CpKnZZq+Ry7lO1aysCcZnulBoB5aSCbwHiIIJIR6U8iVAve871nbdJ1HMUoIVafy58je7GCKbRGlhT62KsuAUbfk66zmoV+g48H8xZRR3Ciux7xvdlmHUnYaOBgrCybMbU8EPzyrPTw== 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 SEZPR06MB6644.apcprd06.prod.outlook.com (2603:1096:101:181::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Thu, 27 Jul 2023 07:02:44 +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:02:44 +0000 From: Yangtao Li To: Nicolas Pitre , 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 52/62] mmc: mvsdio: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:41 +0800 Message-Id: <20230727070051.17778-52-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_|SEZPR06MB6644:EE_ X-MS-Office365-Filtering-Correlation-Id: cea732c0-8bda-407b-6030-08db8e6f7141 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aHfwVFATQ4I10s2Ikz2jk3aJ8mka8ADyu/JtYrsxRs8So8utEtxysyquEMsJpjznJhNzkoRFTFm+ZTCrE4/ZHV5aPiUMPqUcn2EuGGPtVXtaMuOZJ/gzGUDqHrp7blKHmeTMxc7Jjzlkq6mkUTnSuF1C0qMO7Stn9jnKMAfQMzn9oeQQXLhn+aSicTJAQ7CDI5uT3zBpVqJRIpcUvtFHAm1wOXtxRulazj/3ttHa2aYtSZ3Bh7/Gl20yhJsstaENeXqDvuLIoJe67RRNamERBOiD/F+0B+VvbRI53mWaHB0fKNH4m+/RGeXX2nb+YboxeOz+EoUE9h/0T/ZG9xltoPC5w1xGtKCzAV2ZrYuarRlrLN7xuAeNRlY4xIfgD5Ph9ZGvYJU8+TYYGZcC7vPsI2JWteYipG51k3dhVEPJfuEhH3v6t6D6AnXPDxO+xAmtF58QKAEL3x4aLeXLHRuCLOljixL64BwAL8XWNimHQLQtK4CuWMzR+XELAyiq8T/idvj+N1KNnoe+90beHZgl4nY360NKHPshGYmGDBVUTDqT7gd383nhsDie1W9HPuQPvKve33br+SU0KbwMGFp8KW8jjzjgGS5kpe0O91lDXkMLwFPVFQgVH/tLTDrrHRta 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)(39860400002)(396003)(376002)(136003)(346002)(366004)(451199021)(6506007)(1076003)(26005)(186003)(54906003)(478600001)(6666004)(110136005)(6486002)(6512007)(52116002)(36756003)(83380400001)(2616005)(66946007)(8676002)(2906002)(5660300002)(8936002)(38350700002)(66476007)(4326008)(86362001)(66556008)(316002)(38100700002)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/FWQSAfA2JlvmB9kXVtevjFD6B5h?= =?utf-8?q?QIdHZsqnPS+W5yd1rx3pBVf585qj+SpG8PcZISghakhFPCpnCNw5cEUnkty/cA9FK?= =?utf-8?q?XbH5k2a5dLYVz5g5YHJDwHTYIe+MJljcOU4oXghW5l8FXyKMPHD8OKYuvENz24aPQ?= =?utf-8?q?CDJU+m3qkrp3M56WN8Xw/jBN8/yMPjhG1MOoMD1V2OxLJ78gSD4n+VDxn3JHX/jv5?= =?utf-8?q?1dIZJui0EkeYG8rMOnlmeHey33xd0r9LQu0HGVhgl7m47mkBFT+pKph7nBxL8rHDy?= =?utf-8?q?Ov5CesYwJyedkLhdq8WhDng+78B1pjxtML/BCtJG58G50JolivuDiXOj4m/9Sn3Pe?= =?utf-8?q?09cj4v/Gsgf4RDQ7VeApOs3K6QmKsF8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/3C4yTBQer89Y9Kk5io6LPvixrzRO+1mEUH?= =?utf-8?q?WsXJSlCXPoPjIQtzWgwysI5lzE52JYLqDTR+WYkK4VO+7pkYOxsxGbnFs5iE8G3Wu?= =?utf-8?q?uGXW+V3YEfOuKgTSAaX2zaspM7+WzlLHLqTeIqDHC91ITTl9NG9DmM5YMxvLgld6c?= =?utf-8?q?sWuntNqbl9SLgeikRTSeLvrKx03dGAAX+WJGyju6Db8cFf8PLFX+zTEq8+fAlxZ5p?= =?utf-8?q?Y4hO0VIZu7y4ov6UU966oowF0LfI5viO36FuThZh4WLbZZq9jUtNf+0bgE/BI9Ntv?= =?utf-8?q?g+xFCJ7iuwz8?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: cea732c0-8bda-407b-6030-08db8e6f7141 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:02:29.7047 (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: zLbe+Fz8wLrrxX66AiV+uyxHoziXyFi/HsAZUzinrgLH8wn6RigIM2rw/HgF8poHnM1a279ejbWWbrdhd++68g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6644 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: 1772557550630282736 X-GMAIL-MSGID: 1772557550630282736 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/mvsdio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c index b4f6a0a2fcb5..ca01b7d204ba 100644 --- a/drivers/mmc/host/mvsdio.c +++ b/drivers/mmc/host/mvsdio.c @@ -796,7 +796,7 @@ static int mvsd_probe(struct platform_device *pdev) return ret; } -static int mvsd_remove(struct platform_device *pdev) +static void mvsd_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); @@ -809,8 +809,6 @@ static int mvsd_remove(struct platform_device *pdev) if (!IS_ERR(host->clk)) clk_disable_unprepare(host->clk); mmc_free_host(mmc); - - return 0; } static const struct of_device_id mvsdio_dt_ids[] = { @@ -821,7 +819,7 @@ MODULE_DEVICE_TABLE(of, mvsdio_dt_ids); static struct platform_driver mvsd_driver = { .probe = mvsd_probe, - .remove = mvsd_remove, + .remove_new = mvsd_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS,