Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp594475rwb; Tue, 25 Jul 2023 22:46:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlG8vo+dSZyC26K+jXFzGotA8A4Pp3n9PdD4Tg2rgLC1z0MRRAS27Bfxb5Qn+uSjohYUmtto X-Received: by 2002:a05:620a:240c:b0:765:6524:8458 with SMTP id d12-20020a05620a240c00b0076565248458mr1097730qkn.36.1690350399114; Tue, 25 Jul 2023 22:46:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690350399; cv=pass; d=google.com; s=arc-20160816; b=zXs5SKqRdvKUNlWF8DH+2cb3Y0ZOuzlNMLAEX/FFdtakbKJ78YH6LvRzfgsHe3y8Hr zwQBOCbCFN5Ebl2F28xoNCsY8AwitnrI7UsPMEyEwlHosi5j8yy5p3RfWGAKb2S9Rafa EByEWxwbyqK6nDkEo/ZamwzPZaihjtqBpochjANGOBYDvWCSPxOL5YLryTW2xbMGIvrb tp/OYlpNcnQxky7BUUsfA2DIGsQnhF1AudcEM4rsNyjUqHl85ssg5quST653VzikKn4N 0HjouQulC2++gYzY+F2KrPsH4iUwRPvZzVHNiGp6AHy57UTHqwC7unPmBOmGQoiZjahr kAjw== 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=9QwyjiAPoUwvuuL+fTQzivWNofmwHauOj0YWTiKbAgA=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=hbCrxMc2aSD5u8l9TK9JeZfUn5icXU092OGwlVJcUjNoGhioouE3Hqvwugj/NnK0eE jaqdDAsI8XpzrGg2b+rKYuMLAyFb4K/w4R4ri+qEcUXFfcVh4hXJV+NhWQDgrX8BhrXa PrjAdf7zIhfRSbaWCmz+yCQsgNLVqxGgZk/wSZ3mCasFTCIiwzBA6LO+NTis4P2h7jpW 6PgexKAMKu+W1ilrFfHcHa8CDDiV8z30z9z1eX3eeAHRGGqvyz11cEiNTrDO2E6Dni68 MkLhhQPawb1D/YSUXUWtupVLOfoWx3TP7nTDOlGnLc0C5hLbnUqEM7daWGCOCPOEAwEm wGNw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Q845ViZ1; 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 c12-20020a17090a8d0c00b002509d96227esi578584pjo.173.2023.07.25.22.46.26; Tue, 25 Jul 2023 22:46:39 -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=Q845ViZ1; 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 S231749AbjGZEFd (ORCPT + 99 others); Wed, 26 Jul 2023 00:05:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231671AbjGZEEn (ORCPT ); Wed, 26 Jul 2023 00:04:43 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2120.outbound.protection.outlook.com [40.107.117.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2101D469C; Tue, 25 Jul 2023 21:02:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fLfu9+Qs/BNPffXQB/Dp3MMPWkVYDSDbojNbyWJqyS/ajwWlLXsTD9NDINuNH3raoPTkuOePmUoHeciG2UWeCGWQ7cmLjMwXN0//9TzOSpQoNGza1ppozw0RZzQj+TRMlaHRuxzoIX2J56Nh6+S+eonPTTM362+iyAaRQkF7lRgH4F8FwDWxj6qic2Y694XCZF3mxWTvizHCweJWIeDpZ3sD4ICVzZy76gNT2yViKQQ84MfUk0wl1tSa4LWIzvHORkm1SIpR2VEt/+1kOuZWD/hIcJrN4Ccpv09N/wzClh02LxwqqnOMkOFJ0jdaELrCBqNwTBBGYPhm321xTb7FHg== 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=9QwyjiAPoUwvuuL+fTQzivWNofmwHauOj0YWTiKbAgA=; b=PkH+X9z7iwL26R28YXdG16DtJ1d5+jzCrK44jy9TjvIpq3GRDXzkfiAiNw8Xj8ike+RZgq7Dk1RdpFc4I/ZGIQzP4fVDPYWQVlA4mTRiNBbjsPkObKPr9FcZ6wvC+MDW60ws+1VIMFD4zvXm0Y9zH2RsY+0QnvyIl5oVmWDVzfOK1VdkuLg9CcHAKy8VkVqN1gda2kug1bSWMLMIffk/oweOA1JzNl79Q55FdN04BMHGH1vJhL2rSIlX3REtp2j6yH4IiEMNr/WIyUpUnuTHEIc4t+1is2rd+VupH6bBiA/OFkqm4vQnBt5K/iZ9l2BkyyrGZ1umTN/2tnKLCTceQw== 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=9QwyjiAPoUwvuuL+fTQzivWNofmwHauOj0YWTiKbAgA=; b=Q845ViZ17YoLnlQCaht+nsTaVOyqWtnXWG1VPVtYYTcRFUrTk1TafAic3gxXvibninb/Z6p1bVhCh81laf/DpmqOwJMcvRprvZFm7pdD78nwUMyZe51YVCUhGEr26nm1ZgO715Ietd5gCGOx8ERqiVBIOn9RpCub5WHPhii2vIrhbg4zSYmT9HYLRzm4N7Cf/nylsK3n/t+SyQ8sgOygYnSKJRMqIr/BKzppAKmNvyzH26GtO5TOWChB+hkK2bIhGBH5FaHnV0fOB4pN510rP1aLdlFzoZnF7MIJe8+U1Ssc/C1+QgI1I+4puv/Vxe5ZSx9J1uU+caRIG6Cje7LwLw== 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 TYZPR06MB3934.apcprd06.prod.outlook.com (2603:1096:400:7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Wed, 26 Jul 2023 04:01:38 +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; Wed, 26 Jul 2023 04:01:38 +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 v2 23/61] mmc: rtsx_usb_sdmmc: Convert to platform remove callback returning void Date: Wed, 26 Jul 2023 12:00:03 +0800 Message-Id: <20230726040041.26267-23-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230726040041.26267-1-frank.li@vivo.com> References: <20230726040041.26267-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR02CA0093.apcprd02.prod.outlook.com (2603:1096:4:90::33) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB3934:EE_ X-MS-Office365-Filtering-Correlation-Id: 5d669155-5e32-4496-70fc-08db8d8d02f7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Lk6DxO98cHo1SC4UIUtEU8zZsAxOxN6uVxkAlf+rnZgNmWmVA9D9j2CsL8crFDIMTTZIbJDI4hbyy7ipkJBlnj5piTC0rAjnwCPEFSHupv5YoRGgKBVOHPUNud5oC3Rkjvr7/KlikXyu1EbZ/vqyJ5Eydnbrj+JrdL/y1ljAa/WnLCiMRy+oNxiX+wogZb60R9SqYAUyq++o6PODLs+jKG4wBkRCdS/4k05Z4vZmq/lA2I1xAWzJYqYEZhBk2vZVZB00Ak6wvqR8F36Tm1UTzoDfW5MJ9vBYyZd3rBLEKvdUUrEcxv7epjPcktyIZd3mOpGVQFlqdl6hWvPYc80reUhkhR/V0tfDY6GdOF3m3jhkBmWUbu+KY4lQM4D2vLqLw8g9r4My9gRVLVddvuCzWkQPEolwjYb9+m38/viqOpOV0cZJl8Nhlerv2psf6S3HA28sypBmuGyYYJg7ZcfSU/Z585rhDd/6cnw2r3OeLTijrpk4loqRaUcF56KueGQwYdI56+dI8LlIcUXDjZa2G7F0e9TO0rvPDQmCfkaS4ebcKeFMqnKH9VTptpPW+JLr1oSe3tlgvI6MRn6eXCzywoSO34SBGEwgx5xiMzY5oG58J7YtJyOd1EXv/wgNMwcR 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)(376002)(396003)(346002)(39860400002)(366004)(136003)(451199021)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(6486002)(52116002)(54906003)(66476007)(316002)(6916009)(4326008)(6666004)(2906002)(6512007)(1076003)(186003)(26005)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?blFMM2NaN0JUZXZRVWFKeHBBcDhWR0hnNStuc25YWUtzUWpTR2VwOXN6dFF3?= =?utf-8?B?c293bFE1cGVieEo1MVhLY3hmcVIxMzcwYWVsVkJKRWtWeFdMUjNaTng2V0Fx?= =?utf-8?B?Rm80cC9XeHNVY0VPcWc2QWlReXRNaGhLN01UNiszaURMQmFzY1BPSDZNenZl?= =?utf-8?B?UEg2NlgxbHNncVhVRWJoaUV1OWtlRElwbnBZV2Q5dVhkSStZcGVNck0zeHBu?= =?utf-8?B?N1N6VktwbkR5RzJpVE9BSEw5WWY5THNQVVRPNkg1SitSK1ZSWDUvYmdRZ2ll?= =?utf-8?B?cC9hNm8rcHM3cW56N1E1L0VpdEJJbTAwT0NoUE94S3JYa3pwS2kvWGVIaU1p?= =?utf-8?B?RlI2SVhyWXNyOWJ1Q3JOUWRkYmhvTy8wbmJYTGVZenZGcUhSbVp5emdJcGdo?= =?utf-8?B?NVo2cHhQQmN3Q2N6cmxsSWt6WUQvWEFXdlpmWUxpaEN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G4vcXdDRDRqdnZNTllRdjFCVWt3REpERjQza1Jn?= =?utf-8?B?ZXJKUUxlcmNyQkZhQ1BJcENjOGp0OE9CNW9Ua2JjSFc3RUJsRTJZb0swRlFn?= =?utf-8?B?TE5OWUpjQUFxR1ROVXNzbVpBSmNab2gzK3V3T1VRUE0zbFgrZmM0cklMZlZJ?= =?utf-8?B?Y1ZuVUhjdUJ3VndhMXFyb0ZyY3pOc08ySC8yQ29OeTQzN2NySG52Yk1zTStL?= =?utf-8?B?ZWZSWEZVeU1uT1JBZmthSkZtaU9Hc210YXlhSWZrVnZjTlR3U3pUdlgrRDVT?= =?utf-8?B?Sm5IelBobWJUbGh5S1NLV2d6MHllVGNoaG52VXBZVFI2eWpxK0tCbldXUnZQ?= =?utf-8?B?V3IzZTJaSnJZMzRDa3l1cUFnbFR0Z2FsdXFkb3lUNUM5aGwxWk4ydWxlRTFX?= =?utf-8?B?cm9ObDRkdWpSS0NHckdXa0d5NHNkd0pNWEV5alEyNk1BZHhocmFzczJ1MGIr?= =?utf-8?B?cGhVY05LdWxyVnRtd2ZvTWcxS3p5MnhXSFVEWTBpYmtyTHdtTWVRdzFQaGZp?= =?utf-8?B?M1dEZ1dVcVoyQ0Z5YXBMcSswOXZHRzJXRmFpK2x2ZlYzSzN0cHB5MmRxV3I4?= =?utf-8?B?QVBINzlrYks5MFdJNUprcUJPTnFqaVdiMjdBNDhnMmNvMkFONld3UDluandS?= =?utf-8?B?NXNMUUpFOFpaMmJMK2dkMTRDOS8xM1J2UUg0ZWtsbzVNMWx3djd4aUZWZUdr?= =?utf-8?B?UGpPcXdKSTUxOEV4QzFQZmNaR0liNzNsdTd3eDg2SDROVXlzcjkraHRnandC?= =?utf-8?Q?djlcOwAoyJ9cusnX0BiLMtGAJ?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d669155-5e32-4496-70fc-08db8d8d02f7 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 04:01:38.4419 (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: 651XlgwWR74ma3d+owc5ldBzFPf9etPZI4iC4e0qSDNJ9HwD+RVQoaV68nEZRpCUZEOmG3cTpuIfiRjS/bIaig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3934 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, URIBL_BLOCKED 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/host/rtsx_usb_sdmmc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c index 2c650cd58693..ded9b6849e35 100644 --- a/drivers/mmc/host/rtsx_usb_sdmmc.c +++ b/drivers/mmc/host/rtsx_usb_sdmmc.c @@ -1379,13 +1379,13 @@ static int rtsx_usb_sdmmc_drv_probe(struct platform_device *pdev) return 0; } -static int rtsx_usb_sdmmc_drv_remove(struct platform_device *pdev) +static void rtsx_usb_sdmmc_drv_remove(struct platform_device *pdev) { struct rtsx_usb_sdmmc *host = platform_get_drvdata(pdev); struct mmc_host *mmc; if (!host) - return 0; + return; mmc = host->mmc; host->host_removal = true; @@ -1415,8 +1415,6 @@ static int rtsx_usb_sdmmc_drv_remove(struct platform_device *pdev) dev_dbg(&(pdev->dev), ": Realtek USB SD/MMC module has been removed\n"); - - return 0; } #ifdef CONFIG_PM @@ -1455,7 +1453,7 @@ MODULE_DEVICE_TABLE(platform, rtsx_usb_sdmmc_ids); static struct platform_driver rtsx_usb_sdmmc_driver = { .probe = rtsx_usb_sdmmc_drv_probe, - .remove = rtsx_usb_sdmmc_drv_remove, + .remove_new = rtsx_usb_sdmmc_drv_remove, .id_table = rtsx_usb_sdmmc_ids, .driver = { .name = "rtsx_usb_sdmmc", -- 2.39.0