Message ID | 20230727070051.17778-53-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 t5csp916581vqo; Thu, 27 Jul 2023 00:26:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlG8OaDuCXGOQ9nFcY+mG4cGpq2tTbCT7u7bDcUargHe1B0Ke9b2xifnR9bOlRCiJYbP0mEA X-Received: by 2002:a17:906:13:b0:993:fba5:cdf1 with SMTP id 19-20020a170906001300b00993fba5cdf1mr1315097eja.22.1690442805617; Thu, 27 Jul 2023 00:26:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690442805; cv=pass; d=google.com; s=arc-20160816; b=aCj2g0y7SzJ9xlCYCrTmzscx31NpAQt8JgL7+5hhPRTarkj8maVJiNumAkgRuuXQsQ DEZwKQwUg/djvvDzCOzH74Qx8XBDwel6/XgUwmiPMttzfw7jK3Tqml98h448WcGMVLQ6 XhHgvahWc9JdBed9SE1gJNq970JpYRebRSfkQBONCoDJrobuQtE8j2KXqK6PJXPAKPWd 5ItR8J9qPX6PgoSJ6EQJnLbrDag7NopnxihfR6c6/P/nyfBolXK7u+TAODldJo4RVi9s elMwNdi1hOjvZYRi+XWFXBymL5KgDDFGaH+CBvLGptWrRpdz4Q1u93As0BewC3HJf1nI YORw== 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=+AftkKfw0z8AD4ham5M5MC4dYIWJjDbvgy5EIjA9X60=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=awQRMLIqvFHqyn4u42vx4TTCWqNxqJJVGYlworIZcEfPBCRJ6fuIj2+jeXUQXmkzEm ibdue88KKhe/evhywozwQvQvo8r+Yejle48pZ5wK8w1OSUskFNaqYjRZJwh/4Bk+dhnZ svpqAttYCPvl9V/evOfpOw+5mLg82Zkq8ztgXL4zXXDVxRn3dh4t529/E/r/7jKbuGon p3T37btk+A4ahMFxT/J97Gt4NI8FtOstCv1x/iqQxOxpIwyQrS90AL5amdz7G6tAB2UT CMXsNBwcWWqGKYqmxZ9FByi3Gz0N388gTtGlUNdRAJW49w7mMUG+AEBTZWxqbsiEFpVy vPZQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Ykl4jBfG; 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 e3-20020a17090681c300b0099b4a25c9b5si573434ejx.450.2023.07.27.00.26.19; Thu, 27 Jul 2023 00:26:45 -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=Ykl4jBfG; 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 S232071AbjG0HPZ (ORCPT <rfc822;hanasaki@gmail.com> + 99 others); Thu, 27 Jul 2023 03:15:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233114AbjG0HO6 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Jul 2023 03:14:58 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20711.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::711]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B240872A1; Thu, 27 Jul 2023 00:09:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j4mW8h5PnrLFdbw/N9wUEPDikqhdEN852t/6buh7BD07rXqq3Vq47Swuid6vsz8bDP6hMJivHB22c6U8YEgkJ+0IjocevewW60G977Wh9eHELx9n6AWZTrFIVVeRumnkLu7HbD190PrzSxTkQQk2IXlb+qRKZwLckXjgOh7GDIVCSc3M6Fwy9XP4JJX+zvp/7YUKr39vBeinPBJibvLomRqFrLXdjysRO6cHHZudiHQ3qglGwQwozLKMvK4AvM0WrqqZjbe3bKwhs+P/woO6OchLr2gNs+Ezdch7DNKKmgks6XIZybGkuDFYExfjeNi7D6o+ji21k9fjyYBQjv33/Q== 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=+AftkKfw0z8AD4ham5M5MC4dYIWJjDbvgy5EIjA9X60=; b=mdr11/Zw5dP/BWs8+EwtFXDpnJYC7qkcajCl/fX/mCPt1cDMq3Fs46XTa+tJIuwHQNfSbFRhzI7be5fWKff6zSOGGSBQdYE9Z6ju/H37iVCiK2dRdXLOJDEegdmuTTl0yXKa0hJq+5EsSQ6UBm3JwJYEOZFbvSppWqOu3zw4vE9WrW+FHypmb8xG/EMuPkPXdcOrn+XOCjYH4Yr9Ct4n6qAsuqZeR+1Oc6mIpeEd3bDK2IMSMtvgbzL75Cr8E/s/jmFtZlhrofJxoyribuzidHRmWFJPi2UypU6Trg4+zhtK0UkimdB2PdmOiMyQKaFjUV4EPFYmcfB0h0sGbmmPig== 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=+AftkKfw0z8AD4ham5M5MC4dYIWJjDbvgy5EIjA9X60=; b=Ykl4jBfGWj2kKMfTnw7L+a2uxHb4VnkV1QXQb6nE9BDSOW2Oihskc3VPyaV4xokj2WTWJ7unVTjmNDlzGIIAfYFGN7FgJWTT7YfZqvX/mbJ1DPSrOyxzB3bvPNr5A8IgmtwnD50L6LLXy/YWpmIUlKw0uZV37kajMtcx616vHcd3yhUqIfWgTu4nv9MQYTR2QovE3i1TWRIiCNvglhEKaOTySfLnx+mdF1hCGrqmqnzdXy1JO6qLstLBP0Cfem2YET6FTnWdnTS2RXAq4GGS4LnhhO6RbHhkeBVgyWmX/i4jjsIVTCLc+QF+3DDVtR2+dHl1RS+hYFlGCZ86dydCjw== 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:45 +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:45 +0000 From: Yangtao Li <frank.li@vivo.com> To: 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 53/62] mmc: pwrseq_simple: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:42 +0800 Message-Id: <20230727070051.17778-53-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_|SEZPR06MB6644:EE_ X-MS-Office365-Filtering-Correlation-Id: 62204229-a88c-4a76-60b4-08db8e6f720e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hCBheim7O+eGCQyt1jjaQZKqXh5Bt979nAJ4zKFR8N0DVqrXF7W9b3iYuw944FJPswBf0XKC3BPYoBw6tCO+OIZmUqxyp7wVBb84vjaO6molR2gZ0p9OImz3qCqz7M2ctQgEcermueNnzmkfUlmtjZn+M3Ny/w9lGADC/chnRozWTZfUsc4aO/OGXWEZDcQS0Yj+k7goBXWwPv7QtrulBXnWslH37r0tl5+wMbOHtJgTIL1R5V2xxpFd168HnPULkzBg/JiMNu7Mjitrnj86eWYUhH2ljJGRdSTaAXbC4VmaMwgFVfgU8WP6U8gLLaOxIP0fvlNkf1/AsAXsWOPDFMcXg0/pIkRvbpUwsmj65k+rTWUue0S9qbfiKwo7ocGNlUdZEWlQev9fF+97GCAgjVzm39eeDxjfmW0yHYT0TGXOFZsuVK/rqMyWnWe1iw3BMgEtt+StROKifnX8p9SjaeBB2CzvuDBu/4uQUipCVT9VqV3HDkkX3bsD8nPd0cRFFbRpWFYTv2u2y9LbHPCjgoQ+LeAPdUF7kykebSp3fSucRQxaJambvvL6WBnY4D7dMqA0vUTH5wuxS8B27MR6kEebuO5aMh+rx8Gg1hcEbNQLrcFc561m+f+XrgMOn2NZ 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)(6486002)(6512007)(52116002)(36756003)(83380400001)(2616005)(66946007)(8676002)(6916009)(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?E9NX6gQJyHq831xE10EOWVW0p/DJ?= =?utf-8?q?0uZ8ux4dFcRCJcKBOG2tNKfipfk0rK8Z3fp4/xuXS385FQ0rXfJteKNd/gOFP3d5Z?= =?utf-8?q?t91I1JR7nribk8nCTFLRQRUbZ6preBX1yXg1BfbEe/RSMZikqv4efaOEEkrRE8Ht9?= =?utf-8?q?+RVLZh5IPmLy5hFNuN2uyUea/1YmcJHGnfyKdh7KYBjdjoUI0VSC4U2+b7oXYrK5C?= =?utf-8?q?IMZW3w4NB4CeJCRbgIRLjme4PPVDEPqWY7dKUQYIl3A3TFBNJs2uIj5DTaREkVhxm?= =?utf-8?q?N5RAYCSZvhaiAOWH5z7wKN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k+3AGQgI5i3YAD94WZhurNtfp3QYdnqnnpQ33l?= =?utf-8?q?5N4nsUQfsYLNz/I0V7N6k87nA59vhkJlAtZ2EMfWPLpk2/6hz9k+WtqpZ3oPAdXjy?= =?utf-8?q?ig3PWCIGNbnQ1ltNMeUFn+uAY0VcTzQysY1s4KMQTYO/e+zYpPc2B+c8887tKyMmD?= =?utf-8?q?wTM0joISvPGqyCI5qL7fmPoD5fGe8icKUI6JQwk3qLTdkBTruUR4RtKCnKGHomD3+?= =?utf-8?q?acCoj2nYNprm9idLMaxwurHJPOfmfEj/rJry8A4fFDx4SwtiN3L0Kq5L4P67V9Smp?= =?utf-8?q?JDTcIlETRBDU2Nody0VHWxQfW1TSg6PkdX4iaS05zd/oVX64jP0gOZiceugwaffbU?= =?utf-8?q?D+ouzynowUH7?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 62204229-a88c-4a76-60b4-08db8e6f720e 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:31.0340 (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: v59jLg8A8N2RnRtcUQzugxwMLungP44UeqgFvf3/sLBKjw21tJit2poVsELHS9IEPYoGgZOa6f8bk0HVItIt2Q== 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,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: 1772557755138577608 X-GMAIL-MSGID: 1772557755138577608 |
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/core/pwrseq_simple.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/core/pwrseq_simple.c b/drivers/mmc/core/pwrseq_simple.c index 3bac1e71411b..df9588503ad0 100644 --- a/drivers/mmc/core/pwrseq_simple.c +++ b/drivers/mmc/core/pwrseq_simple.c @@ -142,18 +142,16 @@ static int mmc_pwrseq_simple_probe(struct platform_device *pdev) return mmc_pwrseq_register(&pwrseq->pwrseq); } -static int mmc_pwrseq_simple_remove(struct platform_device *pdev) +static void mmc_pwrseq_simple_remove(struct platform_device *pdev) { struct mmc_pwrseq_simple *pwrseq = platform_get_drvdata(pdev); mmc_pwrseq_unregister(&pwrseq->pwrseq); - - return 0; } static struct platform_driver mmc_pwrseq_simple_driver = { .probe = mmc_pwrseq_simple_probe, - .remove = mmc_pwrseq_simple_remove, + .remove_new = mmc_pwrseq_simple_remove, .driver = { .name = "pwrseq_simple", .of_match_table = mmc_pwrseq_simple_of_match,