From patchwork Thu Jul 13 08:07:22 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: 119617 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1668763vqm; Thu, 13 Jul 2023 01:15:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlH6DSUU80PvjHW7xrFfH/hROsU2KNiz9g1tY508FVOwYRN7Ifiqs4+9CR/hLcYzAzQjQQLa X-Received: by 2002:a05:6358:1082:b0:130:f1e5:acc6 with SMTP id j2-20020a056358108200b00130f1e5acc6mr1668078rwi.8.1689236147588; Thu, 13 Jul 2023 01:15:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689236147; cv=pass; d=google.com; s=arc-20160816; b=kbP+Z6gRHq19t+R+e6iSWcn4NGoLAiIOSxX4N/CwtQfEfdYBq/lfWQ3+hWTw87s3Rf 0yqZCATpVFndGnWezW5wqOe1aeYxmc1Y1HuL0aKTy5xtH27dtZcnCledLblF7Tmd6dj+ oR5VhRTP6VIa5kkDbhoQTkRofz2TwiwXiGUHv+CKKlHHjrwqEVrAhDgXMM13J2u+Rcii nmTmap8XyQB1LC73PXL+nGGRQmqloaa6dX+o9c3nnnpdHQd3siG43lC/DYG4ThcGydlG 0CCE264BAIKEjJOf3s+PtjmEBZsx+YZKEIRcDmlJkESQ5MX/5T2H7Lo88Z8OS+vnhItN XGeA== 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=5nbEbIK1DWhnXMWnkEWTsr0nKaN3qrg8h4rvOqRdbbE=; fh=bRV3B52BlPCt3YSalSFThXK0OPnKZx7pv8IR77jUsGI=; b=eXUiNGzuYM44UuSPRIlnwJPaxMACgifbgB9UyQHP86h6MEN7i257AMA2vZ4c7R4HTH JEYSXcZnDLgglR15wv31FT+1FJRgbh+/Gj/OIPvjHXn/YL/ZfvsVz6yCqslrTJCivqCh rM/HyrxNqqyKE7c0kbEsOK3Iv9d7OGKSDHNYq1iDzlw8R4wzuPteu5v/wDBaN+AooXKt OfQ3514Fpwk7dgTxeYxrJTZt7hieklT0/CUfDaCtPrie60+Jm/MeZkMTKWboKH2fowud lLEu76RIYN3LB0hcgtcfEbIZV/KJmebh5MwVjMy7K97YFQVdXo1QntS7Bfq0744cHQ4V X2DA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=VhpwgQGA; 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 h16-20020a633850000000b0054fd0012d2fsi4677531pgn.42.2023.07.13.01.15.34; Thu, 13 Jul 2023 01:15: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=VhpwgQGA; 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 S233602AbjGMILV (ORCPT + 99 others); Thu, 13 Jul 2023 04:11:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233560AbjGMIKL (ORCPT ); Thu, 13 Jul 2023 04:10:11 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2115.outbound.protection.outlook.com [40.107.215.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC4ED35AD; Thu, 13 Jul 2023 01:08:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HmQ4N1hc4WTk8EgW9ncjrAk9sIAFr1OlZqcBMcBbLR86/Ojt9/eIJ3gHtmBj0fzt4CgFkasF/lOww+VxRI4oq/GoUrNdlpSx0N1vEjoz+x2MMhnwR1zntZUqmWxdG8ibx24MPEnmUrEuxxEcaMn5QF9xK2I/eYfDKrxk8/f0iUAzd3AnvOpVK5d+zVryCg19dNBrs1UPmDlu2ayyBfBkILWUsOJFuYwwFsluyKlCqdamia9+b6ivtqJ75SkhnXAd7grLyPaKuWtisJbf2O84yZ+kORiKllTpkjz3hq+qt5RTXpkfUOCqxuQQ4skptolbGwgiEJ01dGhBCixVWRT/Kw== 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=5nbEbIK1DWhnXMWnkEWTsr0nKaN3qrg8h4rvOqRdbbE=; b=YfdbTvevFjus5JfIE1MhUUU7dQIt6ZgCsuGS8RLr7jcrdhNCFPMgMBr5qJ035YQTvTH+uvWwtfE7LdqiSKcCsNsn2i7qOMkrJ69LPXdjv8BZYHhdSKhPG+8FoVauZ8XEAefqY+MOGMBeIoNwtoC+tf3Sz7mYwnUDM3A2Zg4ZGZd448lgTH8E8gPDdUhjt4fv9/1GbxYt9yvBUEnOaiEq4tzbP7VI8xA2wholnU999zEDWRHe+x6N5cvegZCGM79WvIwvYd7qgiOYEUBLa1rtukzajcrw6d0uEDkDjgxRTZYpwpv01jlfLPA+XvWA6UCM83cOFctlivnTG36VkW4TPw== 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=5nbEbIK1DWhnXMWnkEWTsr0nKaN3qrg8h4rvOqRdbbE=; b=VhpwgQGAqqM86pyduds8zesmBFCRkX6kpsI8UU3iWXoASkaR/KmZJlAXcdNR/BRm2OCBhY1cJQq8Eeng++QYl7hNKAcn3ghJcXUYV51uQZHcaQONbuTsitR/vcrKkoWPzQnPsowemwVpZYv+h76g6T9xvXK6UkgnWe9F3BzLdKj0YmUEG+p+YbeNoenw6iqGT8sHphVkZ81or7qpagYVt4V/fSmhFV2vSGMUJNq1P5S1XhhUxZK1PYrsnkYnd2ZbbJxvv2pGuOQ6A9osUbk3/dIuPtHV/acrTV+5Mp2mZKkXoT7KDgThYvX++KEiEBjGYbvcbh8tD0uajpDUTh0S+g== 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 KL1PR0601MB4371.apcprd06.prod.outlook.com (2603:1096:820:74::13) 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:08:42 +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:08:42 +0000 From: Yangtao Li To: Aaro Koskinen , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-omap@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/58] mmc: omap: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:22 +0800 Message-Id: <20230713080807.69999-13-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_|KL1PR0601MB4371:EE_ X-MS-Office365-Filtering-Correlation-Id: 9caa5389-43a3-41cf-3002-08db83785f38 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fBriEl5jQ3udrR+MC7H1qFdlvocjloz3bghRZl4MyPHF2UwSvcHs+UT8npjkRqx++DQJMOP3p3cTlx7S5r1IY1hb7xHHFanlZvgZ1KCCsiQ6Venus9lxR7dP8DLJLvT1/GZz03vLg0teaP7IZyuQCLLv2OLgNgs9Ik9nm29kYBRm+GQ8du1DXFx4DdwPV5wgFl5RrPD8T5Xi9L2+agj7ADVrbwmRUC4ReAdYHLb0ytGJIAIagJ5/Z+WSwAOZwqJIkrLDqiM7FMn07H1oNXZspz+VTN8175Xut6O5eLWD9/vDviKT2FOOMoyIZc4YqZXMmFG/WWQVO2pRXKDrNKvr9S7tOMB1r9Pm2mAweQufxCwveJCRQA/eV3BMxWbNXSzO7p6uZCBI6Uz7muCQKSxZ0eMMky5Y8UQvsbKwGaQAyTkgxN1LPZ96L0DhJhfG4oY4T/yzDJHAX6vUWaSil+PB9nEQ/8PMWQBCX2t9z1050ly784QbsJ/IxvgSuKBG/ItxRdblK2FEniT+E1W66jqkKhuLq9ObeD4Z26OajA5jPWvPX8BWVxjw46MZaSJkGdlODNfne4YtxfogCyr6R8fHxe03R+LN1X223tHNg5ZHPmpIuzfdKTx7rfjPt/N3lE8CBeLb9vXyD74OtNqbTnwifI4f4JtEnHy9ydvoI3MLtvI= 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)(136003)(346002)(376002)(39860400002)(366004)(451199021)(38350700002)(38100700002)(478600001)(4326008)(6666004)(86362001)(52116002)(110136005)(6486002)(54906003)(66476007)(66556008)(66946007)(316002)(6512007)(41300700001)(83380400001)(186003)(2616005)(2906002)(36756003)(8936002)(8676002)(26005)(5660300002)(6506007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?EeAH6kvwWRzYHx5QHDRE4hO8MzCS?= =?utf-8?q?AolPJMtnr7O8aVwO/wIvgJpmTuVK5l1gUD7Oc82c1RMZC71gDBPlAnQhy20/WPJ0n?= =?utf-8?q?GRG8/52JTYyGpBVykoy7jCiehD/zHpTA9C/tR+ey0HmtuMp25MuLoyTThLCQIWg60?= =?utf-8?q?zh/AGhhai5fWk3CShWsQPnIKRXPmTqOnSPt4H4m6RJenLfRl3yN+PweIli3wEePBJ?= =?utf-8?q?MwpNx9iWDbK5Ohf2S6PZ6i95dtuR+KW1wZm84Kck4lLJxsq2MeGq/uD0VPpOwYV4b?= =?utf-8?q?W0SYfzOQ4rmC8wfRzwYgBoV0f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1jAiMvX18tVjrZhAA1+F?= =?utf-8?q?aglmETsWpzAJP9unzc05HrMj+2e9RmOOkMemmbBN5aHduMfhuUk4ls94qP9Tu7f8/?= =?utf-8?q?ULHg8StdaVaNmeOKhJ5Hz9apzxx87U+lv0AxcRvlESHPkTPK6SGwkyUpC0rTzUl95?= =?utf-8?q?IzbZA5bxgCfXQ8lnfWOEHr1/UJy4ipLFXyMTIahY9VmAeLVS+244JOqlPip2TgCv0?= =?utf-8?q?3k9oC6WMDgSaY6g5Utog8uYzHgvQUxX/Emw3my5GTcEA3rD14r1gtcqT3Tq5ABiyB?= =?utf-8?q?zbbvzqpBauKKU2xSPocMiYMrJ9wMsp/7XmQ2JiaOZYfygS+ncjLM13Ke7pV5gEwze?= =?utf-8?q?HuBAhrxCjNop?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9caa5389-43a3-41cf-3002-08db83785f38 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:08:42.1269 (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: R+bBvtYapY1H0IE4d2dLKP88FupARbFpqMfPNESsYfr4cS+Y5OUz27K6+AvXtADfgqK6+siosiox3mbnuE5hDg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4371 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, 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: 1771292482819994604 X-GMAIL-MSGID: 1771292482819994604 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/omap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 6a259563690d..9fb8995b43a1 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -1506,7 +1506,7 @@ static int mmc_omap_probe(struct platform_device *pdev) return ret; } -static int mmc_omap_remove(struct platform_device *pdev) +static void mmc_omap_remove(struct platform_device *pdev) { struct mmc_omap_host *host = platform_get_drvdata(pdev); int i; @@ -1532,8 +1532,6 @@ static int mmc_omap_remove(struct platform_device *pdev) dma_release_channel(host->dma_rx); destroy_workqueue(host->mmc_omap_wq); - - return 0; } #if IS_BUILTIN(CONFIG_OF) @@ -1546,7 +1544,7 @@ MODULE_DEVICE_TABLE(of, mmc_omap_match); static struct platform_driver mmc_omap_driver = { .probe = mmc_omap_probe, - .remove = mmc_omap_remove, + .remove_new = mmc_omap_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS,