From patchwork Thu Jul 13 08:07:15 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: 119644 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1678559vqm; Thu, 13 Jul 2023 01:40:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlECbdt2qbMEP/SHYmdFvZ7CWPYzd0FAheZdaAHCcSsFqiRREhMQohh4RY15Q1zHybQEjoVi X-Received: by 2002:ac2:55ac:0:b0:4f8:6d99:f4f3 with SMTP id y12-20020ac255ac000000b004f86d99f4f3mr676651lfg.52.1689237618256; Thu, 13 Jul 2023 01:40:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237618; cv=pass; d=google.com; s=arc-20160816; b=gEUlhNJBFT9BTTmUYKdr4IpjtvHxYTO/sAFuf4tMN0fLvPAvnJeAFWbuLeEDXwAqe4 PnfpyoebY+7wbIFl89TSd1a7KkzOWGNDFclE05Vf6nEUYwc/NZdUNR6o0ROd6J5W8vaB 8FqQyc6BkupuMufQ+4o87PnWfMoz7i5+9NWtd0eUT6ASct+NYHqajbRxEcaO7p1XgcoK Nc6HYAoWfij1yknXTa8UHxB3e+NbrUHYlC5LAtAWj5M10J7ihBav+z85cElyKulwkcaJ LcHCdRI7kG/hOSQXFatbnukTFreABM/s6U4B1GxF4e6EAN4RzYlIyxnMKRozZWCOQ6vX EXDA== 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=jyTP5vRGutG7Y29doT3s+cSx+CTcgmzp1ilG+kWWrOo=; fh=E03QyiWENBCRDAuP5hv9oopN2sdsL+hYvdCq53xM60g=; b=n5rTwCiC+y8s4iUpeiVd8BNgPiAGbzKm1EFl5q01mknsw32SRohVuXD9kSO0bKeR0E 8frbMNADncDgSWmR7nUzThAQJBjJl4AJuz8tv/dYkE5Vbs8/EukIt4mJAY4idpplOXR5 ovEV4Vx7xMOpuLVgmFpk4YgvQa5yoq+sK8Gcyn+/+/x/w1tl+sYnXCp5o7VnyvNRsdil pl4jumY6nbDRUdYnK8qLN2eCJ5EOZadEqaUc+oUycv3LBsTg4OzbykyKDh7X7Fc3+f2n gwA7HoHqRXApCLSJatHXLW9eFOYHTSJDltbnHMksPA1hW2OoSmwjwIEVCjHbTe5Ae2Zh tw+g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=EkgPW18V; 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-20020a50ec83000000b0051e247f2828si7058919edr.91.2023.07.13.01.39.54; Thu, 13 Jul 2023 01:40:18 -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=EkgPW18V; 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 S234083AbjGMIKc (ORCPT + 99 others); Thu, 13 Jul 2023 04:10:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233867AbjGMIJs (ORCPT ); Thu, 13 Jul 2023 04:09:48 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2115.outbound.protection.outlook.com [40.107.215.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 340972721; Thu, 13 Jul 2023 01:08:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fGVuLTUn0ownsdQyHOjPsgowjkZSR1ANaHjS6+z5F+v6n0bNRSmONdWF4MXGWwtggbbsBNQStF9dNRb9LcjFgvCikHIczq+rsYJd9MPDm7FYRHI7p4JvzUDmJEuIu9isP8G7xpdJP0akwNEOy6rdNXanJFUrGJIaI9PofUHK6mhparro93efr20Cnm/71peWsqefOgoSo7JNwrtJXGK5rFkV5nnf5FYBmeJ2E/6YOru0qQNQyKZCL4FmqwCgnQOV5ZodHasAKfDzXSIQke9d3E684TIXq9ysNFUZHrVjiN+r6zPNb3jUJdT0h7x9V03LAin2sVk9DmlJmlXYVGvYVw== 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=jyTP5vRGutG7Y29doT3s+cSx+CTcgmzp1ilG+kWWrOo=; b=V5S6ceETPn6oS9h+VpyWXKkO/SS7ORhRkTDQlBPEKbM2yl9cjBJHiP8fRXgnBR7bTVGZRVYP6SJ6B42kd1hSBHyBycspC7DLEzbD1GW0QZh7/cQLmJ0+x/LLJEyE8W8FDw2frAgw9HVSqSjQM/KRNskxHv7P75CkUqhXHe5Bp8fpFjDxEPjCkYZn7XO4fASktVsync/1nmRsTO43VSzBfd4exrVt2SvbmIk/xnEMXdQ5u0buc9pW6ygCZNMZKvgHdSvq0eGxNTglvqSZspqkOUk/TFAQhHcyCcNJyPSy0VaZcYQHooT5ZLlf3+BMrafzkcngvOk1mjYWjQT71ef2Fg== 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=jyTP5vRGutG7Y29doT3s+cSx+CTcgmzp1ilG+kWWrOo=; b=EkgPW18VkRj/nKeseAy0ddqzvrW6pUy61acDsfBrEFv5QVmMHleyKLLN7orL2lhDw3S3RudaElkXl7xhIySZUx6SFga8gVhqEGS+tB9/J1BM2IglmLdupEr5AyMtvGJocG75/51sE+LQ1wALnWXSiZHCeoEGxdiEJmmcE7pCBir5gljNBzwYb/E22lFVH0eaELQo7ncliHs1Z4P6h9InryuoAf2uF+RwQ70jdhO0ZTGR603e0pAGoO/x71QIuJCG8EdFwgZm3rXjKl6Y6FgOlWQElUuY7qMW7o8no0HCsFvFXcaRG9jph4GE9nJT/aJrabZRgZqI6PPDNgQUew3s4g== 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 KL1PR0601MB4371.apcprd06.prod.outlook.com (2603:1096:820:74::13) 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:08:30 +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:08:30 +0000 From: Yangtao Li To: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= , 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 06/58] mmc: cb710: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:15 +0800 Message-Id: <20230713080807.69999-6-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_|KL1PR0601MB4371:EE_ X-MS-Office365-Filtering-Correlation-Id: 0eeeb01b-b0d2-4cc3-9d6c-08db83785837 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xPBTQu8MUPAvA33G1u36yAROL5kJWpxv5sXgMLo2t/oSj6+O7WM5a4EQPgl5zIzpeWU62PmMU6wX1XJfoCeHRK53cNy6dXyLjbhez68Z+D5MuX+tNTCtQCdBtgZfw+LiFJt6pLdk3F9GdsQLijiJXS1V8llayIjPngFXgk7mEQRXytUVkb/w53ScwlSeLyXODmrDpIRD0sC34pwIAcxTYXIz74NJB5TikqIOxNGbB84Z/j7aLRPVrVWFKQIKXp6RMEwWM3DdppGlsowMQykJ5RRAcJo4+RfxjBnx5lvMgMJJA41AEAndZuZBkgyXUdVroCJDlEVn+2hUqDz3yR3AGdDPd/S9NE0qeKJ3wFghYaw8Mosien17nXmL0p8iDOZG82U6QPb5wOGYXSWHNQE6U38c4sT/5xKDXkdIKTjg/gfmNY7p/zD8sUr2axTAWsVPr0cU9DiXDRrn+AKpQSSQ+vapkTUpKm3myuRgu+0J6XRR4nEugw8W0R0Dpx1SIINQfY7q1A3VTmvvu3ebiiLmAM4ZljmZh4C28Ur1gjaudM9Sd7KNAptS5DOuCad0cOIt1mAffUhI7jlrJNfxDElmYtr3I4BpsQWQqNQP9i9v8PJp9s7v4zS+NMaUxZ/eugYTtCW0ufKoeARTRsuibS4j5vae9OmdEMsl74Dwty6zeNk= 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)(396003)(136003)(346002)(376002)(39860400002)(366004)(451199021)(38350700002)(38100700002)(478600001)(4326008)(6666004)(86362001)(52116002)(110136005)(6486002)(54906003)(66476007)(66556008)(66946007)(316002)(6512007)(41300700001)(83380400001)(186003)(66574015)(2616005)(2906002)(36756003)(8936002)(8676002)(26005)(5660300002)(6506007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?8216Sd4pwjw86z56oXPPhQs1LUbX?= =?utf-8?q?qGewg7TL7PNVfLx1RFDxImR2NDcZHUrjX6Ap49An3Un+CDVgz2lIYKf2hLz0OuSWP?= =?utf-8?q?8fZXQFD/7jhcfTLp3eW3KLbnwPFixvKySX6JpDQOV6WMgS/IvMVC3qp9dH537Hf0N?= =?utf-8?q?DPOgKOLCr0RsFx6v8JGZ+N1On4M5QM8lRSxMpXs/7wTo/1F26Mb+Ev7TmGlJstbFg?= =?utf-8?q?cBdWApNY/drzduC5yQAhn4G44VsFrHTCuLsXCi8GJlUGz6A1Y5VoIUnkpne0uvg1q?= =?utf-8?q?Y4xFQAXYJEKiExTkYo2uwhPqiCj/aCh0OVdVEB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jDLHId+u1xLH5hhtTXPh5bVCtVCg?= =?utf-8?q?vaupkDQFV60Jovbz3CfjiitM+kCc999WWd/mwnGjJiEk9D5CVXuL21BlKi0oKpw71?= =?utf-8?q?WgeqYZMOAzHQrbf1rqF5R6Zs9z/8LB6HuMyFL24/+Ox3PELM7iIDXzfL5opK9QLfa?= =?utf-8?q?drID0rIr80Nq0wxSuwq/mSUhI9RtRtCIsBB49mClk9SeGlb/fhxh9aouk46iU23c0?= =?utf-8?q?S1qUHD3aQm9bkXS6sg2UXIaEgnds8sE78v1w1HYdCztD8eN0HiVOs8OzLbINyG7q2?= =?utf-8?q?VVcbIY+Uuz1zCzQmM0y3+nFYLUU2UgwF1cgD7pjoHtFkQ1n0z01ACkY/1HRljrGSr?= =?utf-8?q?2q4sBpdQcFYz?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0eeeb01b-b0d2-4cc3-9d6c-08db83785837 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:08:30.3846 (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: jEDGYdG1yFxPjf8Qvz8ejMo0iGuyqu0lMwnwm81DOsDC5SpGEwbXzHeCaEJPjxKEbjfgXnO30cxVnwMdDvDspQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4371 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_BLOCKED, 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: 1771294024755574679 X-GMAIL-MSGID: 1771294024755574679 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 Acked-by: Michał Mirosław --- drivers/mmc/host/cb710-mmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c index 6d623b2681c3..0aec33b88bef 100644 --- a/drivers/mmc/host/cb710-mmc.c +++ b/drivers/mmc/host/cb710-mmc.c @@ -745,7 +745,7 @@ static int cb710_mmc_init(struct platform_device *pdev) return err; } -static int cb710_mmc_exit(struct platform_device *pdev) +static void cb710_mmc_exit(struct platform_device *pdev) { struct cb710_slot *slot = cb710_pdev_to_slot(pdev); struct mmc_host *mmc = cb710_slot_to_mmc(slot); @@ -766,13 +766,12 @@ static int cb710_mmc_exit(struct platform_device *pdev) tasklet_kill(&reader->finish_req_tasklet); mmc_free_host(mmc); - return 0; } static struct platform_driver cb710_mmc_driver = { .driver.name = "cb710-mmc", .probe = cb710_mmc_init, - .remove = cb710_mmc_exit, + .remove_new = cb710_mmc_exit, #ifdef CONFIG_PM .suspend = cb710_mmc_suspend, .resume = cb710_mmc_resume,