Message ID | 20230727070051.17778-43-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 t5csp920169vqo; Thu, 27 Jul 2023 00:34:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlGBEMzHUnA4489NIAEVy7dq/fR4rzWNZopt/yJMtiVo0+EuPvgkCIdMXJnlu3UfsLLN67tx X-Received: by 2002:a05:6358:5922:b0:135:62de:ff7d with SMTP id g34-20020a056358592200b0013562deff7dmr1925183rwf.8.1690443298952; Thu, 27 Jul 2023 00:34:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443298; cv=pass; d=google.com; s=arc-20160816; b=MKQSPx+UyI0Xc8j6Qjo3ycD4Q8xYYAFIFSO8K4hYJgMEdG4LOnPu2Ja2kOlsE4gN4R 5PXkAiUcowV30l1k1NNisjXgccO2vT2j2lD55abTQ4wYV6YeXT3GzoIYPwEJe2tLkmO4 Unc4ZkiZ+GIWvpAkRfnPbLZoc1+FHFeWdZZztJtBPovwLwM1pbo9mcyWGFXD8NY/BWNY pJu+0mr4oY+Ug+X6qb0f6QVfPmwX+xkL+av94ZES4gJSnYSuv9j1n8OZF/HDOWhfNVbO GRHFtl8IvUQw1XxMsHuUIQP6wqlvHqn5J1GkWE21jkiZRN3DRoGcZGCp+JPEhIIRSpfy aN0A== 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=Sc43eVj8D+jXjv+UOKZmNNsyrS57jCHl9PeQXr9Ahyc=; fh=6cdLzAmRtuylSKIxaYw9sY9DAq4BCLf68zkyCZCuc9k=; b=VwM8dVL+JmKGBTinsvWlacMBFRyAMpfrNBwIUuI80QIsEUCmVui8Pky6N3KZY/Irsv +zYvfEtfQHQNtKVcMejuTSR2ddJzE/F0DPMsldKhRw3TNWppPM5msP2kaxqGvPYBRAX1 XKl/bIIcNcge1fHNltobgUBfhTelK9lZ7cG37oKT83WtVzsbEJ+EReZtJTwdxiDHkyyV jfHwvTgbS046zGzJAKmMM6aLOiufX/l9MSPj6jxZDgtZmTLJhWvGqYC/ADyShJNCpHys 4/BhIzDqhb71w+eMvkbdnVJIQHKXO6EBaqtydK5KbxfKzgH/FWizUUBk4cL/rQtmpNwz TuWg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=S3kXDDXN; 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 127-20020a630285000000b0055798b90375si869872pgc.709.2023.07.27.00.34.45; Thu, 27 Jul 2023 00:34:58 -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=S3kXDDXN; 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 S233152AbjG0HHz (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Thu, 27 Jul 2023 03:07:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230497AbjG0HGv (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Jul 2023 03:06:51 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2136.outbound.protection.outlook.com [40.107.255.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 929FA4216; Thu, 27 Jul 2023 00:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BJtNqUind90S16XBXmX5DsM88OebyBK3UkTgXugCG/NyXrClNDnALRjslaV9Sh/221/i8M3hvzMJ0VE5CZGYiSba2q2MLnCtnbifrJpw64EalIWjJwO8QXVOcS95hvBg0D9MxYjgrdgw92YD+cj+lz7xGhduCQajlpJgjHe679PKd0F0YX0Cl7Dwv0fvFvodsyXre62s7SLVmbKUb2GtpakDUtuCs7eIQEcJMWHtuDUofsdIm3aqGnmUjyZMe6p7JdnGatImZwcnFBT040QjpxTiZUbp2mrCd1eXtJzCgFjoAwP6vE2AgdDCHMWB8H4CAW/vGdqMWERxV8eP8z/4LQ== 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=Sc43eVj8D+jXjv+UOKZmNNsyrS57jCHl9PeQXr9Ahyc=; b=HcaVCda5kOjsTYdmxEO31kkNRrQ8MrBQHyn/kt6f33tgBSjZANQX04swiZQ45BQhAT5K7W69BXBHxDahM7GRF9gun0RnyOgJiGdpjJLTNpRap4+0KqIu0vndIbQ8Ygjpbhujac0VDfPR3uAm3Z5KzMRJKbCDAApIYgc20TSkdSCFqUu6fJhLqF+tuo8XtiOJrhJz6G5UWjCoq0gpCf1XeBZ6x0/jSery1PVwpn584pqaRx6K2TPR8h7iS8hLFuQ6I3etkoFQfHO1s1gC1aLcHyB0p+bpBPetCfxPyJAk6uE0R0PTpLzsKIf3gzfdolRK+doSbxMWekBD7+cq3wrr/g== 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=Sc43eVj8D+jXjv+UOKZmNNsyrS57jCHl9PeQXr9Ahyc=; b=S3kXDDXNkqsSUL79sO70cZxKvaSy+d1+OxhWnn5hmeIz2Wl0AF1bxE/B/IcUC+YdA69X54xzuBVOGPuNIWtVjpaOgvtlcbyfNSrO64yp/mZ1Yi/PoX5qp1gjVk4WlZ0qtF0SuDPz1Xn8+60lcqu6k6prhOF0TAyMH4glSiHxulIlXi+JazF8eTS46pJuES60TyDF/VZ7qFp+ycXU3uIy2K0m14X6YWLPHskk4Zw8usfOvwb1S3UIwIOosyWzmmndtXw6SHWB08o7uRSlI1uKeGEnEWmzwsnqScdXfjkoUzm6bxP2xWDOq83YioQ6+BWU90+JzM8zoXQNvPT12Dt+Pw== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) 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:02:40 +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:40 +0000 From: Yangtao Li <frank.li@vivo.com> To: Pierre Ossman <pierre@ossman.eu>, Ulf Hansson <ulf.hansson@linaro.org> 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-kernel@vger.kernel.org Subject: [PATCH v3 43/62] mmc: wbsd: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:32 +0800 Message-Id: <20230727070051.17778-43-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_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: 49d1e544-941d-4c83-a5dc-08db8e6f689f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0k4UTof/FV7/J4v8u27VAPpxLVC+g8+ExehW/Nu9xK3nL10yvey9e/i2gncg3eP3d1L1l7FJv5hJEsJ6OUlGLoUvg659pw5MwLwCIWFRSWJ/OZbeJSVGkwRVa06j3ubtD8bnepU5zWNfAQwrlv2vLDARIm8I8du3jAlo38Kf95KrFpHtdQrNMcb9+bD/jpvJjrbWGwgvpt8oTlOjDFU+r+yQeWwrdkPdPCNNxjMyV7CzgRoHVg4HjPvKEubUzrfR8ot6ruaUjMphYP+7QG8FIoL5DZjhA9LjLyAaa/ohK+SJH0rvQ++qpBoL5ZfmoHDUuM3nJ+TLNQccuE8eiFw4y5aiS0bH6DWLHDdem+lySZWHHRZhuLjqqermgipuIIHoHI1qzyJxcRne5Z+eeqe/GJ6c3gM3t3KPQxmVcz9nnLHq5UhrC4P8Pv4yFES4GvrtWbxTWhWy+n8nwKPI068vI1yIPPkVAMdSUrvDkSPdHSTMKD4Kjeqzi3vwa1gUblo9kSBmJrwj+s8uRT1Iq5cBMSAdz37c5eT5FQ31HQZXTpHdkxf64g5npXauqU1fiz8cBZEZqkZEMhFYn4PtEwuo5xtyL1/BYQ46ZpXuOkapoLqQpFO9pxJ5aenq/uxKY3Wg 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)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(4326008)(316002)(54906003)(66476007)(110136005)(478600001)(38100700002)(83380400001)(38350700002)(26005)(66574015)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?WwK8P82w1uB97lTo7AEGxWwNlI1O?= =?utf-8?q?cn54WJAUH45fRVCbmpNbnkM7/6bnTHXDhzjkWHAAgEr1or6fpy6d8LjgenoH97HmF?= =?utf-8?q?fuzcEhWkZemv7/NWTm5RN53QeEjnBJEpOJW5dH7oC6euQpuoA16i6ETE4+E0vRZLg?= =?utf-8?q?Jo5QAfVO2i4WeoEEwcgpNwY5TA36uBu5Gs7vqWpMSjT7zstogoH9QEkdhnJ//MgkE?= =?utf-8?q?7cjAi9cJ7+ITP7J+cPksy9T+Mse8oOfC61z68CSHUCBoTCyyHevXrzFBEnKwk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d1FZgGxf7i?= =?utf-8?q?LmI+eC1hpcNVjYMcRtviR+NsVqoh6SpKGnZlCTskATFj0HuBk5OkYwo+hd97usH1c?= =?utf-8?q?4wUEwH+VQZ1z1Yz5dls/iU3T8ERvPlnEnefeadhyo1IH7bL0+03koZC/c/ax8MSGU?= =?utf-8?q?oF6/hxErc1dexzcfope95paAijAcvDPfd9+zPJb6eIh+MVEh9Y6Siy5BwIkSxF963?= =?utf-8?q?/iHBr7g1/2+U2Ewdbk6Eert1U0V9AzK5GQBUmvcmvHC+nPN0l/+esKkwgaH4UzNJA?= =?utf-8?q?SOndRld5u+mHWZiwMBqOu7HYi/w79iNlh67JZxiVqsnyUdRcHi8Sib/LCzcJMLkI0?= =?utf-8?q?uW0mg67a+9XkRjPh2w/jeQ+RUfjo+5V09mE+F/U+cj+GQpYZBpiitAlp7eqqIlSkL?= =?utf-8?q?HurTdmU+rEcS?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49d1e544-941d-4c83-a5dc-08db8e6f689f 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:15.2309 (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: kbU8b6XzLNNYzcCd99/8B9sO5CvMZOE6gSop6bxSVMelOckqbob1R1tVYnhwtzq0azby8N7bueZDjZrWBgkndQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772558272751187913 X-GMAIL-MSGID: 1772558272751187913 |
Series |
[v3,01/62] mmc: sunxi: Convert to platform remove callback returning void
|
|
Commit Message
李扬韬
July 27, 2023, 7 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>
---
drivers/mmc/host/wbsd.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c index 521af9251f33..f361cefcee01 100644 --- a/drivers/mmc/host/wbsd.c +++ b/drivers/mmc/host/wbsd.c @@ -1758,11 +1758,9 @@ static int wbsd_probe(struct platform_device *dev) return wbsd_init(&dev->dev, param_io, param_irq, param_dma, 0); } -static int wbsd_remove(struct platform_device *dev) +static void wbsd_remove(struct platform_device *dev) { wbsd_shutdown(&dev->dev, 0); - - return 0; } /* @@ -1904,8 +1902,7 @@ static struct platform_device *wbsd_device; static struct platform_driver wbsd_driver = { .probe = wbsd_probe, - .remove = wbsd_remove, - + .remove_new = wbsd_remove, .suspend = wbsd_platform_suspend, .resume = wbsd_platform_resume, .driver = {