Message ID | 20230727070051.17778-2-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp909003vqo; Thu, 27 Jul 2023 00:09:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlHb/Dg7MRev+0hAmnBl3LJ1RvrLRVgP3xcY2/YZFwX9hOCHFi6pH8DVBeV6OTulY6uxyUEZ X-Received: by 2002:a17:907:a0d3:b0:98e:26ae:9b07 with SMTP id hw19-20020a170907a0d300b0098e26ae9b07mr1005737ejc.35.1690441794809; Thu, 27 Jul 2023 00:09:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690441794; cv=pass; d=google.com; s=arc-20160816; b=jxcbqFH2ghJzVZinQemD373nrFCH+z+OZe95Lwfn2sVYGowUFmyFQDonzy2pl2JHO9 FcIu8Ue3OsQgJpfwnp3rcQI7c1MnGrx8pqk0w25jrxa0kDLjso6bEz5m/2t/L2oN1j4m enjEIId8lQo3xVnEuzqqMHFPQdbHuYL5Eez5vS/AaqE/WhTSTcCghQV5jLOHli34aenK +D2+OEEdLGChhuFw/94X1a0NjkOFXa2fKgG/Dp3B/fgWdRhZzd2tA5b98M+U/txCRfJd FGyUysZMWWgs/FW1YqScvco1PNlvuNrBZ5tpWdm2LMU48+qvml9t+jYtiKFzcED5ZVyN +cQg== 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=0QdurEMlGIZsmiqW8S2xEYZCcDPaCpY8fWT4ehR5P58=; fh=tmOLbH7PZ//VzAvy0/Mm/oOeEk5S0CiCNa9JIbgA3uk=; b=YwNY8ER8L/eEn7+QhjvzVCBb9fB/wwtguGxaeNog8D5vm+R3y1IDkpCdg+MhjjuS0h HrCsmdozja3W8icPrfaybv/TS7hRjgy3vCjFJOk+6i6pmKqhuCQzVhW3k2fjWVh0+Pjd Vhdbx9v6InF3qgcgtCHv8R6iT3HG/h/qZTuWlzxgGRUZ+1xy0y0exKj1NDU1Nu9FhH8E Imz3fGi9vusSFCv8G1wbcqkg0kWQiwywzMQFeQ6hQx/MqWKCsXCnL0aTKzCpdCCRAjio rCgv0pSFZ1Bdy28YlxmIWN9Er7pCJ6s6RomhhE+dx2nC0FQtxKSEAIr5GL3MKX5NR0Fi PSVQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=IyHDCuqr; 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 r12-20020a170906c28c00b00992bd9701f9si585913ejz.798.2023.07.27.00.09.30; Thu, 27 Jul 2023 00:09:54 -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=IyHDCuqr; 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 S232820AbjG0HBV (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Thu, 27 Jul 2023 03:01:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232784AbjG0HBN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Jul 2023 03:01:13 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2093.outbound.protection.outlook.com [40.107.117.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDE9226A8; Thu, 27 Jul 2023 00:01:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hh5bLWAVK/JEBE1WOI9kiYHZB1+uavj4ilI/IaeAvaUfVrwOddHtu+sXI/2SfZrbZkWxY9oTyR3gyMvmmHnv0kasjEnd99B3k6FGa8lLE89flvtgtDOZYTbWuoZ/PwbU4Eg2e296vyURnsd18z2iFR33P/O3Lwp+xQT7JFJW1YCXlS5+7I+iojlQUc7jHpeWTNk+/6oij9vz69/Hg4qX6fYj/GBIy64o3Wv+jXx4lN0npnWyj7WtxiuQ0Q3YEFXuRN24EMAFb7nVdbK9vWcvq6JzB3FTaVk+zt3V+YiQ4LA4wi7Kb+CoKhoy453BXN3VYZZGbnsqXk46S/gjRORVfQ== 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=0QdurEMlGIZsmiqW8S2xEYZCcDPaCpY8fWT4ehR5P58=; b=etbIZOC+HxYEBIVdsKAgak6csW4ZTo6fZWebwB/s8TddLdfnSCf4FteupS6QHwgZylmkWCo15AlZ+rGsJbnhiIjj7H6FqnhfNVZjLn6d4FUB4KAinVIW9JadbEpFLh1bsfAzJ6OSy/psE4qgCYiV+EpZMcYLBUwuyNYn48yD6aofoPwOEf9s2DQUdFbG3hId+0cMgAx+t1/jyBRWpQ7Xm9MY01QAs01aGwIaZJabfcJ1OW1N4zPsSrZwhHy/tQ400zHScjoeDjfPgPQ2OG9D2CJrd3W59dDgcwsHdteVEZH5nvPrENrYWaa1P3TOTlCY1VCXOBpFkZIkpQYidDDobw== 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=0QdurEMlGIZsmiqW8S2xEYZCcDPaCpY8fWT4ehR5P58=; b=IyHDCuqrz2YOHS2j9lwl1i0zdOqLZuB3oQy2Z/6jlr8lVcRf7+L3D7SGltKmVgvubsV8kFLC2AAbiimVV+hTtJBzBHUAZkl35TuSqMSQMgzRFeZMymIq0L5pMQqFnKbiCkActi5uqhbrCcOIX7ex37xM44Q4sQLgW0i7r6tJ6aI3gvgEfZTdbkXrrvdeLyCz4pSavITaLisuGUgY9GcQnix9+6nfKRHFCJc1DphYTrV41L225YrrBJIER0u/sgSxVkX+m4PeBGOkovxM23M3GcYMgQ6TYa6EDH1lEEjY6Mr3LpVjMy0IykX5DrV7KszmDj6cXJwf42pwOaU+oJkzQw== 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:05 +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:05 +0000 From: Yangtao Li <frank.li@vivo.com> To: Ulf Hansson <ulf.hansson@linaro.org>, Florian Fainelli <florian.fainelli@broadcom.com>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, Ray Jui <rjui@broadcom.com>, Scott Branden <sbranden@broadcom.com> Cc: Yangtao Li <frank.li@vivo.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, linux-mmc@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 02/62] mmc: bcm2835: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 14:59:51 +0800 Message-Id: <20230727070051.17778-2-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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: 0138aed2-a23f-49db-9c5d-08db8e6f3f2d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RZG76KbSoD9pwyH+hBC4G5gyzXMYWVQYRe1Q3RjlCVFizCio7tQA3zt693Zm7U+VMSnJtSjbsV1N53vsOd6phlSS+lPL5pJTAO7WsXbCImr3jRMhqBs1Dy9m9yb3jC2RwORwz4on/P+ZXflQq7VGReJvOzFCjjLyDt/BOFK5+8zW2S6zR/SEY84UcaNTeUrNxbA7cwMSpg1Trw8RbzJEhk7YSOxo5TKmWbRBfoxwpiin1jPxlrQv0uVKT3QYgRW0nWmX+uX9MGd4917IxYpudKGtoK/T2wrJkbCIcHKyXTepBmT2FMo+mW1PrQ0ZPgbvIwrFpl9Wby2vzrwvTaPrRHzLe+cmVu0uBF1t5EN4kajMgOkmjr35oOkXm3Og/Xv0gzBAC6LfVhYwBAb2gy+SpUV88yijOgSuVxuaK76WQWJn9XGBY4ndMbOvfpo5dmZ4FqOqSc7wiEI168EfYREzjDwwxocI2jS4FnLvxCsH7VUn5SCpL9e46aB+NmgHYHSYD9UjpSjt/QlODf1t9+lX8nNB4Y3aaawPRWUoTZzVALB5sEH14e2b0etDv4/ITAj8QRRiFQOHFqWSzFN9R3uQG0qW0Oa8SzR7Z9GqxklpMOlqpnEIiY+qHWhxg90wLRdV 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)(8936002)(7416002)(52116002)(110136005)(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?gIpXRcZjqrLsO1hLlc2mlrnq5nfd?= =?utf-8?q?05vDZbQ3op7I64SfC/PYi+RQhp8Z2p3P+seStrNFOfcR54hPbNZ3oDVM16VIbHi7G?= =?utf-8?q?0uEeIoOwT7+DEMVFA1SVrLzOrfqy35Vy66P2wR0KnkJ0MUfSfj9FNK4krWP/vTX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evYbJ4C6mDyNN/hKG/QPAg5mqr/eCtrVEg0NcnTGOik2F2eUudY5B4U6oft89bBP?= =?utf-8?q?uz6sf/Vfhau/LZ4STYgUxbkA2KIj6IGY6HS1Wo9D8Lzf2J2sIvSZdNoKyjEnPnjDx?= =?utf-8?q?9A2/MwqjlsSnmDtMn7I5yuNLUgqxLySvvAoK+883cx50K06bCxZMTykw764gyirzB?= =?utf-8?q?FcMJE4wYTIzk/krPCXXyAbWzVXEi6hWplEYt2MyW9D3I3xMr/jP+7J3b5SFQ49X8a?= =?utf-8?q?e33f8x0TR34+0rKYe+szucHZBoipbmdHJRmUXjng8rMLca+5vCMeIp1XOjvBqnzUM?= =?utf-8?q?k24tanyUpDOAIpwOT1pNRTtzImFLqtCleJ3jmc82SifbmkUVQlKCtIk3g5ir2fp7g?= =?utf-8?q?BfrxlfxvCxJulZJQZj6jWWimNfaSz5sTzXbxyao/jxAbnGay3sCWP3FOe9OoZDMq1?= =?utf-8?q?H/0COPC/aoAZUVxiTHoUXx2f5l0WK+trye+1Fgld/z3VsOoe8FwrNVweFEXt1BNjn?= =?utf-8?q?Qjcix7MyhEgo?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0138aed2-a23f-49db-9c5d-08db8e6f3f2d 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:05.6922 (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: OPhGKlukEo87AaMGy3jUccm54hayZrwfpuhE4mb7WG18Ytl7/D4aLzHF3ziZpA5hqfaK0wN5RALsN9tR9Wgz2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6027 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772556695470740701 X-GMAIL-MSGID: 1772556695470740701 |
Series |
[v3,01/62] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 27, 2023, 6:59 a.m. UTC
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 <u.kleine-koenig@pengutronix.de> Signed-off-by: Yangtao Li <frank.li@vivo.com> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> --- drivers/mmc/host/bcm2835.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index eea208856ce0..35d8fdea668b 100644 --- a/drivers/mmc/host/bcm2835.c +++ b/drivers/mmc/host/bcm2835.c @@ -1431,7 +1431,7 @@ static int bcm2835_probe(struct platform_device *pdev) return ret; } -static int bcm2835_remove(struct platform_device *pdev) +static void bcm2835_remove(struct platform_device *pdev) { struct bcm2835_host *host = platform_get_drvdata(pdev); struct mmc_host *mmc = mmc_from_priv(host); @@ -1449,8 +1449,6 @@ static int bcm2835_remove(struct platform_device *pdev) dma_release_channel(host->dma_chan_rxtx); mmc_free_host(mmc); - - return 0; } static const struct of_device_id bcm2835_match[] = { @@ -1461,7 +1459,7 @@ MODULE_DEVICE_TABLE(of, bcm2835_match); static struct platform_driver bcm2835_driver = { .probe = bcm2835_probe, - .remove = bcm2835_remove, + .remove_new = bcm2835_remove, .driver = { .name = "sdhost-bcm2835", .probe_type = PROBE_PREFER_ASYNCHRONOUS,