Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2070005rwb; Thu, 27 Jul 2023 01:16:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlHWX3ZmY+1NFZM4vresh/PlsdXyBCyXhvpd7HL4B0ODIuXCiyvRS7CdYxZ45JzGonM0gNmb X-Received: by 2002:a17:906:1d:b0:991:cd1f:e67a with SMTP id 29-20020a170906001d00b00991cd1fe67amr1275671eja.29.1690445800834; Thu, 27 Jul 2023 01:16:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690445800; cv=pass; d=google.com; s=arc-20160816; b=Rho4X0SiszgrQUQB0ShqoRL8rBXbl0Gt7enCJH2lA6c9xg4YhNGdXOTRS1Y6zWglqz z9nJLFphWxnVzaQ1y7+1m9xpQlymDlagrzE/s9gDo3qsjs2LP18H4EGrnbAY2RykIwi3 uXoptHLMHg3uI8fDNt/ygPRRlITWHu1fIr04Eib9Mb2jVFAhamUUjhZgis2wuCRhS61B MqbMi3L9rgZlwKENJGU65lFTGOWtQw+BiDNDoJ5dfEprZ/A8fQ/naaX0c5dIbth+tyj2 TB2EwfRBLpP37PGXTgIdXC2cSTqNpGKxiNykLN8l6Ekh+7mIEWxZQjcvh8R36T3iPoJn t3tw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u21-20020a1709060b1500b00993cdec0182si608453ejg.143.2023.07.27.01.16.16; Thu, 27 Jul 2023 01:16:40 -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 S231741AbjG0HI6 (ORCPT + 99 others); Thu, 27 Jul 2023 03:08:58 -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=20Kleine-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> 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: 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?B?OHQzVFhwSC9SZzBadFFZZklGUk1VVi9qMEVLbGVuTjhLMVJIaU51R0JJMmpG?= =?utf-8?B?TzlUTG1CNVI2QVBpVjlMNjdrVDl3TTZxNW1XSGhrMWVGS2l6bUduZ3dybGVs?= =?utf-8?B?cmlUU2dZNWZFRXdkZ1BnZzBJTFhvZytVWjVRTlNqK1BaTW5LNFgxWjNyZGVv?= =?utf-8?B?TzYyejFNMDRGUVpraUFRaGNBRHdlNEFidnNEK0w2UXJGR3ZnZlpSRGJ2c3Iw?= =?utf-8?B?dmJwSFlpRTUxRW12a3JzbUgwVDJGQ2REYWxMV3l3NHlCNThQeEVrL0RVSjk2?= =?utf-8?B?Q3NGbFZlaGtxdWlxeVhtcmtqY0kvdUgrNjVsUFlZVW8wcnNrSDR3TW5nYk10?= =?utf-8?B?QThNOTE1OGNocnB4REVNME0rWWxHdDd1cG9QcThYQlhKMWcxVjZoUWZ0azdB?= =?utf-8?B?MElWY1R1V2p3T0c0cFFXTlNFWnJNVEIrekpQ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DR01Obk8vUWh6ZVlqenRYWTNMUFJIcDhtdHpzQXduL1dU?= =?utf-8?B?NnJMaDBMMW9yKzRIR3FYblhOWW1JM1JlZzNQVEQ2akErKytrZ0hmd001VTNU?= =?utf-8?B?K3Y3dnFWMG9mTjR0V0c2TGpMeHAzVkltOGROdllxOTNTdit2b1B4UkxobTk2?= =?utf-8?B?Ry9YN2diTktsSk43YXFuQmsyWU5WYmNCUlRtZXpockNsV01GYmZzRC9ya3FL?= =?utf-8?B?MjNrbUgxRVhmTDZSODl5YVA3NVMzS3c4cWY2QUc4M1Q2NFNSTE9tTVBGYytR?= =?utf-8?B?V2MvNHdPeEhSS1hPcmtSbzl6d0ZaV21Rc0hEMzRuZTk0N1ZiZG5RNnRhL3p5?= =?utf-8?B?MFFPNVBNZG9FMFlVQ09yeTdBSHIxVExGNDZ0L1dTWSsrL3NyRUdxNEtORjJu?= =?utf-8?B?YWJ5dkhjZTBqNWtUV2E0MHNGMGNwQWNid2tKNXZzeGxCMThkRmlka1VpYjZi?= =?utf-8?B?KzZWRlBFTWdLd0tiR0NWU2JrbEpoaE5scE5vdHZPd1BzOForY1g2WWtKRWJE?= =?utf-8?B?TGpSSjVMOHdhQ2NFWURQeUpZSHkxSDVjbVdsTmVDaDFRZDBJbE50TjdGSzhq?= =?utf-8?B?RXB3eG1TbnZzdE5WREdIekVvSGV6WFpqQ01pMTNxckt4UzIycXJFWmJ3Z1NJ?= =?utf-8?B?UVp3VkRONlZGVTMyV3NEdzJreXdPejVsR05NeHJiK25DYUJTS3NmZEF1VFpM?= =?utf-8?B?aHZtOTd3RFVoZ0hOY1hyWThLQXJXNWNLVitDTm1YTnMrSVh0NU02OXYvTE81?= =?utf-8?Q?Mfdc1ylvKQNLryjhndKIz+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 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, -- 2.39.0