From patchwork Thu Jul 27 07:00:43 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: 126752 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp923099vqo; Thu, 27 Jul 2023 00:41:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlFqD0tpGxHINBYVY+JCXgvXLKG1ZjoeWdUewDCplXdm5hztVyvmHtN2PcE69tUd3+/6X1Mg X-Received: by 2002:a17:907:770c:b0:99b:ca24:ce42 with SMTP id kw12-20020a170907770c00b0099bca24ce42mr1182706ejc.44.1690443695920; Thu, 27 Jul 2023 00:41:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443695; cv=pass; d=google.com; s=arc-20160816; b=ZBhI9G4UZ9h6Sr73SXVJR5Y9TGuOMe97kB+AhugdyLRJOZHO28Yq5radkuZbk6KJhY 9QfEc6ky/gyWNiXrLO7l9Midj/gw86QSMh+2fsCu8tDayydhZUh9w2DTeoDRunq5wgRP QdO0Jy/Fx3bTAJpPY5m14CGqBz3R0v8zHb6i5wvCqkLcYEsurc5Bk4nljs0vgbZu2nyr uM71Al5ZzHALYbO4okI/+Fa/ljixe07z0rRyRgXRSt5sc9ZlWFl+I8Ubnpo60ORJy9Vv t9lODjklq9dEXiEYCeaV/pTjrcE16CD6JLvTh+1NBrgcbj0I0GZTnsSFVQgQt6M8CQtj MamQ== 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=bSVSY0tmOM4h4fHb2UFkj/zeTOsEVDjfwp+nRZtPSG8=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=pSCVUEixf5Sagujwx9GgZkpuMzZ89jRefdkBbmeepYTPzwTprqlx3oGVGsdNpEPJHe BGFzBCAqTfH2wGPzm/ei216zaFqi3cpS3v+l1dmgyG0oMKZwEnvuRlGn+40jdGdycKf2 qYPzxO9ODif2EUWqmHtMli3g67mIuS0VUmRx15FPvFsyER/GH15gKSndFl5hrAKriLV/ TAMirSBnT5NQLqKKYX1vjbka4RW9AXFFtQIFi0wm8Jd/HFFN/tIn5eNHAD7x1RWGWXDJ zi62qSF5iiB5351VEtVAfhuyV7zQCizkuO+rCBNDFIKHE2hoUlIo5LpabMp6iYAbS9vi WpzA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=BreGQRPy; 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 a2-20020a1709065f8200b00987d26a0998si649256eju.455.2023.07.27.00.41.11; Thu, 27 Jul 2023 00:41:35 -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=BreGQRPy; 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 S233057AbjG0HI7 (ORCPT + 99 others); Thu, 27 Jul 2023 03:08:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233243AbjG0HID (ORCPT ); Thu, 27 Jul 2023 03:08:03 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2136.outbound.protection.outlook.com [40.107.215.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9D3749EB; Thu, 27 Jul 2023 00:04:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G5DRWNE1r+LRv/HQeA4yOAag9T7ql3SABtqRgiCViL+tmiJvSIYFm1uuNSN3zfC1Mi29Qr6yW6FZh8P5UzH6UYHESB/xz8Hy5SGRdCg83tUT2HdsBe/t5/JR7JNO4VSH7ZZxgskR8StRLEG1ZKC8wXczm6Y27wT941Eed7fzkVAk6rtii1hckVrYTwsAcLePWBFRN12ND2uXmPbwW7yhiAaeoZkXKUJ0o4bnr9fjyt13GhW5FFPQiquyDre0BQqeSY6jTAy93c6E83TrLYCVld0O+nNSVu1UF5C/4LfFnfC8SNcoFDkzgEbKhWFIhsPEKLtyLN3JAZ97KFxyAtz5Hg== 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=bSVSY0tmOM4h4fHb2UFkj/zeTOsEVDjfwp+nRZtPSG8=; b=ItvpSKFXCA7MFdDiTWko1bRjTvPmWNKHYZtUDIEql00E3+3wIh4OJeGhTMP9YPLllrj+t6iK6M86wqkKkd+jNGRFIZk3bd+tLOhXSvztRdP5iQPYYmZS/Te4oD1HEltDU18zZkQn5O/6C2jj+YH0XGcOJjIKNEt90sEK7ZARoScZa8oRWp70+UuwB8neqtv9QOP+cnvPbAt5cWSH6W64+LQ6eeQiWD5Pnr0KaooHM1q9H3gC0QIaHBaKWwFrIk2FGtosaDESbqsK/kqbyy0MprT23Qau657Tp6hMiFES1hT0udK4KPvEA2gifIxFRvW2Uhb+mgDPdZYz48QwWk7ljg== 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=bSVSY0tmOM4h4fHb2UFkj/zeTOsEVDjfwp+nRZtPSG8=; b=BreGQRPyjhEEYjg5dglmMkjCaoUPB2IWarwdNiBRq4k860RkPWgMSEkhccpk1cCgAhX3PMU4DWv9rprMHsa89zLUdrrkC17y6WQTvX5mdzJ1GObVdm7T+yuAcN3sTGRmAqtuNOaDoGckMNAVQeQGtWzN6kRi00n/aJIwlH8cjMdyUk6rm0rqgBYg4tEti5f9eg+koS41bKo7rrqFqx5cVnfHvJwRXMmVpJ7shaRuoX1cuAOyxvyQrI1zkR2Bpi3hIE9fj/ZDXUzqU/VWRaVqDtYl2m+aQcbc1jaS9wnPVD3JquEdfCY7O8BgKeZir+4imF2UFiyAN4gbc6ILMzY4YQ== 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 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 v3 54/62] mmc: pwrseq: sd8787: Convert to platform remove callback returning void Date: Thu, 27 Jul 2023 15:00:43 +0800 Message-Id: <20230727070051.17778-54-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> 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: c59eafa2-8874-4d42-cf75-08db8e6f732e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FuDH2aEExJ9sfiDvKUczpK5+nGPCbDtR4uslrMk8n2v3v+NMAS+K2DeSwMtNtFTrdR2FW1yEUBGVtd/fItYh3YjfJOksNJigQVBKRdrqu9v+Bud1ao+mOzUGErVuZ7GGS+5jXvAisdTzr3sjhI8eVvAD9LZo09gefGk3X4uteJBK96muzGiUv6onIGOV2VSmvXZ0IOIktDFSUQ4xd2/JgbU6ijVzEP+YeIT3cMWmYDPBZC47n1+c59boTloL1fNXOGZC7IUGj89MErkbWcnNW6Kh+YplabCMm3tQNgNOC8DBpnVW/MfXDO/sKiRod0j6JvR7xYi5IQfr4W72Ii6Ay0Ba2lBqiPnzzer1H8XHUDYm9cosQ8Gk6IHZ2l+BT8ri3E5suGJ7Ar9ndGmQpOqQbind/0+dzBI/tgQGlMvsumISHDaN9d+oqaSxVhCA3jtC5B4/gtr1tUWtq9c+vV4qvGcsZX7xBaj+cmA7QQLe7CM+xFVfd1EzXHx3fJPoj9ULrzQbTyrY7Ug2mJ8c0XIK7gMjDAbetwQynONHHAJ83HToFSzQq2EGl9bd1mIJv7uWdXBU2AUI4dtXAGxeCzqExOktCaS2XbOe9e+IcR5/l5i0krZXxRQHBCNEh1OyuUiG 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)(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?8t3TXpH/Rg0ZtQYfIFRMUV/j0EKl?= =?utf-8?q?enN8K1RHiNuGBI2jFO9TLmB5R6APiV9L67kT9wM6q5mWHhk1eFKizmGngwrlelriT?= =?utf-8?q?SgY5fEEwdgPgg0ILXog+UZ5QNSj+PZMnK4X1Z3rdeoO62z1M04FQZkiAQhcADwe4A?= =?utf-8?q?bvsD+L6QrFGvgfZRDbvsr0vbpHYiE51EmvkrsmH0T2FCdDalLWyw4yB58PxEk/DUJ?= =?utf-8?q?96CsFlVehkquiqyXmrkjcI/uH+65lPYYUo0rskH4wMngbMtA8M9158chrpxDEM0M+?= =?utf-8?q?YlGt7upoPq8XBXJ1g1V6hQftk7A0IVcTuWjwOG4pQWNSEZrMTB+zJPHRWtKWlSvHB?= =?utf-8?q?8j1rZSWvDmyRM8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SY++/srEGq4KNF2nabyvHce0j5kTWa40sF0cpAc?= =?utf-8?q?bwkJ5vsxlB18dFidkUib6b+6VFPEMgKwKbGCVSbklJhhNlpNotvOwPs8Z+cX6YkJE?= =?utf-8?q?bDLjRJ5L8waCcEYDPyJYHy1H5cmWlNeCh1Qd0IlNtN7FK8jEpwxmSnvstNVDGHzEo?= =?utf-8?q?HezXZjCMi13qrKxS22qrEZbwgSIQZwVDN6VFU32WsDw2kywOz5lGNMxrb+nCaBSKs?= =?utf-8?q?fdAuTZLhvm97wDUhgHNcXrY8KArW5cKV+CNmXNs+IXt5M69v/LO5Mfdc1ylvKQNLr?= =?utf-8?q?yjhndKIz+Fny?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c59eafa2-8874-4d42-cf75-08db8e6f732e 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:32.9445 (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: T/e9MMDH7i02wcyK4eSmz7PBnfGaxR7XiiBGGWgaR9b8co5EUd0BIyHg68L9KVgQZoIsRyFJXsjHGM5QYAL34g== 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,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: 1772558689026400567 X-GMAIL-MSGID: 1772558689026400567 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_sd8787.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/core/pwrseq_sd8787.c b/drivers/mmc/core/pwrseq_sd8787.c index 0c5f5e371e1f..0c5808fc3206 100644 --- a/drivers/mmc/core/pwrseq_sd8787.c +++ b/drivers/mmc/core/pwrseq_sd8787.c @@ -113,18 +113,16 @@ static int mmc_pwrseq_sd8787_probe(struct platform_device *pdev) return mmc_pwrseq_register(&pwrseq->pwrseq); } -static int mmc_pwrseq_sd8787_remove(struct platform_device *pdev) +static void mmc_pwrseq_sd8787_remove(struct platform_device *pdev) { struct mmc_pwrseq_sd8787 *pwrseq = platform_get_drvdata(pdev); mmc_pwrseq_unregister(&pwrseq->pwrseq); - - return 0; } static struct platform_driver mmc_pwrseq_sd8787_driver = { .probe = mmc_pwrseq_sd8787_probe, - .remove = mmc_pwrseq_sd8787_remove, + .remove_new = mmc_pwrseq_sd8787_remove, .driver = { .name = "pwrseq_sd8787", .of_match_table = mmc_pwrseq_sd8787_of_match,