From patchwork Thu Jul 13 08:08:03 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: 119681 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1686918vqm; Thu, 13 Jul 2023 02:01:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlE+zn4swhzd5Vw20v7CMhpdA/1Dq41OWcwxdUwI9TF6LH/rcUQDZNSuJvvHHCOgTSiL9pS1 X-Received: by 2002:a2e:7202:0:b0:2b6:e2e4:7d9a with SMTP id n2-20020a2e7202000000b002b6e2e47d9amr810896ljc.38.1689238886140; Thu, 13 Jul 2023 02:01:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689238886; cv=pass; d=google.com; s=arc-20160816; b=kMiWDwqnTENITLUb0TtdB14w9GnzpA1RqTYoKnipWrKUH0GOPFW64huYxqPkyZoac1 hZGjITtZbJT6+NZ1rZ7gRz/S1H6gUd5Hxmpo6oPbJqO9KvYxFQPwWh+grn1w0bx+xC9x RxVNULKFpnfp3JGjJ7hfnefl+dNKAThCNPcdQRvKi13uhBsSP9dAhSyga1hrbCIeewR9 WG8vDA8hPs1DgM4YpEDTALU1hO2nKquncqhRRWxBl9DHsEcrZNtLp38HI6jwS7QH1kAh FVTWpJe80gJreyQlOjf0Bnd+DewlkKjLKle11rMiDVDaVRQVHSS9MD5vs4vHei61nvLV 7gYw== 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=JHxkk4r7uUii/jNUy3JeWmAeoiDQS4Wkm1Zujd9D/iwUiIiOlVKNl8ySQenl5PUNp1 mdlUL7rh5tcBLMIpcCVvTkcZJv2gGTMuk/W7zHJitSxy6Z4tJc4qasxAneBj3+Su7KtG M5HkV1yupe6EaYoGzjBEAOZC5GrSx7dD3tQ6W0lidIRt/DcperN1EhM7p0dKSpWdxq6B OH9EXiorL37MOFua7PNQ5NNGLn9e3X9F3PiXdNeM874vD+kTF2OwEaFORqaQ62MldVFv PYcbFHPV2h9D1D5nllLa1UjPDdSeZBelgdaFe7jxlMUP6ZYIaJ5lW/28r7YPYnBqXD/P KVaQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=QT+w1ceX; 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 b2-20020a170906490200b00992ee6da4b2si6511118ejq.683.2023.07.13.02.01.01; Thu, 13 Jul 2023 02:01:26 -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=QT+w1ceX; 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 S234501AbjGMIPS (ORCPT + 99 others); Thu, 13 Jul 2023 04:15:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234259AbjGMINg (ORCPT ); Thu, 13 Jul 2023 04:13:36 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2107.outbound.protection.outlook.com [40.107.255.107]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E8DF30FA; Thu, 13 Jul 2023 01:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ScS8WtdKxI3XA1LzSkpiF8KSotMCiVzE/hf+AhiwXbESGD5VZFoyBOECI1+dMftkCxRSiMqmNBJcE2MNOVUpgOVrtn8drHOp5KrIK7VZFvWmhTwJadA+7+rvGY5biy2bZfScSyACjQvW15N1idpCLOYmH7RrsqN3flCz2skGs4genCSV7rTb4+UckkevQEF+Z/kip/gB1L2JEBgZ9ZVokB+7pl7kHDiWJy8sFuenzXmIJLv2ieIRu1LKYhAH3W4tbFBdu5LxlZZHLTF75er/JoqXFEn1ZFroZs36y5xLJ6Nv/yDr5TBmWsGaX4g9nEj7of8It0AAPwIziJzE+Gnpmg== 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=iBERjDZMRoLb/RfWeENOv36L1BXtr7o+kv86jyi5Jqy6rEDk+j9wX5ApifMeKm7j14fm/e1qID/0TtEJQRE7ZoSXYWOT2zNGNqwxxx9DsnqSGXlf14vG7sTlyZzj8mcuQa9MPecN2GhGtWOEticBPdvs4D5PCv8JBByh0TI56iNxjimRVlCIfAHr7kjsiC1Z7oJRriIVvMbEQe1LZHfDjFk1oHAcbKlaCEDjEz7o7obW59t5f47sUlbV+oIJ/oulGa81dYT7eazF71oNhg+QG9MuO1M7LoOLH4w8Yu9QWE9xOs+BiTvySo4Sus6VtmGwIfTD6LFoC0VziSLB2LmTYA== 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=QT+w1ceXSfMbToH130vZIrUe1yap1JASYqnTbAVUCt6p6lF/x/TVr+FSpMdSVhlpsUA52YRqjNXvwhYW/Ml1eWcklEpHZDz0uW+QdD2eepNhzb1/tFDiYaNW6BIBZ852TQK8DETG0od15aJsid2JwhlsaxeJhxIiQvkFr7pyA1nyumCJS5Lg7dKl97NRk5OgoQaOZSvew6GnfXHWgh9j9dSNbFbQTfTmJ2VGAKyhhrAq1KYkOCz4Or1pGuHAOadVytMffckVx4Fnn+G4MNmvXYJf+cFKa2HeWJdK1ZUQ5gF1hoKnsCiAz7hZJh2z0Pm1Fy4w44L/5ORUBkKvkGUZLA== 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 PUZPR06MB5984.apcprd06.prod.outlook.com (2603:1096:301:118::6) 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:10:03 +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:10:03 +0000 From: Yangtao Li To: 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 54/58] mmc: pwrseq_simple: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:08:03 +0800 Message-Id: <20230713080807.69999-54-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_|PUZPR06MB5984:EE_ X-MS-Office365-Filtering-Correlation-Id: ed849d0e-9ab3-4954-0ae6-08db83788b48 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lRoFNpTjBimMAfhAP1uWc2QukhbZCA2lbV7otLGVLdsMkx/0Sl6K97c97opKgn7uI39k3LZ9ldeXqFjl6kijfVbpmQqf86veVg/ZSHAMEDgzd/eUzHXk5EonFynsDgIEyKzgHl5IOOSm2044DEdiXQR8Gb5HKvYEL15T2KaKcsW5pRj7eHpF52IM4BrbP7zjV1mFf5iQ2YSOFWkcyN2TXh1hNzdah2ED6+fIJvX7kg3jMVAsjPJUnJM/+nKN1MExrEx33rJJ0RmJZx6v23jYfHsQKhJCLAyC+kZ55S04vuDLXVoW+Kx+h7IAZ6egWP4GA/mMa8+JuVPJmFJAOo8dI9wk60/bJefn4BQ2zH2XbO7N6iMAdWqmRri9apYOs1/pf/g0k5eWsE3O2ilRdGb98BKZY06STBdPos76VMQVSdb6oPAPDWEoFCLp1X4U0NksaRDKnDZf00tHJdPVWIMv7FIqMXisD0iqsMJUz6Cw19fVYxaHCY1Q2XueAEeYa7cYDmu/Dy8DlWM8ax/8JuzmOxTqNYkccPe8u7dbgKTRbR9/ZvZn93keGZuMX2D+d5ogPceIy5rUAn1tZugtz9gGbB5n3aVvxmbopyNfeT9So9LU1dmwp9DnPeWFPws5uE3R 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)(136003)(346002)(376002)(396003)(39860400002)(366004)(451199021)(478600001)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(6916009)(4326008)(316002)(41300700001)(2616005)(186003)(2906002)(8936002)(8676002)(38100700002)(6506007)(1076003)(36756003)(26005)(5660300002)(6512007)(86362001)(38350700002)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?LjjNLhOhjy4UVOnjex8atw6c3yPG?= =?utf-8?q?yBDSUik6pFz5qaaSpZFuKmVqgpuq5kuJkZof4ums8JzditQjMXcLoaeDRAj+mb/mm?= =?utf-8?q?cxN3q7aJJfLZrO9m0Vsyc1U66Yumq2Pjxe1YGDK9T+5BcrYwC9v9239IBdQNQgoTr?= =?utf-8?q?B7Zvz/qB7B/jxpwrRRRHGwe2wSpi9LU8ZcWznz0TCPXUVzXK5Glwwabg0tkHC77HW?= =?utf-8?q?KA/aLJklRXhqnMQBGoXFuhoIlxEtBXhUuM+ALXsokebmD+6PgsPUGcns3lk2aguuz?= =?utf-8?q?vsKGiiUdQnUSvg/nczJkQJgP5Dw3vY1fkKeQVph2UWIcsMY1mYQeZKT268W+Dlu8q?= =?utf-8?q?IvGZUDsaqI+3l4wHjjzVDlZ4uPVR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K7ChmDa3Yf3Rr3JTjxmhkza95kuVqxYQWMhKh7aQBb/mCD?= =?utf-8?q?zEmh4obcsvXKA+lyGZj3GK4a9xr2izaSJ3S3o4Stk5rsU0DdESGM1gGM9G/s81VqG?= =?utf-8?q?cw6YGaMQ3qtr7betb5UjZ0SWQIWfVM/hoS61dLxTK5zMcFJAMplHoxE4otcGrCc+7?= =?utf-8?q?55DXfYJE+L2ElcUVgYwGeGK/OkZJTkTITSFCTSyuJKVEW/JyKAs2HsvJUraI5z84v?= =?utf-8?q?19prqGx0FyOAMVxeogXnwfxSkp7CLAO6aaFMVMpkybwQWl9aqW4F7kyIXQrM84fQn?= =?utf-8?q?XdaXnRtDN4qk?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ed849d0e-9ab3-4954-0ae6-08db83788b48 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:09:56.0472 (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: JmILFVXy3fRKOh57G9n19RKHfyKmulhKM2gqWGWPRZlC83eDAs8KIyiHM0tpn010GnW6Dr70nuEAYVCcZoNXPA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR06MB5984 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771295354128186071 X-GMAIL-MSGID: 1771295354128186071 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/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,