From patchwork Thu Jul 13 08:07:10 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: 119650 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1679142vqm; Thu, 13 Jul 2023 01:41:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlGR5NFVf6m5mtJNdMsHfqX6QTlIT22oN3CcJsNgO6HwPidiq8fOZZDafgOq5hzofF/Guv65 X-Received: by 2002:a50:ee02:0:b0:51f:c673:5f32 with SMTP id g2-20020a50ee02000000b0051fc6735f32mr1005914eds.40.1689237710447; Thu, 13 Jul 2023 01:41:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237710; cv=pass; d=google.com; s=arc-20160816; b=rjghq1ex54lKeX30yRYX7h7ql+adJTIbnT7+i/A8IGeBydD/HLqsoLOWyGrvB/YQV4 3ZHtbJdJrz40NrCuuxcvPieKoFf3bf/NjnbJA+1b1eZphNFadp448RrkURParm7KOw5Z nanI2nlqRgeZYNes64GCw+AdTPFok2BhjI8s23QZ7p5VyNN3t866qr8caX/iQtfGehR8 ql9KHLM6wlg74NaEcx8DZf/0Mo6mjokVhBKvwtedVv11m1Fjn79MZxGLbmBRSLhXik2k vYT4XeeYfq1VwZB6cme2VfRkmH70Gs60q1GIoeEp1ML9bOM84HOMg4IHV+e95u8cOWKg b8GQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=0x0hkJ7rBcNQc6MBaHii9c4fVow/2SAqZ/ObTvOr/Ks=; fh=Obr7MIEUOpnq0pB6zulldJnRaWUMQlXEdPVcMkgQvIc=; b=klgbUdj3VqN76J5DO8RwqNN1bhPfiqgxx1Uu0x1JfYHZsjxf7l8/Axr1FOf4/QivvB wF9yknkpzyT2BQCw6uc4X3cO8g+rxiWDdxeR2sL5SnAKkjkFQy40YPxena5uP5N8+J5h o2ER68JBRVtvceGYb5mlD8dICd9MG/nz8ojMlA24L77IHK3weGW0lNC5ybJl9QUJBPsf N2KvnI20sUPqWhfIH6lJsXxHVT3SazL4g9fVhDr6Bop5TVfxt9LUbUxqLwlirOEtRiTo f34rqsCyc/dgh2S7nLSuugQbB+pggd80FUXiXZPz5U4KcqOpkGNf8jYXEybGqLLyRaBX 53Fg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=W19GC5vf; 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 d4-20020aa7d5c4000000b0051ddf359991si6855301eds.344.2023.07.13.01.41.26; Thu, 13 Jul 2023 01:41:50 -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=W19GC5vf; 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 S234061AbjGMIKY (ORCPT + 99 others); Thu, 13 Jul 2023 04:10:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233845AbjGMIJq (ORCPT ); Thu, 13 Jul 2023 04:09:46 -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 72C392736; Thu, 13 Jul 2023 01:08:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CZv7+kMjtN201aXRChf2u5May7uxLbzY+v/dJa03El7lGMpe+juujvGSxsr7D4mFBoWbyuGPVQhOqByMLFpjXUKyOWJHqMQkisxd/aaR0F7LY7qleTDQgipy2S2XZF5QiiCZ+V0TwZZy+B7Cw8Z22huIx97MIub6Ne+UYiuMOQ1tQHZs+T2qFFMd0fru+6RsQZ0wX5i/UUmSpde8xirJtOsIRvZ7bLWH2GWWPqTlYyjrv4fnwgpqnARNeZyFV7O675h5eEMWoEURYLm+IuSou8FZz+tGjFe1YqA7P+jOJZC6E6VhGdSr09gWu6cJ5ApwvF3na7zuKveD1mCZXXlUsQ== 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=0x0hkJ7rBcNQc6MBaHii9c4fVow/2SAqZ/ObTvOr/Ks=; b=JuOUJzM98B63erEgVTmqpkt+alJYrgRJ4lr3I7+nkgR+hGuleB7ZW2HEoE+1wDMiOTdltCfBGeARpBIaGJXeFYRoDjvuq8B9oBEx9/gE9f1YIKQjZG+gcCqh4ZnSkKsfZqn+rKbaOL26adeI6JwTD0YOh2Qb0brwUpOTFMuTvS+e28zzJivzJe0Qj6QnDAy03ppT30OGC63/HxkpgzYNKObwP6JLcyd+1IcJ7aZazqoDvLyIzbulvg30nWlhIGCVrS3N7vqPwjICaiGjwrFyCRWmztuaKBngvmjA3+S/ca+yUAPvDttaChtgJS9/oy+cFLoss8jElWVySrTK5WDvnw== 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=0x0hkJ7rBcNQc6MBaHii9c4fVow/2SAqZ/ObTvOr/Ks=; b=W19GC5vf6MitdKMn0/oQ2UAeyHy8NHvlE4HHcP3b5KYUHUKIrt9sPx0j20gPTqM9knzX2ddonO6Z3ZW9oA90BdFQbzls40jQswWjPgb/2gdc8+OiS4Ap/oywHkG6xfSKV/ZVg+OJQ0hPJJTmTGlumanowQ1hLBbhQAZHTj9xuj3GVSI3r+k2esXEs498AP7Stnf4ej41y7NpK0V52Zi38Q6arjgLglrhvXygx0EBL1Q6uVwtR2tpFZBx9Hb84f0uxYXGYU4rMBZ4PCun7lBosdFQUsK6K8JNXsXSUeGauzjdyx6AaEUV27tbB4dEh3kPQETCL8htykoKL7xdzl+BHA== 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:22 +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:21 +0000 From: Yangtao Li To: Ulf Hansson , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:10 +0800 Message-Id: <20230713080807.69999-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 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: db512120-bfe8-4c39-1183-08db83785293 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4UKwO+dP6G2m8w5g3hTGmJPt/aV3i33bHH0XyWvUwk4zTTNA7eOcf3V8XJYlRhFWWXyVgcxyYsiSmE9lwmCA2l3zgCUx2eTOdIk0sNpsiwDsMGOtNYDyCifcTieZuKxVcqrGxo6gv0lp8lwifw5yp/c71md8lw682CJg/7Xolvh6q19VySjmEv3Xt6nIFo0oaTYqB0fk+npsmdo40XKViB5E7l461rRUJXt91EFBUgEywCtIDiT8X4Nt7srUue0SxdrIkLUQirui+AeHEMol5xg8a1aJC22kYNbSpLBsKM9GfY9Af01mNdLDhB5EAcIYhpw8Mzmz4Vcv+499IIn/flipxNMPbkzGqorCNDq7hzENDCvj4tYVnUJZVZlpkfKyxeEXIugx20bh/9arc5Gkvc9hlyq6bQ2ueT+BVOPjnGw0GpXjP18jv5z7lDvr3f6IcFrfF7EOxvxmH+gLlWWHBYhabDsrxL0l8jUl3fyraszRm0mTvKOyjkbAw/HYl1u82KyqIju70iyg11/NQ1lXimdru1JwwiEAe+knPJSH6hiKy0AWbUQcfLcxfmhHmnPVnWUlg+xZ/DTuIQPJhUxkkshmggZ7H0Rc3emOonUrBsmoZOyFN6pYX6tAx532uyccGVz5rOsz6QXI+lrcxAfmLHrbqIIyYJy6hoPL2sVkwis= 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)(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?Y9+2t2AnQPn6xyOvEK+a3FlqKKLL?= =?utf-8?q?OB/6QBqSnW/HJQdLy0aSQvkPmyO6qWLjB3CWYjJmXEjJYq5LrjFXpOUxqPLvJOrPE?= =?utf-8?q?5QpyDxjt1fRXm8VPEAc1X9RGj9AfdCPae5DijCu01J6Rz/IllkVWHOh7LM+IuX6as?= =?utf-8?q?lFxt+Lfegzu6vL5CX8rPtM6tGcQ1ndi3541hX79BdBrcUPGUJUVUllbC0YbJfw1KK?= =?utf-8?q?OyWOx1oHMwS6278DX7FELO5pCjNyIhdQAjS++8DRag7VTKuStsVf9wuFgxrktLOtX?= =?utf-8?q?6toqW+u1kF/w8fhE0ebHMlzoWkZNnrhiGH+kFnGfADd/0sBqXb087yAdFpb+GysS6?= =?utf-8?q?2EoLFfDJpmWWxM9h/eK2sGqc2gupU+98UphTQP67rsMbAV1a6CHhj4LO4H3jQzr2R?= =?utf-8?q?Wuz0Md8RwMUG4FIoyi3PlskD3zLm7aKblxTbwomQvsioEmIBP0P4KwU8CNKfI1PpY?= =?utf-8?q?RwMeoi2k/5t/PoUQflVjGzoPqp4frkp0Nmwi79v/ih4kMRiapxmd/YHqMq+5tjBj8?= =?utf-8?q?HPp+f/vv+Z9x/B31V8wLidND1qHnp9JsiUD+fCk4iGB+LpdIAGoo1drE9mWMP/t8t?= =?utf-8?q?Wt1sXxEiCRHgVfIxoEuBPecNjRvaZD/dOImRr5DFnUvKWDfo1tlC5Lb7g544EEhZs?= =?utf-8?q?wqwcnmRhlsjuo5KSKGn1Tm6WyxkHmcEz+tQP1BfeuEFnuYwEaTzLWe9aUIbeDRks3?= =?utf-8?q?DBnj4D7ciwts2zBrFAtJtbwXA7MsI+ct6xwPJ9ykX7UpilBq9pmkMeHPEZLI0H4ZF?= =?utf-8?q?Rg9GHAlvo8VB80gHjuaG2vHoKi2UBPPkZkAyfuVQvZREKZ9aHiCl4T9wVO1aDNgBb?= =?utf-8?q?onf6Awse43448KTKm3IwAoczW+nKLwQSKuJAkrPpQeaQduiMmewlBjn1oONKbdhBW?= =?utf-8?q?IJjKhleMNknERoJ0jDBuyrG7FtIWweRIyghE8KLjlOosNMsB6LPHlb63crv4/k3t6?= =?utf-8?q?H7phFfD2+9y81/au3KqWFxYYDEb0y9A5exrZu10WmUUjK9YXrKYUaT5WOqfkP+n/F?= =?utf-8?q?eoMthWms1NqvU8WldjnIJZlkegw3B7n6d5RccChjyL6+k+drkw/q+hKAbMYSWJrGf?= =?utf-8?q?fRcPd+mwryWE1cACFKJ8AaDaDGUO8bbfhPMZjCFgnIjeenyRQyLcd1SC5ve0hgw+M?= =?utf-8?q?ySzo1LdDKWgIvH2OMSRW4wysOetLcvoHBhVBx3itMX7ZR2m2fM6hsk/6pEjF7eAeC?= =?utf-8?q?nXGmKDxlhpXwKGQ1z4OK0oV71HN7aM0HTKQQ+cDy+r7KLeGKI2O9xcoDVCOMaj5MT?= =?utf-8?q?D2z7nhRc/kSP9TxUZgSjGJ2QGXtDsOERMUDlz4FRaqL2LnRHCm2EwQOXJT4GJcf7t?= =?utf-8?q?fpCjM9fQ0d2WJtCu3MHGeVWdMpI03JM7QzAuomvvOaeGyR1oelXHyNQ0DuCipu7wm?= =?utf-8?q?WWjFDUpYtCFe4yca666GpuaXCB08GwLseGa8VYoTooBnUOdr72O8FeqkZAPhtRdty?= =?utf-8?q?xE42dLtGT4qhVFs6QZRgSVMa5hzNLICTPgP52hFa5pd+FPfQv1OmgYQgnUcf3X492?= =?utf-8?q?aY9/53Jn5FZZ?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: db512120-bfe8-4c39-1183-08db83785293 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:20.9951 (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: 6mBtp1KRGiq1i2IlJzhT2uRt3+oEoXmS4z1okyAKNWGwtXeQIqOqX7n4j8aZeQmfJy5t3OOFE3Vf+eAtZMNIpg== 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: 1771294121411590128 X-GMAIL-MSGID: 1771294121411590128 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: Viresh Kumar Acked-by: Jernej Skrabec --- drivers/mmc/host/sunxi-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index 69dcb8805e05..d3bd0ac99ec4 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c @@ -1486,7 +1486,7 @@ static int sunxi_mmc_probe(struct platform_device *pdev) return ret; } -static int sunxi_mmc_remove(struct platform_device *pdev) +static void sunxi_mmc_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct sunxi_mmc_host *host = mmc_priv(mmc); @@ -1499,8 +1499,6 @@ static int sunxi_mmc_remove(struct platform_device *pdev) } dma_free_coherent(&pdev->dev, PAGE_SIZE, host->sg_cpu, host->sg_dma); mmc_free_host(mmc); - - return 0; } #ifdef CONFIG_PM @@ -1556,7 +1554,7 @@ static struct platform_driver sunxi_mmc_driver = { .pm = &sunxi_mmc_pm_ops, }, .probe = sunxi_mmc_probe, - .remove = sunxi_mmc_remove, + .remove_new = sunxi_mmc_remove, }; module_platform_driver(sunxi_mmc_driver); From patchwork Thu Jul 13 08:07:11 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: 119634 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1677041vqm; Thu, 13 Jul 2023 01:36:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlHy57We2fjDtBzCeN6eFn7F1/8hFOa4cAeYdXJWXWoNQLnI/cUNqmju6r9HHdos/oNfS/YS X-Received: by 2002:a17:907:505:b0:992:d337:6e44 with SMTP id wj5-20020a170907050500b00992d3376e44mr712863ejb.58.1689237400881; Thu, 13 Jul 2023 01:36:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237400; cv=pass; d=google.com; s=arc-20160816; b=lWfm0QZMXHGBhojMA3lq02+DgEiAT++893K89uSz7PWHbW5LJvlXpYNidXVMmtEr+o 3UWMGio1UbhaRFt6fGycjb5jMb91zkZntWjSxEnGxQX4CcjHNBxtuT2oIq0/7VsilQ8Z 0IcTbQehUOaBr9fts8yKkm3FN8xH6Q50apUy/a6ntpxg2Xh2qZt/4Kuu7VsoHAmKlWJ+ txJWVZgRu1NO6MVRmrOaTWzN0i7HoxU0wfZTO+xMFpbMK4UQ1b9qFBkVIY53c0MsGBtL J0RcIPS47Qo9WY86ZNoGL6Or37mEqBlG8+AT5NWilf3V5IswX/SET7/KMvYTdgSGqVd6 lLRg== 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=1raQ0367OxAGgkvChHBq/pbYLsJPiLq8qCsfVZ1QcKU=; fh=3lxePQ8lC/6W4f2E62pbw9rU36jnfhYwF2zv17uKEhg=; b=VH/dxauvzFR+tQgo/i/Pv8sVD5QQlQEDvvZYayDgfCghZJd23fiqwJMInQNqoyx2Wf kjaSs36dnFnofr9ZbuCHuxMJug03Y5ijWWve24scPISheWcuTQfNr1VuH31CtABCKnYM IG8n2VRmXpFtcbnNcsviRF0BSwIYvbLpCH54BSG6WHg61zACAWDKL4qBhDcqBCTR1svz h5UOaS7WkWof7XkQFWaKPmx+BJrOhZeiu8CoQ9zXPbI7bHhDotw1UsDZcZF/28vSjguT KgWUNH4Y3uVE1xHl7BWYYwoDKNSkPcYqM6xEh7Oa24DOlVKe+fFuZoAwY5WTiNhv4Ycv FwXg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=dU0lQsCG; 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 s23-20020a170906bc5700b00988a6421830si484957ejv.979.2023.07.13.01.36.17; Thu, 13 Jul 2023 01:36: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=dU0lQsCG; 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 S234048AbjGMIKV (ORCPT + 99 others); Thu, 13 Jul 2023 04:10:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233843AbjGMIJp (ORCPT ); Thu, 13 Jul 2023 04:09:45 -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 0ED4B2735; Thu, 13 Jul 2023 01:08:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KRekJdXKrbUA3RkD0Ix6MV+aExOMQSGtEbcq10l2L23fIv1RmYw8it/1dk0pWzY8plMd4aHCYqq6XxqSuf4LMiROnQBISWrYSULAHiZMObPUGEdkvGM+orp30OR82ADoGK/McriiI3HwOrzowRkYfFIPOjqP6hex0ko/ICSJ6AIxX6yFu2/7uQ8HtLC586s61lgV1iuaRCnIQOuEbA/mCczfEWJQXoeuWWcj1Gc9isJVPJC/M87DcnYApUqAJC9noSDfAOo6oXYZNW6M7ree6ehSjd5ahz+e8mri747w1+bEPpoQHLSEUS6Z8vQSJtk80JAcoO7HVr18q+6ggWiIFg== 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=1raQ0367OxAGgkvChHBq/pbYLsJPiLq8qCsfVZ1QcKU=; b=mXejBKsIyAQmOBNTR8jrpWRRrAMGGhJzMIY/UJH6mlhi1neJGuocXjLM6ylgCcacqKp0VQBNofcrqwe6U9MET0S7pc1xC9rrik29k4XzyvdqlaJczmr5oeLxPqSA4vjILuCVbBuKV+iD4quDN9GIvCbXRpTWP2mBPoDPmPfeAUNWfM+SQOJnoLl/6IG3pCqUnbey+DDXVslbxGZ2M2XjZSUB+jo6rBAODt+YQ/1yT0ML9d5IM/nhv4DbCjsiE+C3K6aOjf1EFNbgdZpvql+TSDCI+hhi8yMBP8KocwZTVHQmge2NdBnWvNDp7csNfx8lnNm+DLKI8YVsot/gUouM9w== 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=1raQ0367OxAGgkvChHBq/pbYLsJPiLq8qCsfVZ1QcKU=; b=dU0lQsCGaYRGqVyRBTe0NLXMM8kE14a/c+xj/PP8ybdFN+CcF0dcD+nRP/KUf8AKnJeKhXGEzgJ2In5JyiaJfSVh6bLOMaFnTJxd+4dsuMDOdsDtc/wndizKioDN53oIz0+OP6JKVJu0R0SU/61nzXxXfrfUmOH5gswvru9uUxuSnl1UDTdkvrCH+OBB0cmpg/boaaxzKM+fl79tEGQkXQmrYCUKMJwVYjEDtu96owVftueuMB65UvqA5T8BQjy0pLYX6LXj95ZHa+xq6hrseRGMzP6Wlv1O6rEzS24XpiZLaY26YoqK4209sxonmepQmbOYCdY61IpjcMKf/kCA+w== 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:23 +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:23 +0000 From: Yangtao Li To: Ulf Hansson , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/58] mmc: bcm2835: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:11 +0800 Message-Id: <20230713080807.69999-2-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: dc7305fc-47b7-4218-a401-08db837853d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YbFkiwVWkoKSgF1d3khTJT2t4/Ar3T0ZJywFGBUTZqACTYpOVJJ4is/VvqJlDuFfZlIThxAmMsqe7sEndaVwkXmuY+UQ2AvFMTOY0D0COmrzwmWbAHy0xAnqxtQDIWplJTIQIt1FUKgT3NkC7YD3K+uZWjt1wpaAdaIZ3TWVbcLAtf3fESw0/7jNDh9Bc8wKNunxHabzu89nnbm4e6E6VIrH03931Yz9q1xmk2V2zdLPWwQEKfPj1y2YtE7yDXTwB80vC0r0wgeXG/wV7C5GXhfp/iclLyhNdvbnktMWCNVrtQqWLHoro9SH0TcBlmvOSrzHxf/2eqmP6Vnb5Y88V+au3CrNMXoyo9+pKFAtFbG0FDBO5Xif6fk6cWdrkapAMnfasuelREKFrhl+nd/tazBd+6QNB4+2Uffv6pSvSPE8Bz271SuORXBgOYJ3LJIkbQSvh+CVxiSNq389bm6P6qEjVdS1kVZ7h0lDShtF8qbHyawRxxN+0c9x76uX/jehHQbC2Nw4xb9/5Bh4Fr0rsIZjC1CcFBSysn7LM9TXl4LvNIPiUniX7KJbPfh5bpDgiUye+UpTi9Xcoiug2IEbD5ca3hZEPtYjxjKh7YKfHpd5qfRlewi8IcM5BTaFup0bSB62A1I6wekQcn5qP4WgNxN34Bx/LzvrPHRVNGtqYos= 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)(2616005)(2906002)(36756003)(8936002)(8676002)(26005)(7416002)(5660300002)(6506007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?8SwpjtFnzqqRR7lZA8kh+VCXDKMQ?= =?utf-8?q?wVX2yLrCLP0V9Pmeoxhj/gmYBI3yydpcirlEch6MqJPwLu2RPFGHaiKaD7+wJXZK2?= =?utf-8?q?vEIk+U5XdWbFG6QS0Zl8trhXYVQ51XZZ6iX+GH72WT9mRL+cr+u5h6mxtMCLYKG4B?= =?utf-8?q?7BVpnSPYmuBI+0jmWIYEd2UzSVWGP0MIQQq4NW2/6B+3glawLACwT1NRCVW9UYVDr?= =?utf-8?q?IThI0yQpYRD5Fl/6MFdGmV9TCAqjgIwrkVHnkWfDDe0mQOpA/MRDx5H693L0vp8IZ?= =?utf-8?q?qhCNHJAqZHjXGKJzsuwH7fF1WkWY3d7gpzfrKKaJR1OFdHhhL+gAdIZcfM8CUFmCk?= =?utf-8?q?0lvuxroNUhVviPwdVF4izxfOYqdSzF2w6TeGIRs0yM1emGz4URfl+suwaCaQUShX2?= =?utf-8?q?MGoaRHLFLPFTxO9b0T7xWagth9Mq5hkQ8ut5BNMkITap561tKZTDl4sG+3DGDiMtA?= =?utf-8?q?VrPBpUO5PCFsiGAjTzwnyJ3iJK7XrsFsT3QArsaQYmNvrCvMHw1BtcfWjaCXlYcY7?= =?utf-8?q?Z99xmYgT640AfRh6S8nlhnP+9ZPz3+fMW5WhxITUYYbqJzqXQ2KHa+ISZwEMcbcap?= =?utf-8?q?bRef1Mmc8wCPJg9xfbfrSx8U+1Im/gd+pH5OaklJqUklJDQv3jcDlDyBaAeQvs7wQ?= =?utf-8?q?jb0UrY6eSJSM0fwygWT3nFrKGmLqeXEdULFgTdd+R005qhUn55um8kRNDPbS6idNc?= =?utf-8?q?h4v3pmGuQB6N+0nOkg9YPaRX61YMWLv1h2wYvy78/FaULS/i9xKLN8XsgvYF+KBr1?= =?utf-8?q?51ee1VYkNva/RS7Sr3xVfhSH5hzb8vbA8W2gklUfT2JKUNSPuRUvMeZM8hvTRQMLb?= =?utf-8?q?yr9iwFk+7WFD2eM0NdXihWJmvmhBVBIv+mEQZCUzUmaiTOQjeKxvW180cnLYi+zlp?= =?utf-8?q?jVnHjl+L+4iTpZwV0nH6FIcumvMOIxTbYm7B/MMXG1TFsvHg/FDmN6jaxYWM2kNp0?= =?utf-8?q?OSaOozBRh5FJN/pR+vIGPD2lPpsngdr4649rHcwaPWmqQ5lZCf5XadTspNBhH8ki1?= =?utf-8?q?5d46jku4nCamxV80rI+mOAeGoO0q9QJo7YLY+vLsPgB4o8n5iCaLMYuETBFlnM4lF?= =?utf-8?q?v08dHteBMFFSKQDyQq4cx/PJmxTutltGJPS2DMwWE7Hl7wHWTNJPpE6MoCNGtBUr4?= =?utf-8?q?I+kGlG6WorzbMxZYP8AJsFDR3KMw+cWLXl70h4NG2i+AF3MCmD4f5e0PiIY29uuzw?= =?utf-8?q?r60LsVQsmqx3VN3Jdplbbe2aMhf2Q5MLtVxdgEYquOgin6vCI8xEUkCzfQSugJ9Vd?= =?utf-8?q?FmFg0KA2BgDnY3o5PSBLG7TKFk/coX4Jsf5YCulFw+x7JdaoBfo+6f6QHJeDIrA+H?= =?utf-8?q?YCQJEUMtSyjrPrewse9usLI8y4OGbwgkGu+0HL+HHRB1Gy5ncVuvsSi3VHiHeBBM/?= =?utf-8?q?b0yKvDBvk5gVmEMeDMeRWe098IgQANarLCs1BmJchvrZBeJliH5x5wUBI/O4F0sJj?= =?utf-8?q?gpCr8xDgwMzu0MpMnD6YfJVfPfwtxX3eyvjN77Hwivesbuh9SFOYJHjdmucpqL0n0?= =?utf-8?q?V1JQnkYrNvtY?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc7305fc-47b7-4218-a401-08db837853d9 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:23.0640 (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: qexXGbKL66gAmMci/TcD+sSOpP8kXThM5D2QoU6IMVzhJvg7pcDpijdYbjJh2fegMQ0dqC9v20wuj9lrPqgH7A== 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: 1771293797063587945 X-GMAIL-MSGID: 1771293797063587945 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 Reviewed-by: Florian Fainelli --- drivers/mmc/host/bcm2835.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index eea208856ce0..35d8fdea668b 100644 --- a/drivers/mmc/host/bcm2835.c +++ b/drivers/mmc/host/bcm2835.c @@ -1431,7 +1431,7 @@ static int bcm2835_probe(struct platform_device *pdev) return ret; } -static int bcm2835_remove(struct platform_device *pdev) +static void bcm2835_remove(struct platform_device *pdev) { struct bcm2835_host *host = platform_get_drvdata(pdev); struct mmc_host *mmc = mmc_from_priv(host); @@ -1449,8 +1449,6 @@ static int bcm2835_remove(struct platform_device *pdev) dma_release_channel(host->dma_chan_rxtx); mmc_free_host(mmc); - - return 0; } static const struct of_device_id bcm2835_match[] = { @@ -1461,7 +1459,7 @@ MODULE_DEVICE_TABLE(of, bcm2835_match); static struct platform_driver bcm2835_driver = { .probe = bcm2835_probe, - .remove = bcm2835_remove, + .remove_new = bcm2835_remove, .driver = { .name = "sdhost-bcm2835", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:12 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: 119658 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1680113vqm; Thu, 13 Jul 2023 01:44:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlEZrpmh8KGs2MbMJGkGS4btHTrxdiQlBgzGaaNgO3T/+Eao8bRuSdkkkGd0Rol7dO3gP88m X-Received: by 2002:a05:6358:5e0c:b0:12b:ed77:8b66 with SMTP id q12-20020a0563585e0c00b0012bed778b66mr1069604rwn.7.1689237854555; Thu, 13 Jul 2023 01:44:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237854; cv=pass; d=google.com; s=arc-20160816; b=RP7vrnFzw+s97GsV4J4cigjRFf/sfU79ujxeOWbA7aHncvBOxRbuxNfxFA1IkkUKTL SLqyIiSNFP0rkf9e9ll7bg8TVphMfsI1W/fibZ3P2BOTy8rMcw3+frITp6KldbaVxAk3 WFsoSX4OUyRA2o3HPr7lGcb/0TgodJuh5gp28pnw0+e63u9uk3pN/4dNWnTDZ77qPlDN tkmk2+gd9TLy3Catlb1mP3Vdag73rAVWFqpGR1JRVxtZGsvTOCK/tYVLM0qs6mvx9TBM fhFMQvHQ5qw38H6euuEEuIVuK46cckRbhqO+AFoQ3obXCSX6ckN8uQwOZt3d1BAiwzM+ /cfA== 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=rP1v+X2aVc4DKwgxtQDwQRCU/JULLF8ZyOfeP9A2ytw=; fh=RRst69AylAmQjTenUg5G1MIx2YhIHWYClupGBxgNKIA=; b=AERM3R2UHV89sUDT8Yjy9cnsInnGA7WfiqZlbOvccq8WIpAfjJSAZ4ZVfyejyz/2a7 fbdb+ms3jCjiN2nbjbNXes0cz94wgNh+fE6MeRJGXMJoRZmT206mN0DL8fEHqicuDfpJ DZ33EbMN/XSqDrDcDE/HrCaLcHYW0EhZ5RTc6r0cf3MaJ/bpMH1ZqDU8ZLkCQhcNEzOu dJsY8+dVrLdAOKeQKAd4bqr+A5x/ZOd66gpzSrQzrKxnK7HLmOjfqGzZnA+iRyG9HbIY gfa7y3yFq+Tq2MQRAS/FHG5eCjw+28LJNPbp8jSBv0aFdGbVCraT87JLZB/QXpBBWvb1 +cPg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=bl59gsSt; 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 h6-20020a631206000000b0054392750edfsi4554631pgl.744.2023.07.13.01.44.01; Thu, 13 Jul 2023 01:44:14 -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=bl59gsSt; 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 S234029AbjGMIKS (ORCPT + 99 others); Thu, 13 Jul 2023 04:10:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233842AbjGMIJp (ORCPT ); Thu, 13 Jul 2023 04:09:45 -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 8D7DC2728; Thu, 13 Jul 2023 01:08:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RlCbDpAc+xsIqszROf2QZ5pqYJ427AWUKvXrYS87BqVp0IKmoTM7nMt/eFd/jjeI9Cke7nQ/nArg0T4Cwana4Og0gzbAC2Kd7taucRIZVL5czAb5BKCbX0Ddck+B4gJKTqItkIqAFYNPkh7uTlwPRrnj5EP6fbCNR5WPduLpegm5cpU1lhg746iGdtBIFbJHx0tHdq7fVVlVU+6mKBY8GBc97z1z341H1cTCZnmEcGzrSw1C/pFX2e2/z65riS6Kjk0ZGN2oeHHZNRH22zxmeb9yMray9bHF41vWMyCFI4E8b+OVB78YAKimSm6ipLl8EXsZI6GG7MrkHk0+13IIAw== 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=rP1v+X2aVc4DKwgxtQDwQRCU/JULLF8ZyOfeP9A2ytw=; b=mrq8VGk4rwHYA/Uud4xIY3UiK38UCPeTslQ/pCb9eG1fve2NsKpXLNtoAzpy8z7/KHCXU3gGqNVw8eMkJbLX6tczs8EGvaCelpSRJN9JJp3Fp7PW8/EihP7x40doauYDs6a3w31ig9qYoxhgRlgeQAtUhc0IT2/+Ac/7VKV/tMujPUygeAIMjmpCh4PVO67ExPeI9vlBlUOx0GxhYqCkANcBdFrdacqwCbssj3ngQ/425Yl31Mhr22uNCQdckjcvZ8PkXyn+zYknrvaF5PXICivVVIN4+syoFVPNrM2Bw64W4lrzdMLJ2B0CSJWX0W/849sAk8i4qY4vEOw5ljBWwg== 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=rP1v+X2aVc4DKwgxtQDwQRCU/JULLF8ZyOfeP9A2ytw=; b=bl59gsStgmf8yApfy4l221w0ABUg41HAXgn+YTwnB1z57EnS+FaiB7DpFKc16yQqc3ikfu9xPUloBCGxoBWAGGus0MJVAIhQdDX0pB+UGLkV6zmGO+5Eqh6xvXYsxNoVkC8mjtlaa3S75rzcEANVExyqYINWibev2nbiaVUYFlUSqooASX+fuOAIQLqs2FmmmEoxngn2wz3hhEYAk+GExm6akGoaZYiVEptk+IJML+wmW5wYIloE+SHQUbp86WsgynwJLvDYFyEbSuEsUgiL0kKOpLzTMQ66iicxHDVX7ICbltAQ86hGUUUTubCRS9mpDPO5nmiPp/poH34ra9Xlfg== 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:24 +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:24 +0000 From: Yangtao Li To: Paul Cercueil , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mips@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/58] mmc: jz4740: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:12 +0800 Message-Id: <20230713080807.69999-3-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: 6a9563f4-e10c-4f98-03c0-08db837854c8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: glPuWNhoy14xkL0JNnwn44B+DTbY05ZBvefxIsJzy+/8czzFsfNVn3VjzZXVg4atyT1vEBOgIZbawspXnEQd1cE81ZaKapQ8xlgS7e4wKJUvEOj01+DacZFzJpkn5RsKq0zT35xlnKrhWdmn4pxbP3j2mNFPrUOHG5Zz7AiUbNpTHcByMjCo8DWNwPoUWuIwY5c4mDLN55KB4f+Z7b/FZnLssbhQyKe7sDQ5gtGGvDNIsQUEG0OyRClA/d1p5VxgGNI+YhkLLvVo6owwaH183P5Y2LJK7vB81sF3Xfhsyw/HLLE7nVtD+HZNqh0zJWul9dfKAVkz9pm0wa/eU7v8KG7UVbrE98KYXZjkyqcXPgkZQbRG54hhCNW/XQOIRQ/+nVZZuV4gZYIgddVVlAshfT1susdRONvTi+FfAC4K/jf3B5xcPNLmuM7uThpKaDfoV9x9yW9IxuSZUGXj6PWtH7/nu6bNA9mQdD0tttAP+Tyt8B72VLla8zDyF2K3Y/JiHEIZaqSykYFVpn1zIFZ/V05zIUHoDR7TiniJ9o1EkVafKvYYMIxkcuhcSkP+fGIeGtMs/HL9qwrsQ27RC+MkIWtJMvrbQZ4Bvh6TjwqqIwAK8/lWvSR2ub8xw+iu0pa4LEBqzwgbZulXZIxd/br+LrQ55q/SIEqpbfUpydUnEbs= 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?rAC24eIlX6tgB5X3NCU53hc7YDu9?= =?utf-8?q?z48588QFrxvnLNKliPUtzLGgQRKtjjOz0Buqw/NWM0ogWR71j0X7MAKJ5GuNz77EO?= =?utf-8?q?NabGRtrJFZZMbQp2OPqOw47eTiZTY4jCS1uFS6Ygs5vGtBupB0lM8Nu9SwFB+66QL?= =?utf-8?q?IPfS81R4ITUeMqQVoc6Lz6cJaYz9EFj3XHC5fQmlujeRae/TjDSB+DQXvFEBdE4ya?= =?utf-8?q?jV+0Av16clP09VV/bHRmsZMvEd3Gcx6tCr36hEkvML/8JaIxmM23hGcqYlIiIP0XR?= =?utf-8?q?+4yNnXEZHGEjyLF6HXjR9exSGkAuGEhFedKflD8NSMV4Z2MdIW8K6p/W4BoBpnIW0?= =?utf-8?q?SD1CEL9WCKvZUUcFVoTj0cG6QQUcF+PUFWuzWC+xmzgF/INPaLVMgdm962Q0UbODw?= =?utf-8?q?GtovZhO8DQu9RghPX6hXvzSEZ7P4fGA4/nC8OJPzVcPEyaQtPm7A4Jf2ZnFJ3NTLF?= =?utf-8?q?aX6e6lsr+5xB8boAQ/4YwxgjVwQ2PtP/5+AXDpZYq3FHOO70XgTnnD1lUv39Fi7lT?= =?utf-8?q?8M5HFgEu5qpIpkRxuTsFDj/4FyamydF06VgGJYeIyRj0cMzuZm3Pe9GrpmPztznKt?= =?utf-8?q?rPdUlSMv8uolKQ2YBtkyBcYgzbkuKktRmmNsDxG6w4neegg0vwmlEpkU/n8Hfmqa1?= =?utf-8?q?KkLWJa6M4f4IsOCVj8RERM6n/O0sMFyuQ2qaMu4Em5p6hqdUw0K9lNK4dIBF9z6Yw?= =?utf-8?q?Ulya888e1k1Oj0BDZjRNpoHw/uvnVqzql+9ksr1xZZcJaeBN7CddV8a3AFg8RfBjM?= =?utf-8?q?5COVckyHUnO+vABU18birWg7V4G+qMId481ev3oWpG2WaGND2o1NYP5GZNlgIFNtg?= =?utf-8?q?B8UE8b17RrbMoP8vXYk/dcbTeaochfjGtGcPvxt6yVOhOauP3NdToyh4jVQgpE7WF?= =?utf-8?q?sF9zwxx9Ivrj1ZkAOVb36k7IsucX/XFQ3GfDBoj5mhHbyb9qD9/OkSMJFAeCKaslA?= =?utf-8?q?6uf5deIAUoB263QAzzBomE+GtXOKXD3NpnyKS8HvUkRltBlTDmitgVyVEOohPoFmC?= =?utf-8?q?Q9bZJjA/3ZDa9hQl2rJj+GY7WWtVTbxoAz13daPRFDkz1iCaG79Sw4SWrCKAgO+HL?= =?utf-8?q?PyhjpO7bP8cNj4C5ruSCC8zXCTPYxVewOAARrNa2xDqYGM0/NcSxtJMx0mqqjIJkg?= =?utf-8?q?FaFyT5YjzUgrK15COI5wmVyz9HvaLqfCGkdFpvsBQMhXOgs0oEVt47X5h3zTziPc5?= =?utf-8?q?IcWYBuS6GhxcWtpFVg0bFj9iLuhio8sKKraGVFbjc+WiGzFvV9IKt0vM0HRTge8aN?= =?utf-8?q?agwGJUstWofkinczB18x6gCxp82Te+Wy3PIUHwse2bIZN2ZCgLXj95kcLyxxmlKZV?= =?utf-8?q?dvLh/N0Sg9Udje+rime8ziYogT1TQSCkEyThmeHVwdHQvhtDVOy5afyof4Nby1VdQ?= =?utf-8?q?v174X2EEvetOcGfS9rZdeJHDViykIFxIm1SsIasexL/MrqxnUrgM2TE9dKtZV/TMm?= =?utf-8?q?Wm4OeSRCfrRAmqcPDrwk8l3bBJ7U7HrEOzEIZ3uOMf8wxCQMR4A34U8xNkKHcxpyt?= =?utf-8?q?Bkp/3LTlRxmk?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a9563f4-e10c-4f98-03c0-08db837854c8 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:24.6276 (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: wBiotzHYLx8vHDoNcqWQuzVU1zAXCQY37rW+nMusE4Awn4y+mbCWDmuLcWazztk+cPJgI7NbZik7x4PKmde5bg== 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: 1771294272416069230 X-GMAIL-MSGID: 1771294272416069230 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 Reviewed-by: Paul Cercueil --- drivers/mmc/host/jz4740_mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c index 1846a05210e3..f379ce5b582d 100644 --- a/drivers/mmc/host/jz4740_mmc.c +++ b/drivers/mmc/host/jz4740_mmc.c @@ -1163,7 +1163,7 @@ static int jz4740_mmc_probe(struct platform_device* pdev) return ret; } -static int jz4740_mmc_remove(struct platform_device *pdev) +static void jz4740_mmc_remove(struct platform_device *pdev) { struct jz4740_mmc_host *host = platform_get_drvdata(pdev); @@ -1179,8 +1179,6 @@ static int jz4740_mmc_remove(struct platform_device *pdev) jz4740_mmc_release_dma_channels(host); mmc_free_host(host->mmc); - - return 0; } static int jz4740_mmc_suspend(struct device *dev) @@ -1198,7 +1196,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(jz4740_mmc_pm_ops, jz4740_mmc_suspend, static struct platform_driver jz4740_mmc_driver = { .probe = jz4740_mmc_probe, - .remove = jz4740_mmc_remove, + .remove_new = jz4740_mmc_remove, .driver = { .name = "jz4740-mmc", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:13 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: 119609 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1667086vqm; Thu, 13 Jul 2023 01:11:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlHW/qpq+KyHBqzSh9wT/qvUPdgrEOy4waC/UEuPar1rDxiuXM7wvZb96DV+aKWuqJhkz+6a X-Received: by 2002:a05:6358:7e13:b0:134:cb1d:6737 with SMTP id o19-20020a0563587e1300b00134cb1d6737mr1475128rwm.7.1689235890187; Thu, 13 Jul 2023 01:11:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689235890; cv=pass; d=google.com; s=arc-20160816; b=mZbfTDL7Z2V8fDMp21IysrEGn5tHV3XS3mvpHqX35pPHKbgyirmvpHuMIwP1pvIcAf onw8Mma8rCGku66ZEl8F9RK7ZRbqTV0fhZ4q0Gier5/Gweg27VmRiHmzfLfHIfbyMf5e Y/0Vw9Voti4IcsT3xu8yXjIv7Yx7DGe+v3ZRMOb9j5s4Zd5dnJMziqZF6/7D0YXn2Sdi uIdf4muecPBjGTsS7LPxuZvhq0uLS0BYrVMfhpqxn8aN3w7fmQqIs1Wg9KO/rXo+DFgg MdbFpVYLU/9dXJGvT+kTWikpphJ0kMygvemwhLPQi1J9Vuu/EOc1dpr/kvlvuk3dXm9F wcQg== 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=g/FjFXOniG69N9nJR/0wcardmXaPuoPDf1/5LYlD30c=; fh=knVXWtuCx6XZGhgGSUU7JJPQq3c9JBqKNP/6OINxeGI=; b=g5uX73JAfMMXkYMkSok8enQdWbPt7GVYVYsaO6fbvO1fNkfHrYPMopIsLiA+AC4pR6 SjZiMsMdjFqH2qJnC1v2y9od7o0bWAl5/e+TdqM/gV/6jBXp2xextIG0xTJMhSstu8qF 9qmIQp2Vjl69OVz8O7Jcps/mz1lBBkE2gFfy+rLUUKDW7eRCF8XwbR1Cj3cqDBHc5jtR +m0OO25GvtOlv3B5J8hA9wqlX0OVfejtrRdaz/aaP9znNxUIl5TjWqHo2hK+Ap+nCTYL rq8qwHnU+UxWVrmBTXv1bFnjGECOOkbYRtjuyV224h9cbHYzC/siyjmDRk9RXocwGDZk FmOA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=aBra61OG; 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 z11-20020a6552cb000000b005576fecf094si4778600pgp.2.2023.07.13.01.11.16; Thu, 13 Jul 2023 01:11:30 -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=aBra61OG; 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 S234069AbjGMIK2 (ORCPT + 99 others); Thu, 13 Jul 2023 04:10:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233856AbjGMIJq (ORCPT ); Thu, 13 Jul 2023 04:09:46 -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 D35A92737; Thu, 13 Jul 2023 01:08:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TejfADj43lBjstL3ildot/SwrZ6Gp/UDFXlcKf7xoyE0aYWK3WYDgoXIPjY2zmkLyyqyS7dVNe7NvijbPMh771WasgkpbOUDom7w8/ju2PDWigzHH6XCkwNmWtvWOcspIAPxC1TOzhEM4ZQrrfBhOnIHO1e8PlZlda23aPcCAO4TaCFO8zVYhozSVSVLY0cvzNBiz4L/7HyJ3xRBNDaw2oHdnQhgfR6PvHnxcQGRhSkOYR4zY577l/LjpT4/9wza5k9EXKTxOvZu6uc9/5hrOYD+Vv4BbdKI42eDEJqpioWHTejug26qJctNEfoNSvIjqwfSmG4k+aBJixfEgxp2Zg== 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=g/FjFXOniG69N9nJR/0wcardmXaPuoPDf1/5LYlD30c=; b=mFx1rDDRvLc8UABv53ijL5MtH+PKuqMPwslU5dD0D5uDYmWGKeiS1LnpWq5Y8fp05V65XymrjNPZq30XrF0iMvYwtwHSqMNmvuEpu8V8arZfh261iue5ouWr3dZWIdEDFBEev60mecQ2svWjeitx79sXylhKgrDc/h9pTKhWhor/gPqEb1pBWu7NINGv0MF3V3r1PWWW+NnfDlc9XQ8ycmfRT2oinmr1nxSN4DB/RynvdCaGMfXKY0D6s0tQH1QNHY3+WC+ghl7eqSG6YXll36S6liDnRWtpb1xao3qbMz/WQ0mOyLvk84WdvuGW8QqF9qVATOa0fWmObP4HrTMNtA== 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=g/FjFXOniG69N9nJR/0wcardmXaPuoPDf1/5LYlD30c=; b=aBra61OGSzPiF9yHweWn0AmosxD1wTDSV7SphE6cUzBwwlZ8c7KjERNj/+wV/cX3fVielDNOZeRkccphwsjoG9YKO9RGPbaun+tViWzInAb79SYAjyOM3khKWiICJOZZHY0659q+g4lMQfl0rSYc74gwN7vPfJrYB3aWt3txfsd8ZkTMi9pIZZ9GnUYEsgGbi5E7GuLmgQLSa/0NIJ9P16Z6tS5mZblrE2srg/J6CgTUTROmwDHJ6jklmmV7EBJXIlLxAUbram3oPQrOx0nQD8skq2PHVX+P7jRdj2Bd4B0BmpSfUCrVXeVPNfUcj5o+i8+Z99kFWlfpoocxGq7egg== 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:26 +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:26 +0000 From: Yangtao Li To: Ulf Hansson , Karol Gugala , Mateusz Holenko , Gabriel Somlo , Joel Stanley Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/58] mmc: litex_mmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:13 +0800 Message-Id: <20230713080807.69999-4-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: b79dfb4c-3bc4-4661-ab21-08db83785602 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mWG/RqPx1LIcc1A8K7J7w75XRSX/1bmitD74YcfSUwhq/Y/omJFsdQB9AGs7Z2EmI0d4EXmZQnduecg/ExxLDvu0l5eUxvbNpq47UmtdOmwSgnIx3meweMF6/TT55JdWizXvdJ1m7lp/v3nu7ClwyNrTWKkrHgHnu/DaqTrG4daw20VmpvBtDtKhPXYJudZdoFy88ftJKRKMLImX9p0Z2/1pBl1qYEXbeofa2O4d/OmWiv3+ENpTXWTY1o92qBde8+Q04mEmkczyu0ZJq4UAUqQTeyiGrouuqXhATg3AFnKYJPABfSeM6wh4gViutNYbejThYxhusfjnDh9Tqz3tFocAdPf7fpDkBYoS66Iv+VHeN1rohb0KJki913cxUemx/6fxRQXw1Dsn7168/jmgLnD2KEWcgHSshkR/kKbuj3kgDSpUSV7q4pfujubaUsRRODOGzEeiS3kn9eP0DAwB3aX3Bzb3oWQFinM1fKcNvKXMGFhR8p/fhwKkUVj7QbpCwlBQ4QjY4d97YuIQG4/rbnB6wkkTml/mLovmBv/PB9Mc9tvHxXolk6KvF+qclMEOTKn3V17B1o+54UehCUyXQ7+9zH54+cNB8pFYSpRoo3KaKNCZr6+Y73olbTYbyCBN2kMyzUeKhFkFS6NMWamJoljPVnt13tiSlK9IOVJ21L0= 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)(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?gRVWjW+uWR+LIqBxCKMLns5nD0QU?= =?utf-8?q?RrMLabO/I8e1ySnh3/6vVUhfMXxuqw8/XIqO25VYMQyTPfYpUchO0RDavIcTcwyvj?= =?utf-8?q?pFiL0kZjbnrmvt1Sa2IsvB2eVNXXa5oscFFEP7uuvt9kF6Mt5eQSpZfv61kKqljZ8?= =?utf-8?q?P/Knmm23Oe2UT5YYwqqjHGLo40T2ePZvERy2Fd2Lf1/fQvaujzpjUY0zq5rtQMZuX?= =?utf-8?q?/L1DpygZYB8ftb9bHZ8r5+B66Cn5fMeFgllyhh/oqPdwE+KZyPY7aWQY3SFtRzRww?= =?utf-8?q?JRRUvFXViYKzL8xLFqZNf8VoBRADi14r2Lfc6+qR8eBEQBsvrRklMvqoNARBt+gL7?= =?utf-8?q?QX/V3BjLUODiMRAHh6QtdSpvktvT7Q16v1L/I1V7/fkudwdjjHG8MJVW1Y8e3Sy9B?= =?utf-8?q?02xQY59L+u5EceDH1+wz5VCLTjHSKUwTs2wXccYXBuE3wInMfQrmQKxjgElSOv1lo?= =?utf-8?q?gcO0PP54YON8o3kpVgxdG5N4gqN6zFflLrwhqu8+Pmy89HJdh83PB+lxfHhLreKTA?= =?utf-8?q?HGG5eNChLQ5Sw2ndxBfZYLf5jOAanCgI6KJ5oXUYgkd6Xogc78sAmFgJnp+gYKHHP?= =?utf-8?q?kTlHMj2mHjnu4Dwtq5ZMXKv/JrMTDxV12yAGPCYWmZfGQUNVA+pAQYpWfw+DG374h?= =?utf-8?q?Am5O/n+LXudtpXzRdAXXXcp1uDzZ65UrcZd+exlNGGJZXn0zsOru4jlpw0JwEPtUY?= =?utf-8?q?bAryQBQRY7FqPr6JiR7OkFgIhZed95qJ5zoOQ2U42yeilfhedsiL8PU+MTz32Dktz?= =?utf-8?q?QlFdckNvcLHMOwfaN2b2Ymy74aO1Tlxrq8pm610nEdA9ozKmXq0KmMhzEPJCoMT/2?= =?utf-8?q?dd3SrU3N8z9HHD5n0bb28FB6xpdkBh1LkFFthfSgdY385jfBrU7TNplkaK3gFZ7ZP?= =?utf-8?q?GNcMlL0CtV2ZKBXp9OlbrGDhz0g3EUcaadCG3MQr0Nl0RIHmJQ256x/fDUD6yDE+0?= =?utf-8?q?nNC6LoJZX+qUCOkb91qv5y2gKjixmixblvkskpWgsBJoWsTUGKIlUpaQoJhnBVTUr?= =?utf-8?q?Sd8hdaPVUgVP84BAI2FgqnkhdXhNk7ve/QrbwN9o8hvkVKUV0YvnQc2D1ouq6c2x0?= =?utf-8?q?CBgq7C0XZ//3uiFMP82AZCK6iw8wsPDhboglwhqzrbDM22tJjU5aMhGaVJqCRAk7G?= =?utf-8?q?Ers+mGdJ5p3fMliykVWwMgz4nOgY7VpZto5ib31L4I5CXxeLgamae1uAe9HZIDIWI?= =?utf-8?q?fAl4FYXmkkJ3hoRrgvE2hoCRaXO9tfc/ib3pMFSqOqp1DUUcxYYqtjchdt+hETftp?= =?utf-8?q?HtXvngAo19MOg4NLABFPysk722Scuhb/g6PBuA3/xpwvaSKOTf1x1sZ1gbQehHhOf?= =?utf-8?q?AyvN7OoVUP83PsnfVC245sk7wLBoKkl4iL9j++izv6A5ZgqMwXvp5LtZU19NZr4yN?= =?utf-8?q?qzoxuwvDj7w4r5LgN6XB3xyhBzgyMPh+MsUa76JSEb/u+Ysj3wm13eMyvk6o/FWal?= =?utf-8?q?EED3G4xRmRCzDge7h7M6efTwTvyxX5OuIacT03OX3JVVPlhcXbAYezutktnZqqjc/?= =?utf-8?q?AFf7PmVXKV98?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b79dfb4c-3bc4-4661-ab21-08db83785602 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:26.7051 (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: ezKt5X2WCy6dDk2YAuG4j1wTqAobE7qSLq6wbfTLYYxuEIYdV8wf2muiKKherBqFVPQfBGzwlzYDxooNk2Fwzw== 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: 1771292212633086035 X-GMAIL-MSGID: 1771292212633086035 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/litex_mmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/litex_mmc.c b/drivers/mmc/host/litex_mmc.c index 9af6b0902efe..4ec8072dc60b 100644 --- a/drivers/mmc/host/litex_mmc.c +++ b/drivers/mmc/host/litex_mmc.c @@ -629,12 +629,11 @@ static int litex_mmc_probe(struct platform_device *pdev) return 0; } -static int litex_mmc_remove(struct platform_device *pdev) +static void litex_mmc_remove(struct platform_device *pdev) { struct litex_mmc_host *host = platform_get_drvdata(pdev); mmc_remove_host(host->mmc); - return 0; } static const struct of_device_id litex_match[] = { @@ -645,7 +644,7 @@ MODULE_DEVICE_TABLE(of, litex_match); static struct platform_driver litex_mmc_driver = { .probe = litex_mmc_probe, - .remove = litex_mmc_remove, + .remove_new = litex_mmc_remove, .driver = { .name = "litex-mmc", .of_match_table = litex_match, From patchwork Thu Jul 13 08:07:14 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: 119625 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1674719vqm; Thu, 13 Jul 2023 01:31:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlEk4Re2iNYXrY9zb/UrUSTUmLTmgSQDU4I0MR5EeEYZpYx0R8BEhi+8aGdJgwPF1avGTWiY X-Received: by 2002:a17:907:e92:b0:96a:2dd7:2ee0 with SMTP id ho18-20020a1709070e9200b0096a2dd72ee0mr5974219ejc.5.1689237088391; Thu, 13 Jul 2023 01:31:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237088; cv=pass; d=google.com; s=arc-20160816; b=c4hD4niVPkltydNtbt9FUaOReaX8QObYubMKT2b3v3oJ4QEffNhQW1+sybCtucXuvQ z1upOzUwwLLs5GX7cSZEM6skMRwYcW82XySrKuH7hqkiBtCm76R9IM9ZWn2BllpzOSMY v5U4YdQud09TxNGiSoxNoORvx6Q0Lu1KNaCc12jVqsXmDeKvLQ4GOfNIUUXOoTTQFHv1 4J76wqEH1CVdZawz30pO3e6Xa9TkHozwvVVdDhq8YzX6yG4lyihnrSuakdxlvbIu4NWC Z3dSfFGIABkQnvKlOwzTW1WazLLKigJw8iQvbVgFGScRsBVtGlvCPWqsTBW+76mvYEPN l9vQ== 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=0PMUwGYkEKhi1gyynW+rXvAujgXDga934Imb0yL8Frc=; fh=CYjPLkToiURQRXIzKWym/VgPpx/3DQOiB4nlUMd4//U=; b=jYyq7o2MLqyhjK7hKxyIHsVN/B5RWAPOZfaqwlpPkAROY8tXu2n8CivO0rvoPKRKZp Kz1VXBsboTRMKbQiL4txFe44/6OJ4ZJ2R73OrCs+fzGN3TsU6klewdpgakGT/3k8sojF 3gdFuGn8ODw9UrAdNz+AEtIE7DGpBpkfIm4F6ash05/BOhVDqzxBqzrYfbv1/0N16Oma 6f7ly4g/vb0ID0k25/yobc5eMcL9XkR2hSA6wocdGKV3RXpFBKnC7//K2ELVeozY4uEO 0TafKc82SHzhrEB46P1c4I6mxL0fu08Plwa5KKv66mWpiH5gWcAgDD7b5g18MFkysRUz 9vvQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=mAbC8qtZ; 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 gl16-20020a170906e0d000b00982f26c4faasi7087153ejb.61.2023.07.13.01.31.02; Thu, 13 Jul 2023 01:31:28 -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=mAbC8qtZ; 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 S234075AbjGMIKa (ORCPT + 99 others); Thu, 13 Jul 2023 04:10:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233452AbjGMIJs (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 957DA273E; Thu, 13 Jul 2023 01:08:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XNtxQLew8Eepx+EpLw03kcQCEvXvMlslmTc1trlkFq8WTGAwGqd5aPg6Z50yg4NstUrzxYbxc3F7Avak3MAjLOkyPNrDzxNrWiNe2B3zxBhRd++U0dyMNLEfpDQ5D+wjQKfaRGt2z4JVxNM1ocWuILjW4zdJzfkNJyE8gnWQy77tWMMnABMFYycjOkNg08FHcHjRnzNPcTdSRDoRr4bYYIdsySXujfKvhKeUGT+xcEXufPYWkNmsm1DekbnTMNJFicEwIc1GbPSqm/5DVJCtAoz3N5WcQY4wU+/RzyaBRsiOz8QR+dRforyShtBdMthD07RlE2yuyRhSbrARmC9hzA== 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=0PMUwGYkEKhi1gyynW+rXvAujgXDga934Imb0yL8Frc=; b=oICaM5EoIQNYQOJV/+K70wffDVNcurlhqcLSN49r/WEZQvAgbsErLs5hjJHoyTsVJmmU0t1/HibmYkFuSTqyyUgVCAuGQ/ElwXhfDeUTMepczjfvBdsI0oa87K5f/AI9svVQeVA2Fw0fIFar8Fd73L8SUKFTOYMTPdBLsEK+ePK7b5W3CoZV3A/FPBoci42n5pcA9mXfj7WR3JjqkAuQ4yp2bAlzXy0AF/Xxbru6EKbQklRx35bG1+U+6IkcBZ7kapUBYX7aEAsrsm7mqD9iI5JH5X97ElMmc/vZEKLmz1labFSFTSYv5WuclmZIeCYHJWrmnCgsdd83STC7Zh4HoA== 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=0PMUwGYkEKhi1gyynW+rXvAujgXDga934Imb0yL8Frc=; b=mAbC8qtZHLm2XxvvRFPWTJ6HfxoNJ5+sjpfN0LoNLEtnS0/imdjKS9EETLshbenfyAMQoLxMJZDCWfuaw5VUJ34ap/e1GvFjXDzQ49xe7Gvc3Z3qnDJhKBsfAM0G/5HUKzTriKJAQHaPm0ZmHNFHWKjUzC+Bpp0kciRS7LF/FACmwXbjOmxoTHJU0IDtiBM55oHTDMqfimn59pTeKiA3isWGw8p1ym0rkakSydIDqhUCAnkL6IwGsKF6bj/sAeWXopXWOkf8zwOFaPNXz4wvg4cwA0uq+8+/bD/a919bZafph2cCEjATCktmXI39Pe3qKNZAWC0SZpfmgnElrzCfgQ== 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:28 +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:28 +0000 From: Yangtao Li To: Chaotian Jing , Ulf Hansson , Matthias Brugger , AngeloGioacchino Del Regno Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 05/58] mmc: mtk-sd: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:14 +0800 Message-Id: <20230713080807.69999-5-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: 65243354-70f8-4313-0517-08db8378572f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +3K/rcR/1cvOzD8KEtQwp6jaRtH1evDn3LbC3nT6rsYbCh+kFldHtFvVG423kInQyJUpZ3iMVNfV+hS46a9j3x+oRBmtOHdyLNqvWCwvedZJLjVv+kUEK/G00P23iOMXKiRXqhhgW5wqnVcnx/KulRgo/VLMeU/0ubsYB9wKnqiIkDpgIh0IL/akNyrJvUqdCIue/3uOGCj3VJio+gGKOEc7bw9RJ42aaHpJEUhpVBj8bLC/cpkDgsUcS9vG9kC5Wtf6K9Zl/n/31f3vysRdFKALNzud+q2fP4jyVI8kndpBYDofNLsrzqmufy9v14Tm8wUFL7h3p0y5LMUgmn/Q5JUxqDr0iWZvC3n2+BVf9dlh689cXh9F3deSfe2GV3bam3btvSCYt4mGMGXat0IRZcvdZVJj+XMq7gP2NfM3unhdkVC6RxzJncuh5QyuHhKoGMh/WRSDcdTF9SvNwI3wI93nYJ+efwesErXlsS5X0+T7YX1V+q0o3YSFV9MgqvlhDuDUI4cKzTvRENI/aFCKaOlJbs2pnHVIZarKkTVk4lDkwDobW31kg/rCGjT+8b6WQiqoaF4DnmEVjdD735O45xU6/6J72donpfB4DEJHNTREa16h9n921p7u9b1omFXMv6v3SZISbp+mhLaWgWXfxCj4mBVhUnVmcCyxe6YC8W4= 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)(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?PvD+OjOusBLy7ep3EfHOMZj0O3fK?= =?utf-8?q?oa2kOcNyJZlTl4OLrvVSYvcsM5VF2waxbXxPoDTH2T7NaILEX6r/OYdOrUtFXNHxo?= =?utf-8?q?wubJCbz1WYUKg6CmCQf9CkDDB104NZ/AfQmzdCzC4+VWYjSi6oHeMKfNbXKcNycIa?= =?utf-8?q?gaDwGBjD7C//0SjhlUErtYWhsiR/+nuJS7CYctGpTvngpNl8G2xLL30+zCE6erRvB?= =?utf-8?q?naZSTJAfRvdb31AhBMFLZfPyTC6URwtxkTWBuNOfEiGUNBolIG6XR6CRGX/fzutdI?= =?utf-8?q?wPitI3IhHffk4fSW4RMzBnDIxDIUSfrPr9x2NQ9o8DCIAtLWuoYEhId9qZZMB+4ED?= =?utf-8?q?p2tjK3kVc22Jr3T0uS1LEpk6DukBY6Wp5AaVfqBblcptjnrAVxV0UcOrCQcx4wT4S?= =?utf-8?q?m5fRdltDOHPifgk0XL4Wdma2ka9pER0j3k+g86SA/nFjlhvMgHePzOX9lu6bWysFd?= =?utf-8?q?cqOdr8eBa8r1pa5yCxPotqT5LcDnzx2N0lPR6DFZ6srvtia3HxFgCc6dSkJ4ixMrr?= =?utf-8?q?FjPGCPWsy4TWwoxPhfp+etXeYhq0yLkVGHuOXph9b3utz3cFiCfqv47AXFus0pfak?= =?utf-8?q?3vv5HzPYooQ0/z3JzzpxoQoXzL6eJxMoo2seqQteGhSjKvne+2a9byYLg7nethUrX?= =?utf-8?q?Qg9XA7bLfyYYkafNii9Rb8/hNgCHx738q6NdudkB1FkzvtkXg22vGUNK9adeaANBA?= =?utf-8?q?XTDQZXTK/QGWIGY6d0T3JCtVzmvJBOAay4KjeaMbFrWSZ9AbbFgKaBLJpmp+eMhmc?= =?utf-8?q?YvFcdjeeHlA9OB8eHqxoXM9SCPxVohQCxSfDxwwX2+acIrelTacgSORgl46njW/B0?= =?utf-8?q?B697mNq/jijGdlmZybi7M4XXgXfAsdSPRLDBt0Mq8eNVGpp3SB+8L/BTD3Exbi9En?= =?utf-8?q?WHz7NisTsx1B3PLvce9sARgQ5G2mrwMlY4P1lpAl1JYprAo8xEgTcovPg60GvRWvi?= =?utf-8?q?vbDnayBq1s5Yn0ZimsrWiugsSB/zfYxUHnjHWTqrd8wurLQgMuVC7yy+1bRYez3YA?= =?utf-8?q?X5aUClLLMo9Jm9UDihvXhHQQiG9a+gVO/9cGbTYfAOMIBV6R+JV4kbrSSaWFBJU1b?= =?utf-8?q?FKj4JtrDH9eMgv/fpM4SMAoR+/xv8fBEHXddzPTXLWovVwP11zlNTwHUYQAIh+Vkb?= =?utf-8?q?zOB4I9P3gNrt221tddbPevkzBYSmz+HIOY6Iblr90BYE6LbGBvs/gaLayiwk3B3Ay?= =?utf-8?q?O9qJ2pDKjQp+4i5yvJpSL/ddTYQPynJvGf7wqwPKjia+xGP+dm0h+l2bsU5qkuSIV?= =?utf-8?q?6hQSA16V6GgLN4ckilFyeSQk+WMSw23C8/ykA3FQWzbbq9imBvnDIu1leLe1b7ttg?= =?utf-8?q?TcIpkAYkWHE0lwDTDqDRz4gqm+JgKxZNYGoOa/WHBW3LSvKOwHrwNeUyg6o270xHL?= =?utf-8?q?FIZuVnIGqTNXOk8zILDHsmqVrkyxpjTuTxrZ/vqClYqNpna6YLMbR31ncjkWE3GYP?= =?utf-8?q?VPMsXzsxYoxglBfEtgdlSkm9qdSMPrI3qsobcwKqxYU8MlsjDQ7Yrn8rIDGBP3QDr?= =?utf-8?q?qQxS4JlmxFsb?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65243354-70f8-4313-0517-08db8378572f 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:28.6594 (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: FmTm3zWwWCOyyQezqBomPK4+Kn0vzDyYzjhRdWNJvrvgs0XKREqBgidtgs91aZQ20GJ+k4DoMz8kV/p5ORcb8Q== 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: 1771293469104607078 X-GMAIL-MSGID: 1771293469104607078 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/mtk-sd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index 02403ff99e0d..9e2debd1edbe 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -2887,7 +2887,7 @@ static int msdc_drv_probe(struct platform_device *pdev) return ret; } -static int msdc_drv_remove(struct platform_device *pdev) +static void msdc_drv_remove(struct platform_device *pdev) { struct mmc_host *mmc; struct msdc_host *host; @@ -2911,8 +2911,6 @@ static int msdc_drv_remove(struct platform_device *pdev) host->dma.bd, host->dma.bd_addr); mmc_free_host(mmc); - - return 0; } static void msdc_save_reg(struct msdc_host *host) @@ -3054,7 +3052,7 @@ static const struct dev_pm_ops msdc_dev_pm_ops = { static struct platform_driver mt_msdc_driver = { .probe = msdc_drv_probe, - .remove = msdc_drv_remove, + .remove_new = msdc_drv_remove, .driver = { .name = "mtk-msdc", .probe_type = PROBE_PREFER_ASYNCHRONOUS, 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/aCh0OVdVEBaaa46jIeeseSv5z3dl3ZTmCIakz?= =?utf-8?q?Z4MX/elrSAviKG6tseWL+WcTQqM/KtvxQZ5FFOO7u5I8sbHFnWtwWEHU9CI+s6tef?= =?utf-8?q?4VqKtKHbUHv6U5oJY0RN/pvNfODRaSenynu4MBI6+zoZa6TTuOSwB+u5HIJ+4IxoH?= =?utf-8?q?cKcKMWMMtfLzRfe93l37Jm4x3I/UEgomAE+b+OJnVsgX9nKuTC4o4W5sRzM2cIAu7?= =?utf-8?q?oyfbjx9TI4tztYIXyMXHQFihi3Z82y0ETwILV+O4R+u6w2aLzLx4DN3IWymKxAFD4?= =?utf-8?q?DnsYizdL9xMNHYvcMNy43Apq0sMIXsIepfD+EbgLWv2MzvLDVxoknSVov8X3LubiS?= =?utf-8?q?ijU6cdiJc7/+n27AwHFVJ4cgxfNXlMNxcs5aKLytx6TxIWjdxp4YmnRlaPky8Bc5a?= =?utf-8?q?I0D07DxfrYaT8gDHDZo5VsiJFLyLXtPK/9Vhgxbts8+WZuSV+gbOjx4z+Ro9eGhdx?= =?utf-8?q?xdIY9i8bRf/6xokQgqXHIxFdzDJf1fUmaj5+XmQ2zEZAPuTld0NRz8+1L4aM7uEBd?= =?utf-8?q?D2Dhe0KM5tzZQeyDM6wf69q+n8IgpUeTnoe8g7582e0ymVnXDkkTU8pVNlZXOTPaq?= =?utf-8?q?rJAkwmVq9A4sXpmCFzOvHHXjjk/+QDiFNKS7ntRUn2N1R76YheqxfFTOPTcRnAVmG?= =?utf-8?q?vmpE7DBA4Tvqi9L9kWdcfpmIvo5B92CpMhrvbXV7xl5+VHB5w74/6hvnfnUUR4Wuy?= =?utf-8?q?iutilS+gb8k8ybLvh0dD5o9610St1jm1p/46hau4D8Ah3anUo7NkZWbLZoK+7qcrN?= =?utf-8?q?8OcUaTzrfZC2BxRHx9hIys1Net45VQ6MzzE19/toyne6/fS47CFjZsVi1lVm5Lzog?= =?utf-8?q?Nr34URa31e8LyIkkXyBdEXbDBQJGjvV7XFnSNjDLHId+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, From patchwork Thu Jul 13 08:07:16 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: 119611 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1668259vqm; Thu, 13 Jul 2023 01:14:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlELPMfDB46VrQ4l/CyDxIyB5OwPYdM+0uPfc7fIOy73DTq0o7lHxX0iVjCplYybLgdPH788 X-Received: by 2002:a17:902:ed13:b0:1b7:eebc:884 with SMTP id b19-20020a170902ed1300b001b7eebc0884mr344848pld.64.1689236075613; Thu, 13 Jul 2023 01:14:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689236075; cv=pass; d=google.com; s=arc-20160816; b=tl/tp7hfhGksO6UTKseUBYSuRRhE/KtZSJNkZUtldJMmn1Jv643EstDyaulLndruZO otCXAdyBZbdIn5Ia75tah9W15dHPkKkoDAJAb3F07oMhwFE2hnH67ixN8YhN3u2KVUDi i/AYWX1L+CBM3AvKgNEQhYjlI0epugmEisIF/4wRTNn4rzzJoxpDWIdEfV/35GJK3Pvv t8g1kogPyoaD4k20OLcY/c0lGCL3bf6tYQIgqUHc1+aagrS1WOb3f//dr+8LsXsa2dcy ZRkmfI5cAqQykWtCo9WnccfevQIc1xx58wW92SKHMj6FigjNx9iqWzNXiLgkKQ3lI2ij xbMQ== 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=GBmbgmPN2PB7xhwM2S5ZW2SjDGrd4CXWV0nFzX0ddI0=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=Jxr0AiwJXJwkExxLL+ZSC4D6+Wi5zc7D2LuXJ7SDFjHwMNszinCFzX3Bm9dvP1wWQc Ubs7L62v3QIxsMHuqdb8/ucl2V64790vk42XccO5cNYMienhEnI0EtfL1TiJdWC0wxyu FLXyBuG2Nn1BAs5czbEHZFB2ZFHvxCDuZj6USR4HXS3cdZQyeLCeqRkxMNiuXzDcd1/j Oh+eJMkbTSf6GXC8OrsxBYlU8HguCup9s83fS2JtjmOhhRFsk5KNMbqmIoxqPkOzTw9g 9a3kyxmXfQm2uo5Xn4OdtCBmrfs9RRm9cSzezhpYfsbcWilYKkdv6MWb1YjTkWQ5W1Hm Hmzw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Mb2jUFQd; 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 jj15-20020a170903048f00b001b6833d605asi4742843plb.371.2023.07.13.01.14.23; Thu, 13 Jul 2023 01:14: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=Mb2jUFQd; 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 S234092AbjGMIKi (ORCPT + 99 others); Thu, 13 Jul 2023 04:10:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233879AbjGMIJs (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 8FCB3273F; Thu, 13 Jul 2023 01:08:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DyISleTuR9mTcZ9W5jANSz2+fRRBo2fepgRDvwulvC2mhWpxRLb6kmPpHHL7YtCGWgjHPK7C7wQRSGLMOt+zr9BOtTtPUHC7wcyqjIrpdf7Q69qGMfDAZw3E7+3Xe97ks0Vcz1SheSSvsi4C6uRut29duONCesLLdvLMDeR7UkCC3D5O71yrXDK/zI4uJg+Yw4BUayfo368Gh2a9zj8xy/VZ0lO5+ViMQODl6YKTAQl1CAWu7zQ56aBhR/R0Wyxdllnrue2D3fz+Kw1swvbLhUguvV+of5OcZzWEXUWfxg4NP41dfYNJ6TYAjR3BMDE8SiJpLIbYD7MpbvA6Ajq60g== 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=GBmbgmPN2PB7xhwM2S5ZW2SjDGrd4CXWV0nFzX0ddI0=; b=ZoK+yUhggWfajeDUprqKA9v+r8ovBzcV75DDbLHBV/COwGdH9agih0I2LZAOEkCZ/yUhk/+jp9qPrEHX3aKxwD4+aeTME7tG0jZ0U8dCJpvk3vxpdZbeyyk7fqZfQ1NgIqkAMAFiqBsCsjqg3t5smpXqEFanjwB4EQOtJxxAFC4zj44eFs24+lgqx4jNpy/CY7c2DlyFvSlJoKYisgV3k2m5BsXxQdhzEqf7tYFGyaIVm4kCfGl+2wpP5k/I+xeB716hP7M9TGvuWMc1l/QRxM8jpbLbC2N/nGcxO4cNgOp8fK1oViW7bRe4FZxuh1R1coxiz9nx2Oel85C9wd3Yqg== 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=GBmbgmPN2PB7xhwM2S5ZW2SjDGrd4CXWV0nFzX0ddI0=; b=Mb2jUFQdWCg5hrDfY/OaLhKG+MSJWIPDbF0RxcWxYaNyw692k59MzX6cWtFJImNCANCcmh8KrRt8aI7TX4YsNs/26jLJh8nQ/Os+ETZ8HMHLNn0JupuJ/Q3Q5q94gn1Jo2fsXEDyTK6tKM5Gw5+Of0Zi8SfCf0Wn6ZG7Sf7Q67lZgp6xnsIsjOqiG50dfwom0k2qU+ucoHaWDrg2Y4kqw80MywjOLlRONz3LA1rqc2KEetLZpnRWugm0eDh3968uuZGmjYaCbRoMsgBqwSWPz7aLq8Gta8N5v18zIsgCJfoDRD8e+emhu1dhjNcK4IYfMe8481O7vTky3L7dKY2QAg== 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:32 +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:32 +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 07/58] mmc: davinci_mmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:16 +0800 Message-Id: <20230713080807.69999-7-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: 4f629f65-9977-4305-23ea-08db8378592d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: B1f8uWHkh8/kk6h5YiruNSZwowt2K1p64+smHAS7yS87J+2pFXRQBpM/DzO3sQwqDh3eHDaauC1NtawJpLvoABe/Dt+3Fad+P+H8ucOqTlBF6dUeYUGAE5nCbWrybRoFG84D0tyFLTcWRO3ZM5vfSkz63fofDGHDcThmY80VjgX4LR6QJF2yY0fNIMmFbLb8JA39/no9nRdomjDxFBI01yGd4r9fjZa9uSy/bNgOBKvrjj63Q7FvBsEvBaHeL67wmzeITGHS/69cUxw1Ua3m11oZv/puVI5pDNPHiH04IiYmI8z5ZGpvidUivb5OMyhxiGt6dFncAMNTEzLjjlrHFGsuV+YicqujPuK3iXsx8+bx4Gzp5FLoEHiRWn+yAL2JYrYhn9fcqBNh2Xu165vmGuy6wfwfOJILWUWZsdRM8L7zmp6FMKWjYzAYxPVGc5mLUHULrqSrtdWIW7wkT1Hd0Q2ZW7WjuqLoONNGnUaj4wUSfKZyo+cJWb0W1Jxg6nP/StUbrC3mMDCsX1SqEn5KnOB7lqGNJ+Dpz23+NyJF74ngssWHk5cdJJ3hFVnH+OZZENDH2I3dAEhex31wbym9qP3rxWzXMUVt8XnAgUmk7oOJuUi4XIV3sfug6igqHgMlxtZ2j6AW48u9RVE4pQsEb/US5Zh+WHeLxOUXibCGjHc= 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)(6916009)(6486002)(54906003)(66476007)(66556008)(66946007)(316002)(6512007)(41300700001)(83380400001)(186003)(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?BusXG2Aco3Fqee/kmOxO9Vk0dWU5?= =?utf-8?q?jW0mhh4NFKSS84NMjfP9XboaV6wDycYudrrQUz/fxYRVNkiEQgxY7iw+ntjnRQSIb?= =?utf-8?q?1yRj123R4s/Sf5C6bcmRHwDz4lgv5dyQ2LR+uxHho/dNqVzkFMgW1JQOLBePxqLk5?= =?utf-8?q?eIdr8T9bJ867qMtJBuyorpNCaygvAd641hd2oK1cBoECj3Lzkj2h//duc6JPB40EK?= =?utf-8?q?Bm1qE91/3XO2XCpvE5IOyGxJj9f4YP3Lsadlas7pX0tkDcedZRKDLg/nh8HcomPKQ?= =?utf-8?q?Wt8qq/eRfwStxEyQGStTkFiqAqnlRb6XdajWoq3NkUWgZ73ayWPc5j+bCsd/Z27z+?= =?utf-8?q?6ed8gXOwF5ktA1KW4l/EZUnL29sRvoQqW3q6mFP0QvcmU1nV+RSPxQkYfD+Ni2s0F?= =?utf-8?q?6X31LqdBsBxlkfcplT77UrB1mVHJx6r3U3hB5iGzsswBHhg8ShB2bcTIYVU4E2Srf?= =?utf-8?q?74JOAvrlir+4Yy6SurIPpSR418BY3BkTZZoelUlZd0vBWC9FNfYsdacfSn1F1Dwp7?= =?utf-8?q?dYPDXJi8vOYN/1cARIc8LGY+cwl63Fq8J5nFd1SXpaBL7LgJyLPTand1mmp4sFARz?= =?utf-8?q?eAtmuxjvcedqJCIovdLxnXB9TFMDWYEvl0YwgdgiusxOl9l9jwHch9QCQSMfR0mkg?= =?utf-8?q?n2e3aQ6Tou/LlG0aDXI1x/RXEYVFXVyyJ9cZtz0Hb4b5CBNIQyQ/P+78NBwweaL0a?= =?utf-8?q?jOIsAw0cPZ49KWGhncjsrv7F2Ydsf6vyswIovmbLh717RTcRu87ua+CHaSGX5uzwC?= =?utf-8?q?8lk2YPXtTK+yr1cbuyoBEmDx+uFzlWn5cYfQAkdz/kals9BvPsYgvJQsgMbCBOQtm?= =?utf-8?q?dbw5Uy+CD1TuiuUWM1tP397Wc5T61wxWvSMWtyVSBMfsuATG+cNHJCRDV89YrvNvj?= =?utf-8?q?Eh2R+9g47rfCEhQPLHuA+R7HZS/wSbVVAVbWzr+XUIL78Bv8K7KzmCyX2cdP0mJRc?= =?utf-8?q?b/cL0hRZNzIzsEyJrmA/7rvxvw7vVnQFDgvt/sWybFKcDUQQdX5gtGUX50fWC4ax1?= =?utf-8?q?M5cU5JHTzi8dWjk/jyd+UGOuF1EJita89BU3J9DGJXjUg5en4uTnmb/oAL08EnnGh?= =?utf-8?q?T2UQRU0omJkpYLktkH+3n8EnECZVXfpQ3Vv71EAdHcXya5JulISeU12TAK4X3vINi?= =?utf-8?q?+b9/MD9uFBqwtuL1TXfYFj7fqh/EQGHUMCs6DhuqdZkthBDJmHURmiGUX/DR3DK3K?= =?utf-8?q?+cF9SXvJZkxd47ixVyG6RkJiVk6mvdyOs0OawW6megjGobPoXzdUS9JZWsa82Fq8k?= =?utf-8?q?MjeXEcQPH1NALhm4IPhLlNe4Rare4oWZyOgdds9Mphoj4B0ZeULovgLhl5d4sG37+?= =?utf-8?q?aAs4LUv+GGp47jBqTig8CTIyZZqziCX7EwlC1VxXp99pUPPPKNk3v3vyhFKv7SoEf?= =?utf-8?q?JTvmSA2daXfRwr5giZJeNoMJv80YBXWbyT5O0p1iOAzPwGTybtim837ZcMEwa27wV?= =?utf-8?q?+16Lt9HKzSrtAk4mb8lboLZAbuqFYwVLIZHxx1oZLpMPeqrTdu6HvDMb2/rBgXgER?= =?utf-8?q?P3AjrXnuD480?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f629f65-9977-4305-23ea-08db8378592d 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:31.9944 (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: fgckOsaNr6/uPQhFXpvEttvE85IVt/77et5ffb/6D/JPI/l+JsRndPGOObDXE5/8yc4cBdC5WK9oL4595QbV4g== 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: 1771292407524913648 X-GMAIL-MSGID: 1771292407524913648 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/davinci_mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index 7138dfa065bf..0a08b85e35b0 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -1345,7 +1345,7 @@ static int davinci_mmcsd_probe(struct platform_device *pdev) return ret; } -static int __exit davinci_mmcsd_remove(struct platform_device *pdev) +static void __exit davinci_mmcsd_remove(struct platform_device *pdev) { struct mmc_davinci_host *host = platform_get_drvdata(pdev); @@ -1354,8 +1354,6 @@ static int __exit davinci_mmcsd_remove(struct platform_device *pdev) davinci_release_dma_channels(host); clk_disable_unprepare(host->clk); mmc_free_host(host->mmc); - - return 0; } #ifdef CONFIG_PM @@ -1402,7 +1400,7 @@ static struct platform_driver davinci_mmcsd_driver = { .of_match_table = davinci_mmc_dt_ids, }, .probe = davinci_mmcsd_probe, - .remove = __exit_p(davinci_mmcsd_remove), + .remove_new = __exit_p(davinci_mmcsd_remove), .id_table = davinci_mmc_devtype, }; From patchwork Thu Jul 13 08:07:17 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: 119638 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1677483vqm; Thu, 13 Jul 2023 01:37:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlH+zHeuT7qv6vkrY4NwSko9n1nsAurrHvDFVmF5cwzhnffRB1haP5t3yMSX7VU79b45DZAw X-Received: by 2002:aa7:da4d:0:b0:518:7cf5:7ff8 with SMTP id w13-20020aa7da4d000000b005187cf57ff8mr1203323eds.12.1689237459808; Thu, 13 Jul 2023 01:37:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237459; cv=pass; d=google.com; s=arc-20160816; b=ZO45mG5Aek90XAWc4BFmPsdCyFK5+DEosdp8DdN4SQJ3ZgMM1w/ZZHLY7GUaN/USbj RXrcOztQf32X1nRzTY/wPGpphQ9GeajkvcaFaVNOX86sqkN7+WCf8Y9a5o6cXdfwsFL1 fGHlGwP1I3L5rgkWgljVaIaEV3hY5ZyENOsu0gVKqL2H121hyDIN/+AKOUlLTZW7vB2J 2YbtNzyjHyAfPoHOTuKxc7dl0Kz4VZxV1oaL2AGUkXea2NO6Qq0K2zdy+HB013fiyAs5 RHtm/7980yUYcGIwKg3BQgQfy/9yRT8ABU7Zhpk6lurAl5b37OxnSRf/8M+TPID66ZFD Z+kw== 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=N7okkAtAy4Ay200gbDx0jngJNeo2uhW4SadPJUa5pIw=; fh=vEpmipvtuUUFFWbFJZgk6ER9IoVi7xyBonilERpGTtE=; b=jxlmql5MKuAiMkfuND7qogvqrX6S4i3PcFiG7tkKWcJJlfuB1NHbe6BcXCU9dDv4cY XQyomr7Up715fiR8lMzukG8pzb7NvhCUSFgj+E42axjxYwNFl2YGFsdUIWtkn58dfNpQ cTt99asCc/hMqDn0iU/VekybMmb4Qv+YJY+kJapbHbhjyPPI2ycBBDuluzAcJZ3I1b6Q /WEMy+Xhh1gv3uVWvd5f1gDiJdhO2qf/GIqojimolZZCt2YgHNtcl2qXY7BH7JNJUwsD 1v8TCnIL0ubMWJHZtlrIcypY6/btf2Q/XRntqMu1suqHIbvMq1IGzn5Vs+WULccpkDk2 isjg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=pl+acn1c; 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 d4-20020a056402078400b0051fea43cedfsi1789671edy.384.2023.07.13.01.37.16; Thu, 13 Jul 2023 01:37: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=pl+acn1c; 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 S234098AbjGMIKm (ORCPT + 99 others); Thu, 13 Jul 2023 04:10:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233881AbjGMIJs (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 C99D12D41; Thu, 13 Jul 2023 01:08:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TYI7UOqfntP3lAzRhHBWEC8NvP0y7VqIEmP38m5h0qzVTGp8fgFtjAu+UP/tf/pSx+WyVJKPA9QsAG3CKijMjmZ2QLZEUQOuzZXMTYC+eWthcaxu/HZS/MxVcbRTD1xsVSixU+ZBHvIQdzhzjZNegHWR5u4d1SM+hj8WlnNjN5+gaYaX2DtncZmXqcj0eTF8MRdoYTNo3kfsYtruplDMa2LkXKBMYmM5yvMa43S2qY2kJKNsAnPFfyU0mdHQs0dbvsRiAehHccnfMBeF/z+HnfxjFINFnlHmfGMyJfkO4ZQPgyHh27kWKwS4G1DDN3ExKfFbMjToJJSt5NcYsfYL7Q== 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=N7okkAtAy4Ay200gbDx0jngJNeo2uhW4SadPJUa5pIw=; b=LvktVay3YTVhdTqxYwhVJBuKkSCu50aNT9UMYHPlVRrZ7P8hShM0Mtca4TcMFRJqVRMx+HuaoUXqGJ6fP46+htwNc4ID2SwqmWKPVgEoEoVwPFw+Qtucs+NgdlZsbyAcTKsHKTAzsQaeDgcl+N+Ggtq7P+mSNYmjaBB/dLbzrxwJUbaFyQypkgzae6TkGPDQhJG/yOMxlaSMR8KXmhYrE3/6NWbWvqNUmJxN2GA8BLEJGwtVZ9U+cj6TbuyaNG0YspR03+ITw6NQlYYgAaxf6IMNdI0BcbZAARuyo+rwffVDRqPqd8FRdPsrm+UyCiPDkdY2FUEVz9JIQG0RNlcWug== 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=N7okkAtAy4Ay200gbDx0jngJNeo2uhW4SadPJUa5pIw=; b=pl+acn1cSrbxjBqOq3SwzoPXf0G2eXIdB0v5lO1bMtNWpNDUXKutIN87T3S40kfQWSF+FXPw5gmwgi7lLUGT6MYXgUL5py/n9KH17nUKdFOuYyXDTSSBaufx1X+x4cGzq8b2GIyObyDgSyoc9IyD8ruJQyX0QqT6uC/8417fJ7qyi2N8TkQZQnfwTFzGjtv88aCUQPHK2kIJI8xHz/Qem/2suHqfC/rHpp6UYT36gEPUs14IgymQuupQ/wui1k4phL1H9m8ynSA3LMRhIcdhMWuEY9NHVvoikGAUZTsGkT7o97yxqvwLMYXCJmaCjdkHIGnPgwx2YAZt1J0IX7D/LQ== 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:33 +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:33 +0000 From: Yangtao Li To: Jaehoon Chung , 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 08/58] mmc: dw_mmc: hi3798cv200: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:17 +0800 Message-Id: <20230713080807.69999-8-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: 1195ab68-5db0-4687-d3f8-08db83785a0a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fK6oeS92wjovEoWqY5W3bDstCdV/+St2nk68mW00A+oOsvabjR/UnKcpBWsTLvGCeGS5aTSkDUeopleuKiO/3dBO7M9SKWqnaEXbJSrBvY0qMz8oBF+Zc91gSRLn2V0cN5XYXcRv8q6TqgF6QYRhiCxjk0paj6LdsOHelFzVmy7DmerumZ/kGef2HZU9AU0i+C71AQzCTPt7rB2V6LtSkmGOuLLrWQ0cY0lh0wIlO+hlsXz3TTkJDTH1J6lM4lwqej/HMH4WgBRQS5eWXJvVhP+TgdchtUX6J96Ln/WM9dlptS1Co9aIbOAI/sHac8cjpGYiG21PTgzTk1R8oUjEQskt1SWANyWH8K6yD6kJt/CacSgS4GdWvbpF/+45PDaseC5j4PoEmN1tD81htf4nUfuskxqXb5/doGVI88wLNwsP/CAkNnn7ekIG+nj75KF6JiVlYjxP0DgvCmFm6M3NazgsOEz3utpq5YHVGyfEimDyLCfdQb9n8mb75zjTVbU6+HHb8i+TcMxuj2YEeZO3wRKprqGiN46J8uctW4OjKLo78IKi+9C718zz5hyusVgbMXaCyMev3aO5NDP4tOU5wboB2btJeFqeVbB/42a0R1NKAj7QFtiW9xGJqSWwQDlyQq4BRo8UvrJCEoSslOvL9+vD/ZJHNvNoWMnJ8QwMuFI= 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)(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?/cM2/N+5j5UejlRRs7k1nC8wDh40?= =?utf-8?q?R72XrPV307McyUKQWUEoJAcXi6tfp50Invh/w5HA67yWQynvo7kA8J20QIIbbsZZl?= =?utf-8?q?X3EgFj5ofqWVQ7nwisXwDoc3f8Z0kMF31E+0C4kXMgbksgY7nWWPCgw/svF9GXECf?= =?utf-8?q?pVtsuAPxpV5LAYcBX6sjcyOJJdgFwwygLMBAQevBMjy+LZJzjmIcNlH27ixYfuI/W?= =?utf-8?q?PdH7uDhC+BBvDNVkaOIqEd0x0ZGok47mT9ZNXE+ywHqvNsHo6Wg00w7D4hbeHDhBH?= =?utf-8?q?PfFMNbRZnoVrejK9bm69cnGz4nTh7mkZ6zeb9BB63ZZ59vTC1gM7Edn8ArKPuIARe?= =?utf-8?q?la5b/DEGygJooBG6Kg5+GHXph0GKOn1e1ybLTF5zgMI9MKuov2KJzGNpwaqg7Zr95?= =?utf-8?q?eIz9PLPxY9HjMiLIbjvBYYYiKk5I+XUNgJKiH4J50XqfBgx4E8GATxB1lqTEvjGL3?= =?utf-8?q?WNNzXWVmK8ddKYfl8/o0HqgXp+oZBhODOcU0+GlE3W1YFI0F2vba6jBxJ6wwLEWOy?= =?utf-8?q?AyVo8iy96faAuCw3yFUTPR6c9G2hGVAQSbvb4SH2KRUskW0gvaXJ8SJ0Q88a5wlKE?= =?utf-8?q?SR7uUaIOfsWgMmX/+zK6Y01mkTK+yYvz0PcQGf/NMdJ3rYrx5LLUskHxwtyAuPoxi?= =?utf-8?q?CXAq1xk1fJVziDljSTrQfXjZ6/3csaNGwtSiHPuX1Difl6F4Zv9NpKjexiWMBVVZ6?= =?utf-8?q?u7BDgP0KSqq0yDbfPFCxxenuc3CBaM26Cv6YvH6cecEiBWrFTLRHTZuzkUSe9iANZ?= =?utf-8?q?uVzHS3fbVz3B15YpFdemyWGIPDBoIpN+cmkIW4R7nhFQvEaGMa8ak2/eF2kjU1i2N?= =?utf-8?q?6sESUIGfLCwZWIhX6EgRs2Q/kzx5PsYfjVdNsMVcAigs+kYehYmXMfdW3jH5Iet/O?= =?utf-8?q?njTOwsghaF7YqBEX1saaahsKPHyFUh9drvefnBqFtI7GGKQ6ydcVx4OP4h2eW+ocW?= =?utf-8?q?2E2Ap6mRAv22iJ9HLjjpSGw5mWG3HZRjafcjEKr/LrIY5PbGYbv//uYgQyJtUo/+H?= =?utf-8?q?jwQ0K5lDiF3XYFyO2GTa/E5tjLlBfiDvnVFi99+8nUl/YhqeKOHxJVIOWehp1IvTU?= =?utf-8?q?ec+VoA3ynU5bsWwwuAOfucp6aJgHL3ZBnR9HkNTFPdW+PcPCdkgxfvIvwYR0Cpilq?= =?utf-8?q?MND+p+y++LMuNPIAMbeNCJopn1h+I5S13pwDFQb850cihs+jKHc1lJuAwBvAXeBAk?= =?utf-8?q?DnDKTQEchZrSDJ2+LDN5zyim+fQAZ8Hfiu3HeqUzvx6SzYW8bE56zKnq84sgzaAIb?= =?utf-8?q?bRdAJb5HwkEoYz52H7k85PsFVYKQ3hT+iJ/DpmPxoHP4SAiUvxRJHmgqXf9j9mlVX?= =?utf-8?q?FnoXYCsr/FCZwBf9KroufvIg55eLMI3oiBFdZQdTAsWaHpXNFC/qWnWroZ2YGLj/a?= =?utf-8?q?hUzxNyyMrhftGhz8m4xNUEzWKoRVP+LOcPvWatqe25DHHN5fssOxKcU9yr0f0SXcw?= =?utf-8?q?g0jnlAaFRt9CaIdwLFV23s3nj3grk0sWyiO5Z6scWOKc8gJyt8E0SKqfo4TMYWapz?= =?utf-8?q?QQoNpDuh1zbW?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1195ab68-5db0-4687-d3f8-08db83785a0a 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:33.4432 (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: vsi6rngAUDWYJnYUC87jBv0E41knxjSeE6sVhxu7X3QF4hPv8mWy9I8Qj8YNzX9GUq3xYC+3+OA+yBCscKyLVg== 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: 1771293858378000150 X-GMAIL-MSGID: 1771293858378000150 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/dw_mmc-hi3798cv200.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-hi3798cv200.c b/drivers/mmc/host/dw_mmc-hi3798cv200.c index 6f22fe054087..e9470c50a348 100644 --- a/drivers/mmc/host/dw_mmc-hi3798cv200.c +++ b/drivers/mmc/host/dw_mmc-hi3798cv200.c @@ -171,7 +171,7 @@ static int dw_mci_hi3798cv200_probe(struct platform_device *pdev) return dw_mci_pltfm_register(pdev, &hi3798cv200_data); } -static int dw_mci_hi3798cv200_remove(struct platform_device *pdev) +static void dw_mci_hi3798cv200_remove(struct platform_device *pdev) { struct dw_mci *host = platform_get_drvdata(pdev); struct hi3798cv200_priv *priv = host->priv; @@ -180,8 +180,6 @@ static int dw_mci_hi3798cv200_remove(struct platform_device *pdev) clk_disable_unprepare(priv->sample_clk); dw_mci_pltfm_remove(pdev); - - return 0; } static const struct of_device_id dw_mci_hi3798cv200_match[] = { @@ -192,7 +190,7 @@ static const struct of_device_id dw_mci_hi3798cv200_match[] = { MODULE_DEVICE_TABLE(of, dw_mci_hi3798cv200_match); static struct platform_driver dw_mci_hi3798cv200_driver = { .probe = dw_mci_hi3798cv200_probe, - .remove = dw_mci_hi3798cv200_remove, + .remove_new = dw_mci_hi3798cv200_remove, .driver = { .name = "dwmmc_hi3798cv200", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:18 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: 119649 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1679138vqm; Thu, 13 Jul 2023 01:41:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlG/qQpaLFzRgWNgzfc6UpL1SblYlBdEJs9w7XTD3c2CNMCxgHLpuSx/8rrl+gym7gsas9fi X-Received: by 2002:a17:907:3ac2:b0:993:d5bd:a763 with SMTP id fi2-20020a1709073ac200b00993d5bda763mr744121ejc.20.1689237709858; Thu, 13 Jul 2023 01:41:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237709; cv=pass; d=google.com; s=arc-20160816; b=mEYZqCrSOn/AyJ1L2ei6DtJtrTXz9LAb2JY24pZLQX4j1GugG0gbKm1ldPDCXwyOqt EbJPe8XURTgJYQnabjznbvp0OFYfSmZeo/Llj/p6Rz6toYGbEbumcjXRD/Mvp7kSKwUf 5jiBDVQmDFpg+8YMW6Rn+Urf20zrXN8JnW7nrcdvzgFvocZJvOsPLTXL5KhUhb3s37ST h/wUnNMml+MGNmk/Y2Zw2/+dUDHvbVNyt/WBzKBc1ayGtbc/WA46Q/8PlvolYelE4Loo lGe76MAH9nrcpXX8t3IuuKC4l269V0hT720iHuLLlE2T5933Mh2NSukUwBWOESvz0jNZ fRiQ== 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=df1DKbWeg+xqkSYPtOjL8RorXDmDCAUtgwB9kJK//H0=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=sBjMb3MYYB8CAN6bw2Zphb6zhzROwmds8ANIp+kxfyAeIo9EdWUVNqXfzwwtryf4yb RGY59lelfXDXSzyF7/LoB0JtmTfJ/nbcfarI8BaXRFuPeZMhCyzjHrU/N27S9mt/bHU6 DIRitTQgDxhlcusrLm+n1k0I/iYSTozjHBbsAYBGiowAPF9ILmYjIX1IrGnO4o8PeJf6 ywMZ8q1asQzeWdR+6Sojp5a33+M3FOOMlcH2sGbB6zKvNLD2K983UueisaxipuCUfjHn jgvuFZVHo34aaX55nyEKdiJ0nZze81TdHvQN4brxToDHHfP+h8APrIktRPFtEjJpOi/Z shAw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=md32cjf0; 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 k9-20020a1709063e0900b00992860fb029si7601902eji.642.2023.07.13.01.41.25; Thu, 13 Jul 2023 01:41:49 -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=md32cjf0; 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 S234127AbjGMIKq (ORCPT + 99 others); Thu, 13 Jul 2023 04:10:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233906AbjGMIJt (ORCPT ); Thu, 13 Jul 2023 04:09:49 -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 1F16B2D4B; Thu, 13 Jul 2023 01:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hWsbBNUvsk3a6tHrEl6oUj18qkavwE4pw4klaIPY7vE6EArw23V6UuK+Fl3coRFqbloPaHSPNkT2CxeMuzN6UNa0cqnKmM/SPEFOq+39QVLLVw7qjn7pRpYiLGPMoZsznzzOTp9gi1JgfX31G9+J91pCTvEm2xlS993BHJ2Dehuw3OQuwq453qPDANlJnzxlZzT6MMElHJx0CbQXJx6Kgg0CdCM+whu4gj1LsW++7IElQP4RpeXDfk3ZFm/jysuWpo7yRJnSrdNilfgfungHERmnV2dEu7cYOcSE6euBNPLibTJ+uy1q4MycGBk5mrsIWOlncw1F4/5hU+dWHiwwVA== 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=df1DKbWeg+xqkSYPtOjL8RorXDmDCAUtgwB9kJK//H0=; b=ONNbHsFEmTxwebA2oPN5iJvGOB/OQGPOhokU592wVO0MMIjjKm3aC7fvyxbVcgSwGiVM/nDwJgxb25qmw4tMsQyGd54e5E0GAQ1j+mARi+3y5tFjA6FuvD9wDiAOPISN4e+clz4L4mxnywHdhcSWBAu6gx3uGbl4GsMfl79PQl6z9IEWL0wmf/fPn2yVIVEKHkNAQOZGDjVKjKc45gEBS8bHR/HjzZ8TqQ51KBrSn4Fgy8BJw98G9ecmyXyqvoRbA1tVjdxxwfEMAgTiWMLCoNFpvb+a39MqhZHwSOGoaYs2vh6d1W/f+H6x4T/e8sm/FPxuOzZ/AFMGHx9cxuFCzQ== 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=df1DKbWeg+xqkSYPtOjL8RorXDmDCAUtgwB9kJK//H0=; b=md32cjf05J8ArcVzr9GIhN1Qx901qVLJYNE2758OL/r3P8Wfwj+nRjGlhImWOV5ExWgyOIBdUvIklbcDMk/DGECmheyLvbNPdTL3lJcUpUDzUQdW2I8ABpc3JyKQtgItGRhd91sbjF85bjeYE9MwMLxyEapRQLiy5FOne7s91PbarMIl0sr7mKDIw9+sgGU5P8oRZgiI1FE7+jAsQEKeluCUrQIvmWAJBFoOD6bpKvRuQGJd+ECjo8LvT801fisfQLucj6551HikL2k7Tbe11def0p0CzDrerHpUse4pDS1Sn4k6Wnl6BDqkhjr9MW+2EXBqvezdFAuSduk3KLotBA== 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:35 +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:35 +0000 From: Yangtao Li To: Adrian Hunter , 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 09/58] mmc: sdhci-pic32: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:18 +0800 Message-Id: <20230713080807.69999-9-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: 0be406aa-ad09-4cb5-e66d-08db83785aea X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6sXIRJAaaQTil2xgkLIa6zzhcqLzxIXTDUVBneAwcCqFnOkbBT7v6VPACyMYew04G5XuArfvjnoMeisUlhRiBiwcx2K1TLA9opJbp0OtqNizTluQiQ71ArJILwQhOakBiKDbsBpurzIDaM6b8xiq2j9jv3pNbkqSl0qlnFj7BzmkWsRE4nxp7NUFgcrD6kf0eK+I+46PCe1ECi7HgjCaWOF4NEJlQOMzUZJPlnQEQY13gMhuQx02f2ezvdrQkpcSPrcHGRI4dxLUwIz5qePPacEPCjWD3MEKwTjjlF79B2EWPj0qMZwd4HrTrfSkDwgMYW30dyZo1PjNkpOJHe2Z/sjmMSEdDzpAzSiyemgmta48iC6os2T1N2fv7TScwfNPETzaNvP63bxgF6mscCNF8s5aYTnPJsrXQrMxtwKDabRlBxbkUs29agwAj2div4ZHxGjaHSdeCkoCvqFdFOfve2uD8Tqw+p6QEVVSY2fwaMFdwCjxFuAjldx7nPbBX1o3zRivQjnX6SUvDLt6b+qvDVLp0FJQ77KzHIkab6ARRNKVbIkDCeamUJXTNIScSLv7NDX95gOSKRKEUFHICfoqagZNpef6sP/VyU8GBV6xVnG9yV98tA0MowjMgHvC3vFVij1T2jlRKepYCB1XroqWxTPweiyd9jc2ma2qz6eIXE8= 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)(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?nnEOvFBGkfOk02RMTTQhiwqhFcXb?= =?utf-8?q?sKfRxISdauiAjoGblczQOCfzHrf/n+lfuDihKRkue1JTvXAuV4jQf8pnsjum5LAWA?= =?utf-8?q?G6Hry8nRdzRcQS+Kbb108q/cXWiW2G3uwfviDyrCVItTHzHUzzO51WZqthCxFZwfa?= =?utf-8?q?sCszv7awMc88PScT4N+w9ZGRXRAk80D4njQpT750svfSQyxV/OK5tQG99Jroxk1dG?= =?utf-8?q?iUy7DHkfkIc9oinWP68DbOiGFpHxj/tsw1YEp0v0SUmdJo/SmA4dp6tLMBja/52Vg?= =?utf-8?q?STsg41Hm25xxEY6IAyesiTbTg5FHDj6KJ5WrybHCWCWtjhq9TQLhsD9WUN436Ymzk?= =?utf-8?q?xf/jv8shi1CS7ju9Sou2ow2qymymV2O1w945ldsn8f9JDrwebVtQnFEVCYu2P83eN?= =?utf-8?q?vUF+nX7aTqKDs+N8lPT86hdVvk2WbDkbaxmXF3OuEaOsfTtb3k1OzvqJ/bHZzh6CT?= =?utf-8?q?JjBbTEO+qSmW20rPw/bLwnXYmHDO0IWBy7PaknlW5e0hkjSziXcgSceY7pE/6b27u?= =?utf-8?q?Z0MBpqOVx1lVU5YChuNrgWiYPnXH2rLRim/qsrfBFHloK48BvfgDLbkM1lUOo3xQE?= =?utf-8?q?pV3ucn8bc1bbbjynbcTS26O3PSFI+1RPg3sihC+hUJjhRBm0hAbNywLGQGcHIi99V?= =?utf-8?q?frWJf+FKXTb4W415R96+3q3wOk1JFIlQhF4N4JGlk0zmM9g9yBV/1LaWSCU5zg4d1?= =?utf-8?q?zRJ6wJMv0GCgPjg4HcJFFEQ2V8/o8gnDqoXpv8KNeSjCYy73z/OMLlaw1h+94HjKz?= =?utf-8?q?nTwRnEf4GZSzq+sx5xSld786/NXs3ottb4oh/nMXGK3SUIO3dotmWavC7PMfPWVE8?= =?utf-8?q?kSBvLfqf1TY23QRN1KfFuLuuE4y5fYqSbFfajwSviwy4kgyrzMueS/9Q5RoqfvtEa?= =?utf-8?q?S3dkv+psImtKmpe5iI60xG4ZFag0fsEVt+V9MFqQH7aIJdMxECHSqAaQYO7aqcdcn?= =?utf-8?q?vTpFe9H3ZwWh1A3s+uTyuMyFLAEOYZaLVtmHCMdZyrIB2y3DO2AuvpTaD/8QoIcJB?= =?utf-8?q?QNOcNi7nOCOaFLog9kQ23IsGyzmucXozIkGXHjcI7N3eKyAQeFJlpttj+09GbPl0i?= =?utf-8?q?fNgxgX8D2JjHsueL6FRDJcRimvoFkH09tNkVu2FVzEzBvQieIFjN1GjLaNDfY2fAq?= =?utf-8?q?Y0cPfPuLI/VidnJB9H3Z3fyhD9+y7Rb3+jwe4l+4NAGH6JocKrqm/XUlkwEl/UFW2?= =?utf-8?q?0A9Jt8zQYnMsdIncFawjyWQE99YF1w/xZFqnGx+0Td/9tCK0HiCu0hB/OGhUqz0JX?= =?utf-8?q?gScA9B1hCBRuF1R28H/+UmOyRSEXB+hzn5568SYL6D11X2/byO3LGk5xwck4VxtqX?= =?utf-8?q?AsKeBiMRZJTUbSvNW/6iBfg2OmlJDn/xrlsJN8WW/WBa8maatii6qipmRcuZafi+4?= =?utf-8?q?xZ63OyX76mH5km0SmlXTcfCvdJ/MSRxr2AAY14v5ylFPKUK3fX3+JTOOnfw3ppUoD?= =?utf-8?q?p5Y5BZNvRP0uNYNxagHEJ6c/bt2JyYMYJjxpFD1Yk+EB2iT0QgpJ64ewp22aDQLpj?= =?utf-8?q?VCSGFbbrEN5o?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0be406aa-ad09-4cb5-e66d-08db83785aea 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:34.9133 (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: BLVeSGbNhLNqPq6XDFU0C6aZIxTTEN7fyCwZg9fUU2uw9tvNnF+ER82Z4q5fFMmfjeUvAKLOW+cnV7YPLxtCLw== 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: 1771294121183484775 X-GMAIL-MSGID: 1771294121183484775 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: Adrian Hunter --- drivers/mmc/host/sdhci-pic32.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-pic32.c b/drivers/mmc/host/sdhci-pic32.c index 6696b6bdd88e..7a0351a9c74e 100644 --- a/drivers/mmc/host/sdhci-pic32.c +++ b/drivers/mmc/host/sdhci-pic32.c @@ -210,7 +210,7 @@ static int pic32_sdhci_probe(struct platform_device *pdev) return ret; } -static int pic32_sdhci_remove(struct platform_device *pdev) +static void pic32_sdhci_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct pic32_sdhci_priv *sdhci_pdata = sdhci_priv(host); @@ -221,8 +221,6 @@ static int pic32_sdhci_remove(struct platform_device *pdev) clk_disable_unprepare(sdhci_pdata->base_clk); clk_disable_unprepare(sdhci_pdata->sys_clk); sdhci_pltfm_free(pdev); - - return 0; } static const struct of_device_id pic32_sdhci_id_table[] = { @@ -238,7 +236,7 @@ static struct platform_driver pic32_sdhci_driver = { .of_match_table = of_match_ptr(pic32_sdhci_id_table), }, .probe = pic32_sdhci_probe, - .remove = pic32_sdhci_remove, + .remove_new = pic32_sdhci_remove, }; module_platform_driver(pic32_sdhci_driver); From patchwork Thu Jul 13 08:07:19 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: 119621 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1668886vqm; Thu, 13 Jul 2023 01:16:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlEmGQyq4z/o0tPcrrc4posGSVCT0EMV2S9C2fypnbOAys1W6PlK9awU1X447Bbi2wiE7zA5 X-Received: by 2002:a17:907:8a11:b0:993:e691:6dd5 with SMTP id sc17-20020a1709078a1100b00993e6916dd5mr1050095ejc.7.1689236166133; Thu, 13 Jul 2023 01:16:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689236166; cv=pass; d=google.com; s=arc-20160816; b=H9LdHM1VYmFHXFf9tbJXQQqpSArNHYXao8jvkBAeOvM+DEBvMmkfhB+4JOG+bkVoVt NYKKz9Deb/UYLUjCSaS2MnYharqTegtlnaAYsjTvdWxDaE5rXhx6x57UjdcuHC+b1cnr CPlw++/1io/fXJd5LiPlnKG+cSSGB6rDxC9L+ZwGHTU+JKd8dIesTEdNa29Y/KirEqWt PxIuYHjVBRW13kxRW7DFcuYd2QrsLAkgKB50Br9mdrUXWvhnSAL9nTZvnQhIVn2e3r7P CG4RMiLk8qQe1Aig+tJ7hkt7x/EmDWzYu9UXO0U7M9/RxztHe28866Das/mcGBrYDJ0e l60Q== 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=aGmVUJSjL3qqF2yxLWtGfO+5IKk70aRQaFRf9uXQRf4=; fh=rg7X/cuDWju/AN76WSpS0NvnN8m+keu91fVjBG7W/iw=; b=qeQ8awKifsYF7WqQHc4n4NkmQvIFqPedfiG3G4EyjTvUe7fMXH1dG5vMWwW5lDhxt3 /EAZ5ElId2fFw+X3BFNvdYOgC9s0KEYXS4UxcV4lRcEvEzbWhPcLlm10QIMM+RRZL/u7 HCldIh53fwmMQpAEWF/8Kjzds2GNua1FoqW5OKWlR2DGjeuCNrNceyfE4sDIF5lyuRSr dXoy2JU6ncQNw6SlqkFdpQKxXyx44KokX333R1tlkjPgKPj5CnguT5bi6qasWoORey6C 2MiyCXCouGWykJFlpi0bEV0eg3HwlMdl/pjzZiLwt9C+SUGUZOBsurd9gp93QmqO+ice Mw2A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ZCaz+22R; 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 jo2-20020a170906f6c200b00992b32e3e3esi6400507ejb.468.2023.07.13.01.15.42; Thu, 13 Jul 2023 01:16:06 -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=ZCaz+22R; 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 S234133AbjGMIKu (ORCPT + 99 others); Thu, 13 Jul 2023 04:10:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233916AbjGMIJv (ORCPT ); Thu, 13 Jul 2023 04:09:51 -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 B66B83582; Thu, 13 Jul 2023 01:08:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B+7LzO2ESswEnHho59wiFdaQUo9TWJcrJdrYkYh0WTqIKCmdzhTzDx22yZ9dM/TA2TT/nhv8s6VFw6uSUuohXZbJKI9IZyPQNxNRtwGA/zX1HTXU+Ucl8q0WC46Qw2KvfjutlqX4KhRpIXhPeAuo5+zqgvXKsAJj+PIGa44+mwAL8LI5UA6NZ9bTu4nHimugctWG8uJzAwk9oelVf5/seP8q/nlyXt6FmQK7oBIvIv5NkIDmwgZ/FiZ+rJCzg5dY16pDwN/zkvrQ133NecEe3x1SHJvFW0KZT6kFncLHT7Ya6dtjrok/IA//jP+AMTteAIyxtm82NcrMeocuY1ZmCQ== 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=aGmVUJSjL3qqF2yxLWtGfO+5IKk70aRQaFRf9uXQRf4=; b=m1cWayIbTldEt5v9nrkODjePljP7Qy2nuGdjz/SGIBspLhWwfztlBzuonwAO3yDTUGyNupzkpIMxkr1xSlDDCGiPMWZbIecqsCq7v+m6YdGSiI0ZqHHrFOl+fJyv6l/9TY1P+O7Ghus0FSCPygea5GmTI7FBzj7Z/zRDz7VnVq5NcHE1dMuTswKhcqdlE19sxnt9JkPhe69XOOuczvwcI5rPSgEkre04TLxmmNRPh2ZoCKkI2Txml9+mosNQ0W5TSP3MUzej8uZ8hZEXIutta2WvzwuDRu77m9y0OFyjHDSAWg0MDorDEXULQS4x7frMwVLXpQ2hrV/4VX7hOYXgSQ== 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=aGmVUJSjL3qqF2yxLWtGfO+5IKk70aRQaFRf9uXQRf4=; b=ZCaz+22RWlwS3FKoHtLZTCCOJ7Y+gO1FFztXd78kX6G+a95T10Haqf7SLUoabvArU8bHb+3h9VeB3++yXUu+hPjSq9sQHY5BxajBZVfHRdWT55wcTeAf1STASwaxTc6RBNDDwofi4+4dqjLZEBtI6FPY3SrtXcyLIUE/6ZX6KDJedDk604VYqBO/I43E1iU64XtjLrzSf7iAJIRvmh9gU22/0S6/WSNqD2sUDrSmdFPtdaT/hjwC2U3RcBMqvTZWMd4eLMZcZ3Otxpii3ZXR8eML4dQNXd7EFZsjcui6Iw6iLxSV9AbMiucgoQF4/cWgd+BBiNEepj7zaba/cU4QfA== 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:36 +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:36 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson , Taichi Sugaya , Takao Orito Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/58] mmc: sdhci: milbeaut: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:19 +0800 Message-Id: <20230713080807.69999-10-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: 3944338e-25a6-4ec8-a567-08db83785bfa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JU5xiBp+9JigU0MgYTTjylbgYboReiMXfzOugT7FkHCibxFFqLoyw9oi/JMGkx0RNgwDyLzbe3Iy3qaMnYqxR8l5CRYwIByMQXu23XBvR51ZkScDks9jaNLnA/XiELUfg4hzPobW++EofqEmRAQH8ubl8NkId6ZX4RzKsheLMIH6+9pu8I5hFhfW1h3p38k+aW7DSEcXUZFHseJXbrOnlizkLjQUs8nANXNzmaD4g3s//Nv9ghgRJOU3M4x+/J/fqpxAuXGrDngIB3AtdNnacJELS2q5Yv5uLN6/w/DnkgtG9D2tbY4aPhHblYp4ahWmLY1eq1KrwrtW6BUduqbFp6GfNPKOxPmTqWSdJ5oHzenbmml0RnblmHJzdHbfo9r+IwuMMFOi9BO7ivGEr3t0WYXrqjZS14iApjusZUUNK3QIN7MZssWdpuxlr7LGifFyukKwMnjp1TMxIcDDveEOG+vt1TkAY/EOXbxV+jLpCbYyPz0gEi6wHKfaLrvE1ebfvtiyx/Bsika2lYYzAHHvGqYH/rRM4bmHb7UmJSMNOjqwH/kr8GLgqwssxepkNcyiMcbSYjt0fwmoho7huFPmD2p6ZvfgjrPPgGdT9+Mi0vOg/bEPHR6NhBY56KCUwuGxMwtDC6Adhxw3ZIEf8bSPyACiLmpPwZnPmZPQJ1kWuCg= 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)(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?fu0HKqK3qOGDDkuC5sjFKNxsiPbS?= =?utf-8?q?RZYHezm4qIEkViGvxxbgX14HQ+qRY5rt/jx1EssZr7j3Ackf0VvqECVXI94x6IsLM?= =?utf-8?q?UNm3saJ7UgcDdTrtDzSL+yg0momeOb0PDco3/gcZ2uLW2cOX2YWQWwdwtdtTL8mXW?= =?utf-8?q?2FV2cxHjUN9c7Halfiqn3z7kjZJw4vYWxypsBJfBod4Ihje/9B4GcQORsR0/Pjan4?= =?utf-8?q?RSsK5FR5HYd1oOel6YNFbtsqKFg2uNsHUAWtS5/3szfwhUZ3lAgFyxq48MUAE3PgN?= =?utf-8?q?SpXbyhdJi2qqin4+mzYI9KtHR0UaC3APs1kxZSPYPG/ACk7JKpnIhnHv7v7jAhXYw?= =?utf-8?q?jK3ZGLHe+KXPDU91lAsei1/x/Z5mPADGbE4TVLUKjEqlOCprOSjKY1wRiceuh49Nu?= =?utf-8?q?3QJcSGNt0AX/BYuQvyv0GVrqGzkMUEcQ6efHm9sSt4dVNVTSyoZYO2DswWpIXCxhW?= =?utf-8?q?oImbepOR3cCwrRqRm58vQRt9PelUnsiUoXRLcSJktj8VrGvqy9eHNpwcw6oHyh3E8?= =?utf-8?q?l0dlsbyQ1/dZOsECSgYix0stKxAnxrYba9fWeEPAvmtL0nT6Wtf5ZK1XXDATYBBi9?= =?utf-8?q?p8v/6c7tlUxmUYgTSX4wsVj35DqFuACHJ26PniO+BGF617vkyNOIN8Po1zsytV5B4?= =?utf-8?q?+Ucybc9/QcBs8AQn6ZijuRIh8QY5qFjPNVDIEG/WHyxpf6UcVbWTs5hQWbrzdFcUc?= =?utf-8?q?jEk1+XHWrbI3MYzEMKSkjWO2+NKmo+bgjKwf/ta9QTUeJrmoZIbXXFdyhs2YtL8R/?= =?utf-8?q?KLgXl1E+GbK3fC5rKJ7aO9JC2ePI36mtwgPRXkEsIBsbkSQMLMAc8W9jQxu4HgARF?= =?utf-8?q?8kFUyzfY9OQcJo/4MfsMQGU7vX5IAKfwHTxgswut21IObNazUCCeAxz64T98Fcc/Z?= =?utf-8?q?Kp3879joUGNjZVMwXlJ85EkZ3fAir3qE8IWQnLt553aVH7pkDuJ41FJQ468j7A4Bs?= =?utf-8?q?eIpqjL4+cojgQjnetQMXlryu29QX/Hqlq9nK6e1iSVgI+hmXKU/zPRhqOwkIsjpHb?= =?utf-8?q?bcfdiuhEQ8Ac5RYX4FfGO0CN02WE4nqPi6v29JeFqqXgMzcKvUavD//8i7D4TSCYd?= =?utf-8?q?0awHefSrMkt6LC54042jYjx5Y6uzyDh73dNQkWWgt2C+uQzt5J+90iH5pesu5fy5G?= =?utf-8?q?1MWDGwk0qAoxwDRXK6rJLB+W78NJXi4OBq4rJvG99W0uI7rLycguESPT+24wSTklv?= =?utf-8?q?sT3u7DwKVGYAh8Q4egg+gce55rAmUDccanWBqYfwirE9E9LCb7u4dO99QuoN6b1mp?= =?utf-8?q?uwzY6n7puWtJrjvc/TxAPaPRItDBgiqYE3SANQxJdo/SjrsWKFGXgfmZapyn/0Nop?= =?utf-8?q?6JdR7KGiPexPrRAWOOuTXyqKA43Tk5oW90tgrOQrRVQfxxSjEm0FqNaP7RjwVxzaG?= =?utf-8?q?F/fZ0o3fI+2zHEhUhkgX7wMA5z0eB98dpW7kM3Lb2KTXPDVoVDxawAKnQ7kJDx/hX?= =?utf-8?q?DLUDLbtCvwgkgwTUyMQjne2H5tXSAK71spwpGSr5zEwEid0R+69r5wCkargQjjcaY?= =?utf-8?q?l+SxJ3g9rr/d?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3944338e-25a6-4ec8-a567-08db83785bfa 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:36.6880 (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: AIlYVeMllta3UBADv+Ro8GLhAAdTge4YRG3Xyt1V1iPBKv1z9Jz5o1UMew+NpiEK/V5Vr0N8LS+VMqScjyz3GA== 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: 1771292501716437129 X-GMAIL-MSGID: 1771292501716437129 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/sdhci-milbeaut.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-milbeaut.c b/drivers/mmc/host/sdhci-milbeaut.c index 148b37ac6564..ee4514c90eea 100644 --- a/drivers/mmc/host/sdhci-milbeaut.c +++ b/drivers/mmc/host/sdhci-milbeaut.c @@ -313,7 +313,7 @@ static int sdhci_milbeaut_probe(struct platform_device *pdev) return ret; } -static int sdhci_milbeaut_remove(struct platform_device *pdev) +static void sdhci_milbeaut_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct f_sdhost_priv *priv = sdhci_priv(host); @@ -326,8 +326,6 @@ static int sdhci_milbeaut_remove(struct platform_device *pdev) sdhci_free_host(host); platform_set_drvdata(pdev, NULL); - - return 0; } static struct platform_driver sdhci_milbeaut_driver = { @@ -337,7 +335,7 @@ static struct platform_driver sdhci_milbeaut_driver = { .of_match_table = of_match_ptr(mlb_dt_ids), }, .probe = sdhci_milbeaut_probe, - .remove = sdhci_milbeaut_remove, + .remove_new = sdhci_milbeaut_remove, }; module_platform_driver(sdhci_milbeaut_driver); From patchwork Thu Jul 13 08:07:20 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: 119616 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1668618vqm; Thu, 13 Jul 2023 01:15:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlGVX2Rq8FxSGTkCTu1RPHjVd4rUYu0X1KcT7ES5l0Wl7ceWmjpPLz78Whj6C2PEL2/y/wkq X-Received: by 2002:a05:6a20:190:b0:131:40bc:2285 with SMTP id 16-20020a056a20019000b0013140bc2285mr227538pzy.56.1689236125549; Thu, 13 Jul 2023 01:15:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689236125; cv=pass; d=google.com; s=arc-20160816; b=t0aMD5t9a3+A4o16WISaOcWghfnoIupxYILEWIgsaa9rv89JbhdFAJCLX8Expb4TM3 INbEmtT4KvBIsXhoXpAxAdWTq/+C3ae9WAScmw9uIlUjU9n1u+W0tCBiKmlrqDZBIbY4 QsTx2xA+wo+fxwdsIlpM0ZJo8TIp/JZU39PYqvd/gdcuZdS9GrGytSeXMndifSicjaDy JUpiscmtciDR7cJMOxyUcUWoByLMu2KHAdK19gcjvIlPDuYFJe8epVGa8uA6RrX9KxMX 2sPWT1rM8YjABFpVpxBdrHfd+I71KaKIkcwNNosdT5nbiuBDlVCeftjEXSUpQHbct2He PaiQ== 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=BmsUH21Sitgu80/p1tFfJIH7tg7gkEnk91pBdItWAUc=; fh=lsBBgZtt9Zp64MNFIVDMQqe1hUqbGcY3umQCuckK8YY=; b=gmxgt0P+A/4DdQ2BVkfXh/grWIndI8PW21pGynvm/posIpb0Xc5VF4HLyM+ANEDpUF Jxb/ipfW4fjrzQt/ADqX8ECS4Maflfn2VDSYrbnIzuKQ0uxzExTZT9VziKJtJ8vUbJgo 5gqI+DPbUIIzY8heruQX5vra98bwG2nY00qgoWReXhuAV/HO1KiWQrp6umDrsCq3X8v6 DOQa9dw8A8X2mVTwZnE8ArJaVrVpqqwWA5i5pafRJSwRdqLznxG/3WsQJj2XmS0V2z6u jmzw40sm5b+fuhpGQxwCsP1ibSAk1gpd2OBN31AzgZshreM2yhZ9XfhlVEtb02s4PSxX QixQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ebJZxWGl; 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 u15-20020a170903124f00b001b9d180fd9asi4982521plh.121.2023.07.13.01.15.12; Thu, 13 Jul 2023 01:15:25 -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=ebJZxWGl; 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 S232943AbjGMILE (ORCPT + 99 others); Thu, 13 Jul 2023 04:11:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234005AbjGMIJy (ORCPT ); Thu, 13 Jul 2023 04:09:54 -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 ACD00358E; Thu, 13 Jul 2023 01:08:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lfPAw7FDxJqtTd3EOlYvSvqY2okeKJAXK/eEcRYoOZTCpiaR/VYoKa/0SLkdGO4IHOsroiTXZqBNJ/XlspcGi/X0LTBL3oPKxfvOgnDvw/CXf81O7oaSG3cnUILb9Qm72DbAnXnhHSL8BdGEwYFdIC/MsuG78uGtOSiUSz6f+63fRNWDgkrfuvEh9PbQFf5kGlTXxPbLVWusZVOqHqP3BdIklFlHjL4+9buGHFXEGu5JRp5RhEqzLBAAv1hMaF3/WUVxYm1qS2gNeabbI3/p3BnUI16AAe4gVVNNKyY0OMDxLy1U5BheWyyN/sCIbyqU9NRXjKuLP4zdrPNcBH25yQ== 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=BmsUH21Sitgu80/p1tFfJIH7tg7gkEnk91pBdItWAUc=; b=FTEY3w+V8q8FGR3VDgeNTlOi0abdobeyjNL9e/3QEn5Tgspb7wQ6hFdYdqNZj6qGI/3q55gMx2MAOt5u7bUtIrtgvhDstqbW1zCwR5hBpVLUhG3vDGPR+BUyZc1rKCQIkyt75Jl1JQT1PX0ZQ1FJcDjc3TdmR7n2QsCGUMBPSylCjukBZwZMu7kd+89yVzGwhk0Fv2yKo9dUGuoTHNbrRtDWuQq5X7/wwe62sY7O7aWYJzK1VaOlX91JwxiQknu4KCd6x+BUixJWCAH6unHYuCFm4a0BiPJgYw0KY95pjPO6L/0Yiu6zQTXviRLm/poW/Cyo1Cujr9Raaelmz6iWXg== 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=BmsUH21Sitgu80/p1tFfJIH7tg7gkEnk91pBdItWAUc=; b=ebJZxWGlQJc2f5xMiqvZu/kKtt8ehVUiHy92uKgOHvuv6hZ9fxyYa0NLPK57eQsd1si1xG0p9k4vAwXZTa2YJezlXvFm1V8Xfq5zkL6/wSdDOSitlEkzYUBbSsEUNNV1QWgrwXOmzGsBif15Ur/eVUfntpYXyhhq/t0Yf0zcgtRgV53EsPJDyAfOg2ti0PDDciB6TqFsksBMoWFHUjOFP7avWmJAfwHGLRQPqd8hnr6m6x+yzq6jvtcbsUPR3TtmFoeQZ110mwrk00NsA4X3JkrXIKghPbUuQgiEBscrUYspWqC5wPbSsE4UAebMcfwg+GGKIbbcNQxpOc2hQ72FLQ== 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:38 +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:38 +0000 From: Yangtao Li To: Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/58] mmc: omap_hsmmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:20 +0800 Message-Id: <20230713080807.69999-11-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: 6a1e2f10-0310-42c5-f347-08db83785cd5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Bh22jU7U956oW3Lxr9ThNSwu7z5J9UjDN98GtJgCY/JztAFx38OoxV4PZEZ/28NM2WUyjNS/vWma+hF32eZK9T8G8xpc6QDau66b4yNLTg6UrZdeTRrawnya0qKvRuZ6nCPSGflepqdunc297Qgncl+++MyCBl0w0/Yd1x7dOuSZp8612UjFMvYUANUwCSGWITsEwHbV0WQpT6Svv4TBEBKbAFgnLjviPom5PuGPtthkEhMmaPT0ELQiUsUSBAcfkUkw8iLTsHATglsZU/0D1CeGqqo6fymj3m2cpyiCyoCH24zerKUk1TajIhIZpCI54C4KS8Mi5JdCotX4/eJ1mgn0CxuE3okBGLinWbFWoqc0H2Lju+0M7FKdvqD1Xm4znbMl4/ZWBL0dl2jfkkzF8PVJ+CQrYBhDBwfqoAKFfSsFROl4P2AZ1ykk5iaffEDfDf4TnqqU+nkGRdWdvaLDk6znl8+1s/4pEMKqAIhQm3iCUX8c0YU9kd/TBSJL72kC/WuQA6HDypUv9lDWQhQxI9JrhKq94UZrzEAwb1OkDRq0jRMRhNvsVTsSjVDHxH9oMPYdjdV8vQ3ncbChPTR9TRECkHy0QZLjEk27YuP3M10CXps+W5MPr7/BGxBm1ylXlYBXiKMuSjAtorsg1NEeZvBJPMCdxu6Oh7J+/rOWf6I= 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)(6916009)(6486002)(54906003)(66476007)(66556008)(66946007)(316002)(6512007)(41300700001)(83380400001)(186003)(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?0mdBWuMYjlKgpp9gSeazPPY9fN+b?= =?utf-8?q?zr6oVVgmhL648JRMy5uGaDheCW9MU+NGw24CYmGz7Xi5vLC41nfUHU1n2lNRsSdVw?= =?utf-8?q?zoBpDE0jinbF/7RcwH90D8g9HFUqLrBU2/KZieQ6qI6pEgTbzE1HY2OtAXzoeP5mv?= =?utf-8?q?3Hx8YDF6sxBpMwepRCokBwS/4ZAx6BWu3QRpVnUvEp1ZKT+CIp4EvcudQmpRSpStv?= =?utf-8?q?1kRbytvzhOGbID1E5Vvlw1CHcqm4MglomEsdsuHDMG3V6nIBhuBTfBEjE5WlEJxRw?= =?utf-8?q?cW85xz5OMxma0Z3n+KB8khaty1zjIjA4XEa8rVi7oMJ3sDP0RZgXOFWecKaBTJGJf?= =?utf-8?q?1E1YM/tNEkGB1qKKY+zNLeeKbB3MohD5LZluXynUR64XviwHebYZLhQfsiWa8GZta?= =?utf-8?q?jKJ4MLlpNJVoBw00XvX7uwsplAlDvLT6aikD1O+ArqChj7Q1B5u0GineG9R1lhTWI?= =?utf-8?q?+lenb2Otsel0SeVNpsUGgb0zJk8Q2dA2Xn0ko9GBA51vRdA+6RnF6j3epoVBb4xY0?= =?utf-8?q?ByC2snufa0D3bqCMXojY4niMTIpHw3MTQlYEMZMyKnZADy0/WcKM9Kbg+A2qZ9zW4?= =?utf-8?q?xMb2iO9kQh5jHYYfIY+yXaIYI4bGzJ8VIoqTPkYSN8iDCO0bgJptrNhYs2MXRNRSC?= =?utf-8?q?PVL95vyPrj/g7Pf/slsA2IMqq2ZxXUW5R+USreAdl9xW07haPq36EosczLDSx2F2s?= =?utf-8?q?r1WqbmWKo1U5cIc97v+p45gdBOnJukWNkdEqZr3XNUO/EFScfyPis4vWxtC2W48TS?= =?utf-8?q?9DT/+RzGu3FT+VphkEN4YqqgIexEKSp+0xbPcBBVF+zkegOdFX4Qz/k3exIbfQa/J?= =?utf-8?q?gEvafBtCuVcoKI2fE3odrKWB/xgtO79SyrgLH1ZMDk4VEp1826NsZNLheJlDJQOdH?= =?utf-8?q?zBOQNMcc+dHS8CZdtXYm3SMeO1iTIlqTknW7GlDB7CnPsx2ItVkZjz7ptYe6CBJVe?= =?utf-8?q?416ptunyy80oAvYY/lw3V9AiktkHYrfG60wEMzjuY8WTT5Wodomk0KG3XuH2GxAM5?= =?utf-8?q?ELOWT462d7QCgabnYIbrYh7DuJ8cA/ePOyyIkSxR7dVWnkBS3rgBaU+cp+ggZwJ9n?= =?utf-8?q?92qmz9D7lPax8alPf/+wya9Oo7Aje1I95da0T3zzPrMiyBsbztSCGAKxU4kbUWWqp?= =?utf-8?q?sdRjinTFU7zJWUvyEKv2bImMGOW6P5tSFWR8/R/VUyEJcIE3C4tL408oVAfqZzuZP?= =?utf-8?q?kq2SBH6qLid9o0NMzd214RcIoLCW7u0ty7XOKuIOq3EytvTj3soyNpEQUEB3Uj1cR?= =?utf-8?q?H4X06Qd4WKnHK/87Jf5MIk32l73KwGRnjxKOh+9aR45hdaMsO0mB37F4/eIuS3ZMs?= =?utf-8?q?BXnSlcrkyxE+P/bjQuwSf239foXPXEFUZk2VcTd0tRgfBn5GRvad4SAJ0FqJGPYl8?= =?utf-8?q?uAKENq9zSkpYAUhQow/+JLpJ3XbuOdqLwCEdnfOKRItSenmZ6DT7jvAr/3ypwYzXU?= =?utf-8?q?mcuMpRixvWUoVR1AbwZLmbrLly+eDlFBRlNpPoKWrizBuE1ZVysBGdagmt8I4J7c8?= =?utf-8?q?PNO/PYa7IdkF?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a1e2f10-0310-42c5-f347-08db83785cd5 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:38.1693 (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: V1L9GhxRrKx4CHXcQO+2NBzZUrXhj1s6tXrJ/z4ZmXDWRi7LOgyuGtvkPE0TydMma5lRopx45EU7lAQRq7P8sA== 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: 1771292459605475315 X-GMAIL-MSGID: 1771292459605475315 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/omap_hsmmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 1e0f2d7774bd..c5a7bba3549d 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1982,7 +1982,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev) return ret; } -static int omap_hsmmc_remove(struct platform_device *pdev) +static void omap_hsmmc_remove(struct platform_device *pdev) { struct omap_hsmmc_host *host = platform_get_drvdata(pdev); @@ -2000,8 +2000,6 @@ static int omap_hsmmc_remove(struct platform_device *pdev) clk_disable_unprepare(host->dbclk); mmc_free_host(host->mmc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -2126,7 +2124,7 @@ static const struct dev_pm_ops omap_hsmmc_dev_pm_ops = { static struct platform_driver omap_hsmmc_driver = { .probe = omap_hsmmc_probe, - .remove = omap_hsmmc_remove, + .remove_new = omap_hsmmc_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:21 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: 119642 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1678128vqm; Thu, 13 Jul 2023 01:39:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlHmsDKviiNmy1yzXerLhmz8ZeMJ4rWfkeBx4A/V3biZl+JiO47q1YJjMBb7OId6B3UNNrNO X-Received: by 2002:a17:906:100c:b0:992:3ac7:a2da with SMTP id 12-20020a170906100c00b009923ac7a2damr871681ejm.30.1689237557021; Thu, 13 Jul 2023 01:39:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237557; cv=pass; d=google.com; s=arc-20160816; b=f6TRxy/ziUEVHjv6Cdw+sCSIC4gs6+UD8Z/R+ofc364r716WwG9/+4HMo7JSsNTTnH 7/SvRU2wJpr8wV1aHSVNqot+sw/YOPdnvI7WzHwyfqDXeHxZHZgsmq3uiF+qUqFKXOjR Z6vfHAXylFk58vOnRvnOD4o3gEFSL3UOzTBQm1UMuXBO8QEBqShGP9O8/i3at/+uO77S QP8qupL/CqpXPqfwbFhyKlJhywBV1TqiIKbqJ6K+WL9epK1uP1EeP7zpx7p8M8AxR5nO +TBED+9YNv8uf5jA/li8TePSXaiT0f6Xz0QIy5qgMEPLHGyURm4jWBoCzjmxYuKTNW5B X0tw== 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=zfkki4xoknH9pl2wMgN3/myZCKUOHnsaDhrfpsUGHGA=; fh=fKMVcxEXyR448PAR0ORcEmkzL5SqNRft7iKHS6hwUKc=; b=NT4yBzhfr82x+aSfhNturLRL+J/7Goq/MkpPFmKEkPobvBxxOucpZvyI3o2tKf3pWE 3LRutcs607BCcl2rG5cVV8BDFp/oNec9SRBw9JHuFAxBRaSGVfOZ2tdzqznpQctkb9ru RciPZhpIeyaYyEIrKe/963qiUri0XIREGK8VE7+Z385u4PMrYbskJQ/k9sYTMsdG/3qx fi1s39HE6ZwypaIywOyXo7fnjrh0delJZmMx6sxS76U1PYhXrEeeXPENsMOwOJBIBj7E O6X6asnZPHhh6ZDNJRMokmc+71Xkq3JOXR7WgOOPUb39L4MI5QDmvyLfrUIpSbL07wxe GN6g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=LcGG7SrZ; 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 h5-20020a1709062dc500b00977d04a8fd4si6596348eji.1054.2023.07.13.01.38.53; Thu, 13 Jul 2023 01:39:17 -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=LcGG7SrZ; 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 S233994AbjGMILH (ORCPT + 99 others); Thu, 13 Jul 2023 04:11:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233984AbjGMIKA (ORCPT ); Thu, 13 Jul 2023 04:10:00 -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 42AC6359D; Thu, 13 Jul 2023 01:08:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n8NcePqu9UGPJfWCI0D4nAukeB4NlnuF4KIDJzWBoSU6q1qQo3BobqlXnwfinetx8OFjy2iHQHPBXQ1O0xQCGNKmsEGExMvtqGTjKoReSMXdwicn/egkIkoiVbeXjrpek4/MOULCvCQX/PxP8BuL4WktM8grfVHvz/IXv619FChZ3UDcl0NJjLs8u39xsMnukFjMwthmsRF5KcWAE1+0WS0yVcwZ0saQeidK90YCKh75akPef+IpBjSgPsZ9XXRZKE+Y7IGkhmLR2r4+QGYXV2bIMtmpMYczbnErrBEYmCCiUrLVlTKeVAhccMbmrDUtXiMMwnyqEtokgF71UtaUXw== 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=zfkki4xoknH9pl2wMgN3/myZCKUOHnsaDhrfpsUGHGA=; b=YVm7rukifl1ZWnwIlvnl5HWgMkeIi0ZthyGBrF/StS3cDj2alu55YTBD6/j7xwzNNRajYOp4BXmGfT5ftHtQQB/mhKz8AfRDVV6uosgzyqNhkolaHlvodklyZg3Cj/feUtY3/k/u4o8fQfeV8iAwRul40gZIJFLuzjLbZGSxsM+qvGQ+JGxP+JElxl27gwhU+LDzfq6XN9llfvC+YszMAIyPNuDblQHrkWinaw9MFNsVj3MNrq1KzzFkx5y4NthuA8ZFNjyN75trKHNuuA+wjIw9/jYpUgTtp762KSaWikxd9ZuZIWMyPxaI2C2Abey8tO+LZoDYUkstd6cItn8j8A== 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=zfkki4xoknH9pl2wMgN3/myZCKUOHnsaDhrfpsUGHGA=; b=LcGG7SrZYcjK1Rh44RUAQApCvsASkb5luXjdRlQEwmG9/gPn7hlng8CBrRcKyqjFP3h+urq9cUt91DnM1AlwT/SN2jBSPh72DQK0BM82x708AB05LZpUdFin5wGNv0jZ1TdJ2EmKibmrrjC57nnijVnRr63qy4bn0zM00mI7ONFpjS6rZxrTeIfJKdRs8zA6xt4vIgdY+yxlqvlL2N1lGmxSsXuzkyC3+8HggmelraEC7eCEamGlCGwDk8kG8Hc7vQFyDc4eJ6mnUvjLm2YBrKKGWSYC6BvIxvIK4hsx0keWVPE00a1W316980YExybLvb6Po5Pq9iL5SZBcuGQewQ== 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:40 +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:40 +0000 From: Yangtao Li To: Adrian Hunter , Eugen Hristev , Ulf Hansson , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/58] mmc: sdhci-of-at91: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:21 +0800 Message-Id: <20230713080807.69999-12-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: e8d836c1-3e99-444a-e801-08db83785e1e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5Qq/bmvFN4VlDrj7TKH1XCVkVsf1DRLd1vvKRGAyJ8R0zlI1FJxGK90tpGHebsEcUOt6lJXBwAeH87p7/rkxClIxcoO2XApk3NPXbsadohJTa81RomypoBu/ps81CO4IhVKa7rTFNA4toCNItTArtgBlnxtV9cS430VuxCxguic9gzYgANs5fHL0rsn9nPKcEB4nTBNvr+B2+Y5lRYFyB7rY+SQgWiD4OPpV7YPiQxJ3zYolIdgN+EoUX40dWRLJpH/9Rfoggteeu1iuOtpp8FYOnA/uAN5xrRiVdzGUp8lO3y1HH3GPuQC/WC10UxpfqbzsBNZxxtYqC7QfyY0bJ9Cm3lU7rZm+qxUWTmIo4AHqez+DbI84w7rncnbeSAZKuHnGXSJr12ApFdRx1OrRiPjfY3+298xSzFcnueomKAl/36PxrGEIC9wnuECF16rFJQV2uxol9CukU/FmygePxHADSuiGe/Au/8c7996H/3gZ+fIEwLcxX6fvyJBX4lugJAu5dw8Dol5pFAbO689Qjeqnr/pOztJ6TDNUC0HPicbufQ9vJ48jCybcG6zo87n6Qtw4ZctHPY3/BvbyN42qMqCs+EGXSHSHeTSciOEnwO1pp0pTSLLfKwNehHprwa0kb9DGbwbJqn6OVjUPaQVcOX1jjhgQOeIZZbyunQEfMWs= 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)(2616005)(2906002)(36756003)(8936002)(8676002)(26005)(7416002)(5660300002)(6506007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?laAUwIS9U03fNZEszNQY5GEb2coM?= =?utf-8?q?UJd1KXQAGnJOqxFqtLRb+DpSeogsyuoRCPKaYSCQZ5dd9OdqsBs2zIJ5DdltBRO99?= =?utf-8?q?lNAnynUgEGjFt1dBkaXtvq8oXZTfZKYM44jotNLldFQneFERHjY98M4AEXdIr0tbp?= =?utf-8?q?cBUEXvVc3iRhz8Lr9ebcZLld3a5GGw/RC584eB66irREpE7TA4HzFjAkaINOjz4UJ?= =?utf-8?q?Z1ZWPCflnsEzif0J+W8VIQgD4w/ja4OQYn8fQ6ptaR9Wn+5p2tymYsBJb9wQY8ZoZ?= =?utf-8?q?QjIfvcR6dY4YVNCXnU4oMIpOjMLqvF5QyNl0aJHURbIR4Pqvys/JSSWKQIY072T12?= =?utf-8?q?6QLbUqL8UxVuhgRDZ80H4gTaXG5IvE+XN4d373Ocq8OXLzNr58dD+muzdeBtJHYih?= =?utf-8?q?rBGtDQ5TFWx2OZyskmi1lF1rm6xBgBR5b6O7ugf4AVoBc3+J11pNhyx2FlLsPUTDK?= =?utf-8?q?YmSo71Oc4bKacMFXUHY+UmS6DbpYSfA1aHbVLI9mNNEd06JJcwtDkLYnQ7wA4x2wq?= =?utf-8?q?3itKb9PQ95MswbQdwyVrX8whm3LU++oBTiZ/l9hZ2gqdGq+MmGDVgR8VbOe9arx2a?= =?utf-8?q?1tdXQGZS8yriJ+eJqow4V5F3J/ctXEDCVbWGz7oX9536nAsaw2nGeEIOGXBPME7wT?= =?utf-8?q?UvDDUc76j78kJajpJZ+of73ZMr45R17wAVZWchC4sTNZn/oaelHQKhwkU+SOxuJlR?= =?utf-8?q?LUqyK1MEqKNb5myBoxI+uL+b8NS3/22sVkahGoVDfkCCR8o+KbIsbpH2P6vjkHi/F?= =?utf-8?q?jcVpWOIsTdm2Ncn30wUxv1iI3ZC95I4u0wNUy4YRdWy70ZdIwIxWFNmpHnXSwguDy?= =?utf-8?q?a9japHSiyTg7vGGnO6DpzMY8H40oMvvfomu1MmLW7nYGQZgORTusw8kgGX3PfTThI?= =?utf-8?q?BUj3z8du14/4WNUP5XxMnhp1TJHUbdLK5YloDeEhlmmcYWhZlhDm1roPwQ/4jBuog?= =?utf-8?q?8fKM0nNzc8BqCP6a53JoJ0DdQOl8XYGnSu4dQg2WbTFuPhZns02bJYHxzYz9JpnDb?= =?utf-8?q?LlFH/C/moxiFja5TyFT9NiR/wiy8BTe2NO1pDEWQ+b7TECt/KoMACg+/KwojDo2F2?= =?utf-8?q?bmCd9jO3DyDjmMzRYAVUQjUXFbEJqnev+8cfDqKcXLZ8cwp1Cv8O1xivRfVuz6Xw/?= =?utf-8?q?AepWlkXBau7eIdgOd8Kx8yCRpuUTeVovNEMHq0sjS1YlAyZLxyKwiT4zGNZqZKwD/?= =?utf-8?q?adH+zzsGNXI0BGSgIHPp8ySycnwc/LlkOO3kP+OG0cUVNpW/BwZQkJ625w8j2TTBG?= =?utf-8?q?94xBjQgh/wgNc/UarNOFmH80BAkccYJHaatLrf9rkpjauhDdOr3mqtmznxH7/d/RK?= =?utf-8?q?qZEdqRR4xm2KYQr8GVFLi2m5wlGFT6tSb4ahE9FhiWx499etVJJlzJsORtrT84TWJ?= =?utf-8?q?STtUOvQf51SUSYEqYIFwZUSTO4C0zCfYC2p2Ug/GsZveoHRAo0Xn85aqKDAniN/Za?= =?utf-8?q?6rS6O2y+esjp2l2wn9vYvnSafIuQWtwLpb4sBryrinp9G+8hkRfK0VWn8h5MJlCzi?= =?utf-8?q?UkQ0/IszNf/M?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e8d836c1-3e99-444a-e801-08db83785e1e 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:40.2740 (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: nnQXMIMJWNBS2EPq2fnGm0M78YBHwzdiL5JE/vUfN+csXfRSSvXkb4zBnYng36rHIxny9c+O5EmYZiEAVHsYPQ== 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: 1771293960648279172 X-GMAIL-MSGID: 1771293960648279172 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/sdhci-of-at91.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c index cd0134580a90..af5bc0caf29b 100644 --- a/drivers/mmc/host/sdhci-of-at91.c +++ b/drivers/mmc/host/sdhci-of-at91.c @@ -443,7 +443,7 @@ static int sdhci_at91_probe(struct platform_device *pdev) return ret; } -static int sdhci_at91_remove(struct platform_device *pdev) +static void sdhci_at91_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -461,8 +461,6 @@ static int sdhci_at91_remove(struct platform_device *pdev) clk_disable_unprepare(gck); clk_disable_unprepare(hclock); clk_disable_unprepare(mainck); - - return 0; } static struct platform_driver sdhci_at91_driver = { @@ -473,7 +471,7 @@ static struct platform_driver sdhci_at91_driver = { .pm = &sdhci_at91_dev_pm_ops, }, .probe = sdhci_at91_probe, - .remove = sdhci_at91_remove, + .remove_new = sdhci_at91_remove, }; module_platform_driver(sdhci_at91_driver); From patchwork Thu Jul 13 08:07:22 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: 119617 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1668763vqm; Thu, 13 Jul 2023 01:15:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlH6DSUU80PvjHW7xrFfH/hROsU2KNiz9g1tY508FVOwYRN7Ifiqs4+9CR/hLcYzAzQjQQLa X-Received: by 2002:a05:6358:1082:b0:130:f1e5:acc6 with SMTP id j2-20020a056358108200b00130f1e5acc6mr1668078rwi.8.1689236147588; Thu, 13 Jul 2023 01:15:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689236147; cv=pass; d=google.com; s=arc-20160816; b=kbP+Z6gRHq19t+R+e6iSWcn4NGoLAiIOSxX4N/CwtQfEfdYBq/lfWQ3+hWTw87s3Rf 0yqZCATpVFndGnWezW5wqOe1aeYxmc1Y1HuL0aKTy5xtH27dtZcnCledLblF7Tmd6dj+ oR5VhRTP6VIa5kkDbhoQTkRofz2TwiwXiGUHv+CKKlHHjrwqEVrAhDgXMM13J2u+Rcii nmTmap8XyQB1LC73PXL+nGGRQmqloaa6dX+o9c3nnnpdHQd3siG43lC/DYG4ThcGydlG 0CCE264BAIKEjJOf3s+PtjmEBZsx+YZKEIRcDmlJkESQ5MX/5T2H7Lo88Z8OS+vnhItN XGeA== 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=5nbEbIK1DWhnXMWnkEWTsr0nKaN3qrg8h4rvOqRdbbE=; fh=bRV3B52BlPCt3YSalSFThXK0OPnKZx7pv8IR77jUsGI=; b=eXUiNGzuYM44UuSPRIlnwJPaxMACgifbgB9UyQHP86h6MEN7i257AMA2vZ4c7R4HTH JEYSXcZnDLgglR15wv31FT+1FJRgbh+/Gj/OIPvjHXn/YL/ZfvsVz6yCqslrTJCivqCh rM/HyrxNqqyKE7c0kbEsOK3Iv9d7OGKSDHNYq1iDzlw8R4wzuPteu5v/wDBaN+AooXKt OfQ3514Fpwk7dgTxeYxrJTZt7hieklT0/CUfDaCtPrie60+Jm/MeZkMTKWboKH2fowud lLEu76RIYN3LB0hcgtcfEbIZV/KJmebh5MwVjMy7K97YFQVdXo1QntS7Bfq0744cHQ4V X2DA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=VhpwgQGA; 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 h16-20020a633850000000b0054fd0012d2fsi4677531pgn.42.2023.07.13.01.15.34; Thu, 13 Jul 2023 01:15:47 -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=VhpwgQGA; 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 S233602AbjGMILV (ORCPT + 99 others); Thu, 13 Jul 2023 04:11:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233560AbjGMIKL (ORCPT ); Thu, 13 Jul 2023 04:10:11 -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 EC4ED35AD; Thu, 13 Jul 2023 01:08:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HmQ4N1hc4WTk8EgW9ncjrAk9sIAFr1OlZqcBMcBbLR86/Ojt9/eIJ3gHtmBj0fzt4CgFkasF/lOww+VxRI4oq/GoUrNdlpSx0N1vEjoz+x2MMhnwR1zntZUqmWxdG8ibx24MPEnmUrEuxxEcaMn5QF9xK2I/eYfDKrxk8/f0iUAzd3AnvOpVK5d+zVryCg19dNBrs1UPmDlu2ayyBfBkILWUsOJFuYwwFsluyKlCqdamia9+b6ivtqJ75SkhnXAd7grLyPaKuWtisJbf2O84yZ+kORiKllTpkjz3hq+qt5RTXpkfUOCqxuQQ4skptolbGwgiEJ01dGhBCixVWRT/Kw== 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=5nbEbIK1DWhnXMWnkEWTsr0nKaN3qrg8h4rvOqRdbbE=; b=YfdbTvevFjus5JfIE1MhUUU7dQIt6ZgCsuGS8RLr7jcrdhNCFPMgMBr5qJ035YQTvTH+uvWwtfE7LdqiSKcCsNsn2i7qOMkrJ69LPXdjv8BZYHhdSKhPG+8FoVauZ8XEAefqY+MOGMBeIoNwtoC+tf3Sz7mYwnUDM3A2Zg4ZGZd448lgTH8E8gPDdUhjt4fv9/1GbxYt9yvBUEnOaiEq4tzbP7VI8xA2wholnU999zEDWRHe+x6N5cvegZCGM79WvIwvYd7qgiOYEUBLa1rtukzajcrw6d0uEDkDjgxRTZYpwpv01jlfLPA+XvWA6UCM83cOFctlivnTG36VkW4TPw== 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=5nbEbIK1DWhnXMWnkEWTsr0nKaN3qrg8h4rvOqRdbbE=; b=VhpwgQGAqqM86pyduds8zesmBFCRkX6kpsI8UU3iWXoASkaR/KmZJlAXcdNR/BRm2OCBhY1cJQq8Eeng++QYl7hNKAcn3ghJcXUYV51uQZHcaQONbuTsitR/vcrKkoWPzQnPsowemwVpZYv+h76g6T9xvXK6UkgnWe9F3BzLdKj0YmUEG+p+YbeNoenw6iqGT8sHphVkZ81or7qpagYVt4V/fSmhFV2vSGMUJNq1P5S1XhhUxZK1PYrsnkYnd2ZbbJxvv2pGuOQ6A9osUbk3/dIuPtHV/acrTV+5Mp2mZKkXoT7KDgThYvX++KEiEBjGYbvcbh8tD0uajpDUTh0S+g== 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:42 +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:42 +0000 From: Yangtao Li To: Aaro Koskinen , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-omap@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/58] mmc: omap: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:22 +0800 Message-Id: <20230713080807.69999-13-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: 9caa5389-43a3-41cf-3002-08db83785f38 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fBriEl5jQ3udrR+MC7H1qFdlvocjloz3bghRZl4MyPHF2UwSvcHs+UT8npjkRqx++DQJMOP3p3cTlx7S5r1IY1hb7xHHFanlZvgZ1KCCsiQ6Venus9lxR7dP8DLJLvT1/GZz03vLg0teaP7IZyuQCLLv2OLgNgs9Ik9nm29kYBRm+GQ8du1DXFx4DdwPV5wgFl5RrPD8T5Xi9L2+agj7ADVrbwmRUC4ReAdYHLb0ytGJIAIagJ5/Z+WSwAOZwqJIkrLDqiM7FMn07H1oNXZspz+VTN8175Xut6O5eLWD9/vDviKT2FOOMoyIZc4YqZXMmFG/WWQVO2pRXKDrNKvr9S7tOMB1r9Pm2mAweQufxCwveJCRQA/eV3BMxWbNXSzO7p6uZCBI6Uz7muCQKSxZ0eMMky5Y8UQvsbKwGaQAyTkgxN1LPZ96L0DhJhfG4oY4T/yzDJHAX6vUWaSil+PB9nEQ/8PMWQBCX2t9z1050ly784QbsJ/IxvgSuKBG/ItxRdblK2FEniT+E1W66jqkKhuLq9ObeD4Z26OajA5jPWvPX8BWVxjw46MZaSJkGdlODNfne4YtxfogCyr6R8fHxe03R+LN1X223tHNg5ZHPmpIuzfdKTx7rfjPt/N3lE8CBeLb9vXyD74OtNqbTnwifI4f4JtEnHy9ydvoI3MLtvI= 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)(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?EeAH6kvwWRzYHx5QHDRE4hO8MzCS?= =?utf-8?q?AolPJMtnr7O8aVwO/wIvgJpmTuVK5l1gUD7Oc82c1RMZC71gDBPlAnQhy20/WPJ0n?= =?utf-8?q?GRG8/52JTYyGpBVykoy7jCiehD/zHpTA9C/tR+ey0HmtuMp25MuLoyTThLCQIWg60?= =?utf-8?q?zh/AGhhai5fWk3CShWsQPnIKRXPmTqOnSPt4H4m6RJenLfRl3yN+PweIli3wEePBJ?= =?utf-8?q?MwpNx9iWDbK5Ohf2S6PZ6i95dtuR+KW1wZm84Kck4lLJxsq2MeGq/uD0VPpOwYV4b?= =?utf-8?q?W0SYfzOQ4rmC8wfRzwYgBoV0fUmlli6Iae9CeorwvDNJfwOPya7LsG4R0viOSaW3g?= =?utf-8?q?QinDL5fPhg3ehHMO21J4T1xdHTQu1cOald8HufJVfhiFvP00QUJ7HBD3JhI4t93uU?= =?utf-8?q?hC8N2r2275MvFBQ4m9+Pks/NAenkeuaIbKxRtcnJS9nXtS72SSdUffzxNaQrTSyLA?= =?utf-8?q?+P1Qb/AOFzwT87byJmHxgyai+fLGmNPBny3F0d8drB5EncSRsw+YgNT838URZhT8X?= =?utf-8?q?Q1hwLnL50C1ykk3z2GEgGmIDxsc8R1pIY9BldCwywiqxdzmDpkSGbmhPOk9mKK6Q6?= =?utf-8?q?BCGWQzyJLCZtIUGbZWaaWC5YJ7iTanp0kHeRI8PNMUesy0ugRjJutPUZwv1CIvPLM?= =?utf-8?q?Hah/arJD7/X3DsJ1M5xaU5tCdqpJNx3TxUqjW8bVHzFyKn5SiUjcRWntnm/7d/7J0?= =?utf-8?q?owPJposyBQfkKyFBaqh6lEfyogfa3BDpjx5poQYkb+J2KdTqRgj9dKgEJeNZW68kB?= =?utf-8?q?eQmn5O/W1J2ypiHTxNsmzVFAQxfNiCPlx2d2s/9URosIiYIQ4nCiydoLeiDi95xAU?= =?utf-8?q?uwecjh6cEp2du5t4DZS3Y5WAlnuWtaXuHshUGFZonG3K37qG8UPm7kZT8TAt86QXY?= =?utf-8?q?xxYih7TvsFps9nEmlp8AQrHzs3icuH63HyYqMxztAIzgmoAzfClGySCOlV8EA4QNv?= =?utf-8?q?r49R8dS+OED3SQDAeF/KjN2cjUR/vG6ZOctUw6CI8AG5JBORex2snqgV8bBRePsRF?= =?utf-8?q?U/F6bj1dwE4DSf+tuEqhqLAil0IG355oSdDk7fH0l6w/4xr/gxGdM0DR9R5PO/ccs?= =?utf-8?q?Z8ghy+wVBlm4QgjNq6pnPa01Z5VMr4PMns52gtctOeJjgeI712yhnTJjJbVj/E8Os?= =?utf-8?q?RBRUwd2/NtjiUFFhg0MLeu+NOnT1bDdwAkjyjaRgxyRAd1jAiMvX18tVjrZhAA1+F?= =?utf-8?q?aglmETsWpzAJP9unzc05HrMj+2e9RmOOkMemmbBN5aHduMfhuUk4ls94qP9Tu7f8/?= =?utf-8?q?ULHg8StdaVaNmeOKhJ5Hz9apzxx87U+lv0AxcRvlESHPkTPK6SGwkyUpC0rTzUl95?= =?utf-8?q?IzbZA5bxgCfXQ8lnfWOEHr1/UJy4ipLFXyMTIahY9VmAeLVS+244JOqlPip2TgCv0?= =?utf-8?q?3k9oC6WMDgSaY6g5Utog8uYzHgvQUxX/Emw3my5GTcEA3rD14r1gtcqT3Tq5ABiyB?= =?utf-8?q?zbbvzqpBauKKU2xSPocMiYMrJ9wMsp/7XmQ2JiaOZYfygS+ncjLM13Ke7pV5gEwze?= =?utf-8?q?HuBAhrxCjNop?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9caa5389-43a3-41cf-3002-08db83785f38 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:42.1269 (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: R+bBvtYapY1H0IE4d2dLKP88FupARbFpqMfPNESsYfr4cS+Y5OUz27K6+AvXtADfgqK6+siosiox3mbnuE5hDg== 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: 1771292482819994604 X-GMAIL-MSGID: 1771292482819994604 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/omap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 6a259563690d..9fb8995b43a1 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -1506,7 +1506,7 @@ static int mmc_omap_probe(struct platform_device *pdev) return ret; } -static int mmc_omap_remove(struct platform_device *pdev) +static void mmc_omap_remove(struct platform_device *pdev) { struct mmc_omap_host *host = platform_get_drvdata(pdev); int i; @@ -1532,8 +1532,6 @@ static int mmc_omap_remove(struct platform_device *pdev) dma_release_channel(host->dma_rx); destroy_workqueue(host->mmc_omap_wq); - - return 0; } #if IS_BUILTIN(CONFIG_OF) @@ -1546,7 +1544,7 @@ MODULE_DEVICE_TABLE(of, mmc_omap_match); static struct platform_driver mmc_omap_driver = { .probe = mmc_omap_probe, - .remove = mmc_omap_remove, + .remove_new = mmc_omap_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:23 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: 119651 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1679167vqm; Thu, 13 Jul 2023 01:41:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlEry5AqWJ9ipYy2Ibyn05T3qL62gKrzjImE5nFZmYepuVrNtB9FdFLbAOGUjY/qX9YL5uY4 X-Received: by 2002:a17:907:3e1b:b0:98e:7a7:60b0 with SMTP id hp27-20020a1709073e1b00b0098e07a760b0mr1014993ejc.65.1689237714475; Thu, 13 Jul 2023 01:41:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237714; cv=pass; d=google.com; s=arc-20160816; b=OSCyf0i1A22s3JfXfc+0GZE91wMvtiiCFPD+3TQaKppeQ6qgedxwUm0QmtbMzYgP4/ tXhgV2EmQlhDpbcB9hJ9GtgvWmftKK+IvffGzS3ytVe5ZFPKizlkRNzMubNSZ7bb+o9k fTQrt0ARxA6mefX+eZ+RxG3u1Avu0dkZQI31vz1o8ob4gu5gPo92e7AjgjjcSPUf2njr WvyJM8pTSxLumSLplPQevSIMK5syl+67HlNKo4o20oQrfwCNRIWx1wU1N16YopQsJFRR rk+CG+YtmvlPRne03LWPVN728uUihgIW1Fne+jG9i8n7KVH4tONCkc6tkO1W93mVrnot I/Mg== 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=gkUpr7l0pDttVGz3kqCsUAr3ho/CgWL/40WVT1faxUc=; fh=Fb6P30QbJmZZcgekLxd4O6Gwkug10RvmDkc4bghVWeM=; b=hDJHIYXrUHZtK5w5EaHmcL5avqYdk1TGrNK7xp13c9OvSH0NhbCbQMZh8o1lxevqBh HjsJX0CTPcgeIm2NEE4KRB6sOdtkJckxfihoyiHjxkXxgPGS+8S9gOcAkyq7zX2RJbw9 rjch/qBQ/a/RhLDT8PMtIfDweEGmOEnG6r5u1Idf6fIsarQUHI6p/9GiRDatXT2x4Qmf +vTv3Eb2YtdFvJVLsOKMZW4fZjlEZtgICnjIUVI0AWAVSGnHBy01WHQWBqqIMiuYsoBe k00L2FYY/p02TAC/2x4nz/QNJB4RG1qb1Su3B9nKWnnA1XeJag19SjicaSJdj5VRb2J/ JeUA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ANBeX31i; 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 k18-20020a170906a39200b0099396546fffsi6641346ejz.782.2023.07.13.01.41.30; Thu, 13 Jul 2023 01:41:54 -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=ANBeX31i; 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 S234183AbjGMILY (ORCPT + 99 others); Thu, 13 Jul 2023 04:11:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233746AbjGMIKN (ORCPT ); Thu, 13 Jul 2023 04:10:13 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2104.outbound.protection.outlook.com [40.107.215.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D77E35B8; Thu, 13 Jul 2023 01:08:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=he+1XJJsxvToGLZ45EtF8h0p1E3ZLrmgQ0OZWIu2YeVTe7p/bGHNJi/nRRAlSL8FScTfyx8Y5o9bIPXcdphXhxm9cR6sUrum0xWTn9Jo7kIxJ6dfy5x8jRdp2Yqka0m0PkASDTnjHs01zJX8tmQOZ8ReCoFeQsJyG6KmSd4IsdBg7kECy58ZkXAfJQANPZtrg8iy4FFYAkU0f6WFeOVgXkaq6Mf2sKoyk1cFlbMc18JoC0knTq8eZp2NACT16df1PGsiTZPcEQBbAjfME10OlmIrM4X17HkM1wZPs5Q1Bw0TiiTzClEXQLMhxS+zZAKyhWkjFTSRPUMjvjGsW2OVkQ== 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=gkUpr7l0pDttVGz3kqCsUAr3ho/CgWL/40WVT1faxUc=; b=fhFkYKjgNGz6QJwws+j90yXbCojVcL32yvZaLFwJKFapzKmVzeOfOwrL5FJxB3QDliboN2xnvU5/vk5DsIWmDNfi+riSiYsY19J4xxYUbb03NfxREf4UZ05dxs7/zFU7XwSy0XveiyBpIADPE7oOxJxceBumbcArt4p7nnzbriPjQnWYVqATCznkPhESSX3M+TFiLq04qzaKgWC2lU//PP8O2/Bgid/Y7etqUunNAYN2POhxGkaqLwXZO0T5cock4w1KhHn/6JWdTmbnAEaoRT/GJXKSUqAuvaJBb+W/WDU8rokGE6qbY+ac6nEIJvDCXxyEaGrsOW0c2NPp1pZQZA== 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=gkUpr7l0pDttVGz3kqCsUAr3ho/CgWL/40WVT1faxUc=; b=ANBeX31iKNXVnv3rQphkJpMKfWR2e5J9SqKu9mfyeFESwWQDb6WcrmBm3AzuG6rVcaa1AW2ddLVmGkHGTL30n87QHQMS17f6Ebdq3YTe2kCWolNZVnUDgcGfLTeQ+ibtX9dyZzt23/PeYyRh5fjW0OYjYRLpyLjJaHGr+7YcuIT5d3N73KM48UXt5iWTAqkjMbxSpwWJmS10ONeWfU5dTr9jliqPxyj2xLv5zWsZj1m5RIM8oIMp0crPx4awQj4CvpgNTwmZCBysTGJFNo7Hsga2qxYtW3Lha7Mvo5O/FdFAR4/L9cTT3BS1UWlqP1WdKAA55CuxKFdssSnYWH4Qjw== 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:44 +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:44 +0000 From: Yangtao Li To: Jaehoon Chung , Ulf Hansson , Krzysztof Kozlowski , Alim Akhtar Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 14/58] mmc: dw_mmc: exynos: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:23 +0800 Message-Id: <20230713080807.69999-14-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: bb9ca095-7ce1-4e1b-9ebe-08db83786058 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sadgiHwLkT834EFXfPP2FjNefEI+UIKm/UGlSFZD3eH57fbg4Exljn7UhkfSPNFe8mr86WznNAwzwMEEhc/20oieMxMYqkhBFr1eWKW75duy8+FzUtx6XRPNofR5zd9/bQgrvM96FoebiNh6AXuuvfO2Q6d2YLDUOa24Pj3jIzNf4JkwLunPZ7DFXkhV4LjcOnhxIeRHRNChE7XgckZVMxqbGvyGZ1zMN7XLS7wh5neOKfqHz6rm9ggCnbhATolMuiDkclI449KtDJg16i4IQ+n7Hvkpoq6F4MFsFL/Yqk5bvXdD8sIA49SaSGMR7I7WOM1nEz7nVR6YrjfgPyO6As9Zb3p1eK1lyWZvuEAz3vHHyzFsH4sbX8Kc71ksurlhiTG0E9NUJmSNxE75XZZLj4vCM6JUr1ms9uAP8XLRJzBxKuzEZUjUhra4ntCS73Fz44AFdDM3Apzh5pDj5ij0PtHG0qdiWioR+vlfgOVMkpBKWJwSnvRPdDtsb3gZtGeda4UyD9UCjlw2wzWK9fpUd5vnrDjNdFNnDoNaXZ+vLkXKrekTRJOrcZv7yLIiMbJI/R2Cr8GMLwIFGK6HrbSKElmMVyudevP0w0sbnNfIv2h9ZCBl357Yc1E5LVBEtHEf2Rn5fr4otawjzYQ8msDEzhMdz9eyo09DIEBpFhQA3/Y= 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?LVWWbwP0JIEaWr397Lg5Yo/giolg?= =?utf-8?q?nW6sxsCigGOlZr7dl9cV2FaO4Vs624qTaXWCQhRfUiLcuxoIGhP30jMlybwU/IFlk?= =?utf-8?q?rH7d10+P23ZatgrH1GzvPPgiolr+cRbr7gofbOHTNbQbdm10XLFG3ICJ+/0llZTyw?= =?utf-8?q?qLDdUiHdtHGcEF1uelcpwzHsgZVwEp57QmWOAqsXypXbOyKmhVyzyE2HyXschuA0V?= =?utf-8?q?2pTSW7JKIwjPmx6gF6rNUhCuJur0Gn04JBmjoYAkeL9wCYPP9q1hiv4BeNhKheE+f?= =?utf-8?q?Rll+hpUhOhpns01cbMkYZiEG66R540Z8GI5vEHDoY6TlPnVIkMJXdgokYOehtNmbe?= =?utf-8?q?TamOIjdRZkriXJNLiYorF3x0m3w7HAbj/kFMxRD5li6+I1RPJNBLYrjEePLsOyMzT?= =?utf-8?q?1R2W7Z396A83T0zaZEibyYKG6bz+hc09Q7Z9b2OszhEpW3YUtz5t+kZj8/+n5PLD2?= =?utf-8?q?BDa+4Ugr+N4XyVpUdcY0ll/Ve7iYIPsIxSQWRE/AQQ4hRXDYJ3682MX0BQ3DCkywQ?= =?utf-8?q?87MncI7VUsThHwibhPBbxc9xe+FecUGUNF9ZfWsPy/aaLxA34UjF8E4d8sMurPsZY?= =?utf-8?q?L7T2li83WbP2pfw/ErT6rFQdS/m7g5aDGTZX5564QZGCv1+fKLvf0cqhXV8LXc0KA?= =?utf-8?q?ZxtqjgfOuaGbQG9RJqXWFEoU6vG9mIppp4iZes+eib3XRMkBx9harlJvmPxV7Ppo1?= =?utf-8?q?N8cm2CUPrmO4/VLz5yVCjLX+/X/GERjer8NI85/tSADE5Mq3Y2FTAim6WS3QvoNX7?= =?utf-8?q?SUn3HRidAU5o5TzMTGpjXLodUQWDN+TiAKN4O+vd502uzNisR5x4OrP+VUNP9n61r?= =?utf-8?q?iidX1MBUdlJorfX9WOEtcva3h7J5/E4G9QoobulGigD+YBi2/V2Qf6po7E9heIrvr?= =?utf-8?q?vj1p0ePS/suINuSulbjIAo2SD1rO7rZS8lNnYVO1OkTn4RIx3X0mwUGEaann4i26Z?= =?utf-8?q?0QKhF7jmH+qL4GhZX4Sd3+mRZhyjq6PALyyWYEgo06X82PcKXSdB2vaPWDV53chQF?= =?utf-8?q?JoPZayLh0sV6sWYPSoGuYjHTkuOCevNNj4xarm1NAx44RLV3jm4IuRrhIXPbhnNSU?= =?utf-8?q?rxHZACZDCv9R+oni4SRe5kaewczdVOm1pfGUJdKrIt88a9vP5dEdBw/NdWLAQ8VYV?= =?utf-8?q?o5ACucqFM7k+TGWDRgJmnO0RDy4WgVGpTSTwDOcBTGSIRaCG7w/XCUgPifoOcEQVk?= =?utf-8?q?Yfp9IewuEr0HKeMTf/Abhng+upcHNPdUVp0KWsgd6matQ08hvjBraGW6YcKZ8ONlg?= =?utf-8?q?ntWrCi1XNH9++Fl8Q4iDg9OqlVyAJ818pVfsSg8f1ECDJrhggiEHChGDqDXPePij0?= =?utf-8?q?w/EnqfwT9o+pNlMnY+lFvFCaRv6T1wYNY3jZFN9ODQEt5JQtgq0YIwsKtuzD9qvzm?= =?utf-8?q?L/R652peiZsAD3p5Ov/qkvjL0u4CkjTkV/GC2vdv+92/eulQI2kumG/CADYUyJxcQ?= =?utf-8?q?Blygp9lvwJLYyFYEXM+qnZiEEm5BV2E7R5DabBZGrI3/5KjRdR63WzCx+0BcUpY1V?= =?utf-8?q?Sfk8sA4O2kXl?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: bb9ca095-7ce1-4e1b-9ebe-08db83786058 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:44.0177 (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: I/ITy/xJukbVfHRxXI1tE6p+T8b90XpPD3NXMY45ZhYQJ2Qbxm0sFFmqEHZi7Zk7VEvd1TkmlBC4CTtCQQgy2w== 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_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: 1771294069069773325 X-GMAIL-MSGID: 1771294126139438246 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/dw_mmc-exynos.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c index 9f20ac524c8b..698408e8bad0 100644 --- a/drivers/mmc/host/dw_mmc-exynos.c +++ b/drivers/mmc/host/dw_mmc-exynos.c @@ -664,15 +664,13 @@ static int dw_mci_exynos_probe(struct platform_device *pdev) return 0; } -static int dw_mci_exynos_remove(struct platform_device *pdev) +static void dw_mci_exynos_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); pm_runtime_set_suspended(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); dw_mci_pltfm_remove(pdev); - - return 0; } static const struct dev_pm_ops dw_mci_exynos_pmops = { @@ -685,7 +683,7 @@ static const struct dev_pm_ops dw_mci_exynos_pmops = { static struct platform_driver dw_mci_exynos_pltfm_driver = { .probe = dw_mci_exynos_probe, - .remove = dw_mci_exynos_remove, + .remove_new = dw_mci_exynos_remove, .driver = { .name = "dwmmc_exynos", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:24 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: 119613 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1668364vqm; Thu, 13 Jul 2023 01:14:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlHpgLUwq/+p/0rWLEtkJrm7I2knDMkqJt1pmykEkrKqGCrSlIpO7kZwXHNfMlf78EiJTC7u X-Received: by 2002:a05:6a00:2d01:b0:66d:263f:d923 with SMTP id fa1-20020a056a002d0100b0066d263fd923mr567038pfb.20.1689236090598; Thu, 13 Jul 2023 01:14:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689236090; cv=pass; d=google.com; s=arc-20160816; b=agtg5g1X02qF0oYpG1K4ELFixyd/vqcw1gH78r6wuESIEYWZlN+CPTcX1XJL96rfs7 7pyPdx44GQtLA9N9m4RvpmzklJxKOUHorxTqOOty9jvEd9oUq9bottSVYC1Om1GmTGdh qfnlmPtmyOUgNRJHx/QjXZl/iSsVMolZdGet+GAyHU7tSl4uquzdvhreE38LvVIWA9Bk oUAQEpOXD/KkhRdac3hDwqGC9E+yoRty/8TXYfesJwmwdC1RafMKl5eZkoJpxvsv/uCA FI7k2NSIazM1Wxkgz3os1QgFlMjDriJO5fcghsR/fTtw305QTn74RvUbm1KeriNQtkM2 NT4A== 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=fGKTRYq08V0JvxsGHP5msYQNQ4gzgDy3xPfXbsZZVBw=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=RgMMKQqfRNDj/IS//op9Xb849HPa648HJL6EOERUwcOy0iLhdLDp+Fr2EPN4LdLIBs dgAC71Q48DWhVY/Izm+HyiE9Qb7ppJOhJ//Ay/enBtyGgs7tGCRAxVpxVM6Z4lq76W06 5aIcruZbQ/IgK3E6k6h9vzawifcpfargugttOTJbVXXHoN6lfOMO0dAAcGcLntfytTIv vW/Bi3lW7fc5Iudo9BnAcpii9TTpfDBimPFqFzmhfyMw6FstkdtjdA7C4AntoaK8RW3u Sgq4ifYvz19b4vS93WbSrCsJZxmj/kDvA4jp6+XgttqHgmHuS2l3/z4K8Wu/aG336NIH 2bTA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Q0VymLNW; 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 b13-20020a056a0002cd00b00682d831af28si4574855pft.348.2023.07.13.01.14.37; Thu, 13 Jul 2023 01:14:50 -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=Q0VymLNW; 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 S234197AbjGMILd (ORCPT + 99 others); Thu, 13 Jul 2023 04:11:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233842AbjGMIKU (ORCPT ); Thu, 13 Jul 2023 04:10:20 -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 C7CCD3A86; Thu, 13 Jul 2023 01:08:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CqXRLArFgAnr3xRxhFqSPk8q8bYuQc+Mt2B9ZfKms2Obrue78OiGsi53mvuaLLYCAUYIctEfS5bJSewHn4+LuQhhEF5JCQkzjTTL99Qva6KmtrqQuxLkscmOGN11Wb2qMghTLY21VUUjByesMlrFcdQaY/+gOt69M49c/UayHAabiZb2vBFfYTRI+lE37AOBUd7q3Ak4RBHgBZUizDYBfSTQBac/ArLlu9KEX/cwAi8X2oVR92xbJg2mcrk/wCiSHWlgDVa3xZX9qgkXk0aQGd5e0UKFDEmo5aQHyzsXvFGDxEOGSysicSD9HmagN1RjtzwgpM8JfNdTJBEjK+ybDA== 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=fGKTRYq08V0JvxsGHP5msYQNQ4gzgDy3xPfXbsZZVBw=; b=NM1olmGIG+mWw5zZnl0sBxZNHupDT9LAgnTboxZyQL5cSHCpE5fL7CWDA3TsbsWt0FVEUiSK6Es9+gyRDKpkhFXrjzsddH3yPFMNAVMwdGJa0aJ2MQ+hhx8GqDXCfpwt4KEzdFilY7zGFjA5OWja5ZHeFfMToPHoyc74lNVcqnpBQbz2xgyflSq/ucAJBTjYHBB+IGo3tKRdGmaAX56f6SOjoT9OfaiOO/LTPydI+hxdaGVFG/8w192YvFnJ558hykngSOTXE4+4hNtAa1gH5ZvRpQndm3NTsbsbKDiJrGWs/kPLNv/OPHkTduPzfjqthI3t/sFch2JUd31T94HwXw== 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=fGKTRYq08V0JvxsGHP5msYQNQ4gzgDy3xPfXbsZZVBw=; b=Q0VymLNWjYdXUxlnR1L3p/aDzrV9Zbmd4EaGoMUkMmapxJuP6iqLB2bV+V1vibU+BHOAVqRA2lKgY+PDpMGW0jG+tS/OuS68McZCXFt+dGLHkmaIZMYLGn8sLXwp2vQ8kJLlUlGMpny9K85Nf3XNMBVEInN1i7r32jK0SME0+mhmC61oKE5ygo2ICNsFbhydV7rzM0ADDSF5mZ0Sdj7CEy1DEYP0ylIV5WfVNvDh6Li0JAkqJSVcGEDJ0OQ4850RfqLt8eaghNl2p5VmX7NXQ9YwkW5d80w8LP4h9hNglkqfzqW+spxhf0GG1BJLnvWVDHQCZGhBYm3aBUjIpAQYlw== 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:45 +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:45 +0000 From: Yangtao Li To: Adrian Hunter , 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 15/58] mmc: sdhci-pxav3: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:24 +0800 Message-Id: <20230713080807.69999-15-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: f95b1423-929e-4641-5dd9-08db83786168 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L6ElLLyIIX1SrnUPbavt18ms4VENk9Q9UlOrP3vQ7QlAt+Z6OP3Ml+lbRB6ADvTTMDqF4mKdqRuOl9eugdun56a5ssDw/SJXmag02ilWtieXR0nixearuNKjvXOppyYeU+2/YYuuntTcnHTvP+sSfgbVcts7QL4pYZFqZx5U6oEww6uF7OZD9j/3Rtm8xsx2XgEsZPHH2Rgq8BWyZPeN6VwmAjnbCM/WoXOocYOwM1yqG6sokQrKoekRZJor49YKguhWvJiOj4yNrABeS1WUa2CAI5DhVsCJX5BfHchZjzThBX4VeYmQGu8YK0sJttzckfa9vQtH4vGWFRCh6U3meGOQOD8XlRuFvRnGHyh0jW6j5RHfbaxb0U3czNzsEao6Rm75fcFGJzC0bOOeRzylvZXWUDeKYJQ4X+1yDwm0cl/rVzL8tdguF3IUXsMYi2dUvvgByRuhLzQxm8MoucL3eaPlpvAhETgBzYdyKWNl6s7Gnv4yPeev62d9ys2GVUm3U/PK3bYoWnGOyCbI2madqljTS1uMfost/fynfjWljxiG/4/tECrSv4U/l/xP97hQIhk211tsyJwigHWEw+ws90DF1ZF0XGPrGze8cJ259N8t2f8UxyFFy0SCNagBCsDJ8DNt6ZZptHWtLbbsXNBfFzYsQn1fhBKr1jHk4N0abVM= 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)(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?ASBl8rYI/EI0DuT5YunSRs33p3Ea?= =?utf-8?q?zSSR7vWrTxqWtjZpkR/7n0rhTWfl/qMrT83Txl2ehwpBqIK4s8wWsxcXvjgH0Vm9T?= =?utf-8?q?ApxQphCncBN9POuLyPSLJaKK5EbuzlGWLL2S2VVsE+rmucTIWTuiq/iF2K3gWmreZ?= =?utf-8?q?OhXkW3Cimh30TwW5gKPof31KfI23vJRz/TRcoaj0EcKFMlEsxzL+jKfz/RYf8E23O?= =?utf-8?q?DS2azhjmV/MfrAN7hKBJ1FChNCydwihv4KX2ei0I2Mm+1PpcLOyZDFWSP3hAo+ILE?= =?utf-8?q?IUah0+Si8oqVgcIs6/pVsnvEwZXoewexciggxSKVcTn/bOYRaZyFF4cFMjItd8peB?= =?utf-8?q?Zszn4QDqkZFMOgA/YjIubUg1S+fNxpxiy8Ti9RDmSl+oAAjzKpnXfhy/KG/325CMb?= =?utf-8?q?XmzkX93XCmK/Ig2FG3H0uljZ5VnDVOS0zCQ9yXoWRps7CeiqcBitjvquz/g5feV+/?= =?utf-8?q?4TjNIi3qGKP006zFp+uakrClqK2szpar9aWX8zWCqXLPqzmurslhwQRPUK0KoOF0X?= =?utf-8?q?lIJvDp+gtYqn/4z0ZRmgTRsfwH2qR1ySMnQLpSLBK27EJ5YRl3Dtu4tFQC4ZBDMNc?= =?utf-8?q?pC5s7EUef5pF+A9Hv8a7ZAA3LWyhOHaTxPhnGxL0HVUQiqH1sMrmHpsd2mQ91UAtP?= =?utf-8?q?ZpVww34knsGqKI9yOUVhP/GLbMNFARnvmJuGjSU4mvuS97quoeyvCv3I6D8oS6gqI?= =?utf-8?q?xzqfqkcqjV6dPKyNrOCsJ8hlQF0l/q66kHigh01OpoToHlqnh8xg+onVWmwI11tMz?= =?utf-8?q?qj05+h2dRYsRUC4izF+4GpoWOdOWExXrJU4djR54xhkJGo7ForgBBCXdBskI85Qtm?= =?utf-8?q?UciKGQ6PnJCyWFKFt9FYOz3sbUJZQEd+xuF+MXIRyaZoPO76uiHgny9OrriAZfx1Q?= =?utf-8?q?eQyqt3zdGmJGIy9+OLu3LK/tRUkWjOGCzOircrZjdoBJY4Xvm+RHZjqOEPDzQtwOd?= =?utf-8?q?bE/13fD59iNPmZNnZYzZ/abGuslMG0PqPtdkNpj18rJRhOmq1fzU/52h6icNkuLEE?= =?utf-8?q?m0l8onaN1RXKR8O1OtYivFL6kGQk60NeiFRaH1nbxXVYPli4uinmwYCaljX3V7aYc?= =?utf-8?q?m76/+bg1hArGAE+PhZ4cSVOdMVE0oBfkVgsMfol2MAzMkvk9AQbmrU5bl3EMep5Z2?= =?utf-8?q?R6RbhgQC1b9R7Y7tvd6hKbGMfJr7AzdUIk7T3tl6mVDzilL4asBUamhkcgfEccgHh?= =?utf-8?q?aXMMS8OtMqT5CI7Gx6Y6l6fYxyRoynnTH89VgVkaHN0DacVnNST4aBfuYhF13++zO?= =?utf-8?q?B3AMyp+9yeCibz1C07KrZ6ANt1yt286/6KpXaaEym8gOI70wDKyBlGFNGPZwgjWt6?= =?utf-8?q?gfLZ9VadB/7+mrl9nHECmlo5RwfGEqOLMjl8IL5T4jkXJlq4czVrZOH+nP9lpPZt2?= =?utf-8?q?PM+GTmwMTGs8q4Cj2kUok43pg+DUcuavt18rwm3bk0bOsF9SoMivZm1zZU6G8+Yc5?= =?utf-8?q?XDAQuV9ftPhvXPw8FGKos9LX2fZChl/vQCZ6Io9RKKzZO2Uq7oh2njjFsrZLlz+Km?= =?utf-8?q?mqgZzxUd81D6?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f95b1423-929e-4641-5dd9-08db83786168 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:45.7958 (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: qXaFxOAdWfzGwrBw7VpJAbdig1Wo2kT5z1BAMpDA38b7dwsulzPOyrounYSbZR7ZtPJgpkMYA6xDIAZuklyW/Q== 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: 1771292422781028251 X-GMAIL-MSGID: 1771292422781028251 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/sdhci-pxav3.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c index e39dcc998772..3af43ac05825 100644 --- a/drivers/mmc/host/sdhci-pxav3.c +++ b/drivers/mmc/host/sdhci-pxav3.c @@ -470,7 +470,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev) return ret; } -static int sdhci_pxav3_remove(struct platform_device *pdev) +static void sdhci_pxav3_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -486,8 +486,6 @@ static int sdhci_pxav3_remove(struct platform_device *pdev) clk_disable_unprepare(pxa->clk_core); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -570,7 +568,7 @@ static struct platform_driver sdhci_pxav3_driver = { .pm = &sdhci_pxav3_pmops, }, .probe = sdhci_pxav3_probe, - .remove = sdhci_pxav3_remove, + .remove_new = sdhci_pxav3_remove, }; module_platform_driver(sdhci_pxav3_driver); From patchwork Thu Jul 13 08:07:25 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: 119620 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1668859vqm; Thu, 13 Jul 2023 01:16:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlEL4fqVulBFw3mLmK+vUi/lQxdzs6dzE3hNZD+6HHWl+uAonKglBj+KLw4zYTgBLE/1HHIi X-Received: by 2002:a05:6512:6c6:b0:4fb:821e:2241 with SMTP id u6-20020a05651206c600b004fb821e2241mr807407lff.23.1689236161158; Thu, 13 Jul 2023 01:16:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689236161; cv=pass; d=google.com; s=arc-20160816; b=h6s01F6bali6S0FzFq6lO3Qp7d5ZKUqVnCBbRdt9VloqBtf0T17aTSRPNdJvmkywJK 2vUFYGxWI0G1QamiQ0O2mYAu012d/8kaE9ZcycbNW9P+N5Gdv8M+p4Kh771GigccmNLz vOt2OEgtmsYpW85qGZ7y/V/IFYaZdskVaXEo72hnmzMAlqDGyW5RB2qmvxUDzBXNklj7 fS5jvICh7e8IQ8X5STHWlu1NMiSHDAXRdy2nWV1tfKclm/fde0sy8gT0+omSBaxoZIAR Gn0GuTqOvvphoHxRGAxPU93zjEDUiKBxbkHe49glZX0trAnPc4xnxGMGsPlfFNC1b9on H6RQ== 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=SBCrlQifOoquSJLsuYWbDUS75795nZPusK2Le0rM6UY=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=n2zliZYSBEXtgF9UPTq9VZRUfYnPnUpNeafPOTQczID7+xMaNk9Uf5H+5aAa/NmQPu r2nPAUpMX1+K2hBgJUkI0O7sbvNQnzSwwU0XfS0Qs7KXBRarrS9kIbJc0tzM+/snvtdC jIeJJZ3nsAAnTKZqHT4q8gnwwQZ39NsfKkaei/A1er34/6yKptUWd4VcYDW6IUGFV8oa o03Uq5/Xh5lSZsUTNYbp1SwB5Q3xGtpF+OMKZ0duFs75muirDTZWGQ5WSAWVOfw6nhQ9 VrHM/r62pAJtD5KCb331ONfS+G7Jn+2rZsZ+BpiyoDRsL/AGWVqoeg9QI1Bb9nZ/MHLl AEjg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="TuxEa/NZ"; 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 b1-20020aa7c901000000b0051de2c4f947si6644025edt.643.2023.07.13.01.15.37; Thu, 13 Jul 2023 01:16:01 -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="TuxEa/NZ"; 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 S234220AbjGMILk (ORCPT + 99 others); Thu, 13 Jul 2023 04:11:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233963AbjGMIKu (ORCPT ); Thu, 13 Jul 2023 04:10:50 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2104.outbound.protection.outlook.com [40.107.215.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F9F73A97; Thu, 13 Jul 2023 01:09:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O6iPd2aJ8WUMhOKpHwXwrYePic78EHYTVbEATrGsjOyc9OTCSPF6R/RNWA8jO+b6luHuAX7VPRsW6l/P1xwhB6WlDpmEtbgoKY3ckWvaAZMJZyGpHoMFod6BqdLVGn8SH5ReWk/Y1rWSk9BxoCh8A9ZNTy1GOSi0XXSiE0KzZu4VUBAWP/bBX5QAR36eHwMZT92c2zWNBm6dZEIFiqvO3sqIM6RXabs8WFEwDklV1bf6jJe12ZF3Eyy0fOpv5ey8ojdCuhkMOiDbE1f4Af6XXNgx/EZvC+6RdHHxuWejCm5z/44fZUhTnPboSeMSzZejT18Khkn6RdUwmQNGICmkBw== 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=SBCrlQifOoquSJLsuYWbDUS75795nZPusK2Le0rM6UY=; b=Efo0nHwvrmDFTHOm3bZzjXSHmFZKEfMgtpM3yH4g3aJVc4Z5B6xvy+Cb49iJlOPxOuIjd4g9/IwIwnQEC0EzSBWsHtmij21hCfvJbBDqMB/VSul6ZmOvYikJoK6pUGUZ5HEDAFqkHSH1GTKvhSI32wZxuYVjIjfxoGsgmOU0u3PucApwVxRd4W1Y7qJRAqocZgt6ZBsIn/mPOU5LUyIZzwglg44gq+AXVn6A8o7bGqcAZatUt53jUmJTTNwFogXD+uMoTwEvo4IiavWD3bpm0NqIZS0JpBkSJ5kitx5txLMIUYuUKTbPrEvZEkh25i09HZAmAur1LObgC/XfP130hA== 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=SBCrlQifOoquSJLsuYWbDUS75795nZPusK2Le0rM6UY=; b=TuxEa/NZJ1l4T3XaxXFLvd8N3EjKjm983TQ+c+d6YEbok4HvGJvF/oZyz0Kp0vDtQQzPHVxuVUlOIVis9A4rbDkDCyYucoVMzF3vTdVD5X8On+ogaUsePjAu1oOyqwYtWGVw/XBbentvpTVlEZhsQqvSCtAGXdrufvVdeynu6FBsfuxVtGJAS4bsbwLgXKYNmSADQgSsvQHVFUD8YdeGzEUbR5P1SnA49Y+8sSqcLw2oldQXSYESoKyKSTwN7TGAdnfFReOD8SsCk3CvjfzcbJUXrinjnYbY9BrFn8mrEErQEx4WOCE7+Liy4p2DcfvHqNXJWeAbI5RK2QlHWx2Jyg== 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:47 +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:47 +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 16/58] mmc: rtsx_pci: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:25 +0800 Message-Id: <20230713080807.69999-16-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: 20bfc1ac-4b7f-4cdf-5e3b-08db83786235 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZYYuoWKLDHXftphrOyft+0HkyiS8M9ms5WycNBIslTG0lN3mNdeU7uRdoL3+i2kR4cUFOc7TCQdo+sRB5e89bklhHo+/xn31G8H2yufTAt/bKIFe9QbRGRG1iHIPtDuIPXjUJPMoxU6gixUT/V3zV/C5Yo0DCtI7ezrSHVPlB4vtlOANV2zz9RpyigMg+uT1zavPlGeuEo0H9tp6lvnvnBi0f3hRVWbaJSZGOqLiDDr0BpuUUGvMZ16hdo6WIRxmECgzQCnW3ZTvlz6wmeKJpdR2Qn5v1rZokgF4zGY6DfJoJWta5HPFYFUE0N4A6pVBXAktUDO04hg2/jVutmqYWcUssJHoB0FGRTaCaAsN8ccU7FWwQzStbDDjG60PRbD1STuygBh3q4Yx1+QJcz2QoFcsVTedR6cG6cdIwAXFIZUUmcIEYu9cYc1taEXMDlhJh+R19zM+d0s1kvBrnskvIuECZ0Olya1NgzV5vUdeEJg2fVtHlx2XpbdvXRKc1FNH/1vbuNecnG+MQInOZZOqXvOkwnWgGGZju1XD56u+OV4EE0Dq/Yp4qiptrbnza9KwGR47879+o9v29Rv3UWoloXk1DRNmghv/7ItA4LMwPZy+JQ9y5C73lleXniegMrQxAEls8a/KilnE7zg6qZPbErtTUzpSpSVBaegraiOcMRM= 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)(6916009)(6486002)(54906003)(66476007)(66556008)(66946007)(316002)(6512007)(41300700001)(83380400001)(186003)(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?sirV/0gpkr3dEpoHZLAJ8WK3Axee?= =?utf-8?q?V2qQseNGr2dBQZV8MfLoz1JZuZw42VgOOa9AprV49zDTH7ypANMF9QJcudejM5IxX?= =?utf-8?q?Y73O7gai+zPC+at99NIMGkbVF1bmRn46qes59WwHV2PjKLZl298Kepj/njUZkcEhH?= =?utf-8?q?IUUdrDNCqzBun656/0X5i7H1PWFZc4VYlLMzlURk1GzhwqytOhW6SM/ySWFIOaujM?= =?utf-8?q?lG5psm7Iq08RWiOnm4eIboan5IRpIUmXyHXcw35tUcT5mlEG1v+op+90uGvF8G3rX?= =?utf-8?q?1pyzdycrCHeA4PuVikIrb1ZR7TghwmSvZupW4Z2GYGOkjFuks+uGT6lxCjmUoMQ4Q?= =?utf-8?q?eReAZluMXkc6vxJ7ZKngvag9bZij5EYjPoznlmYp/GnGpa+bNNXJgGjLxI8oh13qC?= =?utf-8?q?zgCzr0U9aRvl61sDGohPSd/uAx/mQr0ndpneu6/iS0a5wSPK8OdOjLYdCVY49LAOs?= =?utf-8?q?aVInqTdN1QJ6IlD3TfLTLrL+cyXs6KkE4h6/NljzcKnmMwEpVdnFbLlyNqy7kVR13?= =?utf-8?q?1les/3egiebfPnYsBgQNEez7Qai0iyiYlgahkUgxiXZWP+yI4+fIeRcd8SNIfFh4E?= =?utf-8?q?b5auGGqvLCNS+vBPHb0RVRt6sgnZ/z7l3zLdF/dnvPrC3v5k/V/gNZhEAXEK+DSrQ?= =?utf-8?q?EIwgHCDy9O+f24wuHgokZ7x+NzWua8c4S2nM2nivoCRb1NLOPf7X067Jt6lPrxAye?= =?utf-8?q?Hdip+m3ztssqCS+y+DmOlwGsH3bh5L/rhy+8SAbYmCdJxPzJvpXcbmIPi+0LvxNw4?= =?utf-8?q?HFXC8KuzCL5nLEjEbmHvdLacXNoaY2bhNGwklqjG/OND6xdd8CE9SIUzL4qQ/Oxq1?= =?utf-8?q?P5yI9hp3wx+4TojuLfHxq+l2SiXZudNgWgSd4SPQ6mr0SpATuIyDsIhtV1pGif7Nt?= =?utf-8?q?KY7y9QTkobWjERYMXtwCBFP2C6oPaNRcAODdQ9WIolq8QsKNd2tXs/JrRG78hZOFc?= =?utf-8?q?XUX69JZicbHZNpPtEO78XdHr1naAp8ljCjnckkr+Gda30bF5dN5DY2tqw9UaCfmt0?= =?utf-8?q?YgBkgebE6zohf+6G3IqQemg60T0wtDTVlXhBjOMxMmVlK4CxviDFHI+ocV1X12o52?= =?utf-8?q?ZWTz+Sne48+AK2SPHaeC2CabznyIQmYzLZMT3AttWg1vLGWBHq48qoUbuvn19ym3j?= =?utf-8?q?a6nyanOVH+fe2w3/VMph0riDn6R+GY8iCd5UcxQHj+6FLJZDACRFO7yK8RVqeJ0Pb?= =?utf-8?q?SXbXmirZy8gjZ8+HPNjg2kfjlA9ImjhVb74CLYW5PfEtf7i8ajbShusz5DQxksQsX?= =?utf-8?q?bk5g7IxAUOgNTOqzuuyWniyw1jtJyUDcvwgjvAbDWtz748vVZvqO46Nd6yiXUdIBS?= =?utf-8?q?12piT8KYv1+9CqS/gSBp2NLP4fkHC1B1wXp3o6T6RtqzkPhF0RRhgbkDiUwQEjsP2?= =?utf-8?q?QQl7gQUadHn+d3IwKqEmA6OqJn2RVtxZJHgDZkBu1If9C9heHbGubBlyvgYdtMcBx?= =?utf-8?q?D4u1y+csXkwdE4wsIki43yjQCTUnLCK6aOPcgR7qN7MlaUR2g3cHAsKztIheQrG5m?= =?utf-8?q?Cte4L1FyI4GU?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 20bfc1ac-4b7f-4cdf-5e3b-08db83786235 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:47.2088 (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: i4iTMVMt/atlsNE+wXCxkBV/4wZ9xSM52c48akmT85Vo0PaVzrMs3sTwx29igpcPZ4JXtQASChndHgDQrHGNkA== 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_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: 1771292497079386362 X-GMAIL-MSGID: 1771292497079386362 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_pci_sdmmc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index 8098726dcc0b..5465a7225df4 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -1523,14 +1523,14 @@ static int rtsx_pci_sdmmc_drv_probe(struct platform_device *pdev) return 0; } -static int rtsx_pci_sdmmc_drv_remove(struct platform_device *pdev) +static void rtsx_pci_sdmmc_drv_remove(struct platform_device *pdev) { struct realtek_pci_sdmmc *host = platform_get_drvdata(pdev); struct rtsx_pcr *pcr; struct mmc_host *mmc; if (!host) - return 0; + return; pcr = host->pcr; pcr->slots[RTSX_SD_CARD].p_dev = NULL; @@ -1566,8 +1566,6 @@ static int rtsx_pci_sdmmc_drv_remove(struct platform_device *pdev) dev_dbg(&(pdev->dev), ": Realtek PCI-E SDMMC controller has been removed\n"); - - return 0; } static const struct platform_device_id rtsx_pci_sdmmc_ids[] = { @@ -1581,7 +1579,7 @@ MODULE_DEVICE_TABLE(platform, rtsx_pci_sdmmc_ids); static struct platform_driver rtsx_pci_sdmmc_driver = { .probe = rtsx_pci_sdmmc_drv_probe, - .remove = rtsx_pci_sdmmc_drv_remove, + .remove_new = rtsx_pci_sdmmc_drv_remove, .id_table = rtsx_pci_sdmmc_ids, .driver = { .name = DRV_NAME_RTSX_PCI_SDMMC, From patchwork Thu Jul 13 08:07:26 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: 119627 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1675517vqm; Thu, 13 Jul 2023 01:33:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlGUGHg+qXkt/oBqH5zK5q/HTvtMJGgidQllrChE8Q4bqG9TiUnMrO7tOfUzEbdckxNvh5US X-Received: by 2002:a17:907:c84:b0:96f:1f79:c0a6 with SMTP id gi4-20020a1709070c8400b0096f1f79c0a6mr684032ejc.70.1689237192333; Thu, 13 Jul 2023 01:33:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237192; cv=pass; d=google.com; s=arc-20160816; b=tCLIRbP318gjhtM/RQYnu+rhIPydM13cFAfjxMNDtcputoHFNMpbYdAGNOrO23lfYc VJHKgcDbZQWLIE/XZpmrdjvEph5vrNhy5XOzBQScdH4nJudkD+UgGEoTvwQP6rtfcNyA H9kpi07st/8Nwz5xA+CMInv58sBjqeWks1kxNduThpD249zf6kZJS1mz+XIC3wg/44O5 WS4qRf5DTmEjTfv4sOHOjMZtsV8ijYOAqp87G9RJJpYolXDmuGHboN2WgM0NQNGz0JUH 9ZeKpPjwAZN9uaZyZoLyz472fn0lB3dbd4BjU8kY+kImfOy4TpVBET4aX7tFfIHCBcXS r/uQ== 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=w+CTem6dHExq17DY+SzLyRt98v7BugU2JDEv1g8WLeI=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=XJC7IABQHjxSioEmNA6PxzqzRgmGdfR/9+Un/PR2U0TC9983mV5oWe9Qewdw7ndqC8 euEsc7+c2gIrbivSr3wpTQ5DzqAqbvp5AtjssJ6C0vED4lblmg0jxGhClSLNPVkuNO5v eMq7QEK/Ea2X/Yit6gWZ8iZVL1u63+Azt0YHthH6HfF7NcFq87SICIyjcGxcF8zNhLQM ubnjm/BUYsIGhR8thelvz9uVZkM1QUe02K0rwrBgrmrXIqt58NTmW6C1m7SMi+E6ae6f kpaiNaDMqtIDs7XzorsxtoFZygBYlyty3eZ6GJB9RrrMpVC96XSgnbyc6YKEaeP9ODyt Rb4g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="h/7+/0Jg"; 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 v10-20020a170906858a00b00993860a6d39si6773491ejx.355.2023.07.13.01.32.48; Thu, 13 Jul 2023 01:33:12 -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="h/7+/0Jg"; 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 S234247AbjGMILx (ORCPT + 99 others); Thu, 13 Jul 2023 04:11:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234137AbjGMILC (ORCPT ); Thu, 13 Jul 2023 04:11:02 -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 116D93AA0; Thu, 13 Jul 2023 01:09:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bYpO/4voLcWTi4d3dfR28v7GaLXJFeL2HqUq2m6EPonIUstHex20K9Gt0KKvzLpFd/rYLWhz8tgpJj6kq3HBMKwRdtG3o5FY7tgoB7e0jBHzMyF3ZBNVsOqwZo3rGkdbvcumpSrWzPaxkiuBE2AR1TgWZD2yBk/ZDn/iWB7vFmUYhvkqjpPBFYy6T9k6zbUK/gg7q/9doRBbNIStS4JZlGJhhMOw6UEJ6pKZTUwNZ7OQdwYOIQYoxlWkoxg0fXHpM9/ph+SdpVXRu/gA+RlNJQHm0JFtZZFtI2/vNaW5DsG2afCs4hFTNjcZ25na0ah3KNl757L2n9i2DhdyGqv2OQ== 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=w+CTem6dHExq17DY+SzLyRt98v7BugU2JDEv1g8WLeI=; b=Aly+bj1IrrkJUer5Fsc/iPrBjSGls2jd+aLDjmFQbcrT7R/9tz/thjUAwFQ86wSswOVXCY/I0X+FpQnK18lP6t1OxGEJHZzeLIPDBAogJZTuc7Ir9YVwa833SPKFHpARZXbCFLPgnMdNXk2vosSDeee9je52oGxo9pifwhC7zhZv6oUXVWl0NMblhU9vASTuvJZXtVL0hVvhF9GsG42RypIOta8Z0XU3rzKsIfLU4ZZEWteuC54yJEkwnMljtaPYBOnJsoylrRPqLKp22jzaB0Q0nVOUT5Kr/MMifbKm1BhIdLEUHIl1xjad3hQxWWXuzml6ITNrn2Ct43LUB03HWg== 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=w+CTem6dHExq17DY+SzLyRt98v7BugU2JDEv1g8WLeI=; b=h/7+/0JgQfgu8PqnwAN3vMYAR1BjH84LRoIHghilhp1RspockeWHBqvytpZj9u2e89jqYC+bOyVG5DkcGOCecmIaB7uuZ8RWZbUE2dw72J/uo9sS7x29zcQIuDoJlqG8lqnL5vKbrgn4uLMN+mkW1AC1D3ijQIStR1LlReStch84sYbn47gi+esyHGlQsZm+UqweeCL3uxOQZgBwuoUxTCmUDjs0P2aRLZgnhtexQAPmouj1VBZTySR89m/8ib8fJzr9dK1UrpX5bdDOeBrYEQrHsWBLG2LbnUUNPYxGGsY7NU9DkEbyrT4JlQ5S4gKkJTwz4ddKSF4szW8OaJsrrg== 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:49 +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:49 +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 17/58] mmc: sh_mmcif: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:26 +0800 Message-Id: <20230713080807.69999-17-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: f7977818-571c-4e80-1a67-08db83786364 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UG+y0B6CsZiWDx2Nr+tsmSY2w9rEgBOa9qgi13h1JERWMR68R9LMcwuSl71Ju59OjUEm4oljPYsx7/h00DizwmkJRS+Dq3fv6fclBtH8+TPBPJ4AX/g+8MXwr1IDng+svqQV3n40ZmxPu3bwJdeh/qTKRd/9hONsywbMgPDEhE/5gjlh2vqK6BKN7/XLdQe87NWF/C77e9RleVfFGYCtPbt9Mxs+sEWF3g5bw7IHZGKUCfMM+90p1SMstFcO1DlJgOGiExYXa3aL44AkQifOrrdVZy4kKf5r2JnCQDdJ+ivD9qohhlLmbeWduUDz8eSJHtti1rfMCMBPXLJcdIcn4CSarAl6BDAq6XfrYV6nEFJsSnU/kHH1xPEWMRWVQQM8G9gXHRbzJO45pjZaKsKjOuUv2NHKvylnhGELK5852KlLJGPRbcbzTAiOvwljoSNMxAOtwYqJiX+A8/BIP4wjiuOLpmOaTRqSkmuGNftC6PWOtCSX2q9WzQhp6ckAjvJcM6Or8foV6HbjyzTvOqvNHEBXGak84Y4gP5kVv7bmNn7wID/HYkTG0pzt17P6R5Nu7ZSrPTblF36tJLHBBH9TnB0uztPiBmjIwa3p27eVFlJx0lXWIwdHYgJPorD29NyFW0+l+cvY425qfVAhXQ9/XwY732QWkUc7/mSgvxWdWt4= 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)(6916009)(6486002)(54906003)(66476007)(66556008)(66946007)(316002)(6512007)(41300700001)(83380400001)(186003)(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?//Bq9NxBMOOAvIIfNduIZIm6WUjI?= =?utf-8?q?DFPvMQVXE+MdYj1whABPUyqS1bLVADk9JCNrMZIdv3veO2PSkdEddVkjI+5I42Wr5?= =?utf-8?q?gYdfWLoXkhgZR0LXo5g02UnFqF+iFW5CJNmZajENMnMMc1zvMV31UvqtXnJ0Ibzbf?= =?utf-8?q?wFimM9cfagjS7OghXFOhEWclQds8JXShq05VTfTWyvi6DlwIqQCFOAoAchNacQeAW?= =?utf-8?q?2hInlglmADM1jqdQ6/fTRg7b52QJDc9TaCqtPLzVHHESSqitnSPglcAn95pzva+Q8?= =?utf-8?q?5FXZc0a79kBWxn2zod8jGE9gebejZDuDn7ROpUZFFcDnrwimWSmFqT+seZyer+7Ej?= =?utf-8?q?xCNw5fMdRnyogOmjQYO46oiR9YzAIgTisu1VpsSlUikgRga8Kp1YwZHCnvM4HhFb4?= =?utf-8?q?JLpfpyyu8PGVOOHUx9cmtVtDmFgUUxBslvpJa/ErrOHLdTt5SdGo1qwcLegXhHniK?= =?utf-8?q?RU2r8QYISyCzIGCJBvoWSHYQlVJ0eumdFDaBmuMp7NaCyHi2slmsWEY58B/mReuwp?= =?utf-8?q?u2JzLPVq8oP7wANZAD+PSaygNmt6KpjGmTddkm7sEomWWQY9HbqxiYMpSI9u+4vO1?= =?utf-8?q?s/IeNcYIEXeE5GM3x5uld3+IeKAmVhpfld4LirzB7hhZvTDC4S7YKER3GGxWpGK4D?= =?utf-8?q?C/VYMoaoP7FgozrVyTQAfvgMzQUdodKBRREZ1YsM+er9+QGMU9uGl4BW8oQvkwy+f?= =?utf-8?q?erRxOafTthn7uc37iqjEFNkUb/X68b6E579fdUpOYc8d80mGhKoJymUkIyQgYUsXh?= =?utf-8?q?+TvppQqt/OiYlSos/KJmgdvauTEHGuLTEc/BCD6A08mY2VSf9lLynCfxac+iPla9D?= =?utf-8?q?fnpjBCdvt+hF2/3nQWDm0RbBhWSiEAtZh2tpRqpB+QysNOFDs69gMH2UuZacYacdS?= =?utf-8?q?AWMFYZv4D0MyQHbmFk14nK3WzCwz5mnF7eeJfkY9ZXVmTe1wTyJ+vsLgYzm+UXEgq?= =?utf-8?q?YCjMZP9uogMbDbop+uzaAkZD4838UkBiR6IjWfdBsgLgSknYq9nmq2Ce0rBt0uONi?= =?utf-8?q?+OEbqu6fot2IW0MzfcClXRyYYqMcqmevwleMIg5WkbXQ2nCRe70+BextcI1cYRmVT?= =?utf-8?q?wv1BrJnjqXpGYH2O9ydIzOKUCkqjIIR+EZJk/pcbCyWMacgE0/wgF2fYobmm/AehE?= =?utf-8?q?CMzLq7AeRScFKBdAU+uYONaSGF4ItyGoNLUQ+3GNAatjZX96Xa4ilnMO/QYgLNkS6?= =?utf-8?q?APi9e952ppL3cRHNTaXocHueHDUu0BpzZ2RTu9yH/jXo+S7QNnKwBKsSY6hP4fpuv?= =?utf-8?q?Dkma72oP1J3OYR5Si4IOlL9IwJdrpGQD/byu6Ks0T7SvOvykKnCn3dtx8EGfAtBQw?= =?utf-8?q?jzJOOV+4UzK87jnxqBOadSGvdjId5E7lUVpoMwLSMDxhiIsKJDvJH8w3K5KDuFHUi?= =?utf-8?q?pwKFbBYb+sdYPEHYtZNJd7Y21qYfs5x2dtP336ZKOs7rHgX8UTk7CxRta4NXiRFnW?= =?utf-8?q?/NSo6KpchAlMoGueweIzLCbGEkHXY+Ny7h+vCBrkBbFt1ywy8MyqgpMW6S/YJoB41?= =?utf-8?q?KdzAZMHeCcU5?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f7977818-571c-4e80-1a67-08db83786364 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:49.1487 (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: KUszJBISyrIyN+EAK49YUDYwQbF0dgwZI2LTdLTXQdiZheqsRW9xxAtvwY01CZf9ZNiAbSxQxpMMsodHgFregQ== 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: 1771293578253384001 X-GMAIL-MSGID: 1771293578253384001 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/sh_mmcif.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 5cf53348372a..1066e0c2831b 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -1509,7 +1509,7 @@ static int sh_mmcif_probe(struct platform_device *pdev) return ret; } -static int sh_mmcif_remove(struct platform_device *pdev) +static void sh_mmcif_remove(struct platform_device *pdev) { struct sh_mmcif_host *host = platform_get_drvdata(pdev); @@ -1533,8 +1533,6 @@ static int sh_mmcif_remove(struct platform_device *pdev) mmc_free_host(host->mmc); pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -1561,7 +1559,7 @@ static const struct dev_pm_ops sh_mmcif_dev_pm_ops = { static struct platform_driver sh_mmcif_driver = { .probe = sh_mmcif_probe, - .remove = sh_mmcif_remove, + .remove_new = sh_mmcif_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:27 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: 119656 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1679836vqm; Thu, 13 Jul 2023 01:43:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlH6YynY+eNmiL37XmyryWY3UwhwGFfxcj3BeINvugIYmFfXYDQ3M9rhcyRcPgE8+/XUtesO X-Received: by 2002:a05:6808:150e:b0:3a1:cbea:3bf2 with SMTP id u14-20020a056808150e00b003a1cbea3bf2mr952180oiw.11.1689237807283; Thu, 13 Jul 2023 01:43:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237807; cv=pass; d=google.com; s=arc-20160816; b=UM59W+KAUf+jLIxInPVLx2kUR4ndw3NblUlpGjGh0u+O5dPJGCZuLLgW8+nzI7Sr5q jsDbhKP5nosblauFMI4dRD+OvPn8USF1cumsljyuscfEnA7eSqbdXeF7UHgw2Vxznm2Z HBk48qyX7nUq2rqhxdfZyPoCUBS/6K52khfKuj/O3pfCuPiuPDLQIVsjcWAtBIMRFx2U qkysR02Qn7L01mg9mal4aMvs78wjhOJQK3Lwg+KOxsX5/iRUTF9NVWwy/+5anD92Q7a1 LsXuP2b4cvrw464DO2W1UJlMa9uuiIhUw7TVYKYWNMhj1ts8q8W7BA0jcHaer0wlAGFG Crbg== 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=sJmqNg0QneXTVaXei41tdTyNv8PCANAb8lCgdK9ikdg=; fh=sy30M9eLByds7Tlvf2H8U/dRo3J3gGi9Sy6vmtIbxfI=; b=HAsRVZmTi06KmCns4uzJU13fJSmGa/jWQm5dTTcfLSeryEDx9JEGCpMx6fIO9YsmQ2 jxP6HkWHqVUyE9Y3HS1FwdLAUKHKkdi/MIHdjsLD9LsZgmvR0Q43Utsm8JhMLbGuduMw trZC/1a9/ckdBXCWZF+NEzYCLy4tXgGImx5ymOguuvfUIGcoEJpVsRv+H/2bXY9FvYDY thKVF4tHcogOyX/WCJbO+6ZdfRH2EXu/rBxJs2oRxagms8d2r2QDPx+y133Kr+4a6oby IIu6qzzBAPsd2b3X3ueP3rLG3pRaCZjpR2aaiclz9FDrYoSFbjkBb7l/VrtGLeJhpZwL oCFA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=YcnfxP9K; 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 e192-20020a6369c9000000b0054ff42dff19si4675228pgc.121.2023.07.13.01.43.14; Thu, 13 Jul 2023 01:43:27 -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=YcnfxP9K; 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 S234254AbjGMIMA (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232644AbjGMILD (ORCPT ); Thu, 13 Jul 2023 04:11:03 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2104.outbound.protection.outlook.com [40.107.215.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD0282D47; Thu, 13 Jul 2023 01:09:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JOgCy39PpsGvv6V5D/LyVp2oAQ0IcjqlbjHfCLtP+XeFex2BBP0G8NwsF6PCRG00Dsft4wmFVagjGRawxsxEBhZcmcmbgivBxnm820iQSORdDDpqagE7AgCEJH/u7Z2bYlP7ZCUQElDuO6HtTG6rWRePkAENfIfECcx7UL2L/yYPsjSkWpsz/Dy+1jB7mzmj2bqXeGVe6K52TxeRgu4pOGwzDCDlq8n9uj6AjShlR6JHQQNcU4UgK63B0flRI3LXa1zuKXb9pUD2Z1zCL+fx4eGkbO13GU+9THx16Wo9kKvP8Hvo9qD7rDy+vOg3A347OMNgCfpNlklk0hjpf4bYzQ== 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=sJmqNg0QneXTVaXei41tdTyNv8PCANAb8lCgdK9ikdg=; b=ZdvyroEy+lP6VsZhku70d1UtWeJKO0yXX038wXOQ9tuBBk5hBEwqUVwndHMOqCgL3mv9MoR2YVhrazOWPe7Gb8uii+wU7ZBTS80snxTkElyLPhTvBSzJIYsyse/TeNjjF6DkhULcSsk4UW3OFrPV6px+VjLmPhwz5OsxzZWicNCyx277huPUPZ5hgVlTxgC4kUClnhYhTDemSAgQG9BDxwGde+w8ROsMw6bv1ZSdfwe1SEZutIgZsZaDD0a+VDQHiLKigV72VqmFUPOksQfz62Y48WrldHtpsP9YCwB7tbW5Y2tSzhyLF6od9fWt4+xwqBsQtDS0LSoH5XIcLdKXsg== 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=sJmqNg0QneXTVaXei41tdTyNv8PCANAb8lCgdK9ikdg=; b=YcnfxP9K0d/WKHpzKVllSw2/5rOS53+3k9w+Sy3qjAJ7totNKQtQzk8+q+2PiFXxoIeRk7zjVFuWgt7SwsEgf7tvIzU+UYrVIKbsImaJmfnqpcdNPYCzUKULhvlulGSafVbtugvXhX9fwGZddk6i29FjvUW7BJR9FFG09CsmcDX8mJwVUtIntTsQKg7IECgcz56hzAy8WWazKWGE/DxdGpOblTPOVBoeNsM2xMbPCq99R8n1nkuysLvaffpRhX4sU28baDog4gZWRhUXUO4DUJcO3qq2gFYu7LWwHRgkO0qP+SzngRs1iWZEirz/xApk+N2p1G7IpUZd5anS2TPzUw== 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:51 +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:51 +0000 From: Yangtao Li To: Ulf Hansson , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 18/58] mmc: meson-gx: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:27 +0800 Message-Id: <20230713080807.69999-18-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: e4bcc5f0-125e-41a1-fd33-08db83786499 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gaXHu4hn4rtQ1qTn2+bI5YjoNz9+/QPpQAZVBWHoZsBjHBqIJM35PqNonsPlL/zbtj2FpEmOCBTbdgXIg36uR2D6Pe1lZdOU9wDSGMLP6cBq88lLeN6o76B7+4mpPjsQvYrAqrn7XwlKMu1hGIm6cVIzJQI84ei9nWiyR7e1vuM6qO+y06pSuGulA5i1Dz8G0H7SEiGrX8GFIA8mUnvWbjezbqOnjXDzyTgiESHC3wJbhM/WF3xAktYkUo1XMAhwiFRAxEvDBvJwMurBLLPXHXyUdIEtMx51g47a6hnLaaGnTaHlmV9+ySXKIZ2o53yipWJpae5R3o6FpyF8Y+Ik4jDPxbxWhvEyHu1zuIyRDuIGUYiGpVwIYzgD+uVy48rLzOvUFxFWttXgIDg88iAL1gmb2Gtzju4cfQNfM72UK1GK2Vfj7l95QxfdoFOraKHKF8XUE0n1Ay9FMcZlM6bNT0yQ8jdqcV05ZNfTGNOtfBL1/sqakkhGcySAKFTckVeVueHpWQBZ5c/LmGxCw/xbAfD96Q3AdMTbnUwgNanGJqFHb/3Dfh1IGHMCXhK/HhAbihnVt7wRox01iNDA/7A5G8J3GXo5AnGX9Lawo7amUnNOq2nezd/TX1UCNUCZ0OFCOPQEbEMmXfpJwjIL/oRvO1KSg/DebAdGnR7KKz5Z4PA= 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)(2616005)(2906002)(36756003)(8936002)(8676002)(26005)(7416002)(5660300002)(6506007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?VNOGT2x5KCa9kphtbG12urV7Li/N?= =?utf-8?q?jMTq5n3ER1k6Yvmkns3Iq9PnIvlm4/lOk6m5MnJijzHSb5PXxo4/7Ogy9+Ia1N3Sk?= =?utf-8?q?DbKg/loknSfECTK8nxDzhgIg22r9/q3Zl8oRhb5v6uIwQcuicMJvoeAaFAAkfQxPq?= =?utf-8?q?uqvjU1iBDnKOW0fY2FlMFBi1sOeco4CupFMp5wo7bGfnECRIlC3VqEVeKjmNa60A0?= =?utf-8?q?cRC15ixWJVeAPpvKnMMh7PZiMuh6ievvJpGREvHED6oqecVG2sGM8rqW9Xz0QjpR+?= =?utf-8?q?iPaJhNWlp4+UI1GGW3QTGh2zdDlWiDfrD6OyF7BKhkc/D4jMLchCjRF8OS+q8TEZs?= =?utf-8?q?dij2VenDdXUS3I2zYkFsNNXVn5Ib1W7zHvTwNZXj872/pWOwkaA4yWO+iVAgE9biR?= =?utf-8?q?6iuJxySl+IMQKCjKWxp7BmHqRm/q/UrKE7f8kpHz+H28rDzQAv/brNsO/nUuBuV6S?= =?utf-8?q?8kjCKoqHvQCrpdjTCkpMN0e0KjbRWOok8r5DYUNg1JC70UbT8f2pFSOiRaR709A1L?= =?utf-8?q?poZq5cn7SVhBKzHuij5TatzdviRBCpbN6QFA9RYHQVALFpuxk5W/3m5KBzc8tO86Y?= =?utf-8?q?JejYHD7l6cMcDXOeQYovUNpvAmCLusecdST/vFmHGMcszw4LLoOe3DVm+BnoBy7jy?= =?utf-8?q?sTGvSGEDqwwj50spxale8ZMhusBpmO9M3dk/TvFByuKGPpwSj8cA5dqHsNcr6lXVw?= =?utf-8?q?HFbTMOROLCTe7YeVA+dsiJMZ1Z43OovfGJIsdHdkKM07ETzKcy0XUF2NaBoRbCyBR?= =?utf-8?q?ovyTOSe0DWzvus2guoUHx+XxDTZthRLRPzVcyGTpz179fReJ1byIIIYbWD4cp7lZW?= =?utf-8?q?yLNr2GsoouklAgztFrTMX5Bf0sCm+qLYqmdBDy1CdcYx6PO1tTcuUtVZmzAxjnEUZ?= =?utf-8?q?KjiuR09pJU4ZngvEPJNd6DItegCYxUaeofZz4gYCdrXE5ojsR5QGKHSPXyR4VC2sD?= =?utf-8?q?fm3G23U3hlQDCSLhXcW+VkteNgIa0fkB9/PRHOmk9oTBoR4hq8ICFw9higqwRPoQb?= =?utf-8?q?aebEjQLmYyiBWzD2fkJAQ5pkc//1N6GMqyYvs6+3OcewjadptWb3BBOJb6TilEsud?= =?utf-8?q?CAZNMZb3Ufg0ebM55pjTS5uZhWUBm3GLfHO7wq2aWpYQvbLsbMttXOsj3djqHXoaf?= =?utf-8?q?sUqieK2DHLQNz3TjHrLm1OgCHi7I3u5N7tmohi6fjIi0tcNYbiwQIaPsek2H4mfQw?= =?utf-8?q?uuvbQlfYGIfXGwz7v+oOgAAo6yYukQ7JXXTSlQsPs7U1SDa+2PhZrfouZC2OmmhMB?= =?utf-8?q?39qAWveRo/96uh18Nu7uaH1DDSxxGSQKbAuGCVJYzPPWQpt3imwj2RF5BweUDx1QJ?= =?utf-8?q?d+nAQWc55tZnmP8kWXkkZYv1m+lnFMK2B2SjeSSrlOfB7lt0NtJnnETugwJhgMqx9?= =?utf-8?q?RfNQvF1t7Txcht+rygmdp0MU+JeHkDW0ykAWtziiEhYQnzTXjoxghAKNUDxokJaop?= =?utf-8?q?43rd/37xGBjqt/Regp0DzIZiyAbLXdcTYhqafZwa+Cv68ZzU+y6++n+J4QSfKUI33?= =?utf-8?q?WsY9fH/vbpRE?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4bcc5f0-125e-41a1-fd33-08db83786499 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:51.1516 (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: wgytmeNpYFPSQeD7l0zJpWHAUh0s6rn6Dt3ddBa/IFXfZ3o7PFM93QWp68Wn2hBg/5AuaXui9dxtVEvvGNDTbg== 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_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: 1771294223348219354 X-GMAIL-MSGID: 1771294223348219354 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/meson-gx-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index ee9a25b900ae..106ebc1fd36f 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -1297,7 +1297,7 @@ static int meson_mmc_probe(struct platform_device *pdev) return ret; } -static int meson_mmc_remove(struct platform_device *pdev) +static void meson_mmc_remove(struct platform_device *pdev) { struct meson_host *host = dev_get_drvdata(&pdev->dev); @@ -1308,8 +1308,6 @@ static int meson_mmc_remove(struct platform_device *pdev) free_irq(host->irq, host); clk_disable_unprepare(host->mmc_clk); - - return 0; } static const struct meson_mmc_data meson_gx_data = { @@ -1340,7 +1338,7 @@ MODULE_DEVICE_TABLE(of, meson_mmc_of_match); static struct platform_driver meson_mmc_driver = { .probe = meson_mmc_probe, - .remove = meson_mmc_remove, + .remove_new = meson_mmc_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:28 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: 119653 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1679249vqm; Thu, 13 Jul 2023 01:42:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlEtDpVrx9m9hOMi1U3ihyVoiSrN5WxKpNt5Zhw0H7ZSNBj5x7+Rp5dwaQNyFum6D9elA9Si X-Received: by 2002:a17:907:778c:b0:991:f489:3d24 with SMTP id ky12-20020a170907778c00b00991f4893d24mr845247ejc.32.1689237724644; Thu, 13 Jul 2023 01:42:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237724; cv=pass; d=google.com; s=arc-20160816; b=FoYqwuUDFl+EQBm0/XldzBVAFn3nY6lkgoPJNYPWR0WbhyWQs09GTt14sBzeSaHHQ6 HZDRfRKUKnjMe5/OHvWaW9T4S3hPfCsdbPpdezqqeHHQ/ITyoDSL47a+uOy8+ihBN576 MzY4cDoTKkurLEbikWTSvedd6NL2UPDre5jJvtN+HNxW4d5dTafc1Gxnp9m4NdpGzLjr F+JhQI6QQysBa54FcWDz8yyzhVMjcX3WRmJGbCAkNh050Xt7KWaTTlza/Rka+omCmKUa YPYFyrG7TdDLsEAb8LTSrekpJ6IMAQGCrKxtMmu5We56Sr5slVQTmLtvdNhoP2Sw3ZTa aTwg== 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=+nPOwPKYNeq/2Tv4iqOeh7ZkKMvKEp8wvhNPamOgGPQ=; fh=wNELzKjtDW/UkCeI0vRNNM7WIjF/XKmykMZmmqUnxC4=; b=pOQGR6oUy5uwcZGKlerthvTLH0T8jgCPe3HGM7hv/64rEldzrlHUB6bxqoUlPPXqOZ MXGvYfH793JIxJfOGOcn3xC/2y5AGZ13cg1RoDlWerd4TdHar7/NrFDNzv0tdQOiwp49 A6WNNyxxhaejZvBQiVUXQf6z0nHKLGCy/QOvZnBm2YeO2ljd4Kr+4O75qIQUxXUzsWIf 81hjg3l968NdtKIoG0/4tmpLWEcT1Px9YkYVI0pu5jq/RhMQEtV9fwNSOnJOnbT8tgOU SJFdjLYP7NATIPG3r9msFZ8mZp5ijAyeOpafhCKDrDsB1QNeUwcoNtgdu4efgPUlMhkN GbrA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=JPI+7T8r; 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 g15-20020a17090670cf00b00993181656b3si6280843ejk.453.2023.07.13.01.41.40; Thu, 13 Jul 2023 01:42:04 -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=JPI+7T8r; 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 S234278AbjGMIML (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234158AbjGMILG (ORCPT ); Thu, 13 Jul 2023 04:11:06 -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 9447E3AA4; Thu, 13 Jul 2023 01:09:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EywDNqgdnw2nrkH9QAjMOwx0bGAVohk1QRDAEEGpvWoID6vrYr0uGaAMayCKRC7jnUQNLnBd9Bv//wc259BjtjRNGdx1A2lSu95Nt6ydFMpQhoULANi4VuhHIE/Zbg7wxIrx0D/6vmSxiAWKjESo0HKlHtQ5zT1DEH43Z1LAu+ie9oHJocrAYIG1vMgEm68/Y+3ReUGDiqnybTeXr9oQB9g2o05OeVcVKFsGau6xBdopMVcQ/ZKBO85S+FiwHNdmwEnGf3Zzh5btJhj9josVaEarkz2+aPnE3WQ4o+mSfffEFa9jS+DNdQrssNiuinULGblhSoctQB9HwhKI4YFmIw== 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=+nPOwPKYNeq/2Tv4iqOeh7ZkKMvKEp8wvhNPamOgGPQ=; b=I3TJgN1a8bFE2ZptqIWShtIWyZfFEzXLil1Y2SPFhQg2VIuAHenuZJJ/9pbyg6FuQmh/M7nH5jDGCgndYCQvUb8TNWx4Iog7e0smDwNLxZvHGmb2jm91VdejD93RFsXAPO8iMTXHCuKQ5BUXmOi5fWNr3ZmOKUE1jvz7QefDpltc0zdeKl6TgbsRVt7HDVVGHcSG6p7mPrH5Kdu2fMakHv7NgkOi82QL4GHCB84xf7uuC2qDht/3JNPpTbi+qqR3fk83Akt5kmipiOGHHkvPloeBehHZ9a8CySZazeTejDK0oHQyZmPpMXL5W4TtoH/c7615IoLoGUrzyC/Sa+MUlg== 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=+nPOwPKYNeq/2Tv4iqOeh7ZkKMvKEp8wvhNPamOgGPQ=; b=JPI+7T8r2UV+uF8XiR7KtxjpoQEdq4Q8MhCh/QH/+eQn13uNtfNWqrRZwCTg7mM4Gsj1S6rk9+Wimq27MKtQhfn29XzRWKlfy49ZInVfOxrP/IdpDGukDKt7cciUnFTr2QGEfUZEWmbe6lEQpLezeGyE1Ejmy8C3Jute/Wss/KRo1NWmiS+OeaUMn9dl59dx9eZTuPy/5xWj47BmoGKdZe9gLg+/RMTfRVSqCN0cUcksGhr4ro2B8V7R/L0fxEqMa6HBLbysR8xSFFOBt0cLyqrVUYQRuZ9wRFmKhiPSjXBWwxn+JVY/+YCw81QH2h3NBaoD5GV1VWtqVjgH+i8IvQ== 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:53 +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:53 +0000 From: Yangtao Li To: Adrian Hunter , Hu Ziji , 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 19/58] mmc: xenon: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:28 +0800 Message-Id: <20230713080807.69999-19-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: c1511211-cccd-4a6d-46f9-08db837865b3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6f2K60YY3n8MkM8nW6E/VWJTwF6reYO0KrTiKeZqaubntkbuTexAP5HzihpE1A7XdbU7fIkNC2nV83Sk/5eJpJF2B/4FKlDhOpfqSCRRiI1fUgtX2/Wl5i10LV2CSL8u5s3OzweECN3uTAWkrlK5hnJzRm+AkPGj5E8KPEHfw9IYotZuQrWMD1/xvZZtqztbhVaOXnK68jG+u+pM/Bh0VQnV6Bq3cCWiMKj0PLmUHOrx5hGJR7ldcwbH5EP9CPTJkBtMmrOR1DVkY80JZspxy3SrwfvPDsWvzN5ATeIrAhI9q8zI6Eeamt1DHOPJ/XFYxh9HmuOsw0k5XWJA2Fjp8ievhLwDw9AqweVc3RkkHFWMm7n9KBpUALHlr0ZYY5zbS+U8lcy/MhbVk0nNYrwyoZYjYXaQXfq8UcMLgclAwKz8F56QW3VYwOx9fWIuwnTFJ9XHVys4c5qJHJh8T7/vv7SVUcxAxKDUYh0iHOg7DNAhOMkJr9VNzTJdMyOmMCPAWq0bU7yTz13rHJzt1hvn2vH5rl0bxOYgJiOYIotc9HWyl8tLRU6ogu8llozHKrWXxKQdDSeBI6Si/dhTTcg8kgaJDZtbQXSbfoAeU3eb4RlGH27ldzJ9lpKcKMN4URG6jgJs8izE6XomlKxF/OC//ah2unsYac7fS1MwOSWjc4U= 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)(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?c6DE62ar6BicYzSrJ38m9I0emjxL?= =?utf-8?q?4h+uzmiPxU5f7fHlwlZbeCpoKD7NQQpyyFwFkPAjKv8z/ywynE7WFj9SJHqaw1MZc?= =?utf-8?q?SUWktmtlom4lZ4lnmxJ8rW6GHgBpy5Ff4DcYLFJcWb2ydY9FgmgJaitcbprrJ9ITg?= =?utf-8?q?oj0AtjYYCNcHdYTGkvP9Jbt1ZCkkXYpfin8npcPhtBHlKVaVfS40ik93l4NgMItbx?= =?utf-8?q?uqcANNgptTCyf050y/jRAshpDi4dJJTDfzvVoxME3oBkn8vHLUT+3NahPip4zI6EG?= =?utf-8?q?LkIFkcBWB7wOpCC5NatCDvela2RLNki/lKc+uWydmm+yPbWpai0flR/FSS634u5UG?= =?utf-8?q?ew+WUaiVQq57dchS52aP0pJMPjPSwPFEnigBx45aUnwC6TV9bLTXPCbWLifa9C8/2?= =?utf-8?q?4655/No4AN4bOKkGEmmsC+L4fcOeTQvZtdlZb/qfdj8eIrVWdnwfF2AGGvMTpKgiQ?= =?utf-8?q?blOQPrqN3ngUmQ+EfLYNeO1YhJ4Yfdct5c3lcE5/uo4YsG7+YE2WmZ7Je/2frA57o?= =?utf-8?q?vpx8ahJdlG/GplOPaPTKKt2IYyLL4MkFehYuLS3+PgQFJ8TAJHHDKC/XIGSYUcj98?= =?utf-8?q?x7wKAqte1e2ZxNGYJTcL2JQ1MSGz76zntMg8p5XyAIoxCdaGCHcudnfnPhG3Li5Uf?= =?utf-8?q?jrvbCx5cs8qkzLR6JmUYM+XO2z+hHPBRHCVeIeGAltVcxDtj8ScG5vBGbZhwpguhM?= =?utf-8?q?Fmh8GOF2Nlfv03NkR84JqlOaYN8lWoKAP2BILFfwEYSXOj64p4zNNS0M5L1XlM9u8?= =?utf-8?q?ZUhf2/3uRMDkHxSKjUZ2Ff7IcefG4dtdbjF0WT4K3Tf3z8zy24web1rRml/A6l74k?= =?utf-8?q?4jOGatCG3guatcA/apBRe6K8KTy0//1UOeh5cxThZeZI8Y4UpSMyrzxkh3u3EzFaT?= =?utf-8?q?DRnlzIuHPbTYU/PrhPsA4vTexWosmCfJrPGo6KGcYsAf/du/A2smsf3wIGQOCh1zp?= =?utf-8?q?SdZcjxYv6tBUaJGTWDak+kSmxqICWkOZXjIB6u6DOOed1Z0XVHV+sLrG1zOqm+C0F?= =?utf-8?q?OVi8ZKCuwwrizHvEeaGJ2PVVEnI8C/FH22+aHcjDQaUAJYh3tDitw0HVZR1ULUsc9?= =?utf-8?q?hd1Qsag1eA1TXBTdnBprw5eztQF6tkmDHlQUlzRcmZwhA02zDPSlWzcExWkXbxYmg?= =?utf-8?q?z4AznKsVY8ECn4Zky/bcuXXLcBG4AvFQLp5VBMPZkR64ZU6o5jzMUV7GBeCLCDAjk?= =?utf-8?q?Z7KihDkjOvminw1HSndbJYXzBHvKWcy7SUwZmCGtHWJeKen8lM4db16qYZ3YZKJ0R?= =?utf-8?q?HcycYOBrA+trGhggNpvqIfU5sMixJxDDcyllIJlFaHe9331Hx3YWhSzBEJawTiTCh?= =?utf-8?q?pCKCypGD09lgrZf8YRCOgPilBcyimmktaMQJl/dLChuqyBtJ5ERG9Iq1pqhFb15E/?= =?utf-8?q?fHlib/TXn9w6iXULQr3ZCGdZ6Juztr/W7Y601hY8aYfPY8tOIrR+1YHKb31fZKprw?= =?utf-8?q?lfjeoUsbRPAsLIpuzC5WSVVzJhbTWsY0E7NRWZS/wVAABXOxJCImXwSuejtEzXl7y?= =?utf-8?q?/JsVa0jkOh3T?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c1511211-cccd-4a6d-46f9-08db837865b3 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:53.0216 (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: YwmnY6vdx/jGnXIMar4a/x4xuGESPA1YDgzLVdsedXrd92CZhB/yV1jUyLei2XU/F60MEG+FIy2UO0VaD9kaLw== 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: 1771294136245173021 X-GMAIL-MSGID: 1771294136245173021 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/sdhci-xenon.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c index 08e838400b52..25ba7aecc3be 100644 --- a/drivers/mmc/host/sdhci-xenon.c +++ b/drivers/mmc/host/sdhci-xenon.c @@ -578,7 +578,7 @@ static int xenon_probe(struct platform_device *pdev) return err; } -static int xenon_remove(struct platform_device *pdev) +static void xenon_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -595,8 +595,6 @@ static int xenon_remove(struct platform_device *pdev) clk_disable_unprepare(pltfm_host->clk); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -705,7 +703,7 @@ static struct platform_driver sdhci_xenon_driver = { .pm = &sdhci_xenon_dev_pm_ops, }, .probe = xenon_probe, - .remove = xenon_remove, + .remove_new = xenon_remove, }; module_platform_driver(sdhci_xenon_driver); From patchwork Thu Jul 13 08:07:29 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: 119645 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1678795vqm; Thu, 13 Jul 2023 01:40:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlFGKGvQUHGmIGYgr8jTyxiYwxklD1RR0OkdDY3Q1JPyOWzAm7GK49xwskSXPbP6UpoDth6f X-Received: by 2002:a05:6402:3513:b0:51d:b184:efd with SMTP id b19-20020a056402351300b0051db1840efdmr5786386edd.20.1689237655959; Thu, 13 Jul 2023 01:40:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237655; cv=pass; d=google.com; s=arc-20160816; b=Wzd2ks6lnP2KQ0FHDCTP4BHrUUxZqKC8/AVuszCZB6DdfZ3z3NHbgrqojKPiJNGA7K cGDbvAqb+paIHw7WrPwDJkAg+PopwR7BZ7hxd3C+a5zrMRB4JTbm41PeyQnDucOTX4uK QFSIL4ohsF1hcoluDt28TPXC4iK+NbiB6Hn1XsmbAjEF2SWykBeUZVdqJ1kk+I/it+rV pHTSWNB58teWDoqhImal53PgoscCTNCytSXHRw2oWB2RQXpaRUzIOpbx4D6UwLdBO47u C10c+LRF2flTssPgJTUXCuB0OWqBfzlxlNlOnw4oZNVNaIE0tHifg7bqmUp1l72Mzt7F XSCA== 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=bj+WD0ujQJJoGOzm0bS7zDFDRH08DzA9OwwXsON6vZ4=; fh=l0HlFrqvfXwjMey3ILWTX9zTnLzDojMmdWOwR25kxd8=; b=Ab5kFFcKQuFMa9wTFcZDm2Z+SwZoaSXk4LFgudpUVR8goU1WBRL0QSFRiU7SZIzlH8 wGLtLE6lnUEI4+H0XomJ2hi3vxnz1p8haxNxDEv6978w+FhNQSq4ALz3ggO0bhq6S8Qg o1CtSgUHNoY4TistcNnUAbRN1Iv4OsUdqHGsI08RsgPE4yuV2hHiVgw45xSBi++kigaE UKzTL5KCXUXL7Mo/v0lxRnktTNqsH/I3ZuZqFg041WSDqw4pEliyi8Bo0ILsi/R6Bkgb YZRB26yuO/hQf8vSuBEUqorSnJMQ5GmeMtUk1QXhjvgNjuHFPsll3iltAdBsKuUyMvcm T3xg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=p4SVItlm; 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 i11-20020a50fc0b000000b0051e041a38f0si7200547edr.596.2023.07.13.01.40.31; Thu, 13 Jul 2023 01:40:55 -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=p4SVItlm; 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 S233916AbjGMILg (ORCPT + 99 others); Thu, 13 Jul 2023 04:11:36 -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 S233859AbjGMIKU (ORCPT ); Thu, 13 Jul 2023 04:10:20 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2119.outbound.protection.outlook.com [40.107.255.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76EAA3A89; Thu, 13 Jul 2023 01:08:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hns1i5pe9/OdACZoN2eCbxr0gBMJOW5UxkZUrw04842zFoJpeLKhK/5vU36pHdmmldt1Uym7MNA2B32c55iH6DYhBK+n9N3uqhLMqXNdU+ILvq62ZX0gHW7xIFYdAzDJKWE4LcNX6dGhO/IId0bvitOZsE17+2kcR4qQa8jYZyxJ6Vu13qAK/g7RmCUcKFiWi0CYFY99QsjuSYegy8ZD7hnJI45yDD4p05Im/PsM1unONkTpij2LpTyq/voCs6g2dkSBH62HZcxZw7V0Ce6UsDWTgIRvA00fpOtJIR7BG9HKF5py13IoqSUcC/IAogwoR8iKoN3Mh/kv6QzUT+Xu9Q== 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=bj+WD0ujQJJoGOzm0bS7zDFDRH08DzA9OwwXsON6vZ4=; b=gFXJ+LRDowomXfxKerpwvVEluxv7iish3VwoJYnWDoPNlp4xYK+jXclfFP2ni+1sW9OFBzc/iEjMSCEPgwx9OnEBMutp9EQ7BpvJ+XQYZ28xU6GjAAPBVzdWeh5m0Dt2uCp7F6mF5rDZDp6HvsseTiSqEYwPwwjRxeQYUnfyk9K9yoUah0yrKhWigGxTT/QxpNoHADez4XpHOfhIAbYFiFhWb9vr8Mmcl3t0hzfyhBtkncp3ONH8UfEDc93xyczoJWuqHWTpmUwgmX7jxMdTZUbuNZk1X8Z2+MJPVb/8yX5r3agsZrdH8B9J5nFHBUjJtnS0nKjhbxbr9mlpJ0MTsA== 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=bj+WD0ujQJJoGOzm0bS7zDFDRH08DzA9OwwXsON6vZ4=; b=p4SVItlmCwLHxYEmtHBY6K9BYUROGW4UPrxQRkAn40ij8e8Z2qOfvvXpN56jEJFeksyOJr8VyYgMfwLhwEcE8NNPObN5nbGmoRxHlQN0ZYe/rX39hDhj2xa2JxZ2TwnxsWFWyYYQ8m34rB5O8gB3MXnmRyGh2POtpDkiT74r78rAXJmYgoDhEoirfqLtSNnTt5kl0GGDGNmu2NH1o2yKs8UfZdaI5S7KYEIaJRixh6MFoGEsef5iK7ABLNeWFqn0Ed/Rh1M8jCeTqqejlDM2Wyd96YYXtnrKXQvJIAkXlMaTkEl11uJmjoVXybzYY3QbBg4zH8Cxa/OQ2eVV0vMWzw== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:08:56 +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:55 +0000 From: Yangtao Li To: Ben Dooks , Jaehoon Chung , Adrian Hunter , 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 20/58] mmc: sdhci-s3c: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:29 +0800 Message-Id: <20230713080807.69999-20-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: fad94694-dbd7-468f-c2f3-08db83786705 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L5M78pAHMTAg9MEBEyIAOVpp2xzemk7fXkhf1TM1KMA/C1ulOe6vAhx7HeSJ/z2+0AZgW30tbjZsIzB6X52xyMV7wqF7kglsbW9uIhzvwN3PLxihhc9AOfz9S1tQNp1mu1NJD8BtyxcWaLEF7sjvgEUg91/AXiPUk6qVzGmWcO6RJD+U4yrZgbYgiMhelBNa1ITm7y3lxWbbtPhdq7JyaoakLSlsAy9z9wQ9x2B6IEFEce5w7RcwnAS/P7ae21D9NPqY4Vg7yq3/Du7oyybwwKpM/y4SsrCSkc8Gx4hhZjxs2BNXW5Us1RpJoAj3XfZ2hvjptpT8QItMG4V6UTAZz35wB9oYsOx2exekq2TbtU9dZF6Eb9ZpggkDQN/TU70oFOHWb1lHaFowtpSnfKHzDg8MEp1m02Ik8G5aQcm2lvKxZ2VNdP6ErPwPNS5tCvfxCV9M32ac/FiXHGQ/fZiWYJStHF/EHa4iafV6fZQIOVFbMd8Ziox4Dtry4jVJ7SQqesVSAPTYNl7cYJHdxftnPshsP68HiorFu1KEA4R3AEzC71O5Xuy7qg0uq+dlAN5DCtlq/UcxYnopPOorr10dptmFEmvNz+o8aPbQn0oBGPKhnrwsBvw7Qqk9F2HKyjGc 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?EC/9J4Y7XufBZZmd2fXhonDTs5FZ?= =?utf-8?q?tbBzcBW5F3Q4Db1FBkDA0MNkljcIIqYR/Tf+LNCtoJJFlv04Nkaprh6nDEmrBT8A5?= =?utf-8?q?TzaBPYJaKkaiH3EIhpJvrxQsS28tmR177LIpCY3vmV3Iz8Oj/YSwwJnoHAJEBmY9h?= =?utf-8?q?FBSsrM/n8/3y8QJFW69lMWR9/YR67OYyVi+tsbSUvF4ZvJR4nywlU0oe2H9Tb0sVw?= =?utf-8?q?25OUHKCTaYCz7WmP3LBdwRCkK5E60d90qRGevjrsf1EIIELCn5QAcPm7uUgnfVWUM?= =?utf-8?q?LlD+2WaqUXU3Hul4Ur6hLvXiKIYFhBM2F93wDhPAaZ4b21ETPm+ULx5Q1lWEIh29W?= =?utf-8?q?IpVhK7UzACeJpVMx45SCGdOAv5yP9TtKH1FaCAG+6MRnaHVd50PJQ4U3lShya2/Ah?= =?utf-8?q?tqEgbzc6c/Wwevse+vqOPHLLqC5eofSNjIVIg+qsJXQcadg4H22XWnA9O1K+u0KX2?= =?utf-8?q?jS7HLkZXM6EYhsMD1LN+9FfzIchIfY149MDC2P0iPUhqeWeSqDR9ps8XHbmoLFI9y?= =?utf-8?q?WfzNfobLXmZ3XGLSmQX/pp9gA35WEHDRTl5FGDvewqZp+WxYGiKVJO6hYxc/wgc1h?= =?utf-8?q?uf1NMyIZXegiZ+tL35Lo1avMWXkGARyXFcptIb1vk+i7jHTzH6W6iWniarrJXkwJd?= =?utf-8?q?81+wlLs2GMOam8PdUx1SUaoix87ykhEJd16C/mmoXQjNmQV3Y4vPKKHVnnx2ZcjBb?= =?utf-8?q?bcoMYv4qzZXUhEgtIZmpMusTaZJ7QGhwV+YlW05fDZe3zunNXdEiAkXXd62hIzzU0?= =?utf-8?q?qk68S2Tzu2dMzX0ilgK/BZp5jPdkFZEnPWU2FppqktYOXVtSCwtmLBg8ZEDAc7vra?= =?utf-8?q?/9h6XSrwi6lVjmPGABnhHANDsYAgXPrOVxAKkP3PVm/QwJ96G0s5ZN8p3mHrgeUO/?= =?utf-8?q?OCA8IgXCvUF1u5JQceXIIP41dVyQ8uYzbmw7Cn9/lwPSb1tWCAgQbIMQFy8YG35tR?= =?utf-8?q?FiQLuDirRoVnqd1VNetYu0SkhMPRCIKj9l7F0iAdnLPK8PmcWQMVqtzu60lcVp+mU?= =?utf-8?q?hCr2zaNiv0KIVTiitXDsqYsdfnTop+lnQt8POveB7cov5sZAM2l7XMiwZd8o3ghTf?= =?utf-8?q?7GO4ylUYApPvd3zFcGO1avtgb3l6rpbK2TaIHQ6qOe077FSJ9X+xK7k7yGn2cen5u?= =?utf-8?q?h/iti82POj9nPEcx0A2BcA0BsErFfkC3YUqydTGby8JCGmh2SexBInwR5qtFxziq7?= =?utf-8?q?/r4zhKDUaApcSaH1a6urAKHqqHWuXfpU1l2XCwtb0x+bt8NodMq5MEJ0VCKXwHjPm?= =?utf-8?q?Pic1oDPJzkwliO0ht59GiRxSLzgczIqjhTcVtKuhA6IpyeuKSVuDn1xRwayGqN89a?= =?utf-8?q?ZqFf1MaNQF04umfGvrvxqZohZxrWDw2PHwkhqfLiCE75UzvXNZuMFmQunmLC2upYI?= =?utf-8?q?ctd8akXdFr2/RRu5Bek0Zg8a3HpgLZc32KbrizaiAoFPHTuw1Qdsk0O4jLorM4bR5?= =?utf-8?q?qZe0Pot2cz26MYs50T1Ifq5MawW8O+0Hp80sBTI4e3QUcMVfDr/w8lzlWSE5hzCuF?= =?utf-8?q?5Y8o9l9ICMw/?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: fad94694-dbd7-468f-c2f3-08db83786705 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:55.2638 (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: Lp396nc/7IgariRgPUVWfL3jCTr9FNf+G/0uF8mSZu5N+vbQjRw0S8A5RXNWbo60LnwaP1R3Y6lFvGoS4I62wA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771294064282559900 X-GMAIL-MSGID: 1771294064282559900 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/sdhci-s3c.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 504015e84308..b61f12d328e0 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -668,7 +668,7 @@ static int sdhci_s3c_probe(struct platform_device *pdev) return ret; } -static int sdhci_s3c_remove(struct platform_device *pdev) +static void sdhci_s3c_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_s3c *sc = sdhci_priv(host); @@ -688,8 +688,6 @@ static int sdhci_s3c_remove(struct platform_device *pdev) clk_disable_unprepare(sc->clk_io); sdhci_free_host(host); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -776,7 +774,7 @@ MODULE_DEVICE_TABLE(of, sdhci_s3c_dt_match); static struct platform_driver sdhci_s3c_driver = { .probe = sdhci_s3c_probe, - .remove = sdhci_s3c_remove, + .remove_new = sdhci_s3c_remove, .id_table = sdhci_s3c_driver_ids, .driver = { .name = "s3c-sdhci", From patchwork Thu Jul 13 08:07:30 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: 119623 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1671917vqm; Thu, 13 Jul 2023 01:24:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlFo5ENqwsDQfC81hlu8WxqAXFVY6IQCSIP05dRFpQ58UBjlQFTzDXrDxZ/BdIRxNrECHXYH X-Received: by 2002:a2e:88c9:0:b0:2b6:dc55:c3c7 with SMTP id a9-20020a2e88c9000000b002b6dc55c3c7mr828832ljk.20.1689236651700; Thu, 13 Jul 2023 01:24:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689236651; cv=pass; d=google.com; s=arc-20160816; b=N9vwR86G37IgxuBinKE9GEI0BsFh9arIzgV8EYyW3qDcPj0vQ5kpVJ1npdkwMqcmTC Lq7PFUC83XbdQpi+CZ9lQCHOSyFvzO8USHSDAmg+ntht7LVkOKk7XzJlMm9sv3x6VlnZ V8HgvTBWdgkCluolK8gcJ4C6y561bG4UbDV1LJjW8rsb5ONIjefxhctfsR73txV1l/3Y Srco7ch990CLz0p9zz/Nut++BxmIQ7No4qdJOfsm4pJk4PaX8Xg9mktvUbZTpll+Lgn7 0rHgiT1PMXwkC5MZ6HAmu1jekKSk8SgR3ZIeL63SrD7QZo3LHJv9Z1Kue1bjecFXGM0Z 0iDw== 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=DFCZMSRT/SLHSwmQ+mf73xOp7pZuv/jxv4saUj/q9f4=; fh=sy30M9eLByds7Tlvf2H8U/dRo3J3gGi9Sy6vmtIbxfI=; b=ODl9+dwbnPT0FMOBNvkX6OzcTxl1Eu++mGMOuIYvekYNle+LYC6GwgUX9RJuoZ61my UeErbRHT1z7LNuWidwMa0nfYYzHJxFcFkvfCK1heLZOlV/oiBFAxM3i0w4uBJMdYwxWH Mw2ilir7a4rFnWNeSzM7l0B5YfI/zVzCWLEfAnn5L9iuEpRdwqMJyHBzgOGGHu+ov4g0 EieGnrXZDBQHkohApltDjOVpy1I+PX8UOMpUOSq0upMxb56aVZU+lzbKGzFoh6kfB3Sp 0MuwvARHOJ7uV3DtevBNE45Qa9aoO2XSM7v6kErmmacHH9tpGu+HCDHxFG+/sVzH9eey 6yHQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=anh1d1P4; 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 o1-20020a1709061b0100b00988994251edsi6985259ejg.258.2023.07.13.01.23.46; Thu, 13 Jul 2023 01:24:11 -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=anh1d1P4; 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 S234239AbjGMILu (ORCPT + 99 others); Thu, 13 Jul 2023 04:11:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232068AbjGMILC (ORCPT ); Thu, 13 Jul 2023 04:11:02 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2119.outbound.protection.outlook.com [40.107.255.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CECC3A9F; Thu, 13 Jul 2023 01:09:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gtbjwi3bMJ4PT157X+c31FpdqBN4rR2m/DZ3uPjim/3Dw9LH3zOn9/Qsreaw8QTmtZOs1/CNtSLcSp9HWmcJIQRiF6cooU4aKfmw9KXgYjB5FWJaiEh1NY+lKjgZG3qtR9oipfqjlVMOxV8XVoVuqpk5U7523EkpZRs+pWijh6JpqtFhNSlwiY4jjMZCsBD+gTbBzd7wDE4mwEncP1F5VI12kDBMOlhMdlXj3E6o5VZXwpdlSd0VgOOCGJDPcp3zcRhpXJNJ60davHID1bqAG+Kfh4l4XQQKFu6Y6mTVk2u8cCUVhy5ECPaMnTJ63gDLt85ZYrjO5vhvGSxSCwLSmQ== 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=DFCZMSRT/SLHSwmQ+mf73xOp7pZuv/jxv4saUj/q9f4=; b=TOssskRK/ma4nVIGmiYZG/oj7cyb10LBspc79lqClUS8cg4j2aO8T2fP2vM5Ns10j6cACCQ/mhtAFg6FoxpNbrznkR7HaRdU2fxErMtX/NRqWqGYd0AMvaTtyqo8Ib3wrGMYQNcrSL/wnlPQQuOY6e0j/X1DZarJrvOFtUkyFHYWZQpC6jRtIdABfWMsV3EjGQR2lAPjMAa2PWQEN0el3roTq0EGqWm1ZrmjI+CeRtsu7FiVEsRFPp/BDHCxoBJ0u8NeWNUIKDq01Y3u2/qKQZE9awbOppqrtIVbwiYTtVH8Rz+oEeH9IaOXYUlrcDKQv7DrhuQCvuNaLH/sFDAhhg== 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=DFCZMSRT/SLHSwmQ+mf73xOp7pZuv/jxv4saUj/q9f4=; b=anh1d1P40Ys2f2eK+reDjVm8aviLTejyDj/1BGkUz8jU51qTdSCEnuqgNCgSn9IZx5uqJm8MYlBpnYvaqaj3gq0/SaV8zS+1RgPYIBPO8C9KQ4vZemZ0FPANehYr9x07ZrlRzKyIqhRYvydZ0fi1iy16Moi93R7p2SkuZxtFobrU97n7BfXuIkUrHSSX3o8SDiIp1w06naZzSomFB5Vdh0v50bJYjNtPh+gWl56xAK95z7ZTXkkWTAO1rqXo5uaIQf/ka2Mf0UjO6cpquQhoijKY0/ltA+6MMNO9p2XJK8yRP7Ms5T+j2Isy1v34VmVB9S3HED/Pd3R2ATpuI2XA5Q== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:08:57 +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:57 +0000 From: Yangtao Li To: Ulf Hansson , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 21/58] mmc: meson-mx-sdhc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:30 +0800 Message-Id: <20230713080807.69999-21-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: 26ac4f88-73a2-4056-8e1f-08db83786866 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eYXkFKu6vfoxGuLAAbTHGhRVYtaUH2pyuqXtBWPLqy1bTD3jB4saY1QLmPa4r/e+H8BZxNtvOULaMT7+zlF3cof5cGwf2LwDRI2c1RFyeuSEfB9KQ+1QIwYo3BrmiazasE0cB6WiEtV02Jzjrb/XgKviyyHYMIvz/oN9qNODhBZa+B4kzyVzN+iNIIpolY+7tOaAwnV/+Ux+dmYB27cMcph/nshKbe3MrLktDqLBxPfMFmfPDhtLvAMymSJq49AOOJc+aYdBvU/Yvit+O0+tf1ryvtyTdjZ6WC6VVlp/zs1Nf31miBrMbMQ5ikwY2ZYuMaWwdTUhd++vvdym38sGmiQTfi5oS2qZVV1RIGVlgKV3SvEu5pY/vWZ6zeYiGzz6LOl/d/0F7xAk0+XB01pFClTB+grBEwbBPxnhfWB+0emEvVxxww9hTg/pyS0u7awj0s+0cOeRNnL7jGA4+187ze0RLP4qspg78MC1Vyq9eIvVqIrjvR1ZfuZWzRRhZy6vRZJjndAPM0n5pBdZWjagbVi7XSlThz897GkGtYToMu/vw4p4naFXeb4DjDmwdPAEXQbIpLrm9f2X5sOcAJU3uVkpAreZhXVZCp+NYs6gBhPIMpYDFdA0x6dAanpt2u2f 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(7416002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?8OPa6vUlONNlE945LtdDcMRE84X7?= =?utf-8?q?4rL7J2yjoaYxtKtuwwSDMLUfgd/X/GbJRYyBKLGNAgkqIkZe9hQRX+F0NHTwLcLyk?= =?utf-8?q?SvFvbNxcXpZas3tQeBRlqJkcftjWB9nNWWv73eiPtdZzG5erpWHYLVjNAf4Qsv673?= =?utf-8?q?b90FvDGeXFJI5CD7tgwKgVY/2BWRKPCAPnN8Ei/sgBS5xV+rmdfFvCRj0GvaZBrgv?= =?utf-8?q?N9TOstRWwvuxxQP9R4rFWRUqvi6finUIWOu2Kawz2i1WK+VkJ1RlW0uznrb0sjz7R?= =?utf-8?q?zQ1CO2IgoBJ2Ju0jx9AJx8V1weHqVdZYgGd/zx4xQSaTlDPaYuOR3bLln4PlOC7Zv?= =?utf-8?q?ifwiP2+0BQ9YlGRfNJO8sJVsSui9Habk9Hctl0jwZ11irlB8ylckU7X1w8/Shx7H+?= =?utf-8?q?gMBEYmWWCWqXzY4isvfaSsJnhEgnkBLrAtmhIWo1S5m9eePnK+8pyE4wgfH55HUlj?= =?utf-8?q?KTSCdMzkDCWMwgiAvzInFBhR769POFDCp/yCXr6lXoFRoDrbzzt4HlywCzBtmX8JH?= =?utf-8?q?i9XIwYG3Gau9oxoSojNE0U345rpKFIKP1n9hCPxBVkFyF3fG8EOwOa2tozt4BSbct?= =?utf-8?q?ypkFQpKbbcq//WQ8GRD203LTn8PQrRwFX6xWslF4tBY4pvxbPe//vOIp8pmgrxBXO?= =?utf-8?q?dQ114+ISWfyCc34Cgn7CZNHL88hWyd9ZFe5InFdRfh0fUWQkeGOhZfCmGYvqH1FTj?= =?utf-8?q?3/LbNBl8fx/THRwh2ndnSNOcHjIiYQimgBKXQyG/NdvhbgJukoYJGKzMgupdJgoMP?= =?utf-8?q?frR0sKmLoqR7tphGAE2VoUO2mI+nkR7OHG41RjoF7XpN4so0WBKky/7ttEV6qB4+c?= =?utf-8?q?bj5aueJg84597R2OOy/Uf3kiY4yz5RFYHZoRsqOAqYE/iN5dBpb5uxYUvU8NngqGC?= =?utf-8?q?Bb5wipHfvYllWv5dUuiULS/MydDaOKD11EvZQ5PxAQttqXW1/0Seglho6aQMzBqc5?= =?utf-8?q?8yXNhWCsIbTblQB2XRUckOLosyPg2bwHkr9gBZDPwD+X/ZmWiaeXJu82E5vCWzEQR?= =?utf-8?q?sxGAEqC3DeEBQwCXU035OKBqlTX4xYb04hsTu5VuN204MQr1xUDgSBr24tMbp6/UG?= =?utf-8?q?mqJ52kfOpB2Frm87pWnjRLlJeUM7W5O7IPbSZyK1yyfBGa/WH4i9RB+jv5786cOdg?= =?utf-8?q?HkCAgBYbl+aracpYq6MSgWo78IVjs9TeDpYDDM+iANn2OkcOD2OcRd6bWS8zqqZb1?= =?utf-8?q?9zcPrfcjewqoJSIUX0wxFH5DUktO2AKCZLBU2ODztNubEzR5XYnPnioKpGrx1Y/EB?= =?utf-8?q?pn7/sdrmzLDydJWoVXsVgwQCUXDrLK36+ETzgEJK1MxlWFtjNgvjXr+lc3TeDPo2f?= =?utf-8?q?8OQaPo/kRpWEebhyqAGjTb15RsvfASOHOqw3oPP12L4zY5nWL8ecARD6fsRbc2fmK?= =?utf-8?q?e4u1+hhsHzmo7HFNX5hCEWB2R0QTVjUZhYWaZN4KucyH/7A8wksmfRrLQLw+mBPD8?= =?utf-8?q?Hz9YZKK9ZcGraXqOsA+ulGoMr1JQVcO0q6mNaYktU5GyNFq97GNGncEPKcqsxctS9?= =?utf-8?q?MFgy27bvatRj?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 26ac4f88-73a2-4056-8e1f-08db83786866 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:57.5249 (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: oADOEEbwers0GpVImxfn3JrdK9DSumw8CGWp153sXMLqZfzsJIw3Xmm24bRd01Nev1vZr8kLhDQWB4h+6IwEaQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771293011608253029 X-GMAIL-MSGID: 1771293011608253029 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/meson-mx-sdhc-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/meson-mx-sdhc-mmc.c b/drivers/mmc/host/meson-mx-sdhc-mmc.c index 97168cdfa8e9..528ec8166e7c 100644 --- a/drivers/mmc/host/meson-mx-sdhc-mmc.c +++ b/drivers/mmc/host/meson-mx-sdhc-mmc.c @@ -880,7 +880,7 @@ static int meson_mx_sdhc_probe(struct platform_device *pdev) return ret; } -static int meson_mx_sdhc_remove(struct platform_device *pdev) +static void meson_mx_sdhc_remove(struct platform_device *pdev) { struct meson_mx_sdhc_host *host = platform_get_drvdata(pdev); @@ -889,8 +889,6 @@ static int meson_mx_sdhc_remove(struct platform_device *pdev) meson_mx_sdhc_disable_clks(host->mmc); clk_disable_unprepare(host->pclk); - - return 0; } static const struct meson_mx_sdhc_data meson_mx_sdhc_data_meson8 = { @@ -925,7 +923,7 @@ MODULE_DEVICE_TABLE(of, meson_mx_sdhc_of_match); static struct platform_driver meson_mx_sdhc_driver = { .probe = meson_mx_sdhc_probe, - .remove = meson_mx_sdhc_remove, + .remove_new = meson_mx_sdhc_remove, .driver = { .name = "meson-mx-sdhc", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:31 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: 119648 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1679006vqm; Thu, 13 Jul 2023 01:41:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlG5oUi20zA8uu7xUHdSwWNHgUcYMmRW+wbZRZYSzsHFw/Dc4V19t1utSnrjGNyKugqWrmMy X-Received: by 2002:a17:907:cca2:b0:994:1844:caec with SMTP id up34-20020a170907cca200b009941844caecmr608267ejc.77.1689237687043; Thu, 13 Jul 2023 01:41:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237687; cv=pass; d=google.com; s=arc-20160816; b=HZ5U2lH/jkvNH/vAqmXvzYUWUHbxyBXLuHc41I5VDuRbTtVKwfuf0uKpcu73r3nCb9 7xiRm+aYOimNFFEbwo8xAcL3Q+MUK3SYyMtPjBYJ4lWNfVUraAZ8Yp+MrFgOIQZblOPH /G29vvgsaFHixy4HsdzbjeUmmaeL8zQZoFC+tgwe4IvUgm+R5F34tEq9o0EOOHPDV9Ux SAKRf+5n7J3GFvg2oOu2gcfXRETHnyNMKZIMvgEnh0VvjQMDwewVobkuht+ywa/FKv2b mmNiP8mw0LHI5+89Lh/+BJIz5jQBaKNY+p8i1DcZ0g4G+5M577uF40uydMkUoO21aIH8 Ij1w== 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=c6hF9aDU/m7QFuh3XSyUtrLd5d1SlfwZkBPsvOrvgAFvuB1fdngDH7pfTLaJO5lreA WOSIRNEar2oOSViqecSr8iBKRIJpO7FXtvj3uzp+zPtCzTM2qnRK0JzIeYzfVTWyJJ4Q niVNgmy3c/yBPosq3C3QWcFvm94hqLR4Tghk9ZVaod0j3xOTXH9TubfoX7pz2NH0tp6b KE1Z9Qk8IwUZ4logiTz6su2vtf6qwxq3xL27kj/21SIvOSutDsS1KFgOuAv3GEMWack7 +qE8LtRIxK/XBUduJdqRbZ2QYgwhNE72UfDhg2D4jfAfGT8xfcOePj2GfkqmDiPxP/My ealg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=NIxWFnEd; 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 b9-20020a170906038900b009926007b7dasi6569148eja.126.2023.07.13.01.41.03; Thu, 13 Jul 2023 01:41:27 -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=NIxWFnEd; 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 S234270AbjGMIMJ (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234156AbjGMILG (ORCPT ); Thu, 13 Jul 2023 04:11:06 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2119.outbound.protection.outlook.com [40.107.255.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D7E0211C; Thu, 13 Jul 2023 01:09:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F4GvZhGlLlY0sk6xcr7aJ3+PMTXXqswuXI8MK+1oh3kh+YcC+ENfL7S97vzkGkettt5AFWLehr3GpwXn0oUUIemiwGeg7u1+uTcWFp4ox/EomcRNlOFOBOatmTSVOir/ar76adZ9GdbvofUu/34IFKqI5AwaECujig3r41qBxZ4VLER+NhElRpnzCzzPpfSL68+qWlf+T6ppuq30IGTLQlq+k9rCjk179tgydphgwHTmakbY8X38fqorKIcL9QM9Kl/HJUtlt3aqblbGhDWtevuxRkzd4WhMHxNCrEsF/GuFg8x8PAaDcAJUtpePcUVU0o1FldVHVAbEG0anFtjSMQ== 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=P/BX/mQzPNGCMgXyrxnJVUTAvqYz6mNT9PTnU7eb/3OzBROtwBH/AbrZT1UP8m+nZUQK5zcc+hYFBIR3cqB9YRCruAjew11fNtIrxfHkh7VG0NWC+wjKUxcnazMfOi4wC8qTNkWsh+NOAIrDS6K5tLyQJ5L/sfn4sQG41Nhed190TRbG99ade9A+AsKBv2R+FZIDa0aoAltSw751tPkQLelRmXDypmTPGO6vpTV1LwJWPyUwWd2LDFxx86VT54lpB7jgqVN6B73z2SozKW3aafcgsR1BUKZO7OXsvuojyy3+hq+LsoJZIzHZ9PJE8FqWQNHT6TkNDLEPMw97p1BD9g== 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=NIxWFnEdsi7ImEMNgnyRS/6b4iowD/3n0lAksEMajf702/m1dya4RQvUl741Cn6WUdokikcmOVzorAcex6U6gYwAj3FI++2yc+20quaON9AjhFTPr6TzWeweMgdqRo3F9/Aw+nqurV6Z06AW4avJ/vPotbN7WTTRkzrxlFks1t8E61KvyvLA3sJVXeinMS9onKlv3mOr2zVggBzbma0sBmPp6xJt9S02QBWB0oEJ1fHgyW1GH4Jw4nsoROLEm4ufweDPPy1fbSB4PpTWHuLVNcR1sSQPlsSMuEBRDYwBx0YiEgkdu7wsOBixWs+mkJ3p1aiN9Sw2UjYkChrvmd3qCA== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:08:59 +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:59 +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 22/58] mmc: rtsx_usb_sdmmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:31 +0800 Message-Id: <20230713080807.69999-22-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: ce3dda80-e9e8-47a2-d90a-08db83786960 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: s8ZpqNgGZWsAvpj5zv0DZW4g0RIy88w7iUfttGpusz70lRXAKiIjcqbaR3d45yMg85WWMgMy5rg7Ub9FVrLKnXLwLLbcPBfoMe2xA4wP0X8tC1uVg9P1A6eYczB3S+jiHRqzZw6O7aQKLxWvpFqkyxI1Q/nvMwno+bo21vd44aolWjlOhA0pJD9y/LbJ91s0T4Q0SfMFfMLv1JEEDlwMDY3h7//V1BXY66lGKyU17Phm+MOso34twYA2QSXB1QtHK7vxVhHqhmSMvXTZfeIgNucuNAp71E4d88idX1K1uqynEyrFuqyynvHh9Qc0wa3p9UkV0r4LhUzQqQacqwv3BGEoeVcBOYUWOGheFMu8VTQ+7a5CYXZVeU4sAcVEy8Xqf8kWHgT0sX34FxCM0ti7T8zk2TItZgLFjU7If1ReC9cQJU0GIb/UbpCaGa1jLmAWI82V/URakqRSZY1B6xqr01/77QERcbCxa8ETOxVQdVcjp2PXvZmYfiW67nxv8vxANysr6nk+qJBMGv6uwCVefzvXcZuiu1bR6HaVYqgmxSNwz1KRxq1YlinzTBTu5D8Q6nZVTlX6PDfC8CPgHaaNvExa7PVPcqZgXRUuAlFHKHv4BskOlRypGaZjwRaYLLlg 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(6916009)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?4xP9OWFLeCREoTjZ/jAPhkmEpJ4T?= =?utf-8?q?v0HptNmOvKQeIKbxDV0AD9OJTOAKYkbSP6PzUO0G+DmFpt6IGNjshmSaZ1NIpYSpV?= =?utf-8?q?8tNSqSyVnt98hLSjeubCRCOfsOd0WSdD52MlPbSYy86F9tyzlhT1wmb/US6ud1ARU?= =?utf-8?q?r6nWndWnHAkQdPXtOKVgqhVa89M6UCQK+iI9H8up783SS85wrB1OPPQb+GWuR0930?= =?utf-8?q?7BnMgrblcMh8EOLsS+sMgU5+SFMsKEdLsUKIAOfp+qvRHeqwhEAOuvmXuJGcSLL9d?= =?utf-8?q?iIKvbq1xDELXx01HBXaCtereunJDlY0LlrwWloHzBHSzm2CydZIsRvfwjRCsTnfHo?= =?utf-8?q?N4cgwSL9bj9PHd9qP+thTpmCb+zfCuCEsA2bbd0LSyZZd767Q0HTwbrYHItp66CWo?= =?utf-8?q?kOoR2tYGN66CrXuchWnV3hkBqFN82nEQ80UVrZB5xqwZsXdAekV/6orEpRlTFf+za?= =?utf-8?q?ry/gldLTpaS66h1l7QWqlc9wTU9n+dw4eX54l1rMhFQgH8h4LlKx0lWpdfCVqIT4G?= =?utf-8?q?SxEtqMhDPuCTd7kKyigTvA2QS6V4WhE3WzTLvqr8jDH3Zme58zs95ZPydW5/kke/p?= =?utf-8?q?BHWHiQWDEhPpZGcQ+8+Z++446nrwP/Rsl98HDshVaO8EJpGj/BCHn5nu8eRodD1m4?= =?utf-8?q?536bqf2DrnVLNqWRi+XwPeL8gE4wUTNJ+bLhjnXoLaSBB2tIbuXDOgR8oI320Vhl+?= =?utf-8?q?HzjDDIxVlbYtq9AKCDsDXYNM+tC0ks8QeNpBtEVQN/Y+IFdJR79KOAdKVqdrJNUTV?= =?utf-8?q?rSQnu0qqUcG2MTnd1as/Fm2OKQwe6BIZqfCpIYuuCiL2mLBBhrxKvY5EjIoPrMW1u?= =?utf-8?q?Gm/rbiGqGgYDiWZgzRTlS9D61EMGQJmIe8XeGb4c65DlddNDCIuigkO195fULRPJZ?= =?utf-8?q?PUBU+wRXaiGa/7d99cSdjIZiiZ5dLTPSar1xjIPkhuXchlBPc/TX6Hmeoa7C2QGz7?= =?utf-8?q?nAcP78lVed9Z4c01Kv4N55ERlHSfEgQRtM7yOCIdBDSNQdv2gmNz8WvYwDyqqX40K?= =?utf-8?q?IMjz6t6/q2zdaWA2dtvtwgTLESYJCkCNdEOUN+JQnUx1BmHjBgCUtDAURLJWeDZZ2?= =?utf-8?q?21S5jN3E11R6LC7/eY5CcM4bmaZg40fOez6wJt2N0rv5ECAFE/tFy6QUnsVRzzUMX?= =?utf-8?q?088NLDaYya6uhNa+xxOiDXdFq2aPR2T4Nc9rIw4YAKDvCqEnfNdCdV4tvlkLrmPfq?= =?utf-8?q?rJ1CZb4qDFm3SlEbxY/ETbpqfvfcxCU+2s5R9+SAFJ1qCXSS31hf0D04bYoa5zAdz?= =?utf-8?q?7R3VZlWl91QiNBYWnHXN6NvV7zbmvlrEEBpUrmQXdCS8GZGMy/CUhtliBFrVJLlBm?= =?utf-8?q?O5bT8vonjYqZDw4gGSWiGpAjXPEEfILSHFAVEjuZ8TQ4JH5WCEwV9fEOZAZTXbgBb?= =?utf-8?q?6nzYX64Qw7jomKYNu2xhFxPV0k3LqQc443XUoZxMe/ybMfOrQsEEv2Agz0dmU0yb2?= =?utf-8?q?QBDsd4fc7RovksOOeWMB6+oROoGgCAqcxYAIRvxDE0S9/2bz2q0FMg1UQpxZw5HAG?= =?utf-8?q?1A46HFL9ODnV?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ce3dda80-e9e8-47a2-d90a-08db83786960 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:59.1733 (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: C3MrQNg8nT8KLaMwCkoCV9cWpAkHGjlEWJsbjQPXSn7/zhW0vo7snEDDISjT6jrlY4OvXbhtnZ9huyskbORvtA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771294096674508442 X-GMAIL-MSGID: 1771294096674508442 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", From patchwork Thu Jul 13 08:07:32 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: 119618 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1668765vqm; Thu, 13 Jul 2023 01:15:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlEtkmLON5QfVNktE9parzSJQ4U5LT0Ndq7yel1uTbq10BLVMygzmZ48XdpbADAybCreqHoL X-Received: by 2002:a17:907:98d8:b0:993:d6e8:2386 with SMTP id kd24-20020a17090798d800b00993d6e82386mr679741ejc.16.1689236148236; Thu, 13 Jul 2023 01:15:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689236148; cv=pass; d=google.com; s=arc-20160816; b=C2a3QCPqECkl8YQBr9nr/Uy1yYLVU5oErC6tUlqedv7yO+flPiXGE7DndoOQa9XuHU DPpmOQMHeA9looHfFipL0+I/o+bV9ylUZMnyV2a6WA4Zhh9JYnrVOc+g0Vho4ZKXc1BT 1/evNuB8dijGSFeBHGktv6Jwt/tev5Wea7hVipZilEAeDn+OSaM4s0WuFLTeBvFYxPku YM9mvyii8menMPTGxDmC/8MhFLw1OdEyLU2Dg05gOIw57G3/Po+YHB422Eb8korSnvSQ ++8xuF/t5LD9iRvwLLCIT1k8Q1Wq+ZxrurW6BqM/xrYgpHN0gLjL/KjuKQDaIwQXOJuf pp6Q== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; fh=wkz2ovt44M2hf1vcx/1C2T6B0OZQr2IK+YjLz7QXoPI=; b=IALS+pHHFo3KggKBiAb7eDifUKXGwpuL9Wv2FIZ/pGSf22McHu2W89FNitp6H1j0eZ hhlcjm2KfxnANsdvnNMvPNvADkttEuDzCqw0YngCdxcPv4u2pTwRZxh8O7eEGknNg9+U URbp+nTbvLySTWELeBmMnWPaYGxZrZazM46o0kfQLuLHLHofP9uKyEi4Xs1jPtr3yoUI pEClaDepqBDVXNAfxc/tfs/PlJv5zOg9JQ3wQ63yVQYf/D/5pog1sA2n6PbzRUiT+oGI ieSzxAcM1XiQnRiGII1zm0DcaXbkJC/gwHW8NDpxty5XjaKw0JtC2OjX8KBNa90EfLNY mmgA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ef9NQ+oP; 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 g24-20020a1709064e5800b009827e07cca6si6729880ejw.17.2023.07.13.01.15.23; Thu, 13 Jul 2023 01:15:48 -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=ef9NQ+oP; 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 S234290AbjGMIMU (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233493AbjGMILR (ORCPT ); Thu, 13 Jul 2023 04:11:17 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2119.outbound.protection.outlook.com [40.107.255.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 983A52D54; Thu, 13 Jul 2023 01:09:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HRxSQ2sXQJrNMTmDOK1cM0lEqR18W1eEwqc51AsJdvjo1puZfUhb+3c+ExFx6X1L9KTLrr0TRin4WYKxACl0V84wBdIpB0a+d0kbfyNjmrC3klpcQfi1OyTm/M/yCtLD0Nkl9Pg9wsC0VflKMkJh4ETrW/E83zk+/Dq0zO4104pxLMAx4bNspJ+rp/5++V44GBKLh8VnvpIGxKn9JQMPE5XjF8IuqaXtmVjetoJ+bvjmFjX5fxVuqjCy685b1Rjh6kUhcEHTPh35cYsMmALV/+LjW8bAVI20vXyzTMb2MOHAfVE7GmfLg6eZ0Xqm+R6hPvRyQyWOQsYT2ejpZFJemA== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; b=VaR9BbJsQpXKf/dE33l8INQ8gH7TtHVPdxMx0jhc/SzSLH90yRQJ0zDA71lNddCbJMVr9iNMUTtqMQX0dQBwcy/qOoPzDIeh4Fm8ysvWKU63U8WGYDH1DklCo2oQwPz/fKlknm/lc/zt3Sk8IP6vQdX/IlBUdLu8MU3HZu7BJIR2tBWli/g7/qjGJAMQYAoytDDrwOEscx4zj4rsPQywzljmw84Ps+X125sn0mM5gwXNxdN7HmH9N5n8fFXjjxmh7JdsMe4X5HyZb7WmqWb4QJ2em+UzP7VA+xIXhwf1Qs/oSXRpqpfRBRrTnY2gyjW4YEdHi7dDjq1ouoQA6KwJ+Q== 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=0VnGOYi45hwpGU2pMDgLIc+XDvJEY43fviyLsFSsxj0=; b=ef9NQ+oPfGfp88rK7ahUTpN7b4QYPP+GS9CWCj4D3CJ5d920WD80cXbluhuZMBhSeAZARf/TyqOHCBWbvkNayOMolfnFD/2HCKw+RTGaTyLQv1vkYIER2aVm83PNdgYuiCDvyULAUzPCLPssik75mbB42oaX9+6ybcySG1n/ilYIDP3eYMidF6z4vB+LcyYwokM6xqMX9HLaeLhIxrmLPBXBYyiwqbwx68CHN1NglkXE7ceE+OUP3/ql9LdwfqE06LdkHGLBQZ0fPF7GsLiEyDJkbQ3E4vTTOTuKjQv52LNV5Ro8CWgS7mtP07gIoGQYERVkg+EYNBagJm3ZJzRWCA== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:01 +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:09:01 +0000 From: Yangtao Li To: Ulf Hansson , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 23/58] mmc: mxs-mmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:32 +0800 Message-Id: <20230713080807.69999-23-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: c1215bbb-89da-4384-59a8-08db83786a94 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rQ58BziEzNZDDq4Y18OgrvqOB+yvci2h91au2gufegL20AnCAKcNodvHex8HhN75hiOr8URgT7fNI9F8dtFpBYpTLcf7fIbNuPfie+80qxeg2F2RJGs2P4aCimWtoM2mvqLZ5SX+xK1eFNVIxl4xjUsU8xGKdyRm+gOKfaIqfmH1JPjzsOA46LDdsNs3aWlyCz3BSJi5kTsPjnAvCV0/y/U+FADMOnmN+fvbltzb97avULtk7v2GwXDwmIDwRISa48cTKvfmVYe8tRT8k3mw2ovWfObcA8xKVPprCi6novO7HDzqDqZab2ecmjbA6jVzHdm8BAb1YVXs0HWFyREsMa6JVMEO8+NVdpU916Jw9he/lHVvh67O1/JWvzTeAy3G3nwmr67Px2Q9BiQTbYT+YsGdvW7emTin0ndK8glo5BcMGYPn0XU3+BWnZzra+Yr73eq51h2nHvcq51XXMiu9l+gPSsiOX9l3r/Y+BRlLJA+qidH258zmom7m0/RN8htL2SyM1dNaYocECTOEESi3ygA6HmwvdQ5r1ibkRZ9jhYC/5ul2+K2kVglG7GKvrzrktoYFtpE55nggabeikvKWvNAXD62yGigGlaH7/nEDIr11fHdsHh1LBVgRK2AUsU6G 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(66574015)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(7416002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?k5xBRPtCsGXaneOvNu5zmu8pHqGk?= =?utf-8?q?b+A/NM8uYE5g6aXjCCitIVmRtAEVa808C/ZrYuNiaHLNZrYW18PmhKj93Ul2GzTjR?= =?utf-8?q?LdUjrZkr+zoV+Mth+oqBJaAYMHNCo0aC1TS3Pd+jzQAPojt2pdM0QFLi8Px36lzG0?= =?utf-8?q?fFnridC3Pt1OHNngAZtM3zc2Uw/SHxGLwFXSc7SLMccQv98lQMpDaeSAvx9/MvFuJ?= =?utf-8?q?mMXUWzMPu/qm6CehvBIm95F9QaCtsUM+/tCN0fTd69Fq0JDmFaq990NkVAO5KY62P?= =?utf-8?q?aPy3t3AZ/AVvo1wN66hlhG0SbLSXafmFBVvqRKnlSNYadxUK9bVG8zGisJ3p4BoQQ?= =?utf-8?q?dK7wK7XmmOAxmxNbXtCB97odymK3JJiTNIz31ELVyK0PmZftar+6bWsNji/bB5tPK?= =?utf-8?q?hGKzW9I6qlXrVjwYHvQyfwc++Tr9G7NdaL5QQgvT1W0qN9mvrd7BIVfGKdLU4y7mK?= =?utf-8?q?BMDQCCON1gRDj0Uv8PL80XuwVg7UaD+EXCzZWHQKgIBXK0BQ8a7EC/F2cBxKBBCOr?= =?utf-8?q?AD3B3ex90qHBDbkAY3i3jso/deK+m/3SiyFjXkmhMmM8wj2xoxmrjW4o8KMLvfsEl?= =?utf-8?q?z0ZrIrG5EdVSG08WjmTOEuq61hOaXutys4LTX58D6BcmZltBTMnM0OhpkpDqYzr5X?= =?utf-8?q?zE1m9HDWayjZFuxvfyV2SnVD1IdAsflKp4yCewAg4ZSClIEhaxZq3dOjEVluWOsCZ?= =?utf-8?q?ATs2FhEpSnir7xRJopRjC5FVQAIcvR2/7ndk7q4pTAQsLzwy0/Bz8zshJnp545rma?= =?utf-8?q?z0eBRHZAXg0I1fE5yAjb92IehzOtptLvWoX2CNBvIGTyZckMKf4N5dbQUWbakUkTn?= =?utf-8?q?jt33WcPRxqWuUwiO38zoQWr+6n/sCKEQW8I67cKQKTM+J+NYE8rkdtD+6t2Phr26H?= =?utf-8?q?f+t03Et18y74oqVlyDebp8y5scrY/W2JeWNvqM9jYP2/VsjiHlaZpaLJsif5AxhkE?= =?utf-8?q?YRK3VUcSx3gn6hVdGJA2v9RbX/ZDN2CgI5eR1ZXQBSXThrBpcUheRJdOxOwHHorbz?= =?utf-8?q?f7Wyx3KUa5ZeThEEdpE9xUpvjrBa5a0+hcai+/xH5NNbc9zQY2WEe53cOnxnIpgKJ?= =?utf-8?q?JpoeKRIq9a0J8tITJqwLwaKhSQ8bUFucZnOc8pj+k0EYU1qxg8mgRG7zLaUL3aiw5?= =?utf-8?q?gIdLwQuxbhilb/bl36JDQIsu4SQs+HEzVB8ID+AkwLCbsNXAyDsHdJOwuBSuOpuQk?= =?utf-8?q?SCX9Dt/ZEuH1sqoBv/Rk2zFVGQFpu9C7zZ9lYR8ftFfZ0XUQLbIEuF7RnGsc/SwL6?= =?utf-8?q?2oJOR4pdtL5gTZpBTnCmmy6//OQtbpmNo3gUWvVxtF/jxgelDhYWYz6NZrpGNMjwK?= =?utf-8?q?p+FtJrcXIpi+r8Ch5s54855gnTTRWWZPzjooGZPKT6iGDBQbEqKYCKy9o+6h1i5k7?= =?utf-8?q?I5b+owvpvSBzskDbf4IFJgqzD9Xfy1kdCVkhL/s8UXVZ+QS3TeyQ1UUAk2/G3cxcL?= =?utf-8?q?WK0KNlHnu9qUhpeNfC5f9b5nq4WPs0+amAqZi4ZCkSrfZNC1gbi4gw1+kqTzlsiAo?= =?utf-8?q?fC/ynz8fu6Hz?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c1215bbb-89da-4384-59a8-08db83786a94 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:01.1802 (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: j3NzEQxLTLgWWDGGFegUpNfMXGa2qGnPAC6qjy50q2B/Z1lPKpT1/jCzbSLIFzlWBvDf0nXvf2nujgIeSHkClA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771292483196039385 X-GMAIL-MSGID: 1771292483196039385 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/mxs-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index 8c3655d3be96..9abfb169464b 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -674,7 +674,7 @@ static int mxs_mmc_probe(struct platform_device *pdev) return ret; } -static int mxs_mmc_remove(struct platform_device *pdev) +static void mxs_mmc_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct mxs_mmc_host *host = mmc_priv(mmc); @@ -688,8 +688,6 @@ static int mxs_mmc_remove(struct platform_device *pdev) clk_disable_unprepare(ssp->clk); mmc_free_host(mmc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -717,7 +715,7 @@ static SIMPLE_DEV_PM_OPS(mxs_mmc_pm_ops, mxs_mmc_suspend, mxs_mmc_resume); static struct platform_driver mxs_mmc_driver = { .probe = mxs_mmc_probe, - .remove = mxs_mmc_remove, + .remove_new = mxs_mmc_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:33 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: 119665 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1680739vqm; Thu, 13 Jul 2023 01:45:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlHOM/o+f7O7Dks9BEhtXW19WUg42uC/1KN+DH9mt6m23wganF9J0b4UA0wUuNTH1Be+FHC+ X-Received: by 2002:a05:620a:430e:b0:766:fa53:35b3 with SMTP id u14-20020a05620a430e00b00766fa5335b3mr1378389qko.33.1689237935964; Thu, 13 Jul 2023 01:45:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237935; cv=pass; d=google.com; s=arc-20160816; b=olpqCYEAFsaF/LvRno/aRFpRYvE0ghBKl5wkWJNa6FHrs4Z0mWS5EJDSUVh/PUKQGa BeucMAsEvoIjBbwRwkbWnMvmjqsoGZHTso8AJAIXS2v6h9tIO5jTj6tUMGOUEY69M2AK IQacuBNV7yf73T1aa9YDkBqen6W+Wlm853AOONM01GEUvsgyQaReA0CUI5snsAwWnxuC HuUwtwB0rkPtZcsQE+Hy3dfQeMLuelX5JbrNK+MKE+mFTkGXRvred0qBvutyI7Uk3bxX xsBHx9n76xb6DGuoiNC2+jG+Ow0RjIH9iUSsSk1V+gxO+H9Ax8RxCflw+Uk7s/VUVAqZ yt9g== 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=xHDYAo2K8eeOzGD2DOisszn6JuNtVDOiyeNXZmoz4Tw=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=WxRuosZ+/52FXHiYlSn+UsZsrPIs+LK+jCcUEpWRLMxADgV8ulVNJXWSUyz+2vDL76 3qPO0Qp5h48p8OmLztwIQox1ihu04uS2b8XKZto91Fq8EHiKvlKjAwo4dhxB0pkdNwCi Rh2cuXJw1nAkl/Ak/fqpQXfwZClpn09Xeo+520OWdCyY4Hq66+QY7gyiq7hFxeJSyYn+ UcBK/N25TpSFZjjqkXpqPF06lSNEkGs83sjL8X9lafu27Y8I6AHmIaw8YLLj6okDMsgg wM1GzIZfG/kpe8LkmNUvVvCxVTZnrTQv6J86Jf+dFRr3dFjUEAAwnFP06tJCeXHhLH94 855g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=YhitGbkC; 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 s28-20020a63525c000000b005577eec6c6csi4822116pgl.160.2023.07.13.01.45.23; Thu, 13 Jul 2023 01:45: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=YhitGbkC; 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 S234303AbjGMIMW (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233502AbjGMILS (ORCPT ); Thu, 13 Jul 2023 04:11:18 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2119.outbound.protection.outlook.com [40.107.255.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDD992D65; Thu, 13 Jul 2023 01:09:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zd4xOfunHO++9t3hLl614lWcVo5fMi51jyPpCU6qVnkAvsvR5q+ZEwOfTCAat1yqJQ3IuKAGec+RfXEh2r5MHHvBr6Kn3M91JRjRdH58UTw77w09eACKnKnqyz/UvFnAwCVTFEDbnespLYnsgw55SBCypPXT3Tm/M+xKGmjtA0bIAc1UMfOh6TV1eNVyyYtwoKgcyr1dYJfpFqzUDZO3FoEvDOBDkCZLH8Ti1FmaW1IVfPihsYN3/QQd1f89sFFc3W56wectviQSACzoyRkLdSZnIlQh1MDhOXEKc2mTQhigtua3MfbTfAOfoRRtsTWycUiQJGf7XvI2aYhwcLPC7A== 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=xHDYAo2K8eeOzGD2DOisszn6JuNtVDOiyeNXZmoz4Tw=; b=mvFGkg0rm1+yz9QJe2D+EhZisnrHexc7NrHIREKAg7RGipohb7Yf6yTYoaSynqQdF6tN4RfmJd2WNdqNBw2NyFD4+osaoBE51+gG/nI9ttXwC/53FF3KdGcC60f3yLfYqIdK9cmQXGi2m0jjIzYnxzFrd9NYIKKCxeguSbof+LXnwl2qAbTDU7NWMPoL2VnwbYaW0CX/f/TyTJhYDWLWvTjgb1NsyMAT9rV2LaCb9Zw1yFK9vFmCqxjFP3vU2Zg+bYXpT/jMBZTfoOCL0vlEHPhoLgRnnGxhR3dOGKY6da4/aPFOHqMQU1IMuzARN4LF2GXdEbpor88Kr7o0N3moSg== 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=xHDYAo2K8eeOzGD2DOisszn6JuNtVDOiyeNXZmoz4Tw=; b=YhitGbkCA+/jQNUXdpWB9LbKPd8snPBTnwvKG0/y426yO+F3nDdNV9IQz8TkhRwpFWLLZiAKQQUk3bUXqJkBYiNuM1ESqw4altTjFrZfDW2TjlA9oJPBSzleRcywuLzI4/xW0cnQ/p3Pr3vCIYZsvLw7QTrKfslfTGVrWl6dHWwJm9sqtyB2YDW7wL2efoc9Ik1ZptGKFWRYGdk14O7dgbBcxDDtdVZ2B20PEZ6xj4Ld+xWaWLUWFKrVDXIGuOp5uJgBG4lgzsEOk96eihOUuLS7gyzXGAxWoWgEScGKW2rnLQvtQh9qpwtkpzzP4T78C4zT6uSbReKTdTResenQ+w== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09: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:09:03 +0000 From: Yangtao Li To: Adrian Hunter , 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 24/58] mmc: sdhci_am654: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:33 +0800 Message-Id: <20230713080807.69999-24-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: 277b7b33-df12-4cfa-5435-08db83786b9f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +x+S437nTwxX02ZwkVSRhFsg3Wao0XejI2PypPGy0t8IdqqhpP0dG0wJ3nJpFobYHitWT0zKPZnH0q28aTjcvQYRMMtKJsXucE3wboLFKFWRKXA0EtG+WiI07X0wGheEvG4NA46Sp/ay9fRQejwnFhjK7GUv7HUb1UcCI6a9y4aabS2HHZITpBFfstLLMCuyhoQjxrCtBwV4Bv9M581Jnjj7HaUSkxf9wmYU4sop49jGTIRPXohg4twy49bm+uMYzD21df/sl/UtzfEqY9AyUaO/yalBSb86LOiZyqxaTFBZiSMxPSlqWb8L374CgH6MZj6y95QBQ3lKvMK2VLEXso8mi5ckKIhl8nu1YuG3Nbg8yI6EpECsvvk14ilvZYfRu7GCtpkqDuKU4Wk9JD/yL2CCGLHqlAiKyvY+dzAk7yvCSEAt6wRj9IbNlz3wiD1J4++ps+3VIlybTz/4j6+x1nQwmYZJ08R5GHBfDd0lG8oG8zYTSW+vv/Oo0cREJs5YQwquOee7Mx5HRKtCwvaDBrjTQKhv8p3c3YhPAEM/LvXWgP9DyCZDpUdmdpo5vg2psvOhJaUcBF11ls2pHjbGpjFNfKqHU3VZc5F+aVV7ynSpz/dKK/td52zLnz6yNV3f 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ZkjGml4vS8aZcPsMaDEADYCaDp72?= =?utf-8?q?L7or7Odk90XGabaB8La+bgW8C6zHmXsldDG+6Ia+yOhzX40Ez1FrOmnqYwEZcqNSf?= =?utf-8?q?SzyYXE/069iBqsA1fUmBLMn3SctBBERl0UYm2F6xTamECNKmVcAyO8K/kFtSdK/M0?= =?utf-8?q?7MXR/t7zXJHbtWrT/P6ds/1SqdzW4slolcrf2OiWJ28aQh7dPmsgzipF6lRDZyKdL?= =?utf-8?q?uIp8qdwQxb094E2RMnQyWo4/welcqz+GJygdsX5H9/jtO8/UZklealdtagBEdaP2v?= =?utf-8?q?pf7vfzpbnP4AhYNp6dB7w4U9B3DeqXahACsThAsU6IyhjudTz7EoHuhZANH6g8c1c?= =?utf-8?q?Y7sRZHOEREykSLFYOXX1axMI93WrssEdSxfEmN0OBCXtR26LPvCSGSO+agOfFNr9g?= =?utf-8?q?vJvkM3zlJeek1nvvopvanuPXCQ2o0V5mbPkU24Ooz6CAkEmA8A419X93UTuGTmGDO?= =?utf-8?q?pWYrU7gp0ad8Nla0KThWlhpJ2SLv80qD+ZSlKiqGyDFZr0mwX1ZqQq4YY9h+frhMG?= =?utf-8?q?1Q1dPxcW9h1L4WHei8cNRsqRBhKrhxL26XRu9ZjiwrrREjOJUy4xHpBJQrmtqKtL2?= =?utf-8?q?osZw+9l68oEkt4rvr+WzsQSNfMQmtklaexxypA8YvGwVjYQuIqqR4wU35bKTwBNgI?= =?utf-8?q?mHR6m8g6Fbcjr1epM1Lmi/iBWNOG7Y8lEXbEMdiDNFZCwFR0V0Z0zPE5gENQQ2GvI?= =?utf-8?q?ti/HFx+QFz5mWy/m7JLAGDAps3Z7lR1U1zWC9Vsi931XFbbn4QIVKFWC/FRGasAsj?= =?utf-8?q?D4hawVT3CJnrKepJC3gtc6zfxK9XiVr08XpY1OrDM0ZhonxMs3ZMIgZN0l+g5Aet6?= =?utf-8?q?1+ZRscDtAB7qKlO2l4Xp3dmDrcdzBAKmm2VaLK3tFi+xnOMfMk1NkpZ/QmfNfimWR?= =?utf-8?q?JmeNpj5HM7aI8rqYZXYCd7zwF/6OACijISZC69V9vXFfpsf4bQbt1dDO8jr6hWHMf?= =?utf-8?q?tUZprO2+LHWyaHSVA80Kv3cRxB7xs40NViR1E5JBw+6YSDHr1ZzDpgmARzIM5Ccec?= =?utf-8?q?Omnd212c8C6aRJi4bP0Sp7vE8R28uaaV8rv1rgd+IussoU3czlUQwIxCnq4W0LIsl?= =?utf-8?q?kZj7TsuVV2fWpzhN7oZeGqOUYPe+Hlu8BoAFlJ+HVoNiKeS2wbbYOMCkY2l0vNlxB?= =?utf-8?q?wlNta9gbJzBQaLIuFMkArRdZVvyPJyadPvPyg8YiD8UJO6FlNLHroCRs3JmTWce2i?= =?utf-8?q?Z7ERYJxWsvFyFz2hhYy/vb1Y4rPUQRJ/0+/Al7oK1VTjUkJyDtxmBvRveeGNHhRaT?= =?utf-8?q?33PmZDpaDCdfTaxd4YP7kOxKEPJkk77+qPjSxFKwi5xmUQKkgLEO0xPeFYlSWZgOY?= =?utf-8?q?CoLqi1rWd+dXtuBmOED6hWJFlbrt9JPLbcVbzLkI/IM8Muz4k4D2Ha0Cq3oa/QYAK?= =?utf-8?q?SZjjBacZP6yPgDP4HJSNTHnc5L3z3iILSVJB1lf4viuDHpOY5vKOCujMwlFrp/Y1X?= =?utf-8?q?0H0YVERujHNyeQQaWNzNlzdRrIyPwbzlgH0JX+ojQPOZGJT7v6Xcg76eYyoZAQvBz?= =?utf-8?q?7NRGWP7qm1RW?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 277b7b33-df12-4cfa-5435-08db83786b9f 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:02.9603 (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: /K5Vnb3ZxFsRNv0nJ5pzMWUaTovl0D8E0oMnuCHT7eGHiStehfMnZ4nMfMOz5bSj2jTTS2NjBxysOkxeJDtJsA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771294357625641088 X-GMAIL-MSGID: 1771294357625641088 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/sdhci_am654.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c index 7cdf0f54e3a5..3cfaf7dca274 100644 --- a/drivers/mmc/host/sdhci_am654.c +++ b/drivers/mmc/host/sdhci_am654.c @@ -866,7 +866,7 @@ static int sdhci_am654_probe(struct platform_device *pdev) return ret; } -static int sdhci_am654_remove(struct platform_device *pdev) +static void sdhci_am654_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -874,14 +874,13 @@ static int sdhci_am654_remove(struct platform_device *pdev) ret = pm_runtime_resume_and_get(&pdev->dev); if (ret < 0) - return ret; + return; sdhci_remove_host(host, true); clk_disable_unprepare(pltfm_host->clk); pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); sdhci_pltfm_free(pdev); - return 0; } #ifdef CONFIG_PM @@ -993,7 +992,7 @@ static struct platform_driver sdhci_am654_driver = { .of_match_table = sdhci_am654_of_match, }, .probe = sdhci_am654_probe, - .remove = sdhci_am654_remove, + .remove_new = sdhci_am654_remove, }; module_platform_driver(sdhci_am654_driver); From patchwork Thu Jul 13 08:07:34 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: 119636 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1677131vqm; Thu, 13 Jul 2023 01:36:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlEx1o/uKGCUYxiMBadu07Y9ayQiysrdLlcmCJpKIGEmrP7B3U8Z6zKDR1KUn+lWiS/+57uc X-Received: by 2002:a50:fb17:0:b0:51e:26c8:25f7 with SMTP id d23-20020a50fb17000000b0051e26c825f7mr1050973edq.42.1689237416173; Thu, 13 Jul 2023 01:36:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237416; cv=pass; d=google.com; s=arc-20160816; b=VniixhREemfj5H009DpTS1kK5cj8VXQgbT2EVQm4lNu49yhNp616ROoiBjWQCbtjbt SirA37OXLiimZepuB3uExv7Em4PrC5v/niqVwFM3tL7ksE92pTFHA4ObJaDtnJoGReke gmwaocox05UYsTGp21OQZh7bUm+7S5NRs9Q363MTmApv7IcvD/VC0WOVNjAmapWKFlSy hUswrBDwUchRCKf7KRNq+7c2yOJ6qCOmUiFp/TVqjwgpRuwdQe7gX3Aog+DzgHgGdH5q umpQ+9UYAl+zCcTznxU4A4Skx5OgyYytmrCin3gPHtM07vYHb0NSvj042qoC/KntzXsQ 8Z/A== 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=J5jSVvTfy21nexuFITYTeRJZPViozYwLNoQA6yut0bE=; fh=7b0Y5Cx3utyrzaG4S8aa3Mo2ByBxutW+yB8187lmbIY=; b=m0Ks79W/hVRUYa6s9gjnkGfyreoYlbnsM5nPKE7YYaSDLfM6brsJf/wROnEXnnNBb3 kmUS9P++9vJU8wTP0SGgjKQkTpdJY3H8cZPX0fTVMH/MhWNQ8QBoBkzNulb+p6CtEr9u vtyHu6Z+okql51nn/CtbeKVX4SODOJiljQZSfxGoZCAgQZsKwZhwKyM0iYpEmq6bZj9g vtzHW0cgRC5Sct9McOgzpejLaJLrXmNwQO/aefQYcQZsiXKCQC2fOvOwcLT9W9uzNUq5 3EOHEPzfjXeAmxyd37iNaEzSryggO8oMmIGdJBZNAQ5HCzY2vRYW7wdpoX9JcuqkSV+W xvGQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="UtrCq/nk"; 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 r24-20020aa7da18000000b0051fdaa08fd8si4193586eds.261.2023.07.13.01.36.32; Thu, 13 Jul 2023 01:36:56 -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="UtrCq/nk"; 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 S234325AbjGMIMb (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233552AbjGMILT (ORCPT ); Thu, 13 Jul 2023 04:11:19 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2112.outbound.protection.outlook.com [40.107.255.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A26F1BEB; Thu, 13 Jul 2023 01:09:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iELBa7CsJSLAuUWWFAqJ3Hr6v5J+alAZS/Arq54nI/+kyrn/sUH+LWoqgLno24UMrHyyIwAx0MMzdicT80/QfbRNxDnpjRIgQ86bD8vpKLU/DPPH8nZzIFYeVbN5hv4a0yYIx7oEi1llZnWwvccv08pTEFvt4aIuZEq3ceJ4uutPTBAiqX58ne3sZYtdLpep5DkQLPm/0W2en+zYlkq4F7zKy+YkF96aUmcSVLGPy6Xv349Hyvm0/9K9+f80GxNJaR+iW4ubdYfZFmlx7ZMnTBFKsbqDHwK3IfgSqnWtY9L1cC8FuDsS9Z2XW67DiVW/dQ7qtyY22X7e5QNK/a3yGw== 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=J5jSVvTfy21nexuFITYTeRJZPViozYwLNoQA6yut0bE=; b=kBci9uG3Epi4xUKDnkr6muhSKCHUJLJwjOA4TDjKfv88AiDSnLsXcvRCRKjSm3g41sd644+6yM518zjUY8Oov5xV56nwOf3WLHhIRDNAcC126givfnArAoZJ+mM337sqypQ4F21XK1E3Nd9mj3aoZTTvTb4gDkR/d1r0WGynaxqlEufwPoa4TsOJESTS9SUk+x6Tt9Zp3JIq5/8G1IxJPXgfB34fQpKdPwBW7v++qJUhz0XPxYQ0beziir8aaGUScqs48cTYv3aJhaaklxKGvv8tUhdN9qaGnATukAlZ/l0JVd5npO48Ht/PbS8P4rWEHWnj61zSMuXdXKhlp5SZZQ== 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=J5jSVvTfy21nexuFITYTeRJZPViozYwLNoQA6yut0bE=; b=UtrCq/nk+QfjnJ3K3Qpw/+lpITTeYDNaBf9M2vpqMw5epuu1JxGS0tcSb1C1RcihnfZSdNqZSQrMmtaV6dEKBe07BcR+2NK9eYI/qqql20M0+NMEy/DFHU1Do9JNZ5TJqusuj/gnu56OGUMQflDlcARqfu9c//kXodaylPGSI7ajhqBwpYIHLU/05E0EbDsSt4ftefcxpnZSeBGlk2dxwTtczESxh2j0NQ8IWquD8e/CmL8g/EnElVTHsYnTuw3IEmag9bCZyuSQ++unCe3tndGQtapphLjaKT88R8PpOKv6OWIe+EbYyuqFA+MT0ebEX2OL0A2KgU7eP6mj0n63HQ== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:04 +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:09:04 +0000 From: Yangtao Li To: Ulf Hansson , Kunihiko Hayashi , Masami Hiramatsu Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 25/58] mmc: uniphier-sd: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:34 +0800 Message-Id: <20230713080807.69999-25-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: fff4feb9-875e-4a62-281d-08db83786ca3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Vj3tGXbA/hNN+K0kbADOJxLK5ThT9tbLqsDP09nyjEhdBJGZd6cdSaNlj0LsKJO+Idt7vwLZvWPuHHxX5SXLVa+ApIRn8vodOPwXWAzceBm63wPGfTxt5TKj0vqJoRjpGt0bXx/KabKswC70HBtPI9LpCiwwFSFOvqhSwslNYqUh6fyOXBUK4lX0mljIsQIlnmDJzxPgKAJcIKQ4cCf4lLZ724KDgppHzSZ90QNn/XHQAcFNHcdN7ejibRgpjx0Z2DJEgGLyOZzwGmUJ2ofM40I9rWIxta5qZbc20jfq11iHHcoefhRnaBfiKnfrfBMrJXfbdmWD7KFrNkN2y+VaDiO6NeUnnQU8n+BtCPuI7ZqqXr2i7YBcUgJRC43hPELzA8YP4x/MqTrMoG3KWoRPaYugMkWeSRYNP9MzO3GGt4wiw2X1nwOCQPqXVgkW17ssFkhXntFf28M0mYbjPPQf6WXxcv4RkHjLXq8F3Gole6KiIn4By1jO1Xwm8PLlusAY4hQAD8VNVNtPDVQu+AOFhS0fnd5k+mF0AHkdUup2jUxN5hGOwOY7Q+8hTjXJM40XrqMteuIxHSWjnOU1kqjv75D0SQ02MJnzMxUcA/1EZtC5Y9ldg/9hXJUxtwnKtWXI 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?zP19iBG0/QBKGdM9jrHhYYxIjqoy?= =?utf-8?q?Y0KcBwApQ7tF+unUwoC0l54m8kcXQdX8GpcBjhEvDLV2qjO6RGHAIzQNFxi6VWJnF?= =?utf-8?q?PC4iuY0bM5+nBdTF8SIn8nw+d9Ih2U6bXwCDKYnjSyM4PvH/r8a1wpYZmVQGTixfg?= =?utf-8?q?6tp/5mFm42Q2Dxid5Oxz335WcU6QilmT+43GBwISwnRg7kwF2PERcrag0yb+bMCDK?= =?utf-8?q?S8VJPSrkhrSgWEp0CqisOy2v+X/MSaJCGUK23l7JgnkAJx5qPVfgbKIaEWoGVcCCD?= =?utf-8?q?IsBMpinfKCwq5Gn1ejMLw6e097sRQxjCIvAo343r33TG/lADk2Oxg7XprX66ykmv6?= =?utf-8?q?5XC0eaD3OEmsp3EpA4P6DyZEkV9bnhSI82hkB8wGvQsyZdHsPh4mxdwkGAPM65+Y1?= =?utf-8?q?dmvU30pqNUfbgvXXzEpAI/R+MXvXgFxX0flpwrJhk3rrAiKvg5U52AUlZ+hbwFyoq?= =?utf-8?q?8C/f5ZvIJADpqHyAJyREsW6XVVflPYZ1nMRmq40C46nxwFcDxszOAuenwYE3NbtkX?= =?utf-8?q?4e56deRu4NKzhKH4nGZn4c9TwOFlQrNXKlaiTF4T/cWbCOsPrCstowIfnUNVuRLjB?= =?utf-8?q?Sa//Ad+W1iBOs2IgA0Gpoe8gLNVTTHVY6/TiYm6OTJawPr5LrP+krOCtuIqdFN+46?= =?utf-8?q?koNBvwoqvC/tEFGwmf2qiVO8fR/3aEEIDkTJ3ucCMqT6Wr66lP7VjkEohTFB/eqGY?= =?utf-8?q?pVegpqnr5k9CZxZq3nsG6uVaWizzj8UUUWJLHrZPvkZZcx6mBT9jaG5BiyW4l6e4g?= =?utf-8?q?542cJ77ER9E3ncCUfcOqHdRJzGkciNT41ntVXp+Og9AUTOD4603v4MmYLnNFV5Out?= =?utf-8?q?TH8kzDjsmCFj/VrIIfxOYVbaw5EvLAMXi7QZmr8mktqqvaQIoXzPz+ZsY26Mg+t+M?= =?utf-8?q?wdzxRsAndK7ArlrEMusLpcjWFDLJRb6aCEU+6+2ca4/mVSSgWl3L63cLsJD8/xAU9?= =?utf-8?q?M/amoDh8SyQBNLsFhqaLyLZ6avN/l/fJpxqb9Robyu2e+ZahJcT5m8U/XWt4ZZIZM?= =?utf-8?q?zYAigcu9CLLFsrEurg3RjhCIZRHRFWhecYM2MnLYV7NDsGAaKxQbzFGyv7g22soLK?= =?utf-8?q?gXWgtWciVaHjsGqDkPlzqtKCbHApFK1XvszlkahzffBpJc0bdyXoZQQglMjpLn9qq?= =?utf-8?q?2aMFz26fFYzHAvAqmXjQCsBLJePAX8gCB+DkyOcZmlMZHA5Axwu+ywOg8iPaWrz4w?= =?utf-8?q?lQaiZvHLkJ79NcRsTL4sEvEd8Pwyu1tNdw8PMHf1tm6Jq4rG1pcfKNFC7UfD4byPz?= =?utf-8?q?96RfgyK3ofNhr383D2frFJUpQjZK3pnN87prr6y+mOLt9rl2mxmRrw6OSUPSCDwSh?= =?utf-8?q?967d2npRtYeov+g31O6no84Ed6genAM0D4lhHaRgob2KlYBIKvbGnmJk6VmHX0ctT?= =?utf-8?q?b/lO0QItgo9Wud3X51FOCYV7EwmD3wEXW/6Bq49n/Biw7Nt9+xzViS0qOVsDJe4a6?= =?utf-8?q?gvBvxcK1w4pX8QduOUnT2i/vGeF3cBgXrpvhrL5qA6OzzplXqjruDRKRZOPQeKska?= =?utf-8?q?Ph9PfREcUWH3?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: fff4feb9-875e-4a62-281d-08db83786ca3 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:04.6399 (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: lftmugZw51U8Hhl9rrtMlZQtfxyRrc/Mxj7JI2Vg4y/c0s7/0lyLcZ/tVNNz7W3Bj7DYWrZNsCrYXxzdo0wYrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771293812717107912 X-GMAIL-MSGID: 1771293812717107912 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/uniphier-sd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c index 61acd69fac0e..33a4d1c6ef04 100644 --- a/drivers/mmc/host/uniphier-sd.c +++ b/drivers/mmc/host/uniphier-sd.c @@ -727,15 +727,13 @@ static int uniphier_sd_probe(struct platform_device *pdev) return ret; } -static int uniphier_sd_remove(struct platform_device *pdev) +static void uniphier_sd_remove(struct platform_device *pdev) { struct tmio_mmc_host *host = platform_get_drvdata(pdev); tmio_mmc_host_remove(host); uniphier_sd_clk_disable(host); tmio_mmc_host_free(host); - - return 0; } static const struct of_device_id uniphier_sd_match[] = { @@ -757,7 +755,7 @@ MODULE_DEVICE_TABLE(of, uniphier_sd_match); static struct platform_driver uniphier_sd_driver = { .probe = uniphier_sd_probe, - .remove = uniphier_sd_remove, + .remove_new = uniphier_sd_remove, .driver = { .name = "uniphier-sd", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:35 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: 119637 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1677420vqm; Thu, 13 Jul 2023 01:37:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlEUpc0ZBBI84bBIQD2ex0nMGS80vlFsjzH/nXxXHpVyz5rdChnAOV+ZtGbUzrza4pZ97tN2 X-Received: by 2002:a05:6402:7c4:b0:51e:5cab:feb9 with SMTP id u4-20020a05640207c400b0051e5cabfeb9mr1176388edy.33.1689237451606; Thu, 13 Jul 2023 01:37:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237451; cv=pass; d=google.com; s=arc-20160816; b=bYxnhARMhZ9Brm9APrYxUDTlwD+gWZFTSn8KWtAq9irpdxQ7FUkAgTtoOgxjasGkME 01I9RUrIjVyOisgNYpf5M1cmFUY10Rx2+6X3QTId47Lq/b+0/CrQLm1JLoklGboXUO4u gsYf9dsDS02hi62s947GGQRVME4tjsiGd+MDsmpdSLpUHjxTY+N204gzgZ/+nfuZ1Ga2 /n2LOT/7U3E1OxKwiO3qZQEEkOEpYdky7YncrMu5J4DxcyLJDHYgR6fHvOijc8fuG69A DSnGDvqnWLEEuvI4C2hfsGc/WVZAabU74xYDDifiBgzMsL7h3IVqzIA/PXrmICr4RkGH 3quw== 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=4qtX4rBf8ivXplsOW7iRs7V8GlYIlgMr6Tweprq61nI=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=QgHiQgqD2zK79FTgIlxrnvAxQLhYIC1uRdynU9JaHlMc8hf0UFhhmdL3ZaufHWW0u/ qigqFXDtfwRS4gY6o072ChjetPzaR5lGotFiK2UvewNqUYTcpBlILwTEj9pCKkn4Da/a KvERCA0DSkv6MijH87nJVNbEZz7Y45OK1qpr7ZBc8KoU0TzfyLmHscvwWb1n9n7tQ05X UXEsNdRjdsiYjMAIz3YJIcWqbPh9c/jkKW29vU0zs05JwmWRMUWqdSOoFnn0LlNOiUQf BPsHsdPDJdI7//OPR4fwxZczcYtpbaDbGGWBNamCtAgIVp+owzmFsPya5bJpPKFGj6aN t8OQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=UwlxPtG1; 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 r24-20020aa7da18000000b0051fdaa08fd8si4193586eds.261.2023.07.13.01.37.07; Thu, 13 Jul 2023 01:37:31 -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=UwlxPtG1; 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 S234313AbjGMIMZ (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233533AbjGMILT (ORCPT ); Thu, 13 Jul 2023 04:11:19 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2119.outbound.protection.outlook.com [40.107.255.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F23802D44; Thu, 13 Jul 2023 01:09:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kCebGbQXLkJ9W7E2I0phW/qoWKrDC6drBuQF+QbXTG8VIdnSX6q86nZTm1XIHr44e5nIxYWlEq4QhLngIKvXN17z9KtWXRQigGtrsLUuSpUpQin5e8JQIDSCPQad99eKURGLCUT6vzRDlaR0HvRDRCLlO2viwiOku/k7EnnLt42ZTrCxIKjs16weMZf62cXlII7ZFXGOo3iPNfG8hwHpxOSULwWzBFqAjAxk9irEl/qpZky0AcDFcKxlaDa1/laDr4rXjslu007k2Rq7sZom7YdhsAiWhXmug3DMGVV/1+ruySUOwm3OHWpNV5jWvsh9ljzWl943qnl/xsW/kc8a5Q== 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=4qtX4rBf8ivXplsOW7iRs7V8GlYIlgMr6Tweprq61nI=; b=W7b2aKqE0/YzTw7NAstJubJW8ONc9OrFfXcsLjuFSBFdsjgVWpVuM2le8fUuzQu8AigNBuU/Z5beDPsSEa98FQPi0uKaObBeF0Qqr4Sb4a6l6OzNyf38uxjy6ym0j6fEkLfWBZgtNvrlfsqtkV68naAwiqF50tWIsu8M1TcWL04gac87ecoEyqwuQNjzVblrOX+cxkVHWxTwsPi5A2UHqr0QUBeoXyU+UqRdnnMwaCsQ3aunbhcgIP2l61pb3YXgsQcib/Mf4aiOYrPDIGX2btuMi8v0XRRY+aeuJ4tsi3l0mlcq9o7xLGET4Lbwt+hFms2FrwD7AsVxkMYflpBnRA== 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=4qtX4rBf8ivXplsOW7iRs7V8GlYIlgMr6Tweprq61nI=; b=UwlxPtG1Ovq4S1NwJKSoQIB8A8xX7Qc8yXqrf8wmaMapGAX3Ss1JIrJvVClRGruGNQZIaO0UOakjTmZ3mfHVp9hRSxE2PV8laPpFN8vW7hWoE3muVf7x49FTFNUOVV/wCmCY0sx0GZTiLpykeWHV/Edmazf+MmC24pWJMbiejJHmOpZ3Fak3U5xuTXrC3cCcwLmDORknwbLD0wmOB4sFxUtMgIXpguM89j6wryMUTyvs9FRgRHUIf9D5Mg8eBFAStARoA3gQ5otFCpUfEZdMlUGJZs3N4w1q9CKM8mu89acNzpP2IQyyeF2TCeYke+ppeE0Ix+TG9xI+u/+8v9bvmw== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:06 +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:09:06 +0000 From: Yangtao Li To: Adrian Hunter , 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 26/58] mmc: f-sdh30: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:35 +0800 Message-Id: <20230713080807.69999-26-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: 63815350-9561-4b17-d835-08db83786d80 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nEf5PqpvC7aHnjxIsCo+Gn+uXlzgu+AJ6K4ECIuLDXwYIKMS1/giP2DOc8BxbGYlaoMNGO7W5MsByfziAkTu2ZQVOhKeEKiStXBlJu5gb0auH38srCdNsFbv3ntkZkB1+IHJ+HCxMQl1X+zuNVg7f/0HoPlITkisUphqJHsorYnyIUvWvMed4BA2cAG25xdZ/aDJjXJjoT0f7QyVrg0+mGHNWNG+lFLPYHQfJI13XeZtz6/9IIKHZgwATZrtQ/S8DQ3g0FJXYcSMiXcDS/CQad7nBgWtXK/ulLE4rt2XiiA/c5ZFoE2+ggK83GhXtzFc08Xo8adzrghHpnP+SGYt4PTlPuDn/vDZKsbqPPlQ2LZybKS5LBm1dqKHNtPPbLJARBWMV9TlM+yviLiTff92IcvzESit+tkkV3bmnas7yKKA1XGuq2pFOI6FDEXXdUskN/SGk4GVIqKC1sDwnCCd+CC1OUmdtM5c9Y6aXVP7m/GaBZsuRHtY1ZhkS26PBesQJ5vJQN3OdXdh+3M1yZE7y/m+KIFkow8pU5UAmxP8hfnMTEpd8p4QK6yjup2MzntQu13xQcnoN43myrtrW4c6W1ELLYH55PfLtWWpdZEol1I59E4yOqSDBetwWNtEXQDk 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?txNUUnEIAA1Cm5qGBpiebeXaTsM1?= =?utf-8?q?Z9yYcWPRAdnJ8md9E1BhogQjw9SfqGPOHvDxL9iBiQOlBnCNGjvZ7poR+Q5Kl13ZQ?= =?utf-8?q?afWBrBTIaGTUu177/oxdULiS//rxaxuKwGNYcZcOOz06MIE5N8GX+Um9lcztzRIEB?= =?utf-8?q?sk8tYM8OKL13H/C69mNfv9WpdipZLY1jum1qNrwTQDuRBMW0AL8W7sEm2CR6V57UY?= =?utf-8?q?vN4VjAhY7p8i8eWtTmRimQ1iqoIpNDxxy4EePnStySVjxw+uPnVEDxwQAdGKD9gAj?= =?utf-8?q?1S4+OJN/FIPKX9xjyBQEUxNp6Q2fk/jYyNPA0zxFh6BAV7oerC3T57t5BKuoafFRZ?= =?utf-8?q?LMkRqD5wOgYHpmb8pRMCpz858MWXlqIcVHmBTx4u49XIadEslnd8SA+kAFm3M77Ts?= =?utf-8?q?7BgX5f/sseSxysmsKtTgUqZyfM0/Xn8tpycXhTxqnESPpDtt9w+ATqpEE5PKY+9mU?= =?utf-8?q?2WMkgmiXtLtX5Q0Y5gsoH9LY6XIe4rbFpb9oWN2sN7uMUdSMVGg1nAUwviiezPvwt?= =?utf-8?q?bn3ZX4sQlSFnZl+Gm4TG8FujXQaYI0WNP0ZbEs3EQooP4fi32ZknGGJEeaGshRfPS?= =?utf-8?q?fcx/s1gEKoLi5GXTLxUDzKj7xbF3Nop3bpKkLwMaN9nLhdqWWzO3huCkgK4sgzFjs?= =?utf-8?q?+6LgKXqExKD9+5gGqyy1g9mEufMN49kVjQzZrx5quhUyJtwphS3FOpLrGiRJglX0u?= =?utf-8?q?3CPzYtce3R3SSAgN8u03BiG2usDqL6jZZun7ubxIJQ5cIDNGKx8dfOx5LWoU5lomh?= =?utf-8?q?Y+27vRwW3E2CKyyINOvo1OowcarlGd9RLcFhJeW6ULOFfsr4/iCIKDNKCxLbBO6Ao?= =?utf-8?q?1srZ6aqwSQVZYVPavayxgnlTkuScKewWo9pQIG27tPS8+sNZBhUEzhUf7FZn+CeKN?= =?utf-8?q?LWyJbnxGxPWoQXnewO8ajbrxQdBrlu8/qXTNimQ+OmmRQT7EywRl+zj98XTcU1qyY?= =?utf-8?q?A1QNK2meSSUkWzyZwDSBzJ38oPBCL3nhTroX+tcXCFNlfcO599c3baXB/Xs0+hNkc?= =?utf-8?q?SPJyXgI7m6z4mzuNB7VkItI4MJby0fFxMmo5jUE9Ami7J0vrVfPmN+7M+0pP+6Ig+?= =?utf-8?q?Jh/CWpxpnoLyi3JL1Du69govNeZnNGy2jcA2KUWvmE+rPIocG3X/YFW0rccDuBpK1?= =?utf-8?q?DNgmal2pkjk40p8iRNkITrgUYarFI6vTpju4MhePl2jYwx7qVQOW7s9YqcMLj9GqK?= =?utf-8?q?DjJCaFNg/xgzfxPx08TWzkVFNQiyQsaY5xyvkxBqmN/Urs8oMdNz5U4BkzWqnNejw?= =?utf-8?q?CtvK8CZDZtkFhD/AWxhfgEQfaDfZAiDxo6Zdgo47CjNIjvUQwWJXDFNUqbU8AOQSm?= =?utf-8?q?eb1019fhBlDhv3mXOeXBBz4g2UXRj+dr5UgLI3geP1+rHwhwn4i9386kAD+QOX8g4?= =?utf-8?q?oTzoelIFZiHg7vYy+lxf6vsc64rM1uaN11cEIFPXo1AYfTyzfkm+vXxG+Eb0vfTxL?= =?utf-8?q?zFRLxRI5BD5oDd6EiAE/4pjzbfAHcVPcduqn0tj7gBtY9P21YbDzIqdnIz7M5s/7V?= =?utf-8?q?Y3/bMd0RfHWR?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 63815350-9561-4b17-d835-08db83786d80 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:06.0802 (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: NincHnWZFrmhphbUi/QsYeCTI2IQ5bvV5P+Bqg4qgTqrZjwIGZ62u69Qv+EnMUtyrtWksoo8/OHgjv7pdXhkBg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771293849827077719 X-GMAIL-MSGID: 1771293849827077719 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: Uwe Kleine-König --- drivers/mmc/host/sdhci_f_sdh30.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c index a202a69a4b08..6016e183c03c 100644 --- a/drivers/mmc/host/sdhci_f_sdh30.c +++ b/drivers/mmc/host/sdhci_f_sdh30.c @@ -208,7 +208,7 @@ static int sdhci_f_sdh30_probe(struct platform_device *pdev) return ret; } -static int sdhci_f_sdh30_remove(struct platform_device *pdev) +static void sdhci_f_sdh30_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct f_sdhost_priv *priv = sdhci_priv(host); @@ -222,8 +222,6 @@ static int sdhci_f_sdh30_remove(struct platform_device *pdev) sdhci_free_host(host); platform_set_drvdata(pdev, NULL); - - return 0; } #ifdef CONFIG_OF @@ -252,7 +250,7 @@ static struct platform_driver sdhci_f_sdh30_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_f_sdh30_probe, - .remove = sdhci_f_sdh30_remove, + .remove_new = sdhci_f_sdh30_remove, }; module_platform_driver(sdhci_f_sdh30_driver); From patchwork Thu Jul 13 08:07:36 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: 119632 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1676671vqm; Thu, 13 Jul 2023 01:35:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlGs0t7U3mBEzmtiZWGkdJaJEgb+SMiCEaHfZKWFWtEaMtXalH6osz2gp+Ipb2RrLBdQvC7h X-Received: by 2002:a05:6402:b37:b0:51e:34d5:a23f with SMTP id bo23-20020a0564020b3700b0051e34d5a23fmr1198767edb.23.1689237347777; Thu, 13 Jul 2023 01:35:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237347; cv=pass; d=google.com; s=arc-20160816; b=bTwPY0PNQllO2+PT9gAcCaU3V1MHuwU7g/UIIXQA6Q2ru8QnJei4hoEZR+xrz+RSWQ KK5mSZeAe29EFfR+hUu/h1ifJG87J9vVx07MTR8frWH1qarTsRoI4ZU0cPlQlPymUTfk y0ZgBTjdoD4g+S4W7x1Q48M/s+L9nyRmbiS3zio0L5EcSxxM0HN9F3r6+va15NOTz/zU zSTMyISVHxQO6KGu/BM6Ljcr7eJT0TCklukJZfruhgGk04MS2Og7l67hlsW51HVS0vfG EuYW+ATpO4CJUlJMTqdsvE0ZsPD/PKkbrsXR8qaX1bJSyH1H3nHjCGxEaFmq2TZlnzyP LZmA== 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=/1Zc+RUhord8kJyLZmU9Nv573/MVj8Cm1en61bIyoSc=; fh=WftSSrMycjYflWDEz/kwtixwXRNRv6WqHX/Xnms5Ly0=; b=OB//RnSpIRcSHZdbm3c+Xcnp6vbq96YFLuSItDQStYuLYdnbt/T5gWqq8nHTI7tXVD rZ6HXuDf/q24zmqg7X1x+c/EBjZLD6AtZEgYjF/93ze+jOafOnIQyIKcJdmNSXvrOnkf 08wNhgMDbMyBuHHLJicYfsilnMQA+GvwwA/cUNzdWfs7pY2eJYsWtsRgTAhAJYif26gh KuN0L3Xk1Sj1PZ45Bw/Q36P+TsBKVyzNtsQE5xRtgIFIwAxj02FXqLV+dPiSaNr/Zmye d43/jn4M9am2HU5oN6OhFhxn2YBFN1jpks0N04tDdT1aGymYBT4DMjWQsMGISaZ+otWg KcBA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=LdpQQ5Hl; 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 bc13-20020a056402204d00b0051e249f6229si7485516edb.75.2023.07.13.01.35.23; Thu, 13 Jul 2023 01:35:47 -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=LdpQQ5Hl; 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 S234319AbjGMIM1 (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233535AbjGMILT (ORCPT ); Thu, 13 Jul 2023 04:11:19 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2119.outbound.protection.outlook.com [40.107.255.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E904170E; Thu, 13 Jul 2023 01:09:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mmVAHDwaiqwKlLVHOB8WnFhTEFE2Arg2EctR3VoF+V1/3DAhilGsFBcs0CHD4l627EW13T0YcAgV6zmk/crVBcE23gUISQZBSYsuThwpVGnZkmM7AfIxLMSwsGkzsZDFBZzJGgO71J97ZY1wEr74QR/2hYK3h3u14pGQ5grEdA83b+WP6dDjxUHPiJ+Yr30O1tASBXaxkgrAJxTTRDJXqgUBc1zUxq8ueL7wK+9Wm5JjSzpT4G6V0aE3UP/S+Rs5s3RicwwEt1yFpMpk3p4U7te1Heh7ul8gH0LEtkQImLENQGY9Q6D2NC5rIYwFHlr8uiXqlkxcFcvScWKlOuKccA== 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=/1Zc+RUhord8kJyLZmU9Nv573/MVj8Cm1en61bIyoSc=; b=MEHRscQUwbp8tDOqNuKItLuudzaj0WChR73gO/RAvQ5Ct+8Gtg60AXEp3I+BC4UjgDS+IgeNif/b79hjFbr4fa3H5RYXpcKGItKdy9K8YIhD4PP9yqUo4HiMauvnyoV02/xO1vz4sUmfmd8Xx85RhHWv0aMIIK0Ono/yd1AtcdzCFg3ermoQZbcEQ1kUeVKWlUh6MX4kuyEASmf4+Q7L+9laIkim4z74MVN4N1s+RzohIZ2wgPYBvAeKRXSRdvU+XCC7onpZUAjPlbuuno5vTwgND6gCilTmcx1Ze1ikreP/hsp0U14U/LOsNXQk+nVUE/w5NqbwPdefxk2eBgTXuQ== 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=/1Zc+RUhord8kJyLZmU9Nv573/MVj8Cm1en61bIyoSc=; b=LdpQQ5Hlw+noFEkUjCy1fK7psim1UmKSvjWTgOxuWOIkXVPsizcGRu3uc10nvq2KuDRTeShNoBWRpYzbv+Q84YgbwyJg5dpbHDFpMPIHkV8Ifuwl6Q6TOH39HhuiuREUBHzCAfqEKEnUw5Lra97OX0oIcGhkxB9+kHiwwDsiwPgTfxhEVpLk7lpw2tIo7MEgXcZLa8u31B8b7EDMld8IZqJVtDbRG1utDLpPzZP02Y2CnKFgFAeY8ax2n6tImSrYi2B0OiwvEeboh8YJnu26b9p0Bt/VmeOXTipQ0aMr+DWeXUYSI+Kqp+mPHRIdPBIZlfLlQvycBjYJunOSIAJWJg== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:07 +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:09:07 +0000 From: Yangtao Li To: Michal Simek , Adrian Hunter , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 27/58] mmc: sdhci-of-arasan: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:36 +0800 Message-Id: <20230713080807.69999-27-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: 085f05a1-0f6b-4d16-49c7-08db83786e82 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UGasdMuxBnr0K/5SJIaNMGed4URYK7fX/ui1Jd5L7EgJuC+sxvNM4hVspJB2cO8XArQ2OElLBHXwIitRlWFUsvalPahZktS8PO0j8OKmm8n/KoRmgT+as0I8ZYqLYHT83/3+LFuYIHc0fjgnEjOXkW1NjsQX8hX+He/4sVmp+vwx/I/7fBrKDJf7ePe3O6As11Ywdxz7428D1bIx9m4E1EHuAX+Zp9H/e9kd61dvQuIcj7lUwzjooZw0JVHKJCifqBt0GVaYp1KxXf5Ukn21nMmNTZ/p6RU+R6W7HOl5m7kZLVXtW6ilF+x5MYVgJPsIoO/woKESsEXgo9IYlUzKqEZ2P41A3QgijpBOUx1Ki13rqvY7k7GeC9Z2uNXIGe7SvtY+Ps1RDwcRQ4MOOlPp33TYZEI08aLvmKuZjoshMAcYw/yCZLExz/qm0f6zgIEya/A542Is+nWVGg1PQuYrJnHThzCXDRaQq9oZ7ZsnwGCGy9557Re7ndr0jdsnUgjGRNCSwKysO3TZ1CSTbjXLjM12WqNn24CE0y8fS9Rm1YHezewYOpOA05LfehtpMO2e2nHo7EQkQNEXlG8THQpFikBUpgqDBz4rRHMNfIV+Y2Ia2Zb+bnCX+yAm1tWpgYwt 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?dliHzSHcQPU2zQGpotnAK+PiM4mf?= =?utf-8?q?Y0dIVVFolHllwKCVbDx5wcSsL51m1UR+9fSpsr3csI1efYGKbm5B3C1obdim0M6i+?= =?utf-8?q?ytIKtJwbA/POzoAMplEpYbaq4PktXpsmJVyHdfEYL22z8OoOOefaanwp0Ca530jax?= =?utf-8?q?abaJOcCwHfC+mHy2eMOW8S0rBk8BR8YioD162jc6uaWq9FpK092K2ilK2j9sENl1O?= =?utf-8?q?Ae7iF+Gai4zAEi1xON68eFF7Wb45TWjetHqj8mxD0HmcCF4vc+Ye4IO0gciCWMswO?= =?utf-8?q?0H81zBmWS4zQkNclSXQ/zWS1SdX0uYEQYDKPoVwm3C+QRTU+77ssl71Hz72MOQ3uv?= =?utf-8?q?HL1aqxp04CtiVwNcN3X7ZSn+CemTsT23C12uNbE58Dm44RXFeYSOt5dnnlGh46E5Q?= =?utf-8?q?XiVjtURnRWQpBUHVfqawksrQekVk9kRq4cZUjEnsONRUyg9v3aiMPwCJkri5DUTa1?= =?utf-8?q?5lY1GHbnvMYyiD+sWQKovgWogwOVi0ovmt4OvTy++4JLnENeqa4E5LbpLQjs1yKSQ?= =?utf-8?q?F0vTzYQP0FqpFT48iZJutyf3P4LlZ6NfnNOwABg3vUIBR7BaN23eWbR53qIy+M35Z?= =?utf-8?q?cYrnkg1hi058kqbU8RUNjKhQoCjRgG1j2ZPMYslKq9I+RP7TGnTUBm+LgJPBgEHD9?= =?utf-8?q?F/z6dIyhyWeFeV9oyJY5S+nksI0rMsKmy5B8xSDqzKzZgtCHv3RJDgty3JQF/AnNm?= =?utf-8?q?UI6fWAC5fPMJjF9VsVf5+7IaYhNIzfNd7eyaSDlu+C/bslDVwLZlLAYY+5hC7scuK?= =?utf-8?q?qWGutXyR0Rzi/jquIExYCUy/9+cXugMRJ1AUceDzGOitZJ9lz47MWHcpWakvIeccg?= =?utf-8?q?qVu/IHoKThZFOGWoeVE+QBAmBn5PzvLiP/F2cuN3psCjl3Pgy3GjU/Mx0eYDjuxCg?= =?utf-8?q?aOJBUMXW6OYYYwuftYXveX7KoQTBQvgeCKI6Ynp21TItyT2CQbjTKU37ql8caS2m7?= =?utf-8?q?e37Jzv6NhY/x5ipQfM0ZijK8yuYeJ29XMFrYE2jNRQz9C599H1IVsDZ/fM92ThIdI?= =?utf-8?q?2/ZCxnW+9FwfClps6aoHV+H1uWaupwWgy+xTrBuGfp5k445I+CvVHVVO9wxHUsFYG?= =?utf-8?q?r/yPYGirQu+YXxj29vGq+x9OuBPYahEAtzoz0kq8PCkhn4jZ0QJnoBLj8AX7Bzcxo?= =?utf-8?q?W76ngI6Zh+2WTK1n5X63NH2q/mB7xnhaFXa+9F1Bo6CGRC3PLNKfkFCpizRCdUnkN?= =?utf-8?q?zDjARDHX52VYRXT6hHvpuWZL7oQ/z2um17FWKSitMbMAZBzh8Cnz6spt+DB+AB3w3?= =?utf-8?q?kp/UzMvGXQ8HxD5031XVMGAxL5SdWy8u8ZH6t0an61h8kQPd22kxSaqBMhhZu8KBs?= =?utf-8?q?EwspgPJme91D/bLnIsy9AoNmSBI0tAVq2hoFGElhfg74IvyIC7BBWi1aWeTjW9IoU?= =?utf-8?q?kP1MLtfPBwbzPCLzWZ98wBYzfjVU5OGZb5j8KtaAsvqkYil3kMfmxv6HeV8Jstc8S?= =?utf-8?q?XjDgIbz87oooqeNzasADugTby3euy7M7LYLjlNzky15U0ut4CT3zNfw77IuoyWo8G?= =?utf-8?q?RKoGtkp3uw4p?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 085f05a1-0f6b-4d16-49c7-08db83786e82 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:07.8238 (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: 8i8IfN0JknV9vfGcsoyhlFA5ytw4LMMy+QTibe/ceYM5rrX11touec1qEJqRDxPrHqncARjsM5VAzba+3uoo5Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771293741079645663 X-GMAIL-MSGID: 1771293741079645663 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/sdhci-of-arasan.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c index 294dd605fd2b..160bab0c437c 100644 --- a/drivers/mmc/host/sdhci-of-arasan.c +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -2016,7 +2016,7 @@ static int sdhci_arasan_probe(struct platform_device *pdev) return ret; } -static int sdhci_arasan_remove(struct platform_device *pdev) +static void sdhci_arasan_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -2034,8 +2034,6 @@ static int sdhci_arasan_remove(struct platform_device *pdev) sdhci_pltfm_unregister(pdev); clk_disable_unprepare(clk_ahb); - - return 0; } static struct platform_driver sdhci_arasan_driver = { @@ -2046,7 +2044,7 @@ static struct platform_driver sdhci_arasan_driver = { .pm = &sdhci_arasan_dev_pm_ops, }, .probe = sdhci_arasan_probe, - .remove = sdhci_arasan_remove, + .remove_new = sdhci_arasan_remove, }; module_platform_driver(sdhci_arasan_driver); From patchwork Thu Jul 13 08:07:37 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: 119610 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1668128vqm; Thu, 13 Jul 2023 01:14:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlHb2S8vdGM4/fUTAde7iugA1xB+WOA/W2dNjEnfnyIQ2V4qOxgbShFTZZAg3gVxwObqNJiG X-Received: by 2002:a05:6358:7f0d:b0:134:c37f:4b60 with SMTP id p13-20020a0563587f0d00b00134c37f4b60mr1105595rwn.32.1689236058745; Thu, 13 Jul 2023 01:14:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689236058; cv=pass; d=google.com; s=arc-20160816; b=kutEGgRrbDc9Nxs02mFnArwY1KdBql/aDT/yz+K+l/bmvJ2HO9KoLV3Hxkj1s8T2ZL hBD8UyTw2kqnlo4Wbf3lB4ZUJc0L3yTHtpdZ4w5eustitN+koWEVeR5pPwLUoUBoFZH3 yWtSr6iIfIRAd6vMDwME5Z//8pNyfkMqWTxdDW4oRVXESYipzb5RbNTOwqkgazMQi6kU WjtRno+c9g3yjc7mSte0+amyrkaTvCngwbkU+/nlMpg4fEmW5Jzetong0PMkQXIjVjBA V+8nP6qV++JUE1dWzHxtwDZ2zWANEKk0lvxrDzpI0NSKjSPtk+HyRMX/sIuofkn06Lwd /gIQ== 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=SpY6vRX9+fV+aGIzDgKV7CSAOZ5ZunmmE0jQlRuvPxo=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=Tm0u0rzWRrN+KLfa7Ipo2uNcMOtQ13K14A88H0wmhzQcfzMoJM4SNv9pJnMFUWJ7lJ QlPsuNi1J4G/4GJJytyFAGAdI55MOI8YQAcW9hBFZ2doGtxMvdsMVuNm4/HjKKIe3hCa p3XrfpMoI1oX2RLT9BSn2qqI+BZXZbUYmV7tSRMfp2R9u/A2oQ/uU9Ac0iI9ek63jF8/ USVAdmEKVtLSmDxMvcJCcOJEWrwQRlSxICyJca7OkbAmXeUnXUl/FRfaz19oh+HD2ErZ 1NJg9wck4DTakIt6Tgfez3tt4gGWmnT8x6P8SZVjIquHxGdwHTmyaf+iTlUSETuH5deF s+CA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=fBdcHnbj; 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 e1-20020a636901000000b0055baed7e7e6si4676728pgc.251.2023.07.13.01.14.06; Thu, 13 Jul 2023 01:14: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=fBdcHnbj; 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 S233951AbjGMIMm (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234175AbjGMILV (ORCPT ); Thu, 13 Jul 2023 04:11:21 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2119.outbound.protection.outlook.com [40.107.255.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F0032D5A; Thu, 13 Jul 2023 01:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AAfG8K8oiLmTcxK72fLT+71a0lDjX4zaQvspW/GQMcf/xXz6UFfPfq5GqCdpuLKYjSbLZyNwU7Xfk2OmrN4Mtv74m648GsE+WVFxfRszAy5QvV84ABlHqCuv9yiOSbi2ALoG6WEpof5w8LANFj6JRLiAfED8x7DKt+TqQQWN2pbsK8ZCwoi9wXBg2rOT2qZDYl6cudFs1+1JoqQ10bp1uirGW5OAeUADicgDK7T8L4oTLOkcUmmB/QY0Zn2biLOe+REYe1Mq+5fYOUd/CQ3KsMxRkanimRwWq7wS5Zvnrj8ezm5LYkHClIRW1Sk21dshRF0KZ53zYVGqtYNGZqma3Q== 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=SpY6vRX9+fV+aGIzDgKV7CSAOZ5ZunmmE0jQlRuvPxo=; b=HMDq/X6m8bBQTyDpC8haWdynrv7OZlsenJCXmyUfy7puGprKzenCJDXaI55iFwo2NgNrvilEvnaEVHkk6zjlDd4YW9d6yOZ9A49l6WAr7gy4IXC+fVhhBuZyCabKNnqNqG0/4gpt7hqWO2Hnyux7/HBPdF+A1jz5Ipej9qP6j6dJzcx7hwswhAQit4bz9nTX7y1ECMDE3L9CoBnHiS8++enqdSFpm4c0OxwbLlhqDgIefbRTAcwbTvzWcQ+nXaMQ4IL60oS/twWkhVmx+fp2q7jIzn77GAKwXYAmq1r4PKUCJWIBgx3dEh+PnBN5Gczmyu7e/05j3qju3DzlAGeftQ== 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=SpY6vRX9+fV+aGIzDgKV7CSAOZ5ZunmmE0jQlRuvPxo=; b=fBdcHnbjZ4vhrGI5tGlAbpy5gZBD3/cA8NnwTkk7DgfG6+45KCQDMMqKJKMCEm/AE16d7hux/ry5m++NgMfa87Is9RmpZJk3onauAfsealPbxqGntE5T2gJ7VX0UBQU3+ibVm/C3f+/R4KM5cqiZW0m8J4ZwZqzVMcCNS8dbLP4oBq+56jcnE636WLvHLLw5UTLvTbzEodfyWK1D6q3YqqwGyighH/WtHWnnFBGNp5sTEAmMXH8iuJYQZmDIT/wI2H+nV9V70VOGNmKVQweVwXzDkg8jHPbPp1Kjy4fqM5BoA9/IVo1EnVxvm6tu/DPgihQPaU/6Q1WidGaba7SjqA== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:09 +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:09:09 +0000 From: Yangtao Li To: Adrian Hunter , 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 28/58] mmc: sdhci-of-dwcmshc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:37 +0800 Message-Id: <20230713080807.69999-28-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: d383a0e3-4b9c-4f4b-2098-08db83786f67 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cHzKSCmjj2eVBEtw9yVNG6ROnYxfU9u302A5Ot2ZwOzOOo8TdwyI6zvq5oz2k9RGGybaNoC0URrRo4KiqK6df7we61dD5phPeII4sz3PD6qBbctIP1E6i5Ys+8TIaC4CX9es8I1t3zeiqoGhytsDzJp2vP0KSZ3i0Gwt0HoQGbaTuxKgC30yebc+Xlp/lWaIXiE0zIbSoLKMGlTgTNTJKL8Zmwd/ZXuSHWpS8U09tcnHxNmUZoamPr1J3lNTpuwXxr3FcuagT1RKKGVvqoXjkGzBBLHC65z+g3c4KHBiI7vtQs7x2tIMyFT2RMCneDgzkAXyMLr2KFFhxZX3z7lqkuKAd70S7wwXXNs1OoENqsvKXAVa8Dxdf5BKyxKEX4I1IWM2M8l2DaVSzV+7M8LuT91gxK13c9Ac+0v48LOQpwIMAUt3FJuDa1vSGAfN40h2esRbH1Anq4ztWexLSMXaVK+0DP7/FG3lQFIGvbSLqxNy1jvWL84PNOkEVq2HU13Q83ttyHZowi/Z7us12XUX/1hMld468YFojBbbGFiVyEfIOHKPobYXr+xCLMjt8kKOUmCq47Sa17DT+wfWhb6LHFOeQ5qlHleePV790Fxy9WFZimCO3eKz/1cccZPZZcV9d9cwnlLz4hxyWtuGK1d6MQ== 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002)(133343001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?LIdkBnraeQyV1ffSteSwLEv1IcAf?= =?utf-8?q?aT0w+pLa4XcAPL91Neoi9NnUiLgCuQLjzqhOkrh0UtNl/0m5bwgqOPRsfiv31UdMF?= =?utf-8?q?hdc1si9QeO1CmQA8RX0Z9wLMTuDtC4CBTzH13WDDclj/KOqe27mneWDEV5epHcPJB?= =?utf-8?q?6SPur7fl4jkqZxKwbBsfDxUl75qj6OPA68Q43PCfgHY1iFM3uj5sPG3cH0ZFjJpjY?= =?utf-8?q?m+aaOo207zJ17dbB6WrsDeCalS6UlX1zpD5vt+g7NlMryRGsl0lJkHwDHiyQq+teW?= =?utf-8?q?GacCSOu0cbgBPtcqoE6yU62SB6IzrhwcoAsPTqJYgLhgiNA3JvlF94o5QEUPZMmQ5?= =?utf-8?q?Oy0K7U3m6FiMs+JRAMph03HBwRs1nDn1PAhQnAIjAaQgKXp4yaRJXUKdrWaVYztKQ?= =?utf-8?q?sFGCl4PE47SlrpvKYl7lNMZKRuWn4+w7ZllQFB7nRn5hgb1J/F5j67bOgP0mNns7c?= =?utf-8?q?1g4vIhCOFFPf4BHl0V9rT2j6FdU0fFoUFIXVkFI3FQIm8X3TaE0j386fUM9KNJUfH?= =?utf-8?q?1GL+focJlK9BatAuxcNH7+VAdbchRi4tBSO0bJ4LbqvBq8f/bkSqFex6doqgeUqoX?= =?utf-8?q?or5x4DZeDS80RKhM8HwYXROHhg++Be0V1kV7uSZusCbUaRCmjLTKK3suby906orhq?= =?utf-8?q?mamd9xvfHHtQNlYMUIfSBHwjt4waUkOrQga1xStwpeAlchmaNBQIr2J3+zlmyeQ6S?= =?utf-8?q?S56+arSL/UHKAM6/+JamlSf/3Fz5pgZYJZtigKhBVtIVolLLdAxZjGpJD0mpO2HVE?= =?utf-8?q?2XcK53CVQuXCuRCBcbAp6WHDpQdaBvC615BrR52BWQcoE6I0XUL7x+l5+b7acm9mG?= =?utf-8?q?jvviJaSlYr0O1koLyKeFEHc1i2YH+H+USKr3w4EEBxeXncI5qmyh/hs9ARlstvafD?= =?utf-8?q?QcyqIndWNqolP0Ly4n26Q85D0I/bIDhp/QWp9tcz3/BWvR4BMKsbnURuD5+tz9opP?= =?utf-8?q?VpBM73xTL4Jck7jU5REbI6/2apopTpOUBKpTA026rrBAXThVXJ8S1SdqGm6GLYIZT?= =?utf-8?q?GMZ2E9yC5IAaC7FlTFhnEiBQ+hoCnkdlDgN33qR4dcQJz4FFpWSeU727yWubq06ED?= =?utf-8?q?V0e7DlCl3j0CW9Y3rfYthJgiH1HkJEFHM1BJ+Ni1fL1UrwuQnsec8casq+3rzuQD6?= =?utf-8?q?rGJ+z1iIWI6l8smUfU5rF1PMTMRQ0LSl8igh9d/Ai0eLg0jwXFKX08vUmTz8ITbWA?= =?utf-8?q?VE/KEiF7wDzsiDZHcYuKPmcckXxMNz2QKYic+csAruzVBiJ5DfvqCcTNhSLh7MdW5?= =?utf-8?q?e5/BKDySBWTQObvsu8OWGV+WxPKctHrHpSMFJg7GrEKjJ8JEZTvNCjST9VhVztqDO?= =?utf-8?q?joJv89cClXfVaPMoFC7AtWukuujdMnkHcRg6Aets2hyESLPac6Y/d2QaZLvRO34To?= =?utf-8?q?vUBioyNTIdwZ0tzdSdnNrFfdL7ow0X3V+f3uq4eV5NovBuKvORzkxcfq6pbvRr8tN?= =?utf-8?q?sOuV8JivDT02nGDiz8u1UQ2KroON62whMjXPaXsdDAvjWDvT/nsR5ZBzSgkIyKAQ5?= =?utf-8?q?/OeGfrHPRVkn?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d383a0e3-4b9c-4f4b-2098-08db83786f67 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:09.2708 (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: 6n7Vr773Ei7oycpmUGyAJqiWWuGrVWIelnE6zbtB6oFXNFfffisfLHtwYx/3SNN6KwDCyTWCfF2poWhLe6Mo2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771292389900354322 X-GMAIL-MSGID: 1771292389900354322 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/sdhci-of-dwcmshc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c index e68cd87998c8..5cfd24cd33fc 100644 --- a/drivers/mmc/host/sdhci-of-dwcmshc.c +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c @@ -574,7 +574,7 @@ static int dwcmshc_probe(struct platform_device *pdev) return err; } -static int dwcmshc_remove(struct platform_device *pdev) +static void dwcmshc_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -589,8 +589,6 @@ static int dwcmshc_remove(struct platform_device *pdev) clk_bulk_disable_unprepare(RK35xx_MAX_CLKS, rk_priv->rockchip_clks); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -657,7 +655,7 @@ static struct platform_driver sdhci_dwcmshc_driver = { .pm = &dwcmshc_pmops, }, .probe = dwcmshc_probe, - .remove = dwcmshc_remove, + .remove_new = dwcmshc_remove, }; module_platform_driver(sdhci_dwcmshc_driver); From patchwork Thu Jul 13 08:07:38 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: 119662 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1680442vqm; Thu, 13 Jul 2023 01:44:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlGdhb5wnBrr3UCk/LgZHKcRGNZwM+EDc3gQx7RIYDBM3Z+U45ZpdeAhZYogioDVsBnKQB7o X-Received: by 2002:a17:907:37a:b0:993:6845:89d9 with SMTP id rs26-20020a170907037a00b00993684589d9mr732578ejb.44.1689237899679; Thu, 13 Jul 2023 01:44:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237899; cv=pass; d=google.com; s=arc-20160816; b=UOzRpJMvJq1j3mM4KPR9Dx5+2UZWWNGk5cherpE5eTLRa0HgjRNSUwTDTWUXHVFg03 PzW9KcFzJkva6o+KeZAuLmADuKP7Xyg/1kcxnXORy+GIr3RuRcHvtq990U9IT9onxPad R7H3qM3XgqbMzDQJ/VRZ5kdJj1fCq4LlzyaLj2CJQerRWp6pBKZFx4rqGMxjR0vuKmy0 kjMbSW4LV58aVPwKAtbvCjBvj68Vvrwx1fGA/giElg7e9a/3yVKvjpCNwHk5OUBbRSps g71lMDOY1dnEpzXY97iebUdykTicBJ/uKNhrz7oN2eGAfm6NTrg69xcAXaI7BXuBaUTk WeJQ== 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=YnEm4eeaXUww5eDuPQKSh3EIaMee7cr4msQcxUd2bqk=; fh=KaHw6wvoY0nORQNloGxgAdG9EQoKCtLTTxL7ZTkIt8Q=; b=k2RLwq6Y4Urty5/XXzR/nti8cSztBdB23zQkrow+gZ0Oysu+DZS5CbK+MkVIKYrHYz o19zGyoRrZ1cFWuAcnPAcG3BG7t2Qnv7EY4WrirkhJgkUpozUN/gYYrQ+Y9UMlVsPMLx UMn6HZpbal0K0HFXI8Y14Hdf+cPPiF2DB68+WBtZAMiCnLS7qScYstlfo3NmmShpv3cY 5mAfdseTT6JF6xT42iQ5sP+lgrgRl7ow+c97qb/hmUCY65g90n7F0vTl0iEC0PV0fW9r uHF3DJX7nOCcHm4VaWDFpx1+ORPwwJsJun4Ga2nJjgPzmE0kE6P9hbrpH382uYPXSGd0 rUTg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=UgQ0igkl; 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 xo26-20020a170907bb9a00b0099280a7eeeasi7563588ejc.526.2023.07.13.01.44.35; Thu, 13 Jul 2023 01:44:59 -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=UgQ0igkl; 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 S234336AbjGMIMe (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234012AbjGMILV (ORCPT ); Thu, 13 Jul 2023 04:11:21 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2112.outbound.protection.outlook.com [40.107.255.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E84810FA; Thu, 13 Jul 2023 01:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mSOdt9aBnXNAzr2FUDhnOdeE1V6HpIVYXMUAcWqa8BKuiyJVixM7PAZEzTkxmOC7ifw4OdfB/YHXAVJQOkAsjk52vLXAAtcl7J/PmuqF360pyGMyTgiAaVOrZYUZ6FSEejCh/YQ6/8FLx+wE7+hqmbxKeEOvAFt+idupbvzbEzMfV5BneJRtriCwkD2+z4mHlB28nGLaOvuSby2bxQKdQGVpYofWeEA/HSzEFhf09Uvby77X10YVzc6/z4g6m4T5Wt1zbJQk0qvq+fe543xHqt+4U4Zkq2Yur8hSY1p1mo/Vu80fcurSeohmelXm1YlFerIV6rdg6fSgnkjWhU2QUg== 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=YnEm4eeaXUww5eDuPQKSh3EIaMee7cr4msQcxUd2bqk=; b=QewAxLKPCk8J7jfOhYFRRgEHSXZBFGaGcXoCGlDrqv1Kaw2NCFWoe6+MlLJb0MdxcWCpke1E6pjZJlNoE596TGvkUa2Fw0+QnEb/az/A4EXvKZQBd43ZxwAqRczCeoqxW80MYaCvdjzOoABVBCPgOFw4WfhQQ+I0H8FD+dSshdrbxUWA02tTzIg2niZ5/rx/ozTti04VxEkFXQLBhmVjMw/30gQnOgw1VGhfgSPzmkgH2AlaVDneV6JiC+X4t/3U2F3WwflTOeZTtkLGKOlCDW6Gldw8oePyUzlgEWxdhkNSsmPEGMk+j+1CJ96N43RQ3jntXtqyDD3XyFr1kBFVTQ== 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=YnEm4eeaXUww5eDuPQKSh3EIaMee7cr4msQcxUd2bqk=; b=UgQ0igklY8IShgThuvB30420emNdWELIvva+hVxq7lD2e8xAQDJ8GceP6iFAGOyi/UwFahCUsSnKDMPS2ue/nv9Y5jvc5ntUJ5WAdDHB/wCYjPXGTH8F0C64t4eXoYd89ou368TXYw7uwI6eQabpxKP4+Q04ELNdlCsoW9FlzsSpQczylKF0bDz+rZ310wPw2YxitQjdDVZ/OE+ntaEQTZHd25373kIwXp35/XGWfc9IkDdu0bFwp5sPvysxgmPzfaAP2q/jO0FwTpM7/grlJPOZlaoMgllJnnmZgLAms9XSstd8rVdri988Q2MnS9szQ9TRQANaqGvZDChD+qmgIQ== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:11 +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:09:11 +0000 From: Yangtao Li To: Manuel Lauss , 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 29/58] mmc: au1xmmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:38 +0800 Message-Id: <20230713080807.69999-29-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: 6e97c850-f265-4f30-b8f2-08db8378706f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dX1pNE4yEphqHHb2u4T/vj31CTMX83+gcTn6A3bpo1obfXaX9c0X+CCFSAqWAJlybw9vCn2EXm6XXTjxaX+7r8zTZ3T/vbrRQ7O03qz295Owyl1SVCVipM1WB0uPvzHL+QDdbVTLx+EgpP+0XxQVdenpJ5qcEUPPO8eW9uErOm/76XnfNmf4wau9JvLFNL0PnqTvSR8ZdNDnznOd9g3zbdG5Ur/Y7r43WHhkozRoVlrCJIfIRetwy24rmGuWXkcggnB2t2XxSPi3QuP9sRnTzTbzhkX+7OhQayi/iB/M/wG5r2fZjM7bAhsYowX6lcJ3z82Uh8Gw9AOn13TYXMnfqjrmrfVJJaBEcQ4CW6Al17C7uYYfpIandlylVRmS0xEQKkfyW2Nxb2NmQtzpoB7D4mKMKfVTrrIVpkpcQ4+JKNRnfkB4fyqnPX7++dI79Q+iT/RbpKXAtjGOq1zQUiwNiXt7veJpFAGjjmry5dZgwHr/WfbYFl8zK8TCokvgwl1OYUyjHQz76iOc0nEOM9QMqJ/SNGd98PBTKo/nhOLkJ05dolrE8cF7qwVL4LjgA5fSGbrfI0J0UB/4CDIsC0ri+fTjFqJc3u3xUWoMEDb6EYuRaQt6ux0TwNbzR1Hkeca4o+5qMdSGyKUWgwrOwT82aA== 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(66574015)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002)(32563001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?VXO99rXwrdWtTDct25fYTRmWCt4u?= =?utf-8?q?zm3GOQ2PP9Y7f8G+B+9vJyzgTa2e5f56FEgBB4MnVYttuggedSkZ/K2lM0RpCTJ/9?= =?utf-8?q?EZy3hrFsenjvT1x+PKyVhhrmuQooe0uxJmTPhHp+jvI5tUqbaHFNLuBXL1BnmgdrT?= =?utf-8?q?tLdZfjz8OlyEdEsOOxSwG7QsrPRJtY74N6YKF+lCCAuQKro2bgWCeT5zeZoWzx+2m?= =?utf-8?q?JJ0VP8BhZyzn+hiAtD20n9Ej+pH3LllfzssRMhk5uZy+YcDOC6PFrJDMD3zlluVBx?= =?utf-8?q?/iFKFwxkypV9S1oi8roM604rxL2Updru7anyeELcQeJULLzIG8Yv6rLxjyxa6ZdhH?= =?utf-8?q?9F9I+WsGQrwQa5nkW6L1Ng7Z7GIXBlt8jWdl0uNMKFiWqkxWjf1s+xqS0a9Qk4cLe?= =?utf-8?q?iDGHEwwZqIrhJcJ6VOnHmC8afVzhsUJIz+4me3r5NMK3GbpgAoVwCMFV7eq+S3O2F?= =?utf-8?q?mXvJMWmsmOsTk+BdiJLbXB6BjRb1jhMYpKFvuPOLpT6TEhKfvBn3mNGooNHU2xDUo?= =?utf-8?q?W7jBr4oBUE1Dj79Rvr+/bVEh9ip3OJMUzr8sUpt06B2Nr5cajhVlhmDZzf7/C7ac8?= =?utf-8?q?CDjDRFNkxslzP5JGjYMNTO1J+P4zsviPOp+eMHgOilDlKSHLeXbWWUu8AVRogYO/z?= =?utf-8?q?I87S4iCKGou1mJhCXU42tFxAGxeLvVzIoK1fa551lD7TDnUzoO6q5ILHpUSR/414E?= =?utf-8?q?RFWmN9YnBN+XYrIVwjB+p8lkHZlCXUJSY28j5clUQ6kdMzZretEB/Le2SJJNguBhJ?= =?utf-8?q?SYQKWT8srd6u7+bOB9DJQ5u9GAIItpb1YnQAG1AkOKswAvGjC6F/YBSx80p/P17Q+?= =?utf-8?q?+C1yiV+GKGfflrwg4lJ8SUWssuaOmvV8su3bJztUSnOYYVdVDY/1poRqj+su+a/Nh?= =?utf-8?q?d3Ml8d5/u60KJZteAfUM48DePWX6hZoAXLeGo8dJkLzZR/B2KTINF8k3x9oVdNFhL?= =?utf-8?q?SS7b19zypEcOfGnAEpiiJk1gPfELJsrF+MWT7ZxgwmzABPrUZOcTqIkS6r12w4YCL?= =?utf-8?q?+Cfqbb/45IPm++YSob1AvSe62OYRtEGg/G4WQuzITjM0wxAYzi/my/dhPHtEr3EWb?= =?utf-8?q?sR1F0BR11z/syZgGH/qM2QXZ75U8tA3NmpR93B9BQwgpJXbIWaESVdnGhmcMrPTC6?= =?utf-8?q?Gxm08udgu+DlLYC4uCnpCNkjWFjEXmQ9fXRjrdmVcP9XXFbCIEhoKZdRHD56LArWZ?= =?utf-8?q?ByKvt8FwWfvRtHl/78tvkW0GHCJhV8dCnXvJvs5XYH/VY5o3puAulrUujt5+r9oSh?= =?utf-8?q?SmDA5sxUIjUzyHzg/WNE5xSZMJaGGfFlY/QVoHs2zzfxAoa/OcmW+7wzYdRg5bcED?= =?utf-8?q?JslOLdt41fDNXoxAr2bUGBH8sYH0kBid+1xQOby1P8t3aWMPD7Kj66bUS08H2rQrd?= =?utf-8?q?Z1suGzMTBj8Yat3XRVpJ18DMr9VH4IOQikH5PMtNI1/koQuPr9NPm/UsRNoRD1mle?= =?utf-8?q?VWqYuXi8w9hHLNWihAIrxUzOxgJj47OiWi2Cy6LZLfIPwq79+qd+R1c8Sp5RtLzXF?= =?utf-8?q?NeglHxF0PUAf?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e97c850-f265-4f30-b8f2-08db8378706f 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:11.0085 (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: mvx8GXP6jN2PXQH3ZwXFxSqEBgya0AUmXafIW1TTMBclF8RUgRZXtqe8gfDfOnfWULQk0hx+IOvLFgpANbuapQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771294319831760670 X-GMAIL-MSGID: 1771294319831760670 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/au1xmmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c index 82dd0ae40305..b5a5c6a2fe8b 100644 --- a/drivers/mmc/host/au1xmmc.c +++ b/drivers/mmc/host/au1xmmc.c @@ -1114,7 +1114,7 @@ static int au1xmmc_probe(struct platform_device *pdev) return ret; } -static int au1xmmc_remove(struct platform_device *pdev) +static void au1xmmc_remove(struct platform_device *pdev) { struct au1xmmc_host *host = platform_get_drvdata(pdev); @@ -1153,7 +1153,6 @@ static int au1xmmc_remove(struct platform_device *pdev) mmc_free_host(host->mmc); } - return 0; } #ifdef CONFIG_PM @@ -1185,7 +1184,7 @@ static int au1xmmc_resume(struct platform_device *pdev) static struct platform_driver au1xmmc_driver = { .probe = au1xmmc_probe, - .remove = au1xmmc_remove, + .remove_new = au1xmmc_remove, .suspend = au1xmmc_suspend, .resume = au1xmmc_resume, .driver = { From patchwork Thu Jul 13 08:07:39 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: 119678 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1686730vqm; Thu, 13 Jul 2023 02:01:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlECOcBmdHBGYV/xNv2JorTiymerXsQeSgzuZHeZ2OIkep0sJkmzMJO3jIha8nVqs+prNy0z X-Received: by 2002:a05:6402:2038:b0:51e:293b:e1ce with SMTP id ay24-20020a056402203800b0051e293be1cemr1185449edb.31.1689238869749; Thu, 13 Jul 2023 02:01:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689238869; cv=pass; d=google.com; s=arc-20160816; b=IWdIXvzlqiCuPExDSk1SeGlBd7sSc1U5FRezRCeFgitg5TICM/PJOlmWdIpP8/xaPB HJtm4vF6xoHa+57RXv8X57mN6l0MES29i9WSSNLwDP6m0SxXKhJByLHmyIh4zmhr+EBn VPDJ/EKorKKtSG3oiKHs39vFDVCeFedaeDBmNOXj7kMZb3UyPH3cHR9sdy5tcUgKO5HZ pBSARLgAS2kiL8bSYTRv/Y0tip0JwEVFZa6dNYbYQ9diIHNtvl2po7UEFJ654PhHQwD4 a/raF+YCpWmiu3OJ7KOfpUD1/ax0MEAqdl0aHiLXq5wtMAg+UIBsplck2SWhMYr2xDxA L9PA== 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=Aw4Pv13PwJyGo9i5NmSf9Iol6jil3qv/WJ4az+CnkgE=; fh=9CpPSVh0SzFo0KnH3YRmW2WZmdBNCBKVHGYrAagGn1g=; b=K6RmFEz3c/N49bKnx3NxngMceYlAGq8HIeTe4dXVIY9VBF/e9UT0Ty5Q6EcQl3yEbK l2D30Hj/bE7QXF3LGpfd4ZQFjJ/0xx6Pz6TKalKhVnBdNZpuyF1+1wj01tK+ocUSgms9 z1UL93rz+V4ruF4vsMoefEGvdLEVyQf4D8dCbGCcliL7H1r2/wTddbZQjn7WJp8SYjAx ozF91GC7y8MN2tfu73N+6+yBNyaXkxJVfpCY7uDN9ur+Zr6BHDV/6c+r6BQ29DDj0mnw 6YDXxdXpugUtLOcnCZWwamzCy8a7MphBAL4+QsXGmDnqIfUthUYdU/RbH5Y1MIYL4tg+ Gydw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="gvwt/1gA"; 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 d8-20020a056402516800b0051de2148abdsi6663411ede.359.2023.07.13.02.00.45; Thu, 13 Jul 2023 02:01:09 -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="gvwt/1gA"; 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 S234358AbjGMIMo (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233752AbjGMILW (ORCPT ); Thu, 13 Jul 2023 04:11:22 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2112.outbound.protection.outlook.com [40.107.255.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C9172127; Thu, 13 Jul 2023 01:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gptmkRAxe/UpnN44/zZmnghqPXf/agolPrkfF1JVul+lluLQTjaJ4S8Xthjx3RQy8brASGpLeME12I7IJkhfLiJxQUfkNKfB/H80v1Iyhoyg3oUA4lw9Y9QpyGKCaDc3/OhKSyX1WrESVX1IdVIKksi8pm+uHsw4u+sKRFyIFSXDUQgAeOBcVJlzojaGHG5m+awdKncp8gXIrN0AjXWbRLeow9x6CViBXoEKxlwPfFslFCsKZ0MJHX43OAKe6CLziogig4+s1qtPKVEaGkT0icY1zGA14RHy6Dhh/IrOcLWWj1JI8djJgGP9Oq6zk82kp1krk/RP4FrCmpgL4kG4pg== 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=Aw4Pv13PwJyGo9i5NmSf9Iol6jil3qv/WJ4az+CnkgE=; b=PG6Qtgyfte8vMQV7dYUbataEdiI28+eGQRgFrj1F8g4B7vP9xI0o3zGDjpUFvIFwNNXk+4ZonqBHlzEnAU3fgSA4SkSd2HwTgx4/RPuseib+qWwe5DB/Hiy6jXsXVTv42jrqPdsCqjcHYTz8waZk8l8CgfkbYf6RkEJM9wrRuYt5NkoGWuRqNACaKxIpGT+jcqA3S7hN2XJTvxchUYjv5E9cAxfObzAd1UOqzlJGatQo1t2oOwThKBgHGXXH0V7nCNIiRjP1y3RnDpdS5Cq0wlsZzJn5d+Y5ED+5u5k/bbhs5VGLsiGiQon3HR/jvUxaV8D7n1ajr19BuStIoYsAYw== 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=Aw4Pv13PwJyGo9i5NmSf9Iol6jil3qv/WJ4az+CnkgE=; b=gvwt/1gAMHxs/97yF1e2BWZ4Fsk+GXZK925vONP268NFIEQYZ16loLlqA3t6ANDkeELcEujwKjGyk1S9KwTVvArOpDJ+2dqU6RY/losGZKavmAgMIEumrG0Sep93H9DGDKxyGSOGNcwTUbPgZWiU05A5kcFeduiy0SpQ8bpMIrWbbzWS5wb5RIr0N8mPq5TRG5MEbf/hHjnPvFla4GfMm3ImzNj4s3V+AJSuPQXSx1huiFYY8krF63786Y0TYePJuxj+1CxqnMBq8vwYyxNdGkNt2/mt2h/MNml4+qj8cRMWBlFvReVhUSAR7GivxghJo6LV+C725eIhY/vp5rQ4iQ== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:12 +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:09:12 +0000 From: Yangtao Li To: Robert Richter , 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 30/58] mmc: cavium-octeon: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:39 +0800 Message-Id: <20230713080807.69999-30-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: 0394a9d1-0157-4325-5165-08db83787178 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jxo0T1P4S7chyv4HdKf1mXjv72yLDasIvM9K4RvqpYu/bPp7aA9XlSYaa3f11j66TK8qW5AJvNi14lpNsYwD7/SGf/Y5yGOPqPDj7R2GxPk8gapUiVvmMM8u6fWQf+FpjCr2rHpqkhJ9XlYX/3VKw6IrL/MiS9myL27ltP4SYUtgYkOBggiGqwX8qK+C32NI/vzNOgSGKGymhPXWBBq6bIIPmr6U2BgtuhokSVDjrIYNdDfwhSeixB1bR54PIbahKEkP7sp3YnrHBObbWz0jumuF0TqxidpvFPLiQzf94Z5BUOrRhtnAtZuKmTVNQEUcTTj+QSYkp9zEeGFw1PbMgMxfeZEesfgrcQQECCv2sxu3oRWvAq5s5oDki62GZu5U+SeH1y9OgZYBPRMISCNwzBSrwtf+ta0aeIj1irc0W5w9frFFYfvu/Zo1Vk6ls+5MMMzP1Lu6mDb58e53W7LEPojlIjuIMyKOL7hr/HB56fB/aF1XiVla858lLwHviB7Z2qbkwdOgs8puVPGGq1E7Ktl/bOKY+UHoPV73g41ug85luzkZFBLXvnMLbyaZuAAbwA0c7BsUn9PbKJ+6caMHnGa8lJwsT9z23HG+pXlc0Gk9NtPN9eiMUYBUkhqov1we 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?hYBIAC7YGKEmcVyUEf6wFGRaZd77?= =?utf-8?q?Of6T7VE1/hbNofDomtWtUjFBp2EyB4EgcO5VXjUS2G9lKZ5dVWfaUHMt/iap/Voxk?= =?utf-8?q?LpeFAN1DUdB7EEvB0sMFcMjmh2CemUraAYmDQAvky8xiC7VEGbYyhSg9LSx7x+yDr?= =?utf-8?q?1doIHQ9LjMJAWfSY0g/SF+zfCAZsqwjmrpkE7eVDxEw/HsGcQs48FApguO1zC+5ib?= =?utf-8?q?3zNdcK7xfN9VdzPesQ5j9vj5HcmwROqILI+HjXw9CwhUCxfdpSPCiUobnEiZEwbdF?= =?utf-8?q?Ni7ip+eSRdd15NlOz+C/zKbeMTjhIlpJs3XMbRhz26VsFJLyFIVovG4MmASuV6gbM?= =?utf-8?q?Dsse0bZGI0d+fOB9Npzw8RbyN0hBPRe3stkfuvfqce7rg0Hyp9fV7qI8cEPJ8/Zuo?= =?utf-8?q?A63bmoCO6/JsEKR6lhcwbuKLGQbnqaQujkA0+Sv8pBZQT/hqSv7SRGxLK9Q3LqWsc?= =?utf-8?q?CjQaOW7Nw70LFdUNk91x19UnzV1Pv98kc3vG5kmwQnwioSAh8iWqaTa+UiScuXy1L?= =?utf-8?q?kF8662gznDoNGRdHgAj+5bP2rWgW3RszGJIHNog0VDy8yEeQJXocwSTE7xMo+phwK?= =?utf-8?q?29JI5ON6URBGvIIXXqOhb1y7misQxZ8rLdpbG6bgyZa/VC6j6pJ/zTBSrOs3cfw/K?= =?utf-8?q?ClnUkyfsqE7kVvfqNUmejwMEEG6H4MEgs09/gGkWBfmkeGMvjm31xh7wfOcXnqMJg?= =?utf-8?q?OcWQEWBffkAw2OOGJRsmjlTcBn/krLZ7uHPXTK7pE9uvqCDWPsCDwIVTpDZw1Nf9J?= =?utf-8?q?uvSfiIH5WWZ4gn7mcX4IQq/O4xaShGpeTYEoaYtYKhPA4lEgOzJjptvTgAvdEuoZ2?= =?utf-8?q?r8/pncSURaEDh9NDH0oxr619eT/KCUgzOIAejMLWtjnXR31OqifP1Sko0OTWsLCV/?= =?utf-8?q?vRyEhZoZHBA0M0Uf2P3Cg4Ezmh/jYfxX2SHGlaUFUsrjT9fYA5IZySfqFRno/9vS/?= =?utf-8?q?TCLDuBaRmHfDQS2pgrngnThq1USjrbYVs7FKSMdsqzL8nLklNoax6bwUOhciVVgHK?= =?utf-8?q?Gk/kzaSHo75NXi7h2zmGh9ZGJ4sKwCBuuMK9nrsiy6ImmfPlMnEuyyR7tCqzM4uLn?= =?utf-8?q?bh6gAkDiIsJAP8xcBAzKjvNDwqg1sd0W3qsoZO7AJvUNEPUeHY8EQf640Bvi1PZY3?= =?utf-8?q?9QWsZ4G6cHPdSNsG3Ll61OlsUfVFM9Y75zPLU2KudEwlqDcrwmGtbCTCyc24pZAJc?= =?utf-8?q?Bas0aevKc/7lE3Anc86d2lgN10VSrbxVtbK1Qb2KHdi/HlLzB378S2pO/oS+SvT5S?= =?utf-8?q?cndroG7FBB40uB7JwaWz42JiHzX5/X8xtoQz8o/gkRy3OxScBkcFBsWemv2q5IhE3?= =?utf-8?q?0Q5fSsLo6bnhNiIgOs4cXS4VVAQy4IvD6R9peB2MF2j43TGmTL7jwTNJsJY3gDINk?= =?utf-8?q?bhP9ODaArFbLyEqVVTTJ3GBYhFI5SJgVuuvnqhCFPTvghbVb398lrcb1uVxYJPJNs?= =?utf-8?q?v2W98y9Hh9rCQzZZO+cX9JeJxqkqaQq7Iiu4U7C8fqi0gUEuxzmT1ts2fMlfCTMok?= =?utf-8?q?fFA1Kcv6ZX28?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0394a9d1-0157-4325-5165-08db83787178 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:12.7995 (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: yB30iq6msy3mkFA7nuVDQEEL91CywknPCAN6oS0UrSjRXxpE6Hehn+ps2p1dIaA5TaZDk0YWC2nnw0DZ16Zw6w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771295337082796283 X-GMAIL-MSGID: 1771295337082796283 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/cavium-octeon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/cavium-octeon.c b/drivers/mmc/host/cavium-octeon.c index 12dca91a8ef6..d526868b30f6 100644 --- a/drivers/mmc/host/cavium-octeon.c +++ b/drivers/mmc/host/cavium-octeon.c @@ -294,7 +294,7 @@ static int octeon_mmc_probe(struct platform_device *pdev) return ret; } -static int octeon_mmc_remove(struct platform_device *pdev) +static void octeon_mmc_remove(struct platform_device *pdev) { struct cvm_mmc_host *host = platform_get_drvdata(pdev); u64 dma_cfg; @@ -309,7 +309,6 @@ static int octeon_mmc_remove(struct platform_device *pdev) writeq(dma_cfg, host->dma_base + MIO_EMM_DMA_CFG(host)); octeon_mmc_set_shared_power(host, 0); - return 0; } static const struct of_device_id octeon_mmc_match[] = { @@ -325,7 +324,7 @@ MODULE_DEVICE_TABLE(of, octeon_mmc_match); static struct platform_driver octeon_mmc_driver = { .probe = octeon_mmc_probe, - .remove = octeon_mmc_remove, + .remove_new = octeon_mmc_remove, .driver = { .name = KBUILD_MODNAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:40 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: 119631 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1676484vqm; Thu, 13 Jul 2023 01:35:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlGXlRBWHOQwnsVSWehArgT5AUksaEq86yJrkROPB84ZRl6gQUhO3GdPbNy86LcWx2ulcL4i X-Received: by 2002:a05:6402:1210:b0:51d:ec25:ce38 with SMTP id c16-20020a056402121000b0051dec25ce38mr1182561edw.10.1689237325367; Thu, 13 Jul 2023 01:35:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237325; cv=pass; d=google.com; s=arc-20160816; b=PS7WXirTHzVpJi1/2adnhxLgpDNv9N/BNqUgEi7tTZPOWqB8DkmkcONdrJanyWGJMU naZHlMW0G0iMhwhptkpLnlXK6KedKtQ2cuJcV5V95bqbJmJCFMywHBtQFTSrCid+7gVF ALK4/87N0Xpq6PaZjWb8cgp8l/HQoCxnUFQ6rwVNHdbvjoKypxbNI0oQVdSSh+KRDc/g 1WG8VR1CBLVX/BsF/mFRUczvTF6bQ/6viNZHkEiitgjO4QvvpYUGbmQQpvsFDSTOBqJh 0Y8s9FOZSvP8Ir340Gb7RLJDHhDCZXW5NXebTC/IEithU4RQWBDZNw5weXwublNqfm2F MGXg== 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=VPvk0BJvyiqypQQEM9Xxs52SCa2gV2Is6nfaORO6Mdg=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=J/FaAwU6FvLWzsT00TUNLJIcejKoKiYuCr1t7Ojovp1ZZQY1HBO1PXhXDZyW2gFLzf ELLqrDDDTYGFlYzhCCMAFa8lt6nu/dN+aFm4ZP7VfG4q2Pqe2eIz8BVPyBpuQv5qVjVe FCIK9c9xsiWPFhlMMSUHpBo5xVM5c35jm3/dQXcRu7VDc6LYXXZ++gyftIted0cgVYmS hgXxeMTkE55KL+JYmspax6lNARUQITS6eQ5aJUfgi8IiBirBAcjy2w0sl8H+ArbwrOC9 qMGvx5/l3WKLvbPuneTnfpkc7393NLWONLkcbe3myKB+tY1Y5wFbfvpHGzXWnnIlR0c+ TRBA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=g4rgt97H; 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 m23-20020a056402051700b0051be9a93243si7128386edv.153.2023.07.13.01.35.01; Thu, 13 Jul 2023 01:35:25 -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=g4rgt97H; 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 S234366AbjGMIMr (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:47 -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 S234191AbjGMILZ (ORCPT ); Thu, 13 Jul 2023 04:11:25 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2119.outbound.protection.outlook.com [40.107.255.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AD322D77; Thu, 13 Jul 2023 01:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZRGMwM0JKd+H5GT+yki5nztO+hhO0VG/75ghU50IMStwQK5s4bd3MFQuJuf/URwTBZ04U+S/KR8hDnJM5EbCnVo7ju+EN+pSyBCGwc14SU4hqI74iKtrnhfL7KB4pcsKdraxDTytOMnZXQ/eyQlcHS+1jW0gp4Y3b1rURr/By49aFf2eNoiIydnIrwZLZ/gkSgFqrBOg3lFIlLwh6qsSm4LBJc8MYUvTlP6J222FPCg4GXmTQZGDEfQts36Lc0Bwp7k9+wuto4sBGKMM2LUk8uO4EkmA7R0ckJz56F96rsv8REKQn14qPrOTsMxR8W5MhsycB0yzo53V9VSGzqsyRA== 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=VPvk0BJvyiqypQQEM9Xxs52SCa2gV2Is6nfaORO6Mdg=; b=gPMMnw+GKOExmdo0smoZA2SGtONWKOzBRrvo4r3xkEtqJQ7KLHPLu3nwE8fXRJ7WARtnC2wZix9Ds+q7yu0qXnZuHe/NU0VruLhLh0HmDPNPeQoGCEujH09lBxQUNPQ0blTrdQkTEsFDPgQZwev/IbkEaHzA/aEyYZnt6Jmr4QjxQl2GIsWIkR2UyF6P3jxlFSgLAYJH7b673gG5F+w3mbtABmWkv9nIhuddmuRz+RZBfQcgFMCa5dNuffI93vpCcASvjnWDo5OVxCU2egNZ0kMxBQ9e9xRlaQVouwnZTzNH3uGvq4xLS2QBrzUgdUvSyvwauCaej66OQZCko5jD/Q== 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=VPvk0BJvyiqypQQEM9Xxs52SCa2gV2Is6nfaORO6Mdg=; b=g4rgt97HIo5oSIjhuUJ1sEbaUzgdgI7EBSPTrjlmOFrMwaAhjK39oz4KGcJbsVmzddBIfmug27msDutCxvFcVGnWWKfSh/z3kFn5n4kRUDGGQQKBZb0B/b80eN78LRR/kIfJ4swG8X74mlW83+AeHoj+/KxV+9IfNseQf2JEuzEPvLO+OGDoiR2bC51H0zrihsMSPwnAOOvltwzjaLKLLYaI+FWsujqSXniPvd6pVCIb/gNXKMv/BN7QFwx6apAhQmQvpOvKxbX+8Y+sMxOBZJ6TDAogu0KbVVbHW5Qp47nTYOdjJjvQGnscxu9onAwCwdi54Q8Vtl5Yuy5bZY92MA== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:14 +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:09:14 +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 31/58] mmc: pxamci: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:40 +0800 Message-Id: <20230713080807.69999-31-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: 8a5bc45b-c5a0-4143-7862-08db8378724c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Hk9erT/2dc6ezq8GqU85AE7qNsDVeqgQAlTavcg9QBfVb3JDmN6L3fGrdCl86ZaXT8TZETTW3S3mpHaA89OYm+eFWtZ1Ck5s/Y0Hp+2gVqqqBNVVKswzKQMgIaG3HbEMXd+fSDsWXE4TmjFwOrMEoAuAt5FRwM1xUGNwmwOYj4PBStv2b0RySEPiLSHB0Im6+ut92oUhtjtcM1mYWjr6V0LrvsNJmcuVHmRKTOW5XDI6wZxjJttlh7T3HUzG/JcouFrOhR3Gwi/S+09UUMzVTEVRuvMqgGr0ia3fTr7SNRqQ7eiB2nzpt1S0FtshWzpOp3+VQC2Per5fY68ETvAejQtUvPX74+MIMVTAtorfQjVsBwvetX5ipvO2AgCrTFf0jI8aDySOWRHgGtINt8MMj+d+UlBUeiFQ17DYOH5C6rGecnsLxVyLzxQixNadzdgoXI7/k/GjI+SrCzAjHn5jX0tYGBLBDQjUDgyZpHElrg59WWPyqJmXhnFH3pyL9KIkbhjVzIxNXYg6MBhxgZnKbokfgCkyiQzw0RPcaUt4P6WWsnL76MXDrmq8l8LR7CAq9abqPkhewuEEzc9O4yb84VDrqbBH87WLprqsUPOL460PazvS6LkrbCl4Z3PD3mCs 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(6916009)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?pZMr5oZgp5Olw+VXkDG8APfx6KwD?= =?utf-8?q?0r+z3RqlJ9gbn7SU+nqY1JGVXkt2lnTp/Qpha0+2TVIFtF6+3zW9Y08coPSqqTOJ2?= =?utf-8?q?uybgsGKwXsSC92Kky3Pu12o93gi3cHyet7AAP7GWmvZjHvSUCrQM7aaYm4R1Vwudp?= =?utf-8?q?sNG66fgOcPW0PyDBSCwMLzLb5SRyVy6k72/ov5YFCbO/QnzC8NihMeLcotAQCzbGl?= =?utf-8?q?1CPGFLmrWiAD08jaJR9imlCDiTtkT1013ifXYugLCGI3AaPvIyNNWDUSkhjvV1/RD?= =?utf-8?q?Pt9uIGo8WpIiCblQQl0ptPNeUtsJpZbQsjv/QP6zT20D6Fbvirx3H3y9vIQUBHYP1?= =?utf-8?q?57DLzEvUHi5SybH6L6rjTKU9o0NQLoyRmhPeFYGy3ovMlMmf5a8KJGEfLaWXLVCND?= =?utf-8?q?U2VyuUK0M7F6PkQkk0TAHLp4EU9GLlooubRh847VKhzlbgaJ22QwhZzn2UXKaJVKR?= =?utf-8?q?HNofBun5bdmtka8vVhZ3+ugwUZijCKfcOjJ91pYVNEUDrUl8cwQ7ChMvV8NqUXqDn?= =?utf-8?q?Fmuhp+Xe/d217vrz998T9OllC0Pkmlrk6hIRGYC5CM3t/62XIaDPB4FhADsddI4g9?= =?utf-8?q?JHdFVEDq15uT/u7xt+2AeGnVXhgh6U8f+mp7Ipqj7MNGOLe0yDbUgf/w1i2Ovaak9?= =?utf-8?q?0Wnkw7xb/RjP6oFHdfKbguN0rKg3f4jnSkF4oA0NOWyG0BB7pGh3GOh+6sH7WxP43?= =?utf-8?q?xsUBZSZjtzNaflOvRycx/8bKO5ghyjslU1mgCWICiAUHvlKnMgIOEnDPloaxuqrlr?= =?utf-8?q?HQd6fkS/hlMeCH1Pr38R7dFI9fWqpYzZjfCeXcqCLqqkrRYmJawDNrig8S3mftU/g?= =?utf-8?q?wZCMM++0vlcWmvAJaRPco9E8I32Q1ICtO25/QJyq6rbquSgjuvQxB5C11BOekjyyy?= =?utf-8?q?zUaX7O2bYCTT6KSp5o9er9jNEmRST38e7UIKnvjTc2D34ySTy5vqvsN7h+Evq0eSS?= =?utf-8?q?GQzNVxqAGYfaktFqAPlkJee6TrpUA0hO8hFfHrSEI/l4czoRhwrj9Vby2BxTCjfe6?= =?utf-8?q?U7sGA4GqXdOrIAt9UX2im3YQg1rDcQg+AOz4QvJN6R4lImKwTzf5FRVAtPEjCjI4N?= =?utf-8?q?HdXQnG/A8rh/SNoqtmHDIOb5KR+G9oDirjnvuQ3t+8DPvvDLwYsDYOQ2kCqgJsj/4?= =?utf-8?q?017aT3uuaPi9/On2Kx7ibN7pvdI2gMbuGYfH9yif2OJsJCobbSO8pnhYF7JEFISl3?= =?utf-8?q?9Pl2vXo+o/dvl5s4TOxcH1f9/vK7wTEdWe2SOTvU1oLrWhm93rv44L/i3ytQGBC0T?= =?utf-8?q?QMFNEDklJfDD4dhMekwkX/DWfTtFV9zqK9PtOner8twUMx79h3G8mL6k2JmSlQXa+?= =?utf-8?q?nGqL3axI2MkPqmwhmBhhZ0Ug8wH2SQbP0i6I/TripyImInyypMKmbGHZaUJopTamn?= =?utf-8?q?TPnO7c7M7r4ekxLwP5r6nrioO/XhXg+kCjah/pCcDab3+ox3kE0FBhjrnARl6Zv3I?= =?utf-8?q?vZX1wKHA9CeDHc0q1FzEszwFl5fXHfli69Ayl6s9b5SiRFhvdlEk5TYjPzUPNfux9?= =?utf-8?q?pCvtSsAMIbRd?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8a5bc45b-c5a0-4143-7862-08db8378724c 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:14.1365 (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: IiIx/a69hJ0NdlU/3r9hqmn6Il+0J4Qi9KJtg0hJhS4IdAJf5+4FJ28A81P3HQN74LggdiWMu6M4P6AvcghvvQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771293717699806080 X-GMAIL-MSGID: 1771293717699806080 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/pxamci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index 2a988f942b6c..af17df545582 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c @@ -784,7 +784,7 @@ static int pxamci_probe(struct platform_device *pdev) return ret; } -static int pxamci_remove(struct platform_device *pdev) +static void pxamci_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); @@ -808,13 +808,11 @@ static int pxamci_remove(struct platform_device *pdev) mmc_free_host(mmc); } - - return 0; } static struct platform_driver pxamci_driver = { .probe = pxamci_probe, - .remove = pxamci_remove, + .remove_new = pxamci_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:41 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: 119635 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1677117vqm; Thu, 13 Jul 2023 01:36:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlFOXFsYpl/tya9LPknjoupgt5gu/nzIg1t8DgIUiVsIxsSQ7aHrQBhJ1Le72NF3Dc5B79Ho X-Received: by 2002:a19:8c04:0:b0:4fb:7592:7e03 with SMTP id o4-20020a198c04000000b004fb75927e03mr665620lfd.20.1689237413821; Thu, 13 Jul 2023 01:36:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237413; cv=pass; d=google.com; s=arc-20160816; b=RYofIDkFnrPCLT76Q+aNG9MBUp+Np2FrCorl8rpqOTQq1o3eZWfsxVsg0UZCsCpfmp +Zn0I9Zk8WRdNlXOyOpmxywqgjbTfEaI48RWR/KMOiThbSLQ6Re67wIzvxwF2lUrq23X 4gMU5tIa75IZoaNN8It7vsuV4SK1n9UyltO57zQq3Kz32t0toUfcDebJZyqGivmcU1VN g05OXEwbwPy/RvBOoEYJ4czhdhkYO44c/4fbyklb8c341M3TG6rrN00Y+kITUeJ00RRB qAilfqOpjbBzvI6BsikEgsTrVGQKraMAjEZwjHniU3g+I6CBOMh9ZXI0GCmqqMPNXknL 0OdQ== 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=wifvEmyuIqm8s70tv9XlGEIJA4YhoVtEMbmSaHweM+o=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=bcCgrKj+Zu3/ZZ6CZ3tGTcJu5h407qLh7y7JhEKHEuNYunJf4mafLN9T4dHJFiI6/m WE2/PhJ4Re616nfbSB0Q3Wglzyi9lcc7wf8xI7GKqayF5tGiYt43d99mPlVFvpxm7goB 38Q/Zs/XYOn38hqAPWqPFcI0YkYHv80pB+17FPCSCe72AKI3WgSxnfhfuyl7Ez/tmaJz 57ImZrHzJZw8xjQBMkcjRNMBsg95P1mCv4EYfywzQavyZWhoNp+Tn8SG0F3K6EtN1Kai Mp90ZKe87ImU3nPQ9oMaXb2VJC56bdQtgyNU5nvhpkpFqsFpAwP3kcEfPzg9yJxp0HU9 gDew== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=j0V6J1jy; 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 q7-20020aa7d447000000b0051dd487b0d6si6978472edr.361.2023.07.13.01.36.30; Thu, 13 Jul 2023 01:36:53 -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=j0V6J1jy; 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 S234371AbjGMIMu (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233833AbjGMIL3 (ORCPT ); Thu, 13 Jul 2023 04:11:29 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2112.outbound.protection.outlook.com [40.107.255.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E729030C1; Thu, 13 Jul 2023 01:09:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gd1DWizDWwyRnVwfOJF8eLlVhQ2vzfX7vHMGaOQD6QHuvNUQIekz1Nq3PelzPgiqpuXQWhe4au5Q4xeAAdQLs8PaT6e/udouJsB5e8N/I9fBC4Vs1CjKhlyQqQTfSmXMPfDr8+KAFfGwFMI6SFGpDbop3taj1vvwMJ5nTb7GGdAkSe5IV6LjXusgjKCFi405SZ1WxOG5DulLfwPT942xbhfJUYD1EUtgyy6BmzQwym7pOg+NbVGtAA02+OTSPXN1F3Y4l0npM2vjratD6ef/5UpYFQaB7J+2UGbkk+sT2YJC9NPiseLrjcnb8kaY/K5Yt0//ftNlTbjqjURsTFLJxA== 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=wifvEmyuIqm8s70tv9XlGEIJA4YhoVtEMbmSaHweM+o=; b=fTWqCr5JS3HEkTeBRqh9psD/fH0jUFwc0h/0916bSKkkNcUk6XcFazXUileqvkFaZla+p6OtdQDBZF/Cl/8katfC9IihgRwKmJpmvIQrU4QnkH+kTXzVHV6ZBDsSIughnAnlQCI0YSUvdOT8+NpB+6e74PYfBAmDGWcg4C77jee6/BvVmwP0aPUOUgxU+KizsJq502fCBKzDF9fGgCF3a9aT9c79ehi2BWU9oXrizDM5E0C4+BxsFYiIi228BzUKIVSKklL/T7YxJmjihluB4IJ8JGQrOPYQ6FX46w7fCXcUskghaY6B3onuBhHjrzfbrZ2oQ4vEUhK6kVA1/mLwcw== 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=wifvEmyuIqm8s70tv9XlGEIJA4YhoVtEMbmSaHweM+o=; b=j0V6J1jyKx9Dj9+gsH/uNM2jBTjDwD2gnhI4wW0gjM3jWDLMhttPXLRrgCn3YK+HzhrW3CrrMeM76gdQLmOaRniqbIv8YQcBvs1yjvZDkbxb2l98ia2I9LmEfu35A6N+ynF9AMUQgOZLXNlU9M07po1YPRwpRVQOA5TkqPWdLfKpkqRXLVjJEGGymaGSVPV/rtZqzrCpDGCU4dP00KvfFdosoxoMAP7BEr1ZfvKB+kpIO8QcXWhwYJAwsI9vyAQWnvikA1v26mOqnuyRkhz8bd448m2/jbOBF+4mZVthUOisWK9aqFR0IOHwwCL+2L+TK0mtOJLn5Jd9dUx+rUI7YQ== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:16 +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:09:15 +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 32/58] mmc: moxart: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:41 +0800 Message-Id: <20230713080807.69999-32-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e05fc2c-0cdc-408d-78cb-08db83787319 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LbHvsRVkHupX0Qln1hb0AWarMt+pzPqCnCuCA0HQ4aCae1AnqeWroUPWLD+3iqxRR9msUDPhHHZO89l5+NCB+GJLpmoSMHQAe/VS2z3rreccYcnUOpbqnFOrCAX8iVFVs1d0mDMMql9kRerPMX5LJHrtEnOEE0jvdBNwJOBGEi3W3w4rjMa4tXKYi5Az05JNghVKedWrqt59RzNKHzkqsxC04LVgVgtCHDfzKvQYDEuCB79Surhwhk/rN5hs/HHFlv7RALAgwxu7jxUW6MoEixkjRr5bcL6Ps9B7qpDtEOYLsRJwBS3bUPdw98s7B7+7v432H9xXs1M7CnBFui+LgPm6aEsl2SlVrzLrWyJ+g7qMZ0AnXz1y+rC7OYBSGMwzidTulGSZBc2+8Hgk0QNi2XKhaV73R+dTw8rNCYme7N2vvn1hlxlVsOBjJUG1ZyVI1+qPokiMoOR+UBRZZPY7SoOKhTwAQ9c1z6Ypgpp5yKN1oEiL8UY4Rg3Tj5SMIXZKPCcsSqO2VjEZxZy+VZyAIrdncbTFpzs/IuFXvMeCyKEQ0JaEtuMmFTFtcHT4MQN/3fC35F36TgAIQF1UyMBxvFRqarXh0Cb679Mld1gduwuqadSzh5cBp5v6aMUrrKu2 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(6916009)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?fxrjnQXLnwalowP5j06N7i1ZuG3p?= =?utf-8?q?39rvAX2WGsjvKNoOj2AjROg1qYa66HpIOd+V7jpniRao5hPvc+LwShwSIwwdkzbiX?= =?utf-8?q?mS6onohDaxUOk/iSZAcPMGDWsERRtAc9kOU1EEt42WudU/9TdlBGQpUC44oYrX8DO?= =?utf-8?q?8SAe8NWjXaDr+Z2qk+jNLr1ryK22qASJ7nGJdiQG+FNtn8P9rAvtt0wwumIkxz/xS?= =?utf-8?q?vOJsTLSxxH4E+PB0Ee06zFRRCecibwx+kf9sEgxQv8rjHfzcxDkLP3D9pKVzJbNoy?= =?utf-8?q?hu4/4WObP9dT0QarawwoY9osOfljJLaagsegCk90Duz9OlGHEbYrtamHljKFvy0Vb?= =?utf-8?q?mqRCG85Z7cFl59RqqOSGjo7vls9P+szOQ8GsLiM6b2RAyqAvABqVYOmbBJu6jo3fZ?= =?utf-8?q?rGEFZhua236mZnsxFXDtzFnEJofwywMQbXnnzl+8PW5J5sM7KvBNuY+QFE1Wovx1a?= =?utf-8?q?hMyPKL2g8UZKTpedbqxD4EEtT+L776L+PZK3N6du0UOVDXtJIRCx36VkOaOIZAw4U?= =?utf-8?q?bf7CXWQ0FVxsymjZZ3Doh70JAnhXb+dJ9lvaao4lE8Z/+D3aIJTkb3hLNZY14Mr/B?= =?utf-8?q?FKkr5L3UTrPS8p9/PFrrvZIlXicuPnYt2897X5uvV426Qx9M4XjE7iWPLiVmFGQJq?= =?utf-8?q?dJ6D/kFI1L0y31QprDnWxQ0ljlpgFwO5EgbWwSaZh4eNnhcI6LcM8/Mvf0bnfxwab?= =?utf-8?q?ZBzbJNr4btappnrKjAG8G70d5Ha2Y3a5PdfoFqtp5h8qzLorgCycI/NHs7ghBUaZw?= =?utf-8?q?4D9j4tdh8DOspGFHg0qOsUDynCHQqMD0hNGCLwh+uKebcX0RMUeuxVh52yjrRCz8a?= =?utf-8?q?AiZ/LsxuKvYmfgkQDE0bIAI3eRW/LSklHOMqlwtnSWca3/zLmNYce2npuO/Xj3ixR?= =?utf-8?q?+/3MwItduu8agFvJRnje0uVgdyCH18+kGkUFANnLy+vH1PaClXpZGRPnDXXaLiK7w?= =?utf-8?q?IJB2T2iLuDqCB7SUKFox7GFNxXzRCgkOzsqmniIf7+N2yXYqSdzE3OUcz9jpZ5eLh?= =?utf-8?q?fJ/PnE1rMOnCMSb5bXm7nJWg+3G7FODkId+MwCvoQDyNM4wpg64odzbAMkrcAIzuu?= =?utf-8?q?EEvr30aB6ueB0mPXwOFyJDhrA8LSrfPqJvMwqKfv7yqbGps84QaxnYtX1FFoajWbx?= =?utf-8?q?rutVW1W/OcehxqRg71kaJ3gmr7+tmDVU5iLKy8ZY7OQGksZO1WPCd/Ttpile5PJCG?= =?utf-8?q?AExxsQggF8Q3kdrKKiKF5+qJ23LIsiZX6+3d8RDPU57UKlvoVVZ0++OrE9DG4sPBD?= =?utf-8?q?jNmbbkI89uIv8kAyA9LjGAhAalGGMPAdI5a0/y5psgAiN+Ol2dJxDVf+bPBT9jF3B?= =?utf-8?q?za7cs84Ui1RjeKtejXzmCtwQI16DOgKDaM+j1WsEb4FX6e0Yiqbq3Ak/TkCltLQ4h?= =?utf-8?q?9ur/Y0F2D/ae+mgulKgBRbHPg515jjBEBgRTWs91+xxeoxW1SDiKQbeSClmPlGSHn?= =?utf-8?q?1rRe+3nwhOL3U2Xi0c2US/6TQ5mZWjYTG44nngTUg0DyFgEAdwKm3iwO242MbDyxq?= =?utf-8?q?2x8yV0jq6QhN?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e05fc2c-0cdc-408d-78cb-08db83787319 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:15.4686 (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: ykh6j87FJvUE7UqNACcsoNUM0ffY9qC8Z9DZc5d4yCoP7tZYS8f+Nmtrkx2T6rGEFMLxWLSuUhgLOqEcGnSUfg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771293810339014339 X-GMAIL-MSGID: 1771293810339014339 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/moxart-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/moxart-mmc.c b/drivers/mmc/host/moxart-mmc.c index 2d002c81dcf3..7d35476c9ef4 100644 --- a/drivers/mmc/host/moxart-mmc.c +++ b/drivers/mmc/host/moxart-mmc.c @@ -693,7 +693,7 @@ static int moxart_probe(struct platform_device *pdev) return ret; } -static int moxart_remove(struct platform_device *pdev) +static void moxart_remove(struct platform_device *pdev) { struct mmc_host *mmc = dev_get_drvdata(&pdev->dev); struct moxart_host *host = mmc_priv(mmc); @@ -711,8 +711,6 @@ static int moxart_remove(struct platform_device *pdev) writel(readl(host->base + REG_CLOCK_CONTROL) | CLK_OFF, host->base + REG_CLOCK_CONTROL); mmc_free_host(mmc); - - return 0; } static const struct of_device_id moxart_mmc_match[] = { @@ -724,7 +722,7 @@ MODULE_DEVICE_TABLE(of, moxart_mmc_match); static struct platform_driver moxart_mmc_driver = { .probe = moxart_probe, - .remove = moxart_remove, + .remove_new = moxart_remove, .driver = { .name = "mmc-moxart", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:42 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: 119639 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1677498vqm; Thu, 13 Jul 2023 01:37:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlGkjHsAo3TAerfuwgWGTB14iFuMGb9NXTUssvXvMhNrsgARvjNIicJ2isANsrRSR1wNY/Lc X-Received: by 2002:a05:6402:344:b0:514:96f9:4f20 with SMTP id r4-20020a056402034400b0051496f94f20mr1041274edw.41.1689237461672; Thu, 13 Jul 2023 01:37:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237461; cv=pass; d=google.com; s=arc-20160816; b=q0WWa8N8oNX+t/XXJ4qPTIr8RTRTYZEGA1GrYB1XROCftG4PF61FtcTKu/tH3tAw1P aoB6IpOMfLZFaVymAP/oz3UcBblepzIU4PdtevBuoqtDan9f5mmPRPUnUlEhb6VQH7yO kIPyg8bLyFZwg+n3C35FhG3uiSd/9pgUqMkELO4lfRxI2bFgmQ3w5LtMpJdzXroVyXH7 VjhpG2s1ok0R+kGKmuT44vbGzO7T4ar7tqld/vykn9KkOHAo3k37P3W5WWscRmHZbjxn 3ULWFJ4zp5b9A7YRN2f4LjkoPpWFAPvvKFbPL6dOvWg5RinKc4+YpaJy5Zu1wVt+TLWt kMYQ== 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=ZqLHw9NdBMcVTHEOA1IaAb63aa7Km95uMTjhpgdnf2w=; fh=m57JEiI2nA4Ac6xsvVbwnYCRCX9O68E28ZTLeMZC4F8=; b=oI8UDrrQn6x+fOGoPnAEbcXzwvf2gg+F8zEyL838iqEiOM7DDDQ+4dXlaHHGBZRTCJ MYzMsCm134DfISnXZvlQ3dNgwoIL/co4pm9cooGIiECKCTf1ubqfAsIHFWnv/h+gbQKL a7wJ2wo2qBrSSjIPq6SAFNpE7pTolJMjjB200lIQ4SKIV9JMZF63m9eiIH5MOVyRHriP 3UNGK9VNL2iusJWPPSgOfjep8F1szJJYZyXQaa+/cPEtGJlC52sip971lTkHodK9uC4Q Dcw9Q5DYCxc5/WwtAiOkUoe/+IBaa/Adu+k7f+YvlzU/LQ1zSOrZ17krhJQ+d5UooEUK 6oMg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="VxvKT2/5"; 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 bc13-20020a056402204d00b0051e249f6229si7485516edb.75.2023.07.13.01.37.18; Thu, 13 Jul 2023 01:37:41 -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="VxvKT2/5"; 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 S234384AbjGMIMy (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234024AbjGMIL3 (ORCPT ); Thu, 13 Jul 2023 04:11:29 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2119.outbound.protection.outlook.com [40.107.255.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB0DC30C2; Thu, 13 Jul 2023 01:09:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I1y8neyrvkY65NEuUIK5m49Eary57PkagbwpYeJmAxtl7S5TSoI007cggurLFqMx9tO2s0i+i/J6SQD+qExW34Pl4/cVFHXv8NSSh8A7F/fNYAYVbWyUoWQATcOTHhjXNMxQrrbB8k3ThLFyJA5m65QLx1+2sHXX3WfMCQH1SHzNpKmc58YTmqst+rAQ8j4CRoxMCd7/+Sx1YTMuy1ccjH8+YQEAfwWVo583aDGqe88weOoCke/bt+x+n1SQp2r8UNcqV44EJjAEUXsDn75SqEhDRRVT2TZs3st3FjreD4OpulaICN05+bTKVm/87aYTrHa5jM/e5PcvwaFUfiAFMg== 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=ZqLHw9NdBMcVTHEOA1IaAb63aa7Km95uMTjhpgdnf2w=; b=EVXNV8ecrIrej4j/5Fx4IPtLXZlAAConec3HU5soAM1+88RqTMwTdM1eVzIPFiMbUOLAlDquDoyhJ+BDvA+FfUM5Y5PpBMISMD5DdsEiRziWUPhrIK63wwrqasnN/znqIE3jo9T/+NdTXIZMnWs9BhwDjI/u+rtR+DuRxmf4c2RvaaAV8FpUOw8a+hEAK/01g86w3m5BigCxvSmts+Z6HOmXeuSoVKpSY4n160NMcUIG6qcADjU/dKjg49/5d1lf4ROfCL6dXBLH2hd4uY0+AQZ1MbAafHoFDziRgdhx7SMYZ0r+wBXpt+WF1gdfoD7nRqjAlmdu2iAYRKLPqljf7g== 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=ZqLHw9NdBMcVTHEOA1IaAb63aa7Km95uMTjhpgdnf2w=; b=VxvKT2/5PJdjIsLYyj7IdiiHSWsgkT+8HMoOJTiJVbkOyJGTCXEiJvDpf2l+koEs/OFeIWNzo7Dfjfaa/o/SIUqEVoPrpUKlk30oBurgFGCq2kvgBQ8PYM7MG9HdoCKAqNZRxEFDSu2eCJQdMhKMRVJvt4bUex3kwTWe+L5B1k4kuIVrZhNpJIruN36ANajd2hxAk0LOhHiarWVE1O1y1L6WnLgAUihhEAC2Ot3x8lbO6GqssxnhIWJzX7sO/QMEuK3tqU0xZQ0TQmhosQP7cTKfYsWDvYt3so4BUSKOauzGfs0QA6wE/oaig/V4BmJk5TRgYBN/8HKaDKP0xJfDhQ== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:17 +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:09:17 +0000 From: Yangtao Li To: Adrian Hunter , Vignesh Raghavendra , 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 33/58] mmc: sdhci-omap: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:42 +0800 Message-Id: <20230713080807.69999-33-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: e953bd6a-a935-4e30-d894-08db83787407 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: orirhwI29w7CNbDYiNKv4hx35GIRk17RYrM5KkvGP+WFTAiOxh6EGWWb+tG4GUIbLoY7mD/R3gJmyRnME8kGEkVjtqC150P5u2piQH9a4ymOAOaENkX9VhJwV8dAHiAZLJM+ozMD5g15r7vZx87wgbmGmCNgGvTjNjXGdmKhoAJPy1CmBurGFQqZzAh151AnoBevvLF1Rhjoa8jBjT1md04Fntw92l4jYW+krztXcAlX6+tiqFpZdvnCEjXFzL0OlyNB9q3W48ChA/3z+rXT+a/Os8AnlctnC8QjIh9/cibHPTlTn524SM8bqwhYMrY2gHaxhRAaEZC8VNXxUFUm/fnjtVzufTteucBNo9eMNBPxQXVOYJsmJ1764XIQG9fPe+maUS/osgmSe462y9wpPztvrjblO0NFj5jlOoFAxu+mTQsA8HDTHNwRFGNsGwk8JL+ro1xu66k6SSbxLVXAYagUzatNePL0mXMHP1tapVndTOgo7oVTpZSrtg5Oq9hQecjoloN1En05jIWtBq2dJJ3aWspI7bKsysurx6PXMgASllA6n5Qk3SXRA11XdydB9auYg3iY2Fucc7ZBuecxFDyYCUcvz1RgY02jHDg8VcTFNpn3yuJIWcxWqVmwCW5A 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(66574015)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?6wLQRrpYvH+sYnGDucoxt1ePYeR7?= =?utf-8?q?+sCcsxDjumHZasWNu2LoG2l8jRmrBIMexTUjvDHs1T3uqbGroGITiiwMjhaPIKZHJ?= =?utf-8?q?Fq096I3kufAOkWQvawBsGyU+basTNxvgPWUOEqOhWfOMmL9NsbY3RhMliJ2pwnXMx?= =?utf-8?q?vMuz27sQW0mcf3yYU1v4syQ/GtvkaXXnRu10VGZV8aOdZkGQUzaT1xwExAAAFVYpg?= =?utf-8?q?23100terOWR0pCcO4z2ay2ejO9qAEoUDoU9NmziMsdlBamo1KOmoR/JhBUyFMo4iS?= =?utf-8?q?8J4n4M0BZSly8uRg6sjH9mXRH3ZjQOjy6ijX/C5f9ijto5aD7/wy17tALOhaHQRIH?= =?utf-8?q?Q2drTVGmJ+Rte0DTF3hLJjJoesORmfpS5980pbJ9qb8ZBt0ipxp/1v+ZjRWYhsH4w?= =?utf-8?q?6JYV2p40UudFlwLDXJD/JQ+puXgIpYJgTNRk+FLH/tGF2qBifgnPBViUrDHrVsN4x?= =?utf-8?q?fvN0ca3+bP5b5THX4JtjuzTkWiGgB8qyuwpT6yIIAcPYv704+h6O81uDtnMTNm6K7?= =?utf-8?q?onJrBWDrG84LgVrouS4XQacfeIermp6c8benIaJsgiTKZlSUxQPCFUl+3M1XK9sDS?= =?utf-8?q?IFm24TN/ZgR0jMm7yt12jtxhFwoHiSMTdgSDlF/B1IkCZorwOdVeKLaehJOi9f+kn?= =?utf-8?q?xQtHaocbpCcTUjkowQMW9oyAIyI4IKaywAq1w9qx57yn/PKC2zovCeHzV44fjPIGc?= =?utf-8?q?vpKdWy8SdHhDHc0ps5CMO5TRrUA/9kEKKPqrN2kcit1j6vYga8vhxOZaklw8pGSud?= =?utf-8?q?t1Fxtk4BPpYqvvReHKKfdlAsjUkdD6Ti3/o6ClP5Yb+t8qTS3ry03LYEk7Cw3znOD?= =?utf-8?q?TV6bRMQEbP7eDHYaFuGpU6jQbsYrw9XwPlGYAFYehOX71U+QY5x9HTEf/XCaoTCyd?= =?utf-8?q?6kZV53NW9qpeI8SSHhGCusPtQvnCgCUMt5xXv2uUoP5kgqqZkjBvq/EyZ7ep78ijs?= =?utf-8?q?Rqe1c7x6ZRw+sBkqUuJqJAG8Wli9/yaj8sUeYw4UFZGjz7KuzvkdWUBFRuysEKnOj?= =?utf-8?q?JWUoKsr3XcVdMyKc7iHjSt9tujBXWTWy0mE33geZhX+lBUmREbSmbj7vgL/QnjQAF?= =?utf-8?q?naqmyAKtIzr7w/UIJn+WOxxr1fZI1DfssS5f3sfe++8StPqwM6wjnOPDCq2oHN7dF?= =?utf-8?q?fLjVsZt632G8FM+MVq230fqilNwRzb9RCq6u1S0KwLUre1jws5xyaEdT+qmMV84fA?= =?utf-8?q?t1JPefYuF2crQXahXz/LfMhq0F9NQjNQGDLsSwC6QdivyKvWEq586vBa8AkGJlB5U?= =?utf-8?q?qlvjAlY54oqSQvsJtLMST78k6ElRMTAsz5SrAyUNnl22P5XHCVRDoD896vDvxal/w?= =?utf-8?q?7s22jQUvyzitCxg+t7bmaanI5LAmbAgAxMrc/xCMgZbeUflH+1Q0c0Rvk6Qbzb6Wr?= =?utf-8?q?7Zf9XypYA5rjb236lSOmyJTjxn6ZA791cjnTfjKYwb5e017A1rAU/UhlfQsHPUSCR?= =?utf-8?q?E+XhND4JNZVTmmi5rMfpWi3Ypg0bdBHZ4vSPtaADueqs3ZZAT2lhvA9HPvefB8eFU?= =?utf-8?q?JQ91sD2TcnuB?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e953bd6a-a935-4e30-d894-08db83787407 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:17.0410 (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: EgYoXJiUfqbFHwRqCB0XpiVpYRXFTIrkLD8EE5E2ZHzfiVLSOJCiNOKwES103vRqtqulJyPUT/mPkHP58TbaLA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771293860472039966 X-GMAIL-MSGID: 1771293860472039966 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/sdhci-omap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c index 8ed9256b83da..6aa77eb4a3fb 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -1394,7 +1394,7 @@ static int sdhci_omap_probe(struct platform_device *pdev) return ret; } -static int sdhci_omap_remove(struct platform_device *pdev) +static void sdhci_omap_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct sdhci_host *host = platform_get_drvdata(pdev); @@ -1408,8 +1408,6 @@ static int sdhci_omap_remove(struct platform_device *pdev) /* Ensure device gets disabled despite userspace sysfs config */ pm_runtime_force_suspend(dev); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM @@ -1478,7 +1476,7 @@ static const struct dev_pm_ops sdhci_omap_dev_pm_ops = { static struct platform_driver sdhci_omap_driver = { .probe = sdhci_omap_probe, - .remove = sdhci_omap_remove, + .remove_new = sdhci_omap_remove, .driver = { .name = "sdhci-omap", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07: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: 119661 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1680421vqm; Thu, 13 Jul 2023 01:44:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlGmrDbqBrtCGfUL2maN8dtYZaVzTUG0K2t8/a1xN+KYMxydjK8LxAqbjaFwzNnws4e1so4J X-Received: by 2002:a17:906:51d3:b0:96f:e45f:92e9 with SMTP id v19-20020a17090651d300b0096fe45f92e9mr1081300ejk.16.1689237896367; Thu, 13 Jul 2023 01:44:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237896; cv=pass; d=google.com; s=arc-20160816; b=0ex5awMwdZ9ckybnV5d6u5BQAsovozplnZM06pjho8JChx1mrEpL0uF16WeB5UTUfv Vmo+pcBIInzwYX5j2TMH6kNSoz/sJ3nj/wU1y2V9v2CEuBlIH6cPOWmK/SbbUHhFf5/i jg/8FYIMOcimMC0wfpv/jqQIHssVTReeNY/3uIhdgZAVeqJJUPaKg4sIVQ/UYesy8zav g/peGAd5vHVJDvW7Va/CqswKMFqN3FxRqKE3Hy5oAipQObcLQ4/277fLsNYggeNHUz2N IPk5uF1k/OjxeM+gSnX9zwMeWNqj9ykaFJGDu4KuFfmUGz1v3gGZqHaXt/K7wjs+z0Vr oEiQ== 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=yYB4ULj85t6RodZH91W/2KX26vucD5LOfkqU3wXonck=; fh=Jptc+LQTdIbOXFIkBDUB9YnZRWZjO2vsWVpX7sYkr2M=; b=GaByf4t5G1GkE1MWTa5qfKZ322YCS/DAAk1FRQJz4RjQFJKB7T6zNH9JpJFcjI4TBo 74rTeAP646QAOSqh7gqvMBMLEmRaJMBBrXYzafXm8Oy24O/edUGdOt6NMm6DFhj3bvPq 3rZdVmKAqvzGM3gLtWDh8vEWG4ufveUPtLcrhC2+0Yt9FBhSGKXePNzZxBYASxOyPeNK gKjBR/yIR31kTmJUqkmSz7gsdlGKbehJgAGr3u1tS7Fff7GIFmsOUnKZj4RCD8vccUIg Y81fcMT1wOS0u6TyEOjit+cZMPltYVz61nPI5GLn+2JqkT8ZG44t06Mp19o5Vq//3woC 5AZA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=S0VvKPOh; 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 v5-20020a1709063bc500b009920f18a5e9si6480276ejf.728.2023.07.13.01.44.32; Thu, 13 Jul 2023 01:44:56 -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=S0VvKPOh; 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 S234406AbjGMIM4 (ORCPT + 99 others); Thu, 13 Jul 2023 04:12:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234028AbjGMIL3 (ORCPT ); Thu, 13 Jul 2023 04:11:29 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2112.outbound.protection.outlook.com [40.107.255.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B4EF2D7F; Thu, 13 Jul 2023 01:09:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EPoO94keXcqB5YleD7O2ZNydg3+jOqqLNaQGQPNu5G6CgAOtLubObl7uy+9CWdjRpeuHG1RzRlvyzc7NSCfA+iWhuBQUstiQmJkJzpvHvBgpLFIiR5cWf7wBDwroDLi5OpIVLaJw7OrlQafvAQ81aMrEg0OwJPWMQUP3tAtqJRcsfyyZV2pUPXLd4ovJhOcndQufdJ+FFtQD9yewk0FaMNQok0htaz/6+3CsiRnFIcm3KTgqxA/1mdIw9xEjsfyABIHZ7wuYMAsAHJH3s7hTqgWuFi2Ic14LKvg0AJ3gsSQJPgn8i6Rvi0I/TPtkt2r9w0Tjsb1juQWxtSH/2FCJ2w== 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=yYB4ULj85t6RodZH91W/2KX26vucD5LOfkqU3wXonck=; b=hyPdntu5m3BFR+kJqpB1d0UpcsJcjxff6Gwsj24snXf6W80aSyA8ZrMfWYZuryYvXekv+2joXPAuLBhrKdCQBwHvdH0P+H8ZOFNrO8Z03x2+LUQYEpiCDTcdwEtAn2VY8P98BQbjkHR7QbDWDzPJWoF0Q9bIOuiJ9kol47DiJBVBYMRkvUEj1rwsa7qsePwe7sVmwBzcu36mMOLcbA2hixAdxVn5oV7+gRsk5k8WPA/4Ko9ou88A3DWwxU0PMrtgb7Hv+6M90qZYm7d9aYSs/KGr78o1RrjVmTtBvzO6q2aW284n/zITpewfqEURghDZMNJaTMH4qustxexcTFPekw== 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=yYB4ULj85t6RodZH91W/2KX26vucD5LOfkqU3wXonck=; b=S0VvKPOh2ecIOoqq5spv49Hurl47rz83PYTFSjzVqmJaJiak9rwawDQebmHjddCHt+SGoF7hmkarDCYkdXRyVR/8EljWlQQ94Jb/iwrVh8WHPPOHgwC1ztLMzl5TgLhxkV/G2tSr6hHGWnX4BoD3l5m4YCNVRhsdUULJosd9ziDgHLhnehULuoeK4i/P6abKPhaaCq0lWsqT0g2ZWov3hlanfQyBzmqM9TeINd5x2hm1/MEd64IzwcpouTS0xyNofGv6hACNR9u1KOCBldClpt9fsPiuV7OpbFSXc4y8+oSdTtSpfaWaZuoCICGzJFEeD/k7Eqfnjkv1omWcrINH+w== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:19 +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:09:19 +0000 From: Yangtao Li To: Andrew Jeffery , Adrian Hunter , Ulf Hansson , Joel Stanley Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 34/58] mmc: sdhci-of-aspeed: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:43 +0800 Message-Id: <20230713080807.69999-34-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: 26d5e4aa-9aff-4f92-df32-08db83787563 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XFQ/vMCkNJCFwT68oYAQMTppvLLGuGcjcr1csqHj6+dHBeOtHSbcq0vmD8ZMahwobq0S8K5d+zpbJurDLZK2Gs2A1+Rf8G3PFUCXv2p4Gyn86gq7z/LJKQniEkeifC0YNlunH8tU62klWO7tsvrcKFTYn5h3Tu08TFwVp6zawZJjYd0fV3TRC1PPmJPbVI2nBzw1JG50J98HQJyqIbTX3gPtkV91GPRwA6pW9w4KQIhCpk6KPhJeMHpALp7n3GOpGb6A5fbPENyQ1daPgi+/oFoE7708svlWUuS+TEAL7jdjTFCc8xlwoGBRNGZQC0wJyFI0WRSelxmf17TW6RDuy6n3vNDKUhXkhrfDwvDbmD8gbY0NBZy+FJN8/0RmPXeVWXgmRiQOMNI9ufFgwOpKciLXqhgtv8GMzP6qtnRAkbT6Sp8Nn9GZ154rPjzTiUUiWzk2/hT/g7nDDt+1yCkZIBACfmOYxiyAebpArv+HQLFVlNGoNSWG2Wrhy0+cLqTF9wsACKMV+JIJUd5mHkxE2/Pdz+eRCrsu2kY7LI30x+bKtLwxItmKSqIMa/y1MCCC15wOgxie+9kRZ+qbXB46YaMuDMJeytqU1VPo7PsRd1563MrvvajPdYFL6ZJyf/Kq 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(7416002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?3RZ9dmLyjsvB/4CV0gOwh8eXIFc4?= =?utf-8?q?12ujWT1PZ+O2ARBa1NKYGLXju7UwdWaxmsRS1IVtW5at9UjeWXKP9X1HhMCmXy5ga?= =?utf-8?q?RSDR9v3+TPoM0ovk7oMiCW7KK2+FxBHj0fuo0Egi8xqcdHPUdZXAEryRT/0kbWWJV?= =?utf-8?q?RC2cOl8Vq++bYQqkNuBm7gpjTR5JfG/W+qEHQzwpH/OMOIDGBz2OZnQTb8lMhaIG/?= =?utf-8?q?MQgGJOdDZ5S0QlMY/3LqxM1xJPjBYFyxJzFPfzvwL4yUkz+jLCS7pZPNyCTFF0MRD?= =?utf-8?q?Ke4PlMjhuf4KhIQCqv785RY/uI6/eQ7QtgI7t6KTWPDWlW0da8Crv7fZw6nH+ndfH?= =?utf-8?q?q2yc3/TlrkvopK1PFVXKmezK7hLduvkvjl3W+t4OQvNFytu8Ql0TCp8tKshtAcOPY?= =?utf-8?q?EzOSDPWea42ZLqo+TJBvrxUIoEKjOBBoTfueXbW9hwvKbmlHKE/jCL5lwTtNG30ae?= =?utf-8?q?2mvNR8QEKMVf4O+Z971UO7QwLcQuwboipge8sbT2nrjlD/D7S6t8BWXtVfdYwC9ya?= =?utf-8?q?K7VlhM+rQ+lEMRXASP/fWnggMAYoOxRrAPJfBFNpiq+qG856v1qMleDoLEs3lDO65?= =?utf-8?q?eBqD/IrEhg2YmMwQQ/qzX2JOzJFGzzOmIDPRF2fODFOZR5pXJ34fIRkP9Oeiynduu?= =?utf-8?q?+ASTaKQ7IoUjxBUyNYcvUyPf3GdqLF3+lV/zHHrLeBqvj+70ETlmH2tfhyCEPawhi?= =?utf-8?q?zFKSuysFxhXcznPFvo8DGx1Ob12f12IBjbwHiitrzOUl5SJKGuGdMjRWfPQAs5smx?= =?utf-8?q?11kkGil20uOWxyS9NlFzVW8YYJ8vjt5aE1S2lhps+lXJuTTDg7h0TK9O9Yh3fEohB?= =?utf-8?q?022cD5AW34jYt+cLMKOOhGuVE7uSLnF9z5Es+Y+pYwCPxf4AzSEmKWQvsldZnnT6m?= =?utf-8?q?5WfoYksD6MO8m2INOflF1+nSL/orFQmbw7ZbmPCjCx7uSy0ZGfUb/Uyr3G+eAl0s0?= =?utf-8?q?noL6XbMJEB12AVBwXdUz2G7m9GerTA/9ctleKvWPU7gN6A3pN2cBWgR1vstzk9Z3f?= =?utf-8?q?TBZjU8ACllT5/WCd2AcyO6Hs44QWPvrVDX3fQMKoTyrbeJqdg0dlkdmKforJ3bbo/?= =?utf-8?q?21TrlDw3Wh2VEg0KCUqK42cA6ye25kw3xi5VA3LBISvid7GOmnKuQQ8xaYER71AkU?= =?utf-8?q?NSlaQw//8o3JRvhSqW4k6I/F/CzLvhX6vfD1nidcShsue2RI0ws2VXB81NWkx/zvR?= =?utf-8?q?6WIA9UUApG7d7R3O0E6amhV2NEPt60vCkHdCnOzX+6nT0LBk2V8ePMUhdQCIrGoiD?= =?utf-8?q?If3xBRU6VsbjfXU5fW/7/mkGLEE1zNBrun60iE5qfJqaW1JcPGoIQN3NM1RRGI/EP?= =?utf-8?q?6CBf2wYprn8Srk+4vDRK99kk9Ruac/BKMIpwsEItXgp185n9EuxwhQ3+DSF6xsz1t?= =?utf-8?q?oRMNc/ZJ2b6nvU/igCoctp2XVAaXkJNLZQwKFzP5L/SLcnikcqtEMiuitcAtqiuVs?= =?utf-8?q?Hsl5zil6gBgG/OJ5xZWE3hhXcC5AnoUBVH73Vl9beFqKeXu9PsNzScu6EyIlyY/GP?= =?utf-8?q?udXN4gDC+3UV?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 26d5e4aa-9aff-4f92-df32-08db83787563 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:19.3157 (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: yhlGAtM3uC4hssoZQ4Be3bL9ZEteG7xOu4rd4bxk7NReJSHhi6OlpISTRQgQsyp4MLIP/6XUYs1U7U4OiAaimg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771294316296988971 X-GMAIL-MSGID: 1771294316296988971 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/sdhci-of-aspeed.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c index 25b4073f698b..42d54532cabe 100644 --- a/drivers/mmc/host/sdhci-of-aspeed.c +++ b/drivers/mmc/host/sdhci-of-aspeed.c @@ -450,22 +450,19 @@ static int aspeed_sdhci_probe(struct platform_device *pdev) return ret; } -static int aspeed_sdhci_remove(struct platform_device *pdev) +static void aspeed_sdhci_remove(struct platform_device *pdev) { struct sdhci_pltfm_host *pltfm_host; struct sdhci_host *host; - int dead = 0; host = platform_get_drvdata(pdev); pltfm_host = sdhci_priv(host); - sdhci_remove_host(host, dead); + sdhci_remove_host(host, 0); clk_disable_unprepare(pltfm_host->clk); sdhci_pltfm_free(pdev); - - return 0; } static const struct aspeed_sdhci_pdata ast2400_sdhci_pdata = { @@ -521,7 +518,7 @@ static struct platform_driver aspeed_sdhci_driver = { .of_match_table = aspeed_sdhci_of_match, }, .probe = aspeed_sdhci_probe, - .remove = aspeed_sdhci_remove, + .remove_new = aspeed_sdhci_remove, }; static int aspeed_sdc_probe(struct platform_device *pdev) @@ -574,13 +571,11 @@ static int aspeed_sdc_probe(struct platform_device *pdev) return ret; } -static int aspeed_sdc_remove(struct platform_device *pdev) +static void aspeed_sdc_remove(struct platform_device *pdev) { struct aspeed_sdc *sdc = dev_get_drvdata(&pdev->dev); clk_disable_unprepare(sdc->clk); - - return 0; } static const struct of_device_id aspeed_sdc_of_match[] = { @@ -600,7 +595,7 @@ static struct platform_driver aspeed_sdc_driver = { .of_match_table = aspeed_sdc_of_match, }, .probe = aspeed_sdc_probe, - .remove = aspeed_sdc_remove, + .remove_new = aspeed_sdc_remove, }; #if defined(CONFIG_MMC_SDHCI_OF_ASPEED_TEST) From patchwork Thu Jul 13 08:07:44 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: 119677 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1686703vqm; Thu, 13 Jul 2023 02:01:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlGJsObQM86gNoc6r7Gq5mcefMl/lfKqZ6BM47Mep55b3tin208Fsj4cY1QTSBThZJK+19R7 X-Received: by 2002:a17:907:1003:b0:974:771e:6bf0 with SMTP id ox3-20020a170907100300b00974771e6bf0mr923217ejb.56.1689238866966; Thu, 13 Jul 2023 02:01:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689238866; cv=pass; d=google.com; s=arc-20160816; b=D7zWLVdOLrPLLQF/E2lDVGOOgCpNSbt2yF2qJ0a+iFzZ2VE7mtb9tejdy8kv16XX4x hRr/MYRGTCSpyGdQdteZJatx83t6SM1jS0a8w1iHsyz2hfhSdTXiGkiPObz/s/2b2jc2 ciISbLGb6850xKV/pNQ8JkU+MzSX5mmb6qva2UOg+odMT5heWcd7LQm3QidZFzv5jzYE Fvd/QvozoBJedB/dSMJOt2sQrK1HrMx3t4Bpb9lMXoYqSRlcAihxP6r665b5Vd6kM/Si jm6HI8vmRi+KjCgCvo9NnVAioBF5+4PBmnqq76lFFRNpCU9lOr5J+GOSh/o6lLDR2h9r N0/g== 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=uMtEtYh4yggL3P4Ktr/c7Zr9RRKQR6LhGA6gTsORCp0=; fh=sy30M9eLByds7Tlvf2H8U/dRo3J3gGi9Sy6vmtIbxfI=; b=eenyX3SqRmbTVOecu1RvNDmGkLEn1VCEnXifHbv+zkdB7lHv8Z9/Qn88mAfOG/tbRL 4urPsKsY6wO+6genEQmaVsaqcPHfDs6RZ7tqFeDeWkk8GtKOukDc8nsrEB9eWoW0rxf7 nABjTGkG3QOnd+xdWWjI3g2zrv0oGyOMwGi2mQ2huuR4lvJH35jg1hCb0luRwMq7A4PH A6FX2ft7iBpv7FIPwbbRh/BswP0dDGuYpVKqsxcfrSWfLAgiZR792XT+743y1E1v4h4I +mGaBFM7/ZGTz9VrsPKKMhsN/qL4fSbXGD3wlxk/Altu+wNMwuFIscUsPMhDiso2bKFZ XIOw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=get4PgZL; 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 y17-20020a170906559100b00992d0de875esi6936622ejp.914.2023.07.13.02.00.43; Thu, 13 Jul 2023 02:01:06 -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=get4PgZL; 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 S234022AbjGMINL (ORCPT + 99 others); Thu, 13 Jul 2023 04:13:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233860AbjGMILc (ORCPT ); Thu, 13 Jul 2023 04:11:32 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2100.outbound.protection.outlook.com [40.107.255.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62D4B2102; Thu, 13 Jul 2023 01:09:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oepT/ZoJyvDVwxR4VR7zY+fG4EuW9UVnViY9J6S7zk1Bnfwuy0SKC9mXZphEXwqjLXryhI0XGwQfrj4x6QNIiN+Wu6jOn3E26H+0AheIvMAiQW1pG12CSI3VM2I+xGZStE0DQPpkvJYnJtivV49bp15CdGjLJEP0QhYhJjdFAEB33vVCSkBUkAlnrBizY+Gy+LqFTcsvrEywlGs1fkv6Np7mA+Hv/cYVskjazzadLo2VRsXr0JqKhgx7kL5F3SRqHU2lC10U6SNnXaDwRrAvQh1HzjYWwgI2rHLW0kdh6o6DyTTZBiClIIr0y5doudKQqhuzSzDNoo6BB0J+m7hCkQ== 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=uMtEtYh4yggL3P4Ktr/c7Zr9RRKQR6LhGA6gTsORCp0=; b=AeuuckOgKEMLg6D8nyyu/sQNCsY7pMVrQx7YuOwIrtq8sZCCOZ7Ss49IZMF9pXs20IXgtYwypANjzsccpwuRe2C0AXv/QRe5Xx6iarYDu/hFoYaGNkmYTtJYwUmVWsdOMlCWf9pcIRLU1YfeTY/DHX3Ahj460c2tgJ8ICs2rWAB5kuSrP/ZoQHv/H+bentY+E6aN96It7We8tk/CNW8Mw6GSNHj++BLLZGgXbV4tpjJNG2FoLM82thX31nYRiaVybk7G/l5G3ejS41C1743kZ+thzn5FvrLFdiQ1wBAeb5unGpsAgb5aYZTpeLB30eX0DKcfMOPD2y3d/0AeXThjog== 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=uMtEtYh4yggL3P4Ktr/c7Zr9RRKQR6LhGA6gTsORCp0=; b=get4PgZLKhRYMqQxX5xtrZBI4EueLM/enpmA6YrBHnN0tVo4RaC/rU2gfUgD5BGHIyBHuE/3kun6p1IPCYnj7cSAAV4CamNey0pfG4lzzcdQAdjqXvNXAFgczmYkR7bIA3/NZYHl66ZlJWPdTNbhVQHF9kQTA6RK4CbGXtDDxpcYkdN5JEB9xzZyRTqc1D0gaT9jJB5a3CogxY6JYzGmQNGs/5j0Xeq/l0kc1zovQ3SVBTtAwuCqZIFBef5QmeeUnNHyjxKlkLPHSyWQj5i7mVxeCSRoBlVOke/ULCRq6rttVVq7srquEboIX1IFeEp51aeTuwG0zP3A8XObijmvUw== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:22 +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:09:21 +0000 From: Yangtao Li To: Ulf Hansson , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 35/58] mmc: meson-mx-sdio: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:44 +0800 Message-Id: <20230713080807.69999-35-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: ec7bf0a4-a3ac-4054-a764-08db837876e3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 16MSeHMUey2zVk3KeGERPfX8XV6QLbsK4hPHIMot37+9Sz7Qahqwq7+UvyUwmAZeK+0C9wIpRCRiU4eTyFxry4dF/NsRJwxJ6nMvJiB8RP8X7hBmboEUqPzEEPIqjhDJBlXStNyK/SybASANvjVEHv0YZyO6zpuNaJT2wZqhgxxuVb8fGNxyauMBtPrmmeUJtiueU7EgXT7X8m3OVGeKD8X6vLPRmF0H6DjU1s5qa5A0kWVbMCTACgSFWGOhIdekM41Vk2WgJSRjYA0OJiiZVAcsXeHdO1MzRdYet2/VPps3rEpVvwB3kSzGkFVoAs8QNf4FSe9Ge6JQHCW2YJ9Pxi6M6/oPjvSK8ZpjEyR+EWmA0MxBdiHuG+j6+SqayjFFaGEehkLZApJEQC6pcpvh1cCY7dYjrcA9ilaUlIXMlEZKvMVPLqY6KhVP9UndiEPJwOQGUzb0huZVsO330lvWWiHDvnlhISTkZMwLylLYnnNoJERZCysgOQ8q8gRCSTtqELlEAJI+neAUHl19aCDo7umLUOPPj33RteHKOk9p2wy3Fja+D9OvATSSmTBmVDENHEag4q1K1bSncOgQf73kMo+5qXXwQuFWdlKFl074oC23RMvM+msI49SA9lNtW7lq 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(7416002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?JVPAZtA5lRLSpiWE7ToBR9jUMcD+?= =?utf-8?q?TO8Ev9/3yHC1cNg/G38Ye2YGOwWAXxvgHids6DYR+6x7KoNWCSbI7lq0e07cRUOEN?= =?utf-8?q?BPw2F9CBPqDFYyQCbZxi0ufyAywlJ6PD4cNLqzdt7w79bFLGzFAbTGL64Yme9Y2Gj?= =?utf-8?q?URd2oWj9BouCe1GQFp3yKn7feA+IiGyMhIHjCw71/aNNjk0XD7v35OKKmGIIqg/Pt?= =?utf-8?q?82vCD6YShxSCHJVYxbcnpaTv2mu63iiHU7eXX+CDXRSNBF4LmRqBbdxNtNdK20f/b?= =?utf-8?q?WiDBAXtFJVtpchnjRzs0Re21+i6OXC1ZKFoox6B/x5fU8++t+DdNpOhJUxK6PMBBv?= =?utf-8?q?AoJ/+ID1+EDT69rkoW/PUSHSXzIcM6YG/N2fZBMNOQX8tj89nmjJGpTJKhZHgCMr8?= =?utf-8?q?Fe2f4PKV/bU+KtBx5k2XvDtmRNnWgdr5yPpCp0p6OzSj+b1sVyFxae6FHkr4sXmym?= =?utf-8?q?XDx867UD3QEDYr1Z2u+LKgRMQJDoTjbT2wslgP5FXkL/KHNuWnkeadSIUD1piyCao?= =?utf-8?q?O8vUvLkqEh+K7lTzBA4V8U6DagCRYiBaXJkXMb+gJpYe/Xm80I1K9yY28oQ9gowJw?= =?utf-8?q?DBL6VBoCOkb/EvtdbZoNqneWe4mOZO6P8q52E2T/Da7PfvlQaXLhvVIuMQRMvgJHi?= =?utf-8?q?DKMykf+HNZoiyBjkRdnTQ22pXfZPH/oxRBCpbtYq7G+320jH3d+wu8sc73NClMQH7?= =?utf-8?q?x33dz8VjWIVSH4jkjxW3o7D0laiRVkWHL6EtsRPB0leBWaRJuzqM3oWJXNg27XXFi?= =?utf-8?q?4doAuKD/eR+FB04NyAVeOU7zHNiI0r76n+KCuS+bGOY4sz+K4iNbgzYPf7T+Wi9zZ?= =?utf-8?q?8Dwy6X5i4YkBaudnmkJjYFFHa3mYI3HO6R0FSjRM7Cf3klE4TZhXkKDNkNszmSXpX?= =?utf-8?q?gTqc1JQMpC6qX2FvGd3JY/wIWh3yWzih9aX3HH1QQ8/L69uK+Dzjmj2qjlRoMuVjV?= =?utf-8?q?IdE1S2lS3t4JbwdCBCVA8eek7FYebtVI2VLck+TtHqeoUdgIQ7l09O0fYiJi37MvL?= =?utf-8?q?jVv3M+B/KGuC2rq/20NuJMRTyLWY/JlsAS4qw6ZtRVxym4Kk6uH5txLyrLQTBCBuZ?= =?utf-8?q?SW72bk/M5T1oS7rb0PvYbTaFUaTFrs11AWUND2cD2DeRUWNHwjdDdwbPq+52jJn0Q?= =?utf-8?q?n1iQQJrb2Z9GxPiwFtDUrezkpexOY3V/nnR6oyZjErbNe7usKWAjZdPT/vCromdFi?= =?utf-8?q?f0Z/S2jEBZlawymTNe8ncil73rHAlaRJwcZP8Q0dM7JdOC9C4Y+Y2ypHW07m91K2i?= =?utf-8?q?UP5zqiZxSH0xkxy6lSdXM3pQmwUylXwMDTBbpBWFdy7RleqIlY0QPFHqUrq7oT+TX?= =?utf-8?q?G5UhXUBDr+5Xq11DGAj6ktJlcYqMFhXVqdCaf78OJh4qNqrWtS/TbT6Jix5XVtuHS?= =?utf-8?q?iltlrGRL+0HRdgT98rvrIuV/HMQX0w3ANB25oFOrkyELmeg/+5dosf3HHaiu2wGjY?= =?utf-8?q?rjibH+IBH2lfhsihZEAe80J9dFO5+vsDOCSpJQVBjlbM6ZN/bKl2fC+YcwYQfRpYU?= =?utf-8?q?Cgrm5HS+rdRC?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ec7bf0a4-a3ac-4054-a764-08db837876e3 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:21.8488 (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: vUDynbJ95iJrmAuHYp84wtGmS2lPp3GnPWZQtu30c5ff/3E7x+0lxwNM2rc4wq5kJTd6SWVrYg7eSmQrkLvhbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771295334245859832 X-GMAIL-MSGID: 1771295334245859832 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/meson-mx-sdio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c index 3a19a05ef55a..a11577f2ee69 100644 --- a/drivers/mmc/host/meson-mx-sdio.c +++ b/drivers/mmc/host/meson-mx-sdio.c @@ -728,7 +728,7 @@ static int meson_mx_mmc_probe(struct platform_device *pdev) return ret; } -static int meson_mx_mmc_remove(struct platform_device *pdev) +static void meson_mx_mmc_remove(struct platform_device *pdev) { struct meson_mx_mmc_host *host = platform_get_drvdata(pdev); struct device *slot_dev = mmc_dev(host->mmc); @@ -743,8 +743,6 @@ static int meson_mx_mmc_remove(struct platform_device *pdev) clk_disable_unprepare(host->core_clk); mmc_free_host(host->mmc); - - return 0; } static const struct of_device_id meson_mx_mmc_of_match[] = { @@ -756,7 +754,7 @@ MODULE_DEVICE_TABLE(of, meson_mx_mmc_of_match); static struct platform_driver meson_mx_mmc_driver = { .probe = meson_mx_mmc_probe, - .remove = meson_mx_mmc_remove, + .remove_new = meson_mx_mmc_remove, .driver = { .name = "meson-mx-sdio", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:45 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: 119676 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1686436vqm; Thu, 13 Jul 2023 02:00:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlHqzE2aI3MREw2ElgqeLAHev2aSi49Y3gTWFNc6yatUFhAShE7QFu5DpAgxP1x8i/8GgL8x X-Received: by 2002:a17:907:8197:b0:991:7874:ef71 with SMTP id iy23-20020a170907819700b009917874ef71mr727170ejc.44.1689238843243; Thu, 13 Jul 2023 02:00:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689238843; cv=pass; d=google.com; s=arc-20160816; b=IDYuHPSbS/SeAVDHkNmstaXiFNX+CbP+eu/FeHf7EypmxUFDRZBo919VvKJPYqBaAr O/njugiv7/smZSV/HR9mtcCkBnQjBbiazeOZcggdbPELk3Xe9l9m2tdsmWBIPCsqjT5c briNSNh0p27IMWtupM/WHOVDwjlCdxCQ8mUb7f5SaRxzXFk8ENr5YCjiMRNmzd60ugTs 6gE6wrLIZKn/y8iLhTtOCodUYxmHXUcTyCNdlIjZZaOwNfTHXkjr0AcFpCrQCgUuQb+S Ye44xifbmqUjU2zs/aSYQV24iUi4eInBfmt/nl0IGyQqOA65Nd4LH8N4m5HYViayiect Kg0A== 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=iRmZXFCwumSmLXQwjvRHThU5yBcyjcWZ8ZYYoqniSk8=; fh=0b1WHgzFaKa3wEZ+TH0lsKqGVNqDKrTFnhkKsch2fbM=; b=m1alhSQSV8ob1Wa5s+m5O4d/MrfCYCAjJO05T9yg4Um+6DN/WRIHTt+bKifT19uivU GoOD7Iob9KdZB99z+wq1Lpudea2tSeh+GEVm7yKIU72e3y0l6eXZ430aqGQCfnNVggaJ GCMwH9YrHQSBPJXuePGew4wuQNiUmoPlbNzNOBI6/j2y42K6HrU0kg7bcLa4JbemHB4G num3k5dkMyZqDP65OvbRojh8jawYBzKMfRUe4LaKN2cnBYiPPscpHp4VyXphrYgl5u+A 4M7C5FKvv7dcOZoHvfvpJradH3FN6k64jjDYA6RN5VxrAINrMxmud3fhBrOWgWv8K2gS Pgug== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=JOzyjoDS; 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 m9-20020a1709066d0900b00992c195ac80si7115615ejr.357.2023.07.13.02.00.17; Thu, 13 Jul 2023 02:00:43 -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=JOzyjoDS; 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 S233042AbjGMING (ORCPT + 99 others); Thu, 13 Jul 2023 04:13:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234052AbjGMILc (ORCPT ); Thu, 13 Jul 2023 04:11:32 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2100.outbound.protection.outlook.com [40.107.255.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49AF21BB; Thu, 13 Jul 2023 01:09:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U8TN/RY/M++kKH7+r5s5Z2vBrf8C3UkF2myQXxhwkps8NtIegn3HYZXyx1cF7K5CjSdaKmK5dmIn4/mqjLP8X+dLPl4R3Q4rmtuCie8o6sd8yYNYkgrfJi1mLIX9eawDgFqS7NDCYMtmyW7rRgJzxxsRvWw4l5NXtym7JqZR91bRVc19+CJWLR6jhVGsEQ9D39Vy6yWF+bUHdhk9wbhmdWo/zNY6ItjfYSXh1PJ2LCA3X2n9KJBPlSDwKQf/E9OCf7/oA/z2Rnn/M5bX6z/3KjDWMjPJWFkZv/8y4+kUdu5+EBVPvvm5WOG27wRFVwmIMUveSWZ4z7Edbqn8jouUCw== 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=iRmZXFCwumSmLXQwjvRHThU5yBcyjcWZ8ZYYoqniSk8=; b=jsSGgsy8eEQMX509+bxl52GLpLeEE7fjLnU+TzkPIkrAKd72Fucx3w/KzocHBs6WO9NqZgwpxclM5fjZ9/moMbZkckO//5RBd5gRzF/1Ey/XnQ/Tgx2fly8zNM2AyiCNV+HSTomO86UtV4VEcpyy5c3cfAvwfzfnS6+cQJTQknprELFDYhmdl5xsJPE2j3oFvJUDeck/rZ7XD2IVAtBHQbCmNu+blFaZDpF47wEKs98S+tq4ieQY9REjUJK/Q6dqjrpts+PIpel6NFzaAzLhLG2+IKPXRoGSzIRI/KQPhIHuybimv/XYUuHC0iCq3771FYE1VcVeZ6xOZ1a5ja4Hnw== 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=iRmZXFCwumSmLXQwjvRHThU5yBcyjcWZ8ZYYoqniSk8=; b=JOzyjoDSQ3KG3ckIZpJqyc858jSyD5vd5qM5/8jbp2lWad8H/6koQeimFKHr8sBujlKOXVRciFKXAhfckTbALQ1F+fMcMgCsQZoAgZQ7rPdeJOz6n23PZiLKZm1oZa5/gA6bv9feg4QcyYUGzEyMi2wDMIZMHXsGQ5/+jiPQzG1R+7qcOSHku777bC7ac7+azmWQFujbuHQiQ15B6w7zmUeVZDc3xvxzsnx9S1yqEkCesQNuNtg7vS8PNr8ndRISPIBG5eQ9fn7yuOotSLcvudMT9AnuULOT48K3zUWYVqMsKFlrMAKDLe6zKczy1ZRQ/Pun9A7lF8udl/LCmMYAYQ== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:24 +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:09:24 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson , Orson Zhai , Baolin Wang , Chunyan Zhang Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 36/58] mmc: sdhci-sprd: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:45 +0800 Message-Id: <20230713080807.69999-36-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: 312846ec-be51-4a84-60a1-08db83787831 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ltSQOnqZIgVizz71ttodLZPPVNaL6MfA+lzxtmHsiOydId2lU+GF+Olp7VJWjVeB6bJYSVs8zYYbjVAVemqZUIwIn0x0SzjK0lAndTaJXDwKzqxnHb6jgO+P32ZKov4o6+wzyhMaYx48eo7+++iJmUwdQQ9hNKtMdsE9LdCeMuo1+G0XcBXygZtpu9PSgzKQI8Okmn1H9JZ8OKJ+wXierUn9OWKvD5nZxEIuVfNzlxSFIZJqzJS/xk0x5+DJ/kHo1N5z03e00Adn6PAkpqjVZd9oBYwro6F4q8oNsw/HOkzcufUMP+GddssoSJNO2jAMgZoDeZ5yqtEvcaqVxFblwYleBRE8qyDd+Kzws6wOthTqKzxrogFPpJmiAd8Wa1XsCf1VuHpSjfPEspEswYDMo2AVQQg7FSeae7aR2NicamW5ZgLIY6JkqxKxlCwEdgqIFVpeBhgrn8RdEuJQWoeCut3AVGVxmgOHJMmrSd4t0Lsm21ypSRRgQTew2n+dscxD1JldnQh5bcIGLk6Hf/+mEN8hGgCIkwk7jyowsuYTXUXjLCowB7pQpqyI8RUydggPNDSBrcBfCSzQLtjcFd3RvJ8KcF1QxVs53PKPP1hiAVwitYcJYCYmchFMG+j2FDYC 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?uNgZlO6nq2F06gjTJHseYqxMudHY?= =?utf-8?q?iw8bJcaI6PCPY4KElV64NRWJuXfADYj4JLLxiAldJsnRwkfjaAJlVR65zD8O4om7g?= =?utf-8?q?gLm1PksAGjAsdXVJWMHMRNUfRPiVTnJLeiYoFVwHIYRX9hppn6hmi60hkW3aoJw4f?= =?utf-8?q?GP7wBdR5CLU8hBAzwM2nixycisczJeCpDQ9209EqK2E/oXKMD5C6eITLVhyIG1qI6?= =?utf-8?q?k5oempDG1vmvYX9WwvWtiyJrJq6CUrBZ9qpgxAufz9uKcS0YfrqgqOYnUXKwznrDd?= =?utf-8?q?jAetykOaBK52hl1WP2UIbranIjxJZt5oS91G9CBpBwq0Oh7TuxmUAmPrkmNIJTYot?= =?utf-8?q?jkhVUwoK7/t1r+CuTEt8LCySjzJLCdb4sDIibhn7ipddxLbWgyWoNeUudVl/e+8Zy?= =?utf-8?q?v/OX/BbXh+gSdQKo8n3enAQZc+RfMAIbt7/AMwNgBqdaBaow1SY+HafRF8jXtb1gq?= =?utf-8?q?3xNr5QhPfNDlNPDC+eWUfj1bA34CFOwT4hnp/uAV0KfYXwPkikhbPbqfhLH7wBegq?= =?utf-8?q?3GdpIHNUWArT0mWyh3sn7UwvXFQR15vdcOcmeN9ka2rNbs/karrdIdaTadKGPBJnJ?= =?utf-8?q?hqvF5I42z+SWmvOXnRAdwQ5GYp8pwNblbyqVL7i9bOv0SE3FN/VFHEYA/P1hLYjQ3?= =?utf-8?q?dQ/aLX9uWV4pUwFO0VE3IbVHcrbAThgMBuMzsqfWPOp7mioj9YtpGPItPJgZ/sQDK?= =?utf-8?q?ysMYLAWQYeO24iKQlZC/5ohaJ79VtGndtyX+JRmXQDFOQbUGZURC+UcT9JoIcithh?= =?utf-8?q?MNi6nqRERDdgiE2whOuD1ZJUVkcalV6Kix0R3uPq9klt+kuVpnSmcqSeX4XmFCuez?= =?utf-8?q?XINlCTPhAm6nR0UFc9RdVevcNl5RFKjYCTb4Y3il33RCbPu4YpbRX1n0lJ0Kf2E96?= =?utf-8?q?gyF+ISJDTz6u3GbUGmu/tAMLxSPNKAPvRSvW4mim3GXtgDCbQqd5hwbaQgRvfwv75?= =?utf-8?q?q5SQHwVDQQv792SHmKgxNjz++Dfrf5+Y3479WTiHk9L7oXebv8fMYiy29MeODZpHT?= =?utf-8?q?b/3uovH2hxFuOLFYNowL0PfOHLIzVYuHMQy7jdpCsBJVRjDlJVLkdPuub9G525bQt?= =?utf-8?q?QBSKX9hylRc0SRA4XHRUpo850wBHriOJYgz+JYOEASzOjDl5FF1ZJTKxh1ynWgIAw?= =?utf-8?q?LoVbjq0UXxHGiROl5Yz+dkYNmIfEgdosSpTQfHXcZfIKd9xLqMYgBkn2wxv0h3dP1?= =?utf-8?q?PEdyT0vlA8gDI3/bzx1iZooEBk4Pat0JUPSzaRtw9cI7UN5eE4pWZ6gNoBvbNeTlV?= =?utf-8?q?7qxxvVAyyFd40H1tr0tzC4Q/Uj+8H6B51wze5G1w3UVmHG+VW9Y1qzPeGdGRPgmiD?= =?utf-8?q?Sp+tH8t4E467mUZh46ZQyrsu/i9Ffv+hdiYI9Zu1FW0C77GwY3i+yZzNvnd2NkiQI?= =?utf-8?q?IN2uMesZufj0cSU4nnGoTwj2NwpW8Hb6ni98N8AYeEIeiPC277ljN5z50f3kv2ZvL?= =?utf-8?q?4RDRmASR22//tXZXc/C//EhERQ3ZoELV5bffXG6GtKyipBIBeSaJLF/aHLLie9bmW?= =?utf-8?q?zJfR09mXwynw?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 312846ec-be51-4a84-60a1-08db83787831 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:24.0414 (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: hE6FkbKXjWPVcOwcgkavleHyXAvExoTkTAloAbgwmgnnch/bgbJVgXnTDB2MEZDTjQhe74wCQ/zlg7/CyV46dg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771295309368777173 X-GMAIL-MSGID: 1771295309368777173 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/sdhci-sprd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c index 7f4ee2e12735..379cb3892757 100644 --- a/drivers/mmc/host/sdhci-sprd.c +++ b/drivers/mmc/host/sdhci-sprd.c @@ -720,7 +720,7 @@ static int sdhci_sprd_probe(struct platform_device *pdev) return ret; } -static int sdhci_sprd_remove(struct platform_device *pdev) +static void sdhci_sprd_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); @@ -732,8 +732,6 @@ static int sdhci_sprd_remove(struct platform_device *pdev) clk_disable_unprepare(sprd_host->clk_2x_enable); sdhci_pltfm_free(pdev); - - return 0; } static const struct of_device_id sdhci_sprd_of_match[] = { @@ -800,7 +798,7 @@ static const struct dev_pm_ops sdhci_sprd_pm_ops = { static struct platform_driver sdhci_sprd_driver = { .probe = sdhci_sprd_probe, - .remove = sdhci_sprd_remove, + .remove_new = sdhci_sprd_remove, .driver = { .name = "sdhci_sprd_r11", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:46 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: 119641 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1678093vqm; Thu, 13 Jul 2023 01:39:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlHU+RyDX22Qg9Oxx0PJ/zE6CYKk77CwYGoHodpzfrWSWCd6HE5AsumVHqmSydVR7HPuAThP X-Received: by 2002:a05:6402:12d9:b0:51d:94d2:ffd2 with SMTP id k25-20020a05640212d900b0051d94d2ffd2mr1429837edx.2.1689237551967; Thu, 13 Jul 2023 01:39:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237551; cv=pass; d=google.com; s=arc-20160816; b=FgbXcgwz0JPKLR33hZoJiJ9onEIF9asNebm2usZGzE9zyBIcz9nxuGlBK8GGRKShb3 wO2sa2VdpQ60LRU0Wf7aiLSozbUaxX8NwlEAvHF3nKOVaUxNS/jnx+TaT6k2HDSMCV/c BJtTWFXFJAIZ7ix+0EKYrMCZRU6pc1OjBT1cDMRs4cx6M1wVDea9/FaCF3IDtArlWpj2 Bpt8P00Pqg5uEIMRwAH6j5OT8ZZmXkzW/aXwphweiUJAf9lE4SjNifOUndYSx7DXCFz8 zVl9J42wRXXyTDa4CFucYeOfM+pN9bun69gNftu5a7+taagYIMdxG3Cln+y2pV61EE5u QsGw== 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=vyhbeNXUgBwkQepDAzaYajBffSTDYfSaQABURS0z/Nc=; fh=wZYlUM3eR9DzHU7b0SBT2HXVkVx6ajD54pczVSribH0=; b=UWEbkaAYNYI5Lr+y5bRvluqz9KpzC+K0r2JBbfQWM4Xs7uK6QR24HJaXz17wMollG2 JkR0qchIaqrxwwXA+paIkOiFnBODvaMMcn5SNoNjZ2XswhvxQWfN9/jN8O0KbAyGJt6/ /8GPdhJ7iDjwLUDTaZGUS0vS0zyAayIovIGKQ29WwdqRJyYG4lDB+2m/XHljOsfYxcHb bIJ7iiZ+axdFeyJ8Y/bnBHGVevSLfaODdlGsSKgWvCNJWrZvOBkR/prNdbzlJiRAERV7 dn9s7TSQsxeDGMwWZ/8TofKfwbeDSsCzwgtYUPQPEGCC+YXGeSEOsRsRzwhSY1uTM/it dgug== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=g98B5KiH; 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 d4-20020aa7d5c4000000b0051ddf359991si6855301eds.344.2023.07.13.01.38.47; Thu, 13 Jul 2023 01:39:11 -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=g98B5KiH; 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 S234052AbjGMINN (ORCPT + 99 others); Thu, 13 Jul 2023 04:13:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234053AbjGMILd (ORCPT ); Thu, 13 Jul 2023 04:11:33 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2100.outbound.protection.outlook.com [40.107.255.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B46561989; Thu, 13 Jul 2023 01:09:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dbhbVH2hERxPHY52LWq7/Ckgxkiz4fG1WTAhAKw3Ncn8TTwCWEhZMKRAxvZDOSi0CwuYLxUW4vaI3t6+JZEBLYqVZdrxvyor5rGhIc5mpIE6s0925qjUaCz1L21BDagRhJg3XrwSvnE/+EY+olUOAlVQ6vjPTU0q/Sn+RAVz+6UW+kuQPPYSTSSV6KdzRnSyFu0MVP0p6fW6GQlz91Ma7nOydOZxkqOICVnXXxYV89RHOdEEMdjOF/HxpWhVioJjPkacJRmR3x/wvnlc6kf3WDnAIZIqaVVAACef1AkcRWi2rQfs1gFCP5nKsymKstWWENx9bGaG3ffKlqclpWmayQ== 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=vyhbeNXUgBwkQepDAzaYajBffSTDYfSaQABURS0z/Nc=; b=HgqKI0vdHsrYi493pu6Vxh32DigfaQHXnm0lXDK8tSYVunHxSo4M1+k6EBB6eRy79c9p1ZSdQCA13VBqyHgAg35BgcLgnwVT5KBcr3SFJCH7YtkQvZ76e2SEZV14P3SbiI4lPo9lY1u6zIgmR+02JPoCK/fVDfCvO8QJWHCakOvVTqnp6PEC57vw4hV49ycuIbIsH037MLYorqxqplulE8wnPKg71vd4aCZxXIAFkCK15PC+OVwjQ4wnSTzQITjxHA82UhI0XFxUKy2deh6lvbw5hl3SWHSWBPqm1SUICLQkeziioUSNFKbyo1WNcGGiLZy7RQ3kvMkuLDGCOgk8FA== 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=vyhbeNXUgBwkQepDAzaYajBffSTDYfSaQABURS0z/Nc=; b=g98B5KiHqYILHCXHjabDjza7uZGLglBseExTep3eWOlmqgw4gGW3eKXHDErUCEJ1mkPxyY6/UXtoYZPTQN3c599uhOapK3ZFMtpT6+/JGe7U/PRNdS7s4Ko1RT0xz3XB94v5zqyfmeKPKlTDi72Ords6SvFQbxMoUUWTGxdKw0TAPsl7QLLgDXZIIPLmr/q+OrlWSI6BJ17oaskdsfKcG6iovoc5/iBSwWCcT8kz6NiRKgX4lald+zQSIMvanecH2nUCaHUWyM1L9ysdnz6RRwqDY7zDKkJRezl3ZOWFIN9bEOSuFpTm/kQ2c9jvLcRYbDmdov1egv7QA8HWvWPAEw== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:26 +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:09:25 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson , Thierry Reding , Jonathan Hunter Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 37/58] mmc: sdhci-tegra: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:46 +0800 Message-Id: <20230713080807.69999-37-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: 608b097f-ff8f-4778-228c-08db83787941 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: E0wvJjjF4LRBa37fubI0Bg7mZwS+RLbcOBm8HH12kcMTUDUdJ5SwItfLvISlC8iGmk8IL9D1pf2HQECaT6JlOgKR/y2WiEZVel2r8BfQYpK2cFR55kR7ehxOSjYNzEKQTMPqxxUNaOjfk4DfsqCQOhbUhy8ZE0YZQ73aM/hCtxWhzo+/xFRk2T4GynXpxwT2FGeMtkGWdeDjs0tvHTdTpr2kcGo8PtXfA7T8AbxrLvVLTydf8+p3tziigmBptHBZo00xE+jUjQTGJhdAwdL/9DNwbkrF92EI766Vmi20yoUuDyDkhrRfvXA57OHoG8ijv4cajZDxTW7nWo/NfWlc6HMPK2z7fiiP9A3D75SfpC7/XqyUr7B+BltI4DpNZBLv1QXJNM3b8i/mKiKWSzEr9zZlyIOFCRN4wv2CsrRAfS+dRFPRlPKl9lARXOsp4qelzKTOvJ+xRw+ClqXPyxIlYnvrKn0onXaMWoGtSLs5DMJstpX+Nqq7rdRYpwevV04uJHZW3tFzPXNLtbNakYEBsg2y5Zn9sgn6CM2mpyRbNqgdvLLyOwzUT6ltdFgLBdcLVqI46DCMXJd1wNWy/73lI72rGWqdu4v+IvT3SltJ65/VgS+IMGU95SIIRkjMx7KX 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(66574015)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/C4ROe35KJlhi63lqIQK/h8X052w?= =?utf-8?q?88A6IcCAFfG9+6gmYMQL2MACaiGrqCnWYY1l8V5P0aP7QKRktQolxWTxkeFNB38sE?= =?utf-8?q?HkKu8So30muRwZuMvICdBvb0Rvn6XjqMW45mPcmX3A4GZQ5Sn6wDoJ3qMhcybsT+H?= =?utf-8?q?LaiV/v68vfGTmgocbDkPgCZKyfCt9TL4hxjVN2RuK+QYYRLYd4SzsnABk77YMOBW9?= =?utf-8?q?BoZvMhdqPt/ulLEcx4uUgF5PHsluPW5ZPh8ho2X+OUp7K1SO7AJ1oKLm1vfFEuGuW?= =?utf-8?q?5q+8WXj9wWdOw24Yq1fUevO+9puTxfqpboM16rTOgAoy8m41LHzzcfmQTqg4C5zxG?= =?utf-8?q?mAfB7chfrZLx81bDyDvHLvKEijxJfZuNUd4/kHCR/f3yLcQ7vnKxkcEVAIpqxX3cB?= =?utf-8?q?O9VFACVr7ek92IdRzWOAC4zusw658Pw5IeoMM4Dr/WJ1jDksDc278inMU6HannB3I?= =?utf-8?q?CnC/1qew5Y6LFUC8ylCBcxqEMy3cbyfrhpsfvVAEzmnJ7E5ppOBFaqe5KU4qikj3D?= =?utf-8?q?aEEE0OV4I8U1MsuFT7TtIomvKo/IyxqoPa1NNEurFEVOHukGKtgHXTVpmCJveoDuB?= =?utf-8?q?AAgW7E2es+GYzv9TaBEZdjvxiTz5vRMaOUL8w4w8+xHczqVf0UTfMw9sfcaSqCOfO?= =?utf-8?q?Sf82A9shaTIksYKRrPjUCYKzlzOnHtktZiV4Cg4IIeNbe4pJZ+J9AFJYHqL1FP/dg?= =?utf-8?q?SJEGbyeuTN5p2TmepmW29aQ9jk4dTLMaSy2uY3Y2afNuyRzLpNnOfhztcWh/grZ0X?= =?utf-8?q?DfiR0FlZ9Prb2efUXVimKxdSPDOAxzjX5HcDdBx7J7C5Wq6CvAa6TI7Bf2sFLADyb?= =?utf-8?q?ycqHGaYCWOwzw+L7+40ML6uBMh1r659zPqZ3oU+jxIteXnKiaHNV/RA/8dUbaeFBd?= =?utf-8?q?7EvenmGJWLSonJXmR+9Lnw+d8sU6kfRp0tLnwMfUjvInN2mZ8R5LYyGeqiiK8oxa4?= =?utf-8?q?QoztyP4qQmnaE8ZN89a7Wb8/5jgrHAsmqSLyO2tg75dTL60Ek7jRnui9iHRQG9Rau?= =?utf-8?q?QVnAE354PH1s8ggggVE6Ers+cti13RmHiO7F9WS0ESpfZtOqI6Lug7/JNqEDFvHlk?= =?utf-8?q?pAux2ZbMrCBCDJMmhxXP22opS4Yv5KgjKixCtmbV6zQlk8RQ05TeaRaHcWDljElCK?= =?utf-8?q?joOH8X58zg1xwMvVSjpdm19ebmyBWeEDfPlPNnKA1Oi7oFNxG+/Ttb8JAun2s163F?= =?utf-8?q?eqw9DibOaSOHLTmjllgtSx7G4nxpCcGrN9d7ZJ9Rjv9duzJ6yZWtWuos5gEJgk8eL?= =?utf-8?q?4ngLtsrkCj2GhrLdoiqVbT6VBjD++83vZEBEueIHTIbwsMQtyFOxIYxe6sKijpf/Y?= =?utf-8?q?Yi487qgTmgdMFyn6pq6HPxU05uUcYo5vY+XJN4nyoWeS2xyFWZSypRn4Lsp1V7U4o?= =?utf-8?q?LCm3Sjmtm4DaMutZG768hc4rx9mPukrsjiFGkF6dRcYIyK1FdjbRxgmNvuP8w8ujZ?= =?utf-8?q?aYg79u1TaxO7FAuCWJ2sFP5/eWTBPrcrVqrgJO3gWa0E78XjcdrdH6h8jkv4ZsiWc?= =?utf-8?q?QnnE0mngkKnr?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 608b097f-ff8f-4778-228c-08db83787941 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:25.8272 (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: IbVOEdo5JOIPyj6g67dd3yo63D/I1FjKCJ67VKlgxdGfyYprgdtjJ5XfieSE7PfJUFupZgkB2Bo91LiDmYSKbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771293955151894362 X-GMAIL-MSGID: 1771293955151894362 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/sdhci-tegra.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index bff084f178c9..6a50413afc8d 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -1818,7 +1818,7 @@ static int sdhci_tegra_probe(struct platform_device *pdev) return rc; } -static int sdhci_tegra_remove(struct platform_device *pdev) +static void sdhci_tegra_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -1834,8 +1834,6 @@ static int sdhci_tegra_remove(struct platform_device *pdev) clk_disable_unprepare(tegra_host->tmclk); sdhci_pltfm_free(pdev); - - return 0; } static int __maybe_unused sdhci_tegra_runtime_suspend(struct device *dev) @@ -1933,7 +1931,7 @@ static struct platform_driver sdhci_tegra_driver = { .pm = &sdhci_tegra_dev_pm_ops, }, .probe = sdhci_tegra_probe, - .remove = sdhci_tegra_remove, + .remove_new = sdhci_tegra_remove, }; module_platform_driver(sdhci_tegra_driver); From patchwork Thu Jul 13 08:07:47 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: 119626 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1675143vqm; Thu, 13 Jul 2023 01:32:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlHcTnQBV/56VhkPwJKMqpSfIsYOJXWkGpezM2mFBaGnQppkw54YMHEHItco9KA7yHHHypOP X-Received: by 2002:aa7:d992:0:b0:51e:126a:403a with SMTP id u18-20020aa7d992000000b0051e126a403amr1039712eds.13.1689237141930; Thu, 13 Jul 2023 01:32:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237141; cv=pass; d=google.com; s=arc-20160816; b=eImRYJ3+UsmOZp1pLncUBrCoxpApPb9CKFRS8P0PX7PwyJdhI+X/NvYOgzE1fyqzjh fQiVdJ3TT3O82HyYGwGTEPTrLVmSCsGdXqIiY3SlNVio0QPFVGQjOeb5iQ2m5CVC2uCS 6soeSFdcpR/MBXkh9DS7LXqZabvQGe3quRJCLl2QD4im1mQGftIbyff9kBtD0wLdrugk vD/DV7N+HCx1d+sUE+kk3E5ALb3cv54cTJJNBMbBW/wLMtqZYozgyPZ5NaKyro2qQJDW E3z1ZYPwgotIVt48+7emedPyYJbh3RiZ0y5o1s9Jf3AMDSp2DZ6O9gRiO7T8sD+VWyJ3 SwOg== 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=/zfGaaJRqU+i/vJRxACVy8ivU2sos+SCFqN4m+wofmM=; fh=bJZZHQZH+VGE6F+8RE90TGtTwv5nTUcl0TOIcmRPvoA=; b=ILE7A7rr3DT/JHyJFUb7SfyIrny0RLEvDaGuHl0AmuHN9Y3HTPvDI053rc5xFHJ32E L5N+KOIOMzDJwFmEQuMzpCfxJAqKZY0l5lgfnl/NQogZTlJg8kUv48jdqYgSfSsHhRDw mx1b2/E16RwZxCU2sk8r01MlFwt+321miodSrJqQzxLVfIAaRaLoO6Fkx2F/+yCJ4oPn Rr2Kghm8DcsJk6/KHNMNpqMfQCVojvQJHmOk682RfmgSElQwOqEcy+XJm45aMzXRA4i9 sIXhDqt/fLhMRUKw4UT3/WWsI/oa/11GsWJx8ZAKFVGqdvdeeP7Dcfy0Hm9oPmG0MTEJ yUCA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="plhwjkh/"; 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 r19-20020aa7d593000000b0051e28ec9d30si6810751edq.665.2023.07.13.01.31.58; Thu, 13 Jul 2023 01:32:21 -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="plhwjkh/"; 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 S234360AbjGMINw (ORCPT + 99 others); Thu, 13 Jul 2023 04:13:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234405AbjGMIM4 (ORCPT ); Thu, 13 Jul 2023 04:12:56 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2104.outbound.protection.outlook.com [40.107.255.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33CBD30E5; Thu, 13 Jul 2023 01:10:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ULLE3FEEADYGmCyPdBA+tdycBsTPP+rAQ96rP4G6zLoovxNKCENF81ml1qXTVI/PGZK/rZ9dJMGB3qth8YJRXEuguNukTmuxptAx6rzBf6U36d1w6okwGzCB95jzIFl+4aPVTdv2/GlbVaxXs1Iw6SHOFHfnIYKrg0BdOWx62d5WeDbJmRzjqwSIxBiGIqaRuGZnkRGvLdh0JKn3dmqSvZAHee4yerFhZ9YeUCxc2+txIQHCS6+UkvqkGJB6P7NCNYm3THmRE85y+u6hNqezz7RfsG8J+SDyyVWZlQgdABXReQ24IPg5E3f73LGxpMTJ0zFJjhHRgVdnUfy0EP89og== 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=/zfGaaJRqU+i/vJRxACVy8ivU2sos+SCFqN4m+wofmM=; b=IotPw/V3NgZfKjgYyvpdEywNdfCOw4DaQe6Bom1LioZkMCHb8hx1HjVpe1/mPfvcU/55Tjy1s5WLkIPi019BROAf2xOQZRdJkqe4jWIF90KkEJf/9ChG0zkR6DARoLiRZ/z8O2OZlpWliQFvMgORmYRNE4+PlcUC0EUpmKz4HxDF7FPKJhF1O91Xh7j0NeYlDkc7pFCNK6xSmgd5oQLZD5d2oBWMwIDEKo9VD6lNl6PMPDQHaQ8lSSwUIT6LuMLPZm7jWEPWh5pk11Ftg5v+BpHO7kCYLjzr0iAdsCXoWc83FmT7hrVvncaE5ue4v6smI5RXHjYp1sEPEzq10ZZVaA== 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=/zfGaaJRqU+i/vJRxACVy8ivU2sos+SCFqN4m+wofmM=; b=plhwjkh/c3TfOgS1ndieLMqK3pjerdtjlcVdou+VjUONSjcny1fE1YhQmoKZ3Fv0mePqmkwgWNuepuVGs6+rXyrf49htoDUAa5B4pak4VLQbuT0GkqLQTQVayWLTNmsxQT+hGz36MNqXKPDECAnWyb23Xxgrb8Oyo2EBFMDALaFIpIMxk+vBTzbH/AZGnuhK7ff41kp8kG0+OB8+YJ0XHcY1MwTm7iAG+bSwHlR8DT67ziU5PDF2MmZQIZqm2fj/f/5NpYJZwTKFWdbdpos/2K880o/K4CJCifPZAOIvGSfepZKCFDHGACiFqG2KsZDbJ1bnZqGrZ6FQK4JaXS6VCg== 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 SI2PR06MB4409.apcprd06.prod.outlook.com (2603:1096:4:15c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.24; Thu, 13 Jul 2023 08:09:57 +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:09:57 +0000 From: Yangtao Li To: Adrian Hunter , 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 38/58] mmc: sdhci-acpi: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:47 +0800 Message-Id: <20230713080807.69999-38-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_|SI2PR06MB4409:EE_ X-MS-Office365-Filtering-Correlation-Id: 25281a96-07a6-4f50-cfb9-08db83787a1e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +iocbeMeeI11r3SAzS/nTW0owlM7iNHD5S0s64k+PNcE86pO11oaUA/v48MTmWVuIlAfIAotH8SYc4J1rP4mljist9e+sODQBm7N172GdOU6U7AXqkwK39dzIMUi570PvF4DvgYBa7SZ3KsFZrbWA2YKZZUtLJTwMJGcVmfvmMLZPMLnfaPoXR8FmvKcqEVfQK4S0S/B49xcaOzoD50ncE9wmZrYGcGaosrU5aBCVwZclnZX+gfQPCHEjmJK92W4Gyq9OW4T2gHnGwHe2JqnIEWOYrZtYB7CRG12sr/AkWlWaD8Y0/FWkCx+pgVYIGhf5i+tSu4ywA/KHYwgCk+Au27elDgNdBYzxiAHzQ6BKn11gI0TGeTAgmI2AClJcj8ubuRE7dcgaWBUKjOp2LM1Y2uybGHNaSfBzK2vbIdz8wN/5EjsfeafrlBCPABP3jsvVhGkyK2zlr48MGULHvsguFD2sw80qCSYJUQOlu2v//iR71qgKq2T2IwxnoZkHZh3kipJMBfWKham0lr6fEi8S2CgX1v0UdStFnmWXuCwrNjZC0tLPIKnDPDlQegfH+fnZlvhEl2fZYKSw6l0xBK43/GHpchSFgZzjy6wDUALgsumobhud/5ED6hQJvF/WSC/ 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)(346002)(396003)(39860400002)(366004)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(110136005)(54906003)(83380400001)(2616005)(36756003)(86362001)(2906002)(186003)(26005)(6506007)(1076003)(6512007)(38350700002)(38100700002)(4326008)(66946007)(66476007)(41300700001)(316002)(8676002)(5660300002)(66556008)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?lxgg5SWLlC5nvHtSjp8C8ZBR4eDd?= =?utf-8?q?Vsvc5yHj9ID78EYzKSJ/S7nHzJX5p2Ge03swkRGx8Qoz0V6ZJB1dd16gJFTtsN5hT?= =?utf-8?q?2y9GQiKAOA6O8ibn0fI+I4E1IJWKmTxBceGtcW4/L5G/vKmv0e1rbZfn+mVOzd3cL?= =?utf-8?q?PqkrY+9+TxP8WsvRux10Ni2TrAsXTO3sCs//cl3SSn0ySEAlgD4Gt2lUl5Zh+xKHH?= =?utf-8?q?TatQKENywihnqCaQmT02GWkAiPopDJJ/mfDngzoWGvV1cu0jXFVSpSPhstb4L3QWS?= =?utf-8?q?9Aq6sdit3lcjzOkNQH8KjsLuDdkcsYVir1QGogcM30o4NYpkNzUdrpCEOLQuM5+fx?= =?utf-8?q?Lus+93JAsvtqlXdza1iy9F2XlMrkwTVUTnEUMSTy4000LBLpVjzAbzXTtS1ohL/vg?= =?utf-8?q?VTTV/G8y+ldxOxr+R36xopiwLs1jyr3dXkVfbf21cWMZGYCDpd7IsigRMJSdzIyT/?= =?utf-8?q?3zDu4Rk+SVQ7RmGa5R4SZx3F50MhciCj3X0jxtXBpZRpOENqs5bWM9PFBskfN0zwX?= =?utf-8?q?UM7r0+dNFB2r5q35eroiedBzK/FgUH4ys5dTl6loCplhFnDPyDc5vx6srLsc6uBLB?= =?utf-8?q?xXpIvBgUK5f5zxfMYmrf1jyyILM5B6E3m0RDevdBp/KGYn2SWVwxJwKjpPpziJq4S?= =?utf-8?q?qNds6bm63fykHFdPKRKsKTI0ZzyU780yLc3jmzJcxtEZnk9N+VDuROl1GcX1lzXJq?= =?utf-8?q?E2cqnKMuwDFm78pux3XOdBWw0eCzG5aYFyWZQTlyu3pCG7yZUX/qrsapEd83kNBVw?= =?utf-8?q?4n+7aMrpawiET8XfMctx+B2iOC0aJ9598myLBtNbrFmx+uny+yLu846VyccRvV9tP?= =?utf-8?q?F76XNGzjtByXUcVL054IS+RcwWasRdtz0iVXKmHIGr2tanCtyqDdCRAIRRBX7EAu/?= =?utf-8?q?krAeD8N9wVwQ73xmbzK/KJ4JfaVDCcLQ0hoPXx5lnyohuGAfUaIT/tgX3qu9FmQqm?= =?utf-8?q?d79f+6L6Nf/QgvCXzCqOhiKpuclevQqRZrgwQn1dmjosGB7tSU8hj+tE2wY1/jTlM?= =?utf-8?q?Oa3Ga8TjfAexp6+8TrKJs/8H2kXciW64ykhK2KDrs128moSWB1AfSWZmlIBzuVGAi?= =?utf-8?q?xAXO77QBHtHd9GqOKDptVOubcUhU3osSxb5Bo47XlTlUXh8gpMyWvk1kV2dDo8qC1?= =?utf-8?q?18vDNp9stiZ2LwL2YaNg959jzlkwOzvgd3SCj8X6KfGP59Q3zcIRI+rcyndPcD3GR?= =?utf-8?q?j7OBkwckGiHdmI/i5vBguj3Dee71G7BN+tlgo4ozKi27grk5wXdslf+cnhci3hRlW?= =?utf-8?q?Y8ldM8KdD7WkLzRV2jkWLM5wz6lTbK8hDmuxJq41/L38JBCchRqrRvvAfn2q8Ch73?= =?utf-8?q?iro/PRT4eEnL3+V8ieUQ1HaTG7I4peQRJR1SxdP0pX1j0FQ4a9SuemNujx4MYN3a5?= =?utf-8?q?84yu24m1+KY79NVXzCdzql925C5vvf6avV7VleDOMKEHptdgmcE8H//U2NSZYrFZZ?= =?utf-8?q?KNqyGnm+fCrQfX177LVp0r+3FiofN3rV6IdDDg/LrkXWvPDNuPIFV6jj6HxrIB2SJ?= =?utf-8?q?EhiXElWffceq?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 25281a96-07a6-4f50-cfb9-08db83787a1e 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:27.2595 (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: kXFS5bfr6kyxyMnuGy7IPLqBP0IpyF8TiDfycYfUHCpHLONZ+bebofkxcKmutp16R2pS11HF1kqXFYoiC0c6AQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4409 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: 1771293525007350925 X-GMAIL-MSGID: 1771293525007350925 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/sdhci-acpi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index edf2e6c14dc6..acf5fc3ad7e4 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -917,7 +917,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev) return err; } -static int sdhci_acpi_remove(struct platform_device *pdev) +static void sdhci_acpi_remove(struct platform_device *pdev) { struct sdhci_acpi_host *c = platform_get_drvdata(pdev); struct device *dev = &pdev->dev; @@ -939,8 +939,6 @@ static int sdhci_acpi_remove(struct platform_device *pdev) c->slot->free_slot(pdev); sdhci_free_host(c->host); - - return 0; } static void __maybe_unused sdhci_acpi_reset_signal_voltage_if_needed( @@ -1033,7 +1031,7 @@ static struct platform_driver sdhci_acpi_driver = { .pm = &sdhci_acpi_pm_ops, }, .probe = sdhci_acpi_probe, - .remove = sdhci_acpi_remove, + .remove_new = sdhci_acpi_remove, }; module_platform_driver(sdhci_acpi_driver); From patchwork Thu Jul 13 08:07:48 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: 119652 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1679203vqm; Thu, 13 Jul 2023 01:41:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlGx2upuyuQzwY5TFvZ5+vcY3u4Z8L2KcQCeUxvnbOtcIFjpw56hYf2efoxaIBDTYxx5mYSP X-Received: by 2002:a17:906:73cb:b0:982:2586:f85 with SMTP id n11-20020a17090673cb00b0098225860f85mr839199ejl.65.1689237718670; Thu, 13 Jul 2023 01:41:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237718; cv=pass; d=google.com; s=arc-20160816; b=Ls1DGP4CuG6GwHkGDpJ/ml0YE3bQ27ghByuhN5hDkM+XgxdrYphgsCysz26zQ7BvKP hrO1Qqt+RgK0SjiFVHFVq6/4lukuerN9cFEiEGc40X/CiS8zAdIydscHbqj7jZh5OKxi RmRqn9xdWD956W0M7dpw3OHFoGy7Xr+7NEcPLRCExnb5QvccExBZUVG3v3SiBikU7LWQ jG0iQKN+bBMxx1qaZ+9NzvPC0iisv867gGbxRyUBoFEYWfbH0fBS82XNLJUUW5RwwOzn 62LzZR+q4vw+Hkm+SbbH/zFUZthkcOCP28OXiAKEFqhHhSD+E4lZ34ixi+fbQ3/OPQjj nY6A== 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=ojpLTgBzv5+ZNx3nkgEvgE/P4GpJkxrZ7R2nyuhf08k=; fh=b9dHX9k7LQUBH7MV8y7hwirzK4SEG5gZGgG6c7DQpKM=; b=lMeH3p/qbsOknnJr1+5uQ+PUqSI2WE6ZyNNWia31RAXKt6+lX2jJIn/Km3wZ39Xxy6 8U/pTXJrJyExUhPDPrS9y4+tCm5rbQYn3abJI0x+r77Q9zURlwdsSZ5iawCZvUiHNGyJ 5On7XlS1VUakkqbJd6+fQuk2BwRDzYaXo64bC+WUMJABFdUT2HdPczp7YCcmxMWj4e59 ukI+lAlH5gCfjGeF9CV0HnQ3ABqnf+F/C6TVLzg/0b1zoLa0sU26s26LI48Az4S2hMEb Yrs6On9jWh0S1JOlbWpwOsWlLXb5KQRcZMlSr5TaNJx4ErTm2pgnERRcnFwgS3Is9+QT Q7lA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=qh3rwJGJ; 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 bn19-20020a170906c0d300b00982a267a399si6348559ejb.561.2023.07.13.01.41.34; Thu, 13 Jul 2023 01:41:58 -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=qh3rwJGJ; 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 S234268AbjGMIOd (ORCPT + 99 others); Thu, 13 Jul 2023 04:14:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233535AbjGMINc (ORCPT ); Thu, 13 Jul 2023 04:13:32 -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 6C3E42709; Thu, 13 Jul 2023 01:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cIZ9YvSl/nmfAebVWG1I90bHS5PRDjV9V+3S+vCyi5AX7B2KQTwjuQNwf/4RLJy7Nq3BkmTAGIqCFQxYecKoWTSsY6/6gdsyq5lFUW9+gxSqBSpxo3cOVVad0aJqWP8nQdO3hbqskJmW3+5Om0mYwDF0nExJzP4v96KqCrUZ9RztubkUy/uR1a2SvtjZB9e8UVg9/INy3VdJCjeL9U+GtYf+CMRU9YBc4i6SEsq7ZrohdyZaiZF4NpwZ5tK/ht59tRlv/hjyREWRX64DkLhRdCZkCNyN1+YO2+cGJWCZhtSN8VXKFm1UXIii2XTAOpyJ5eWDk+A3dDQu7LsDivfp9Q== 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=ojpLTgBzv5+ZNx3nkgEvgE/P4GpJkxrZ7R2nyuhf08k=; b=gxXOqPl6cQgFGjaU6iS/BXkClbFhywTjjhMOkWp0XQxeWHYd3OGoXRkSPW2hJE5iOd+jnuZRhf4QVxE+1ZsXPQiCLi3DC6Sps1QNybW8T+rHe6KMfc8iEfXeeLSg9kx6pqQyfb02Okn2sk+xAluzKA57JewCawFiaD/SvrHXb0HzvIpVCaJXx/vMzLgtod2HuX7coYRS50qjNKgecZZohXZdp/865V4zyktKYTAhg6Io+WWQ1AceWo6fNZFrp0tXU76BuIGAoawPBZAMoefPSvezZ1bkPhksAztEPztOo0l3Bujnz7z8cKr0Kz3lQFERGrv3FXIyx6E2/jWfovmulw== 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=ojpLTgBzv5+ZNx3nkgEvgE/P4GpJkxrZ7R2nyuhf08k=; b=qh3rwJGJdTTewpYVCZO5EWJBEjE9xlnjRsBANlBceMkI5RgEjcgArESVeAuMWAFLCVUWrjqxSHTWNljqa0Klo69x101S2YqYgI4EFBOKwLYsrXgMRH5skuH47kmz/kr9pJZnEIsE2ExVLFqqJKYaZudDLBy4S8tCxr1/Dj1dKCrqdCpmth7HyY6sfvNndeXyOVqiRPxp5J09mSve3DXkZXUuKRrVlfZzd00xo6QlohVpEA6naVge9dJD7p3RH7YWQqThxMXh89dvi968R3ev3yUJCh4sZ4vC78HZBgtmIibujFAG9qeAX6P5+lBHS7ZkjWLXxulwGyIDdVEbRKP/Xw== 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:09:58 +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:09:58 +0000 From: Yangtao Li To: Adrian Hunter , Haibo Chen , Ulf Hansson , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 39/58] mmc: sdhci-esdhc-imx: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:48 +0800 Message-Id: <20230713080807.69999-39-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: 0d9d181b-c6c1-4d1b-4d71-08db83787b71 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o2lo3VeOM0oFYnHX8j+bwqdHdrZyTCSGhx9cnq863lHCPWhsSKQVhSLJEz5Y4WCEsTjiIyRwXYW1bEDgq9PHdDSZVOz+Opcax7ta/7vTVZtrTwv4D0gFii6GhDPJfCuYogCnVh0XfQYfoz0eik3ulXyzOIjC+7txAHVS+0hXgFdtYpgCK4dJ1h8581QCrp1Cf4jfTmen+S6biGi4M9mUK+7pDStWd0uomIMHw2mDMQK2VVexMat1YfwG4RUjADNJ00pqkZAH+vWVhRrrVsRN3EF55zXk4gfNSZ8WobFmu8mDWiZWaSZ7hJHjVxs+DrU0+A/NA52q92BJXBPuye4YRzdkLu0HFx0JDKXHIEAOiiZ22l6yNFsX6g6/pgPSLWskzj1JgSWGDJELVyC1ZMSUO5HmWFeEp3RMdyl3kUzALsexBA5fZtgkHmtTfExoG2BXPHykIZmIW/jSunsJeoJ+dPSHCyxgTYLriVoXhOBv/b3XrlwAfMFi7ij9ZxlhrAt5c0D2o7OEmNrY6q53PJyo/qqAZluavXF03o6zxcU/1WqRNbCEvftIJ9IZ7GGmbpDA8HZflmJeT6FTrwclvR5bTkw7FHJ+lPN2uUp6zLKUrjb75TSYvi0Cb9j7Yz07sy9s 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)(6666004)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(4326008)(316002)(41300700001)(2616005)(186003)(2906002)(7416002)(8936002)(8676002)(38100700002)(6506007)(1076003)(36756003)(26005)(5660300002)(6512007)(86362001)(38350700002)(66574015)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?1q349hkOwz1vwAXqfcFBPHaYRlwI?= =?utf-8?q?KDGC4tpk0O37/bqtm22n9YUXV2nqks7SsDYKFE3i8PUwkvcL9tWQroIVXB+hBzcL6?= =?utf-8?q?pwdoKnNpTQbGjsNtHQL5/6Ta81EriGj5PpSSF+WzXSqKKH/J8pZAeK2EGF74VJrYX?= =?utf-8?q?2NB+FysDPcyCBoV+Es6+urT+cwqq2C6xzSgYOTYxCLdtVMCKAoDkeAveC+gnxTefx?= =?utf-8?q?2PJbzUdKT6zCkiv+K1KPuNhNXvuYfh7hk8Z5jUO5W0sjBN5sD29aH4Ry+TctfeS7S?= =?utf-8?q?iAPuMvFT0Xu79lOWq5WY+qZm2cARm4eI31OZjUufPIUQPeqjYC5rP8TeHkwrEpNmu?= =?utf-8?q?8pLnp485hjsdM8aFaCAmfu1K4wZd0aToBx89+vA7+NlhSgO2K8Jhtp8LyOflM631/?= =?utf-8?q?OY4Tm5c9tytvIbnPUM5w9qdFvjYKYBv9kYTDQllBrCfe6dRDSkbld4FzsVKVDaHb8?= =?utf-8?q?QryG4qXh75dIj86Or35f4fuBPuH+93KVQ+8O3MJkjMg0XKcoKuhwZGNE9BkfpA3ES?= =?utf-8?q?1o9Bwqe5ZTVCdVuWDwbwcJinRCMTymZih2HPo7/m6NKg3EYxiERF/gCO6/KMQKR7N?= =?utf-8?q?ndJhg5we9RmhHdPtq9RdXfCOv1wcdqa2JQ3Uv+8N4GN70rTbB4bA+Fw3qZZUsymz7?= =?utf-8?q?LtZkub5DhcBmBWGIN1EZAcwQBy3MrqnkMmru6RGpKn+Okr7ubsUNmQWenkjjNwg4d?= =?utf-8?q?pc+/MCkK7IliqJGZHVcPtCDOtscbm1CS3pMqIaVB26nl61vNuMILlxVYR9jTKz0Zh?= =?utf-8?q?+efdcZ1WIhzz65KFPo+y4+f/zx277luIkuVKDDF5Da4VnQYIqcCTe0DwC9QQsXkos?= =?utf-8?q?xHrvnxOu8FruQ1uzg0D4YUmxrtYXTW0ROg7gRqV3UkX+uFa/D3BEhqAGvpRUOFXEl?= =?utf-8?q?JjA96q2NkrG217nIKFrCWUA2m6tWPiXa9rmxZaq2jnnuOIqPYtpTyhsJC0YpASZkH?= =?utf-8?q?WIDE5E41UMDB7q1FIRa6+EbeC6vXU/dt05jTK1wISew78GlNVuWNnptMLuH72yny9?= =?utf-8?q?4ECDRfVllDGlYuCj29nCV9apBnH87n0iitKhRb47lgm32pD9buVjRZ7BqqXN5t4hi?= =?utf-8?q?TQkGApmctVqEv/le+Olvl8z+9AzR+rTooHxD1p477JySbgIt+rvQUt3XlK693okQW?= =?utf-8?q?S17tgemOt3BhP+f/zhz3RHqakP8RJSBMr6Q9k6aJVRZjrGVCGm2lLxzMz8Fu77l+s?= =?utf-8?q?NIQC/Az1wL2a7ShAtFLEUyf/Jfw79j0oEStqQ3yYHYRMchnEnL9ePpmM6uTPLX2qF?= =?utf-8?q?F2ApIfAhmnO7ZYXscO6Ri5E/UQVn4NtLpkMq1piWzRs/nsD+4UgzCwlZsZjVByoOy?= =?utf-8?q?q6rBCvnbjxkcLt7P4bpWNeBPYWvyOD0z1k/G51GYfEsOGovCsvpZgQBNeTu01mNhV?= =?utf-8?q?F0tMklZW09xDU8h6ZP2FZ2IqHY6JO8BYP0X0/kbl5u0gpjwIb1e7/tOdp6PXY+F7f?= =?utf-8?q?aMAMeLzDwRNvRlB0ByLj9Z9bqExG7cxwHbVJXZohz+RGHE9DRDOpO0aJpFDRCDiOL?= =?utf-8?q?BvAvNOEmJSCN?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0d9d181b-c6c1-4d1b-4d71-08db83787b71 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:29.4831 (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: 2TJBdXdwuXVCa3KrFUe0N/EoNfeqLU9IL0M3wyNcq4+P9xvMsdP/LDD+Te31xGjkBYIUdmW09cK8BmNNsqP1WQ== 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: 1771294130294969440 X-GMAIL-MSGID: 1771294130294969440 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/sdhci-esdhc-imx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index eebf94604a7f..e882067366da 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1802,7 +1802,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) return err; } -static int sdhci_esdhc_imx_remove(struct platform_device *pdev) +static void sdhci_esdhc_imx_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -1824,8 +1824,6 @@ static int sdhci_esdhc_imx_remove(struct platform_device *pdev) cpu_latency_qos_remove_request(&imx_data->pm_qos_req); sdhci_pltfm_free(pdev); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -1986,7 +1984,7 @@ static struct platform_driver sdhci_esdhc_imx_driver = { .pm = &sdhci_esdhc_pmops, }, .probe = sdhci_esdhc_imx_probe, - .remove = sdhci_esdhc_imx_remove, + .remove_new = sdhci_esdhc_imx_remove, }; module_platform_driver(sdhci_esdhc_imx_driver); From patchwork Thu Jul 13 08:07:49 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: 119647 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1679004vqm; Thu, 13 Jul 2023 01:41:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlExNCG1BiyfIUy0zUJtV4rldxD5rfdl2w07N2SI1wOxfvJlpiOPThDcib+0Oou7Fv8/L92p X-Received: by 2002:a17:906:9e:b0:977:cad5:1580 with SMTP id 30-20020a170906009e00b00977cad51580mr1072179ejc.40.1689237686761; Thu, 13 Jul 2023 01:41:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237686; cv=pass; d=google.com; s=arc-20160816; b=OdriTXD8LuxCCdVZdXDmgNiNrjvXllMWtmm8DC9KTb2/vUE0/iGdBzHFxSOz0CFopV KGvIwQChuhy9wipRSUPL0OqOrscsWRcTdF4gugEC5gUonpfzjjp45UGvcAvKHerfyTge vULJuqUbi9ejkh1+stlf1f6zJPEnZ5r3SMAyUZnlv37M2EIiSR469rTQOHII5jl1OqTB QPO1MzCzXpB2joiU3T7FQ6+pC++oOuMSy//TNjmcu4KhbWlBgbs+2DwytqIHwtPsdaSt rSiEV0vXgMBC3A9xrfjkbdcqVSM/kb9wXAMhUBDwDeNy6nEM1QGyzsNpr75v/OC3dgF8 tAlg== 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=bZlf3kRbzhOTHqfQQOVUzmVEhE2nBa6PIZr9CzqCeCg=; fh=WlToDQ2saYMXn/rkMs5pDwh2UkuFS8Vrnaq/kNYGuo8=; b=iL7VfG6xEIPzCNVhlL/WLDmdnxIo1bL+jL0PFd0ElVtAqpwxzQo8TNA3FPaocE/XuF pfMYfP2X7ZYUwyotnP+9DEdZ6itwN9asO6l/zxbmJtrkR29x8nWwt9AhLcVYoiUgeh4i FSmLgwVbOWZHkAO0lbtMYO9JcJ3aBxGc1UnBHAEZhOkFpSaIa6u17NneZmdpq629o+/h lYoJaoIdYUGemUJ0FDKhPLq/RXGRvIyrE4Rg358m1PPgo0ug+XleXKDFyeua6mhhS96e nNCPFWTz5ieHI71qfe6bd/07Uy9L9LTGROH9M4Sn+T97tW8V5KnuKh5p30QXnvOmz0K2 +pbw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=AE1f9sIm; 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 gf15-20020a170906e20f00b00993629dea0csi1147349ejb.134.2023.07.13.01.41.03; Thu, 13 Jul 2023 01:41: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=AE1f9sIm; 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 S234478AbjGMIOl (ORCPT + 99 others); Thu, 13 Jul 2023 04:14:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233973AbjGMINc (ORCPT ); Thu, 13 Jul 2023 04:13:32 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2123.outbound.protection.outlook.com [40.107.255.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83AE92715; Thu, 13 Jul 2023 01:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HuUM4eQjDrV8h7ZctK8ihKoXoSRQHzXWW4cwDIxFHmHVo0YhIVEWVaKT8XUDKk1pKrcbORCo7k/QMX/vlGIVG526aqFcMZDo89B4238BL8roU0t4J8c3XrYiIJi0oCFyzh+lO6h1W1dt9WxYNRlumuSoXV5GV7uEx9Fg3VuaNX8Bgaf/J3Z45ic0efYIXWzwcAUuPd4xittkHcBDIbb7b0msPjfE3/cf6n4Uqws5+qbWjc1qf2F9fs4TCHLk8XRc3llunhFJTlFa88kk/Mn/BSsK7AxiO3nOXJEwvrQuia414N+hJQ6/OwvY+pX0bk8Uf+BuoouezjboLr45z1feag== 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=bZlf3kRbzhOTHqfQQOVUzmVEhE2nBa6PIZr9CzqCeCg=; b=N3RtUgfP0koTip9Q53ZHzKLlScuMX9hhqY23eaZbuO/oemXaAJ3GEKxRNrai0HDZuybbRC6nRvEQo9PL3UrcHE6mZUaLvD344yVH5sKQd8VWOEwHRkR82p478czXuKH7RhbA/2hXk4KJex9RuoLbPmFN6iZt99XOmk60lJp8Yx4p5T66aU/d8asufgaFUOUJplIB/b9qWIjtbS8ujwa/2faQAOoDZ7C6S/0ZmF9gDRvuJBACBUmqbmoAD0I1wH97uu5mW7OqtWzV3Hud733Tbnyh3LpJhnl1FomI2kob/9ZWODm6KGvfvh/S8ofU+vHvGi5/1caJwl3z+T0JVEP18Q== 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=bZlf3kRbzhOTHqfQQOVUzmVEhE2nBa6PIZr9CzqCeCg=; b=AE1f9sIm6F2clUyjGjrV6RPFOAJbT+ycRhuWv15UsbAjuUf7i+Ozg6gVsGPJHd7Jx9sDnQ+k4Zg63tHchEIJ97HFdwPdwM1i1P/mu/yCVb81HLvGyWGz6VbqzRtx5h+wxiTAC+7Qo3Cx5zl3DR3SRhndMCMiaQ5BUkQ4GQ4joW6yogHZndaSsjJCvPRjOERRf2Rwdx3zm2P5cprmjRAxwmy78SN9a4MfAC2+qNoq5qLSTFYn0onqiCRQ0WHTIsNRNgGn27cRQZPzyPAZmQGPG/jaVRPq5Xa9cRJSxvvaCAUtUK9pbbdofYdixtiOab8dws7g32JsPRbcn2PzFITQWw== 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:09:58 +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:09:58 +0000 From: Yangtao Li To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Adrian Hunter , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-msm@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 40/58] mmc: sdhci-msm: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:49 +0800 Message-Id: <20230713080807.69999-40-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: 8144fed6-6092-405b-bc2f-08db83787c91 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u2nzhaVighvM5uQT39Xd1qmDspn9lLPmnAyA5iWkknJmXTvAR9jGzT/Fgi1s5euzAAhi4syb4dgx6NvNn2CTOp3HddMC6KPxXfdN6Dz7UppDy8o9MplmSlTQnt/7EZZvamHrcpCmNupYfdBav/kApwRHcM4xKMpJdioidIwPsOvmO7WsmVSjdBfv3iRLde6VSy3Hj/d+4eZYRyuA7tO845ArOpq3UovwRvbQHXm+02GrNY1Gkv691oY0SkQY31OJAg4xqwEU9zX+miQR2e6kP82qFuNAzBs5Gm2mqB/SJdBLxzTCJFuLZMa8JpkaF7cByBsNyFh7i+KLEbGRqcrveTTXJlYXR3+z1bAXDWU7ZQiCpBnOBH/eOWmd3IqmpIygVX88zheMoWHH8vVuz4JhumexVi/fAy3LZglYYKhilVIIXKcrChdZS5MPTo3TzI0EIXJR1KkTW62cI8nkb2ovMtDT83qGlYiZY4wVgtLXPy0doiGDraCqdXX8PhfljqGL6OZKV0N/3Cf7bvR3HQFvlDpxlhyoo55vfgU6NqXOEa26WxcSwZqOLSTqjIYnAfA0CFkHQc1B4Hj50O0wDE4ximra2e8asCdiO9sIb1OpPYYY9PqbLGixsX5p13wthw+n 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)(6666004)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(4326008)(316002)(41300700001)(2616005)(186003)(2906002)(8936002)(8676002)(38100700002)(6506007)(1076003)(36756003)(26005)(5660300002)(6512007)(86362001)(38350700002)(66574015)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?L13ciHpDhJsxgXr2KGPZ6281Iyzy?= =?utf-8?q?ujCOt/Hx3dVm7aP+98tyebxgyNp55WHKPaNfJQiDPMUly8cjJOovDWCTpozqIVNZV?= =?utf-8?q?aoEDOoVRA5lFBybc+1MfzAItgZOY8cEpkMbnhP71jOVkPgglTm+V785Pqqx0ZUZvy?= =?utf-8?q?CWp5RKWRSIaoSEpMFowB4HA9P0sJGSe6mK+F6hgq7hhxJ8yVo1KVkwwnhoht3Ls9B?= =?utf-8?q?sFfQcTzGz+jEldyWbFCIsdVKkxpMlqRZ70vRWsouG/EuLjhX7sXbfKorCdWfpbeTP?= =?utf-8?q?JbtTvjTSk5weRPp3/9PLtnJCEzCdnwXhCbmcd0m1XiOS0abFp7KG6GjKhtaFT9q3y?= =?utf-8?q?PKzcIMCOuFpSDj/ORXIX6yV4dKGlhwJ4Sef5b8Rmaks0jE1Pbm0BXqv+by/BxrYlS?= =?utf-8?q?rGVlL1kpzid6BEVU3v8FF+ZuWEXoxYS1pTqcDIXbfJAN+HH1eHPDksIQIsNPZSuA3?= =?utf-8?q?hNmLbJQY7QUVeSlWjo30JvNvgWraMyF+8UJCV+TD5yaPg7gChYjJyWexrjgguGsu6?= =?utf-8?q?pACcJjH1eJSQYfBtU7CjTfG1UbLRVClbas68bhNOFyFKzigl9y8vhIMhP1b/CmufL?= =?utf-8?q?bG2Q0zxRvMXU8Kuk9iUDLeL6/oHCngA0jG0vLfTzQ4Q6h7SO4QZc/AZH25MrFyhC9?= =?utf-8?q?ooiFM1qveYHV9Y5ProuPcsm1qT8yRck3+KDqMw1OX37R+PdT0aPjygcpB/2YUPqvz?= =?utf-8?q?LIjplzcPAS0DF3lYsgu7sVBdmhvZGa791tEI/Xxbb8DNg7WViCyd8UxJ90cKw/A5f?= =?utf-8?q?7cclVlqJG4WxHNzi4jmcQfln+1vvvLWey5+HYv6X+gNualZPvUiU/Lgjhzd8dyKXX?= =?utf-8?q?GOgzouYPHUnquFZcz1CBFPnBPHQoRSzZj+n7VQVU+2RZwI7Gm1cTtfwtJdsaEwM3k?= =?utf-8?q?MDnV01oq5QORWMDjOluKPjDkDgpg8E628Emk/hygd5vg0JPxnGEu8PnZ23fK4tslb?= =?utf-8?q?ZlGPjosppfVtLHyQ5LJA5dIv1h7xv62EkKhJAf7hTLMQbJxOIV0mJAsCJhMUyQyB7?= =?utf-8?q?W6nZ4ON/3lk2cItXqzxEHjCjYSfzEik5u/DP5nFftF772zE2csAh0unKOl82V+3jE?= =?utf-8?q?gvJoyC9LR+GFUo1JfpXYf0u0i4NZvSIpo9WChFOuscPhnCUGkAIoRvgr7iTziL+UY?= =?utf-8?q?r7W/XzOYHEuW0RDRIKPFes7FCjUBXwoGQBVNiZH9fTxoFR2wFNH472RK9B7y5vzGO?= =?utf-8?q?BC+KCqMIJgm3e+k4OBFwqeB0QnPlN8yL91TDSo3U6h6dlRidtLIxEw7AQ0HCWL8A2?= =?utf-8?q?WAraCoL9Z84oW5uRfIgcSDxfWYomKV15ZC3Igj4X7TxEGT8wv/A/gEgu8a4ldSpBW?= =?utf-8?q?j0AY6mGji+8AsPdGLWktEllYEaj1e/6EJjIax3u29XG6BF3svQ/T14IWrvlu9XNKK?= =?utf-8?q?/t86q3BuTs4UqF2uHPui1r2MT+kG1FHSv7HupXom82icvIjB1Y+5TAD7q5LCkngM8?= =?utf-8?q?1O33XOeyZHQ/UYfhGe92VNqVkX6ysVH/gOYhs8el9N9BlhYIlJMCogSX1CTL+BzPP?= =?utf-8?q?6rHuKwhguvW0?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8144fed6-6092-405b-bc2f-08db83787c91 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:31.3672 (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: tC7InX3hGypnph1gCs1mTlS4DKy2AVKS+xymuHBre6B1WKy8ZeT4bYOlSCOg2bcDu2TsPUA676GrfY/JFVsFIA== 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: 1771294096173117330 X-GMAIL-MSGID: 1771294096173117330 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: Konrad Dybcio --- drivers/mmc/host/sdhci-msm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index 1c935b5bafe1..80e376802ee0 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -2668,7 +2668,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) return ret; } -static int sdhci_msm_remove(struct platform_device *pdev) +static void sdhci_msm_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -2687,7 +2687,6 @@ static int sdhci_msm_remove(struct platform_device *pdev) if (!IS_ERR(msm_host->bus_clk)) clk_disable_unprepare(msm_host->bus_clk); sdhci_pltfm_free(pdev); - return 0; } static __maybe_unused int sdhci_msm_runtime_suspend(struct device *dev) @@ -2740,7 +2739,7 @@ static const struct dev_pm_ops sdhci_msm_pm_ops = { static struct platform_driver sdhci_msm_driver = { .probe = sdhci_msm_probe, - .remove = sdhci_msm_remove, + .remove_new = sdhci_msm_remove, .driver = { .name = "sdhci_msm", .of_match_table = sdhci_msm_dt_match, From patchwork Thu Jul 13 08:07:50 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: 119633 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1676933vqm; Thu, 13 Jul 2023 01:36:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlGFiZNkYQ46RN3GxRJwq2hkZANU1Fhlf00Jk8wJTVHYf7dqRK2qzWCfTEcdEr8gKTGY2orC X-Received: by 2002:a17:906:370d:b0:98d:63c5:d147 with SMTP id d13-20020a170906370d00b0098d63c5d147mr778296ejc.47.1689237385892; Thu, 13 Jul 2023 01:36:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237385; cv=pass; d=google.com; s=arc-20160816; b=I/sdeFbZ+A+3iXaqY6odFK/Gy2feQfZUSXsqpJpBA2l/qovQcrmmoCWQ/wWXB7b95/ REFwt/a5tFamlW2tYUI7FI9YTYnaY8N8L6oy5y+88Xxb4LtPcFDlfkh56sisQybMP+fb /sPuVfWLgxaEa8FlLbJsHGUw12nDAzIpGYbEax/zLJ9NrkHAI3RmP30TNTiHl9rFBzSX wp372kP+kzLpKKZjKF+QyVSDAG1JnF3irQdPR3cLad5NdKtHaN5NfTt7YvTjCAab4EtP Agw2k96rCvSrr4ZLtYJEIMClT+sNtlmmDiGw2POfQLtBJa6D8rlPDvjZowT2M+agvY95 dKNQ== 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=WVnebS5xmKX74dwA/QiihEaSwS42iXdHIK6TKi1CgBE=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=CTrRO/CJCJ3NUpjG/4PeK0r1WmJcrdDYpkTYEBgvVkjS26TH8GH/vgeGrRN2R/h5+x TKezp6JruOI8Bc4wL/E4ha/FFwNSFHSEoiwVxlFAedFV6REv5McxQt3o35PcfdxRn10z VBInBDH9JJJMOp7+UPyCaOr5Jpqjteo+/2Iv4Gqi5YvSQ4HQXfccALKv6tvukFZCwZx2 5AgBMyPY4zgerCv594t8LHx5qShFbPdsq+f0PGhpLJtJirLXlYs0yT/OkDkTwUaRegpC tdUUuBeilNaDMy4Fcez5LpHQ7tHFbpymgx/6M0vspuZBAE+1iDPWnSk7FCnJ1TK6vZFk lPiA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=IV+VwuYx; 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 xo26-20020a170907bb9a00b0099280a7eeeasi7563588ejc.526.2023.07.13.01.36.02; Thu, 13 Jul 2023 01:36:25 -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=IV+VwuYx; 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 S234432AbjGMIOI (ORCPT + 99 others); Thu, 13 Jul 2023 04:14:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234464AbjGMINE (ORCPT ); Thu, 13 Jul 2023 04:13:04 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2120.outbound.protection.outlook.com [40.107.255.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 747983AA9; Thu, 13 Jul 2023 01:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dt+Kve6inq04tzgQA/XGkQkzdsQ1dH+q+goQdWTytxV1FuVPQFPSsmAPT68TAZ3R+lJv8N5JJf0TLj3tvSOagR89vf1VDUTyGgyREUZN94blvhqtZqK7fpqOdytJZgfIZj/RZ3aqKI7cSnfDTF074s1YmzJyuQkQkHlW+9LrsBCSYoirsT3iIqHc0tVHLuF+HU5r71+XkTE8AeKIYayazV/7wiU+QxYuIZRCI6ndTZiGTSDOREIBw54G7/XkzISMPWIzR7yHziGLnJQy+AGW93oqEAZYSEHUiG0rGD0uHtoJ5zx22OIE2REwE3WgGzMgvlNbd4uRImUwl3jwxVQrAg== 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=WVnebS5xmKX74dwA/QiihEaSwS42iXdHIK6TKi1CgBE=; b=Y4JH42PvASEQ0qpCGMo5E2TjMwuqG25HZjyEW5fi53QoFYYShzlA5L2WfYCuLAuN1ONUqYAVxgQ0bZp42PmsjD8wTH3j58Wo6/+lbA9tfodw6qNKfv+IQOnRypk9KXBxmrWkBRnP7SYRlZE1N3HB0dKLDv64Ecb9NUSfxoIcdGyO+UN6Nld7KUL3zMPbWICNVsRtfSCsrjMu/fl2tHJ26bfq4WMH9IlKUQG+burOfZp8y3N4StizESr9QGUAyXbMr81Wn8t34Ut0kuEHOJEWfhTPKgLq/bAm1KAFf3SCSouVamYNy050GlSxTZLkz4keOcIT3D7RNTqSCHfzPTzjLg== 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=WVnebS5xmKX74dwA/QiihEaSwS42iXdHIK6TKi1CgBE=; b=IV+VwuYx3SzW3CBiKqqvZPUbHLEAa+NBCvPGCSwtGAqHkVTSWEkOa5SPWd/wadMU5LVasJK33IVKPxbkXiPiHznQqp4qNohSuut1EoZvs+euvDpBtPWWFCIZghnz92K4iIvpUQdCgYFFyrCVN6Xn7snErJ1rGWi7DkbTkMSmqzYLY/r385C+wv/dHXEZUqNDDBo2R44fONys5uiJwDhCX0+mCZYGp8sQU492IiZ4RR7lQA1+rKY14IDCE73dzw221OPspnUIhZkxBrNf0pzT228b0u+E+HFV//r76UcoeosPswQXy99GrFarV7w/fud2BywN3U+Xc9uSRd4EcRDyNA== 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:09:58 +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:09:58 +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 41/58] mmc: alcor: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:50 +0800 Message-Id: <20230713080807.69999-41-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: ddd0622f-b9dd-41b1-e04f-08db83787d84 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nE468ABzbW4tNDCd9XRswf9e0pZhG8DQiLPKtCDF/64PgTAG9pgEOpaK/SnCKEvWkd51ugSgdRiyj6JhiAYW1CKm3ABqHR6e4wAHUnWouMCaOtWTCaisPXz1v2iFih0Gk7pLgy0rEro9pVmr4FmJ48IHdVS3ecEef8l59DadHYumWUOIp43U4DADQZm8fQuovNMnE8SUKpDe4UUrcMkon2qWo+wkbBhYf7Mln8LWzXXMTUtWRlujrsgnPUMn65JMQ8o3Ow2wMl3Mv2UpA5kAUAc28X+4mJQyrUK3c9a2NLXNe/j2KNWsk66pel6J7PWNYKvuDrDJS+ryZwAHM3rTRGgy0CBDOd6xU4l+azBEk7U2FE8JDodwwhD/Q03rqj/W/xYGfxh7G6Yq1MxVAL6w6GdrS6hjv1IJli3ebqdGKZh3FzDhuxWA85rBmYngOQS/3kIFZoV1y7vZWBqsfJP2L0/fDzeEWlp8cXWeOC+OLWELPnqA+OD+DGO9ziIKcFu7VPpCUy2T8xtMq6QspsI5jc/nuPe2MCl7s8lgZbIdnBOgBrDsiLD4bpnH9mmJiq4QCcSCFvnkbtHR4bK2g5G4CgEmQk+xIWjLQRq1h+UcMB7bAvHVNZcP1eW10Q5wL4dC 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)(6666004)(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?PHm1ASjA8ZHh9HcYpZS9pyi4RRge?= =?utf-8?q?mWWuxm/GGr+WQ7Mye3X00xvNaqcHHNV3l1Sa7fzN5pm/dWCNTuVIH2UsxBdRZjfTr?= =?utf-8?q?St2r1dcMH2/BY3CPDzMbiu4jMTk3xkcJRjnidJgADaq6EB0xXMTVQQqtYOFEWNMTi?= =?utf-8?q?+3lS8KCp+NHcLtbTLONzyGavOpYRBW1wKD0Sb+Sdsme0ud8AanvLq7SxeIaZWCeXw?= =?utf-8?q?wsANKutFstk9acVBt0YNAZaoCN4P3R4Cejn42us/cJXIglvm5iOtsOn5vIrvhFF+Y?= =?utf-8?q?JTretRN4p252n28S8qBPbPFds8i9XjMiPptMMUz6Nsy3XqK8b8VKxjhqfAQm7yVPd?= =?utf-8?q?+wxJa/tnKKCKT2jnzHwCwmlmz1OIAKe/CEL4y3UFTJqpN5NdN1tcy05ylOq+/AXoj?= =?utf-8?q?RuTiZZIdMrHH2ZjllI5G3x7B25s5dC+rb44Sb72dQsV4AtCqmIc99ykxVI+Vzz76k?= =?utf-8?q?LnieFSqf70gtqUpl7nIfoyslUDcwJVMHQjaYKHlMlfaf0NCtvJyfqdqVh+cJpCWYb?= =?utf-8?q?RpKm8LQBf7mZ1jXkeEL7vcSiU2BAAmgno5eYT67S9aw9O598whKuIW4x123wICRm0?= =?utf-8?q?Z1LXOV7ero/dphysUF6zBDaV1uhJwUgUc3vfgDaZ4pFKEC+/sip5rWUdXdm2PUKfJ?= =?utf-8?q?YKF+JJxemtEik5nr+8F020HMDh7glVmUTqvIyzM0BHwZLrGF1CO0qS0NERGl05NFh?= =?utf-8?q?t8WiejqrFr111COpAC02tqQEh323ebIVWLhRk0OhSY8xPjvYTZ6FgrXEnJeNgzWNz?= =?utf-8?q?cJ07P8y2ptkGIP5B5YKJOSKYmKX2rgy8evkS6DL3lOa/bmTq1X4nuI/Egwvcr3XIp?= =?utf-8?q?xBo7Q7f1U5v2KznQQZqXy7bUQCMTSTwHXkhoGrs7rUdQxs6oRBXYGM8VF9MW7m2OX?= =?utf-8?q?g0hO813E/kJ4GKJWVodJ24Ysk74IQNTAo/emfK8Et7hR8frIqWxkTnYtNPtkM6M/5?= =?utf-8?q?b0XnzeTzyXXkuHUgaYWVYtjm8x17Y69uZZ6hagDwvToaWPaNXufXGEnkyz51jbSq9?= =?utf-8?q?D2g+qpmGLn3yiof8rLVkr6AVmkoczTxzzdDGZ42kJ4R/mFiYqlHB01GzJ4TT1cGIl?= =?utf-8?q?Y1vRuw8JQqHDDD9Gz/e1cCSQgqFbHE2AyHPugf49rDgYVJFBAfjiv7t+u3bnfCxna?= =?utf-8?q?6khSX7ZSRZy7BU2WW6oM4WX7BmrYP+9SYDlVK1z4T/2mbTNTNmrzRbEOiblk0wwR/?= =?utf-8?q?bk2l0QKa10Bx6fCwBZ654PSfjAoSxIxNpdb36tC3h3A+pWZvQ4hd11AFVCGmr8SHA?= =?utf-8?q?6+y2Qco3mK/1CVJNCzympZ6YN6f4fcSUEjuN8qYdOpf4RvKzvbIkEN8ndKxoJVU5k?= =?utf-8?q?mF5RZ9SK3Y7B7VSimZyp4WDKWRMyjNsPzbIxcKCkSuC13w3VgfK5PnR6yVo3R+RuO?= =?utf-8?q?MvZ9pqMmlKOaeOECF0uB7Jol5KuvhJ/NN5ZEt+O03GAurONuEe1nOt5DC7X3QZhsU?= =?utf-8?q?ziRa/6fNYqiuWnJYYCjKfVyAZTgym1rm7UL51GiddgqfxyFHe2vJ1xbXyDQr1Evpx?= =?utf-8?q?V3gkcvetRGKc?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ddd0622f-b9dd-41b1-e04f-08db83787d84 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:32.9586 (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: gxqc3+qrH0FV63doMXmoR+7qgDzuw5gS5N7viBEr6v4hiXVPhYvkh3sQXCLegP0n3lFsuTsnedzjV1sXe51Zxw== 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: 1771293781272568501 X-GMAIL-MSGID: 1771293781272568501 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/alcor.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/alcor.c b/drivers/mmc/host/alcor.c index d01df01d4b4d..42aa43740ba8 100644 --- a/drivers/mmc/host/alcor.c +++ b/drivers/mmc/host/alcor.c @@ -1125,7 +1125,7 @@ static int alcor_pci_sdmmc_drv_probe(struct platform_device *pdev) return ret; } -static int alcor_pci_sdmmc_drv_remove(struct platform_device *pdev) +static void alcor_pci_sdmmc_drv_remove(struct platform_device *pdev) { struct alcor_sdmmc_host *host = dev_get_drvdata(&pdev->dev); struct mmc_host *mmc = mmc_from_priv(host); @@ -1136,8 +1136,6 @@ static int alcor_pci_sdmmc_drv_remove(struct platform_device *pdev) alcor_hw_uninit(host); mmc_remove_host(mmc); mmc_free_host(mmc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -1177,7 +1175,7 @@ MODULE_DEVICE_TABLE(platform, alcor_pci_sdmmc_ids); static struct platform_driver alcor_pci_sdmmc_driver = { .probe = alcor_pci_sdmmc_drv_probe, - .remove = alcor_pci_sdmmc_drv_remove, + .remove_new = alcor_pci_sdmmc_drv_remove, .id_table = alcor_pci_sdmmc_ids, .driver = { .name = DRV_NAME_ALCOR_PCI_SDMMC, From patchwork Thu Jul 13 08:07:51 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: 119667 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1680887vqm; Thu, 13 Jul 2023 01:45:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlFC5/Oo3+58MQSGqputh5vOaObkv0zhHGytYP2//E5X8b0yARv8VdlbHyj5TWMMe/fDku1K X-Received: by 2002:aa7:d503:0:b0:51d:d5a1:a7f1 with SMTP id y3-20020aa7d503000000b0051dd5a1a7f1mr1130376edq.38.1689237957618; Thu, 13 Jul 2023 01:45:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237957; cv=pass; d=google.com; s=arc-20160816; b=XtTA+4ySnmwORWu0M/Y9ZAeP5pOmpuxM5w7AyAVuaC0ar2wIepN6D6ZupQZtg0XgSl U8U+BbfqGznM5hL9O/SzLFgYytb6RyLiwwhG/KLPfFH5BAJrL5hAo9jiTxuGqJDunLNC Be5ggZsuINAa1xb13k0IMIvZxXb5cpKT6b/r1q361uN7/wnL4CLdeyMuRNW8fVLa8S7W VsKfB7PmpxLEuPJ3q3rNP/xfQjwdSGuOOTdB9eIJ3hxTRoZ3w0pzu5RcXz797b55qY4C LMvKxhdSVrpRItG0LLbcOMgbbsHeExpm18nH2h51xvCMccd5bL/gV0cYFXiEkx6YSe6q wjJw== 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=iHKArmtjsh7/y1Aplpgib/ppYsMir3MLAx1CuQ9EKjQ=; fh=zja0ga6cdYzjxoJoO6ODJpxhr+hlxRWJt2ziNAHhkao=; b=i8kGl6JiBR/HccBlgoC+4WfO0fEHJQXLjLh4MyrC6OYMOCYarPvhz0uFc0y935uwrX Pgq52goPHIBWA1Q7+y6gAZCz6lOZNlCbDgoDvjKCFK3E+t6bj2F26/vnrUCM4rFSDBSC HMTGrnXT/VJVI8J5NAQM/r16IrC1+hZ9OloWMY6ncBbaRDuNQRHj7F/0yaKSxCCjGFRu aKfW6zNQrEtOvdMUktlkicnnzA55gysAgfS3kLN+6GzAehLsSjLM5/GhRa2k2y+pydAi U7Q+5AlwEbymViyd5Nyo7fdyakPpoq29pFHKwGMTGzTXBeUjsQ633kvsIhLpD1ym5/lH m9dg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="hoCB/9b8"; 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 d3-20020a056402000300b0051debcc0476si7652158edu.152.2023.07.13.01.45.34; Thu, 13 Jul 2023 01:45:57 -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="hoCB/9b8"; 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 S234076AbjGMIOS (ORCPT + 99 others); Thu, 13 Jul 2023 04:14:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233992AbjGMINM (ORCPT ); Thu, 13 Jul 2023 04:13:12 -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 951352697; Thu, 13 Jul 2023 01:10:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hTUbUiVDjfZdOcXaVRu/p0N6vHQA5JA2/ECziUbeEHEqErDPiPVbp+/OdwgGHorWBTjc7eNELMHUfKpoKvVEZcn6GcEoPoLI15BAbeyq0zV1+B0YvsCamUHjXFp58t3knXpBvLrC6uSvFBAif52H0BqRKyJz7d9sfwiiK9LixI2TvZygHzojX9DYLOPrVfpzTFQ9UVui4Dj9MqYVyTTj9x0WjRF3BTES3dIqI+5X9YlnWMYQNhVwa/F7U79msGqekljBzh4Swa5TjI0hlXLkiKCiiAnBw7Gj2rRWaKAxrMP3mzjAGxi8c1EKi5m+8IsbGZ2VDpy0QRw8IooyGPaUDQ== 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=iHKArmtjsh7/y1Aplpgib/ppYsMir3MLAx1CuQ9EKjQ=; b=PO7qjlb2ETwxoA6GsYJt8UH1sBFIoZNuQyQDwitOxvDnoFgrV+dttWgGs2TFUP7A6KKhwjV/LjFf44nffgTEO/PHPJouz0JBtn6NgrR5SQiI6jh8p4qpOgIznUq8PsNAnGGnjO0DqxrDPL7IzyaV9Tho/AbugJd1Ftupy/S+ULN2qqRvYrnjvzePFm1LEwyrLdw/rcc0EylqDpSItoezrVZkfLxp9BzsF78R3VVwLAnLZaH6kWvi78oQCpwxRSuEpgJj/ELScoOBfYCQNr9QXj33kMnvNHtN9VtXEYCzV3ZaipeUUF+k+gfFqFBRHTDldfeKOhF8cOBemKWDFlNmpw== 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=iHKArmtjsh7/y1Aplpgib/ppYsMir3MLAx1CuQ9EKjQ=; b=hoCB/9b83bukOsm8nihD6dKhcasQrUnfxS6UZgutGtntF3HYC79UKPXBqNSJz3IHMJ1x8C9PQeiodhJneed2A7gefRwK0/kmTcZnbs9s2UAxpqLva9JsIModSr9O87wKt6eqD1k2FCPwftYlOgDQAhKPIKAS6WRJG0cw+YmEL7V9vwiPeN6uCWzXNdCesSHqN9wBMjknT8UB7pkix/PqFcyR8i5IB9+G+bH21ZvDPqXwL90oqPIfJ0ZB4xT8m2bz5+6iOMxC5rxY3mpwgzzSkAdHTOOP/WkOwUA1NECjIHT0GrNTtdumeX4BJo1c4mIg3g/9cV23MRiH71zyUZF5bQ== 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:09:59 +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:09:59 +0000 From: Yangtao Li To: Jaehoon Chung , Ulf Hansson , Heiko Stuebner Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 42/58] mmc: dw_mmc: rockchip: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:51 +0800 Message-Id: <20230713080807.69999-42-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: 0e30de44-7a3b-4cba-ab6e-08db83787ee5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bmGr9M3IOCAVX8UgHFFMApI5ddUQePQs27B8Yk2fsvj+kleKSuG+pXFRPKHOlm43AhFlQ0lgna8BYPoto33LmeRToP6rkjEFY2SgpFLWMPxCEo9p4oFstf29UD9j8aurYBHzwmZFgKRvpGaSEHor62YAJHUtxOGcb6iB8fo3r1g+yaG5IKC9NntpuIwgXl0CMLreL6z0pbKADdq/KqI71jVYcq5z77ILiYT8RdOTn8JiEV48nrobVqer0YQ4zlzFq/Wt0YYnYozhvobYfJqEvloKi0tQ/QYs3mhX3bD6aRVEG9WwwBUXlGVxnE/oZ4K5Z3lPP8cfZrC1sevVExISSZBGTZSxasUOqwQXjeK84uuaS5tXBfdfhWIQzuo1wFraicLnd5lkkc5w7B+tN2vblzSUHMIEWP/w1mEtrw/dAl3R9e6JdfhUvwb5i4W4cOHtlyvXSgWMvOX16YLoYWlczN6wxL1+7qOeMfGqo7X5JF0RY4HxlPQxTpE/8rnkmmqy+ljPPrs373uz9VOJ1QcMgp51p1chXvqrJwHSq+k8uF1lHKBx1NmhiOtn9PlzxGKFNCqcFeiCg2+oJpEoO5t0tEJKnEgeYu4UOXunLrmP+nJJfLy73np5iMgPYCwhmdMv 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)(6666004)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(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?DikxVcGBjJgTbwsq9cma88Tb1P2r?= =?utf-8?q?kcp9Fr1X1NRH/JKK61TdyzONYQ3/aQA7BD13zKMFs+pTM1ZsnefatCGpyp3WHKMYL?= =?utf-8?q?JODrIGLtd/01cVmEwGi+6lRYN55QU0bF1i9kqoGe58/IgdQYnEU2l1pIUDsHe94z3?= =?utf-8?q?STd5CW5MKnn3ZC36mNDT2hFepUTkdNJ+rwuU+5iMPyOfVdMZe1FN0xyl8kBbRaCod?= =?utf-8?q?PnplWgHgp6q2ra6GuejIDXimoeLvslu7YovsZ1xdPHb3pRn7c80EbOMMzZGQsM60t?= =?utf-8?q?FAB8VzCe5nJd73AK5N0IP8a3//2Z9WfBH87R9tsYYTrj4CLtAp0drTDRCa5yCf/zt?= =?utf-8?q?xvrULv9LaiwnckCzxW3O/HoqjyYmSgjFgo3TmkOIF4/jS52iNOtgURwku+bpgdD0H?= =?utf-8?q?8pM4M39+8rAQJPS+gsG9OnVtuc9beqY2+XEVLhWUjTYNyNCWKoEOf0UElFwSSxyG7?= =?utf-8?q?8DxDpsAMO0qUiUzQ3tN7RtS4jeThpmm7xFy86x7WXi4RRyeqLMsbT4gkUF4PuZP8g?= =?utf-8?q?chXG3mIn1QLaD+7SzoVcKdNjmyfs3HM/JoR8fn99X8yVo2E8IT/nq/dHDhk9lM063?= =?utf-8?q?D1h33EUZ9lKqaHC/9VZSW1UqA9YTs+6gOP9g+7LFL6w8Y2SEucozytPmgU3WiUlxO?= =?utf-8?q?ElcW/8U86o++l6JQnEtIQhRdSCUQcTxP2zQqr9o0Qj0JdIV8QGjaqUTg33x4jnBhe?= =?utf-8?q?2HGZh1hIu4zefontXUGbNbp3VqK6CZf3yKXsaoE0EfF0qfHa+Cp6ncxk3MRwISVwl?= =?utf-8?q?46X7Ih+4ykiEpv0PvHwtv1JmTISOBRHGuBODAVf03gkPKNKPf33Y0xvdAU4Zerldk?= =?utf-8?q?3awp9aBWb5uwKPHl2SGBQ+fyyOeN23w2JxwujpgiLyAM8soVCS3m+DZh2PvNv8Qbc?= =?utf-8?q?Mcd582mFcnmisg5H8gLdeij4YYUQL98OQUSeLSXt9O3CIFmWUKjVrJHRS5r8luxV0?= =?utf-8?q?do3U0cLAwEC93QEARWRxRUlZ1rlprayd9phYdVNdSdJsluBZvElIJxU/m5M+PFH0v?= =?utf-8?q?Kb//rcVFWNsxpibywUs34Ex0dO8lyWGFQTMjFn3CWQBLXA2JG5bkUSPgfVaEkUs80?= =?utf-8?q?dSzchHfg4hSTNmVkzc6Bjd83gkaNjmhNYZxii0w2PkzYgYoU+RSRzj0fRRqVnmgUs?= =?utf-8?q?pLf6rpuQPAPhHjlLIso9UMeuVmv/KEaSKxiWgnMqzBbhDXtuKs8SFPtGhjjnJK1N5?= =?utf-8?q?p5POirYXH8j7C/fFjWZqbt2LarM83Zvc5pxmNli5vw/vnzvtavKqAMEs799PJ4H1c?= =?utf-8?q?9cm3JZI+52//8riH82rRqWmvjUtfeixEpXmM1AxCrCM8KzTnPoT9m4B1dVa+K8mJl?= =?utf-8?q?taRh18UU9W99FfbuKY1IAzj7nOo/mH55++mCgOUsxCqjuAoZ9BqOpX5oZ7i6fnw8S?= =?utf-8?q?9acHSnIWbFitXac5DkOiND9dht8pICTyPyKOgbgVunawXZKrRL7x3LMjQPrrL6pld?= =?utf-8?q?kS/SkT4drAOZ8x64WOoPduBJs8S3A6C+cFwDQyzdOi1UjgimV+C7UNvhC4Op+krFr?= =?utf-8?q?kEJqbUfRiqAE?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e30de44-7a3b-4cba-ab6e-08db83787ee5 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:35.2673 (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: sHsObpeO0K3sjY/clh6lllkMVflWjT1m/CsRKPqg1LK/tEdnRsbB65ABlgufvV4QO+26zs3fK9OWTOzXUPBBQA== 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: 1771294380457197817 X-GMAIL-MSGID: 1771294380457197817 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/dw_mmc-rockchip.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c index 2a99f15f527f..b07190ba4b7a 100644 --- a/drivers/mmc/host/dw_mmc-rockchip.c +++ b/drivers/mmc/host/dw_mmc-rockchip.c @@ -371,15 +371,13 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev) return 0; } -static int dw_mci_rockchip_remove(struct platform_device *pdev) +static void dw_mci_rockchip_remove(struct platform_device *pdev) { pm_runtime_get_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); dw_mci_pltfm_remove(pdev); - - return 0; } static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = { @@ -392,7 +390,7 @@ static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = { static struct platform_driver dw_mci_rockchip_pltfm_driver = { .probe = dw_mci_rockchip_probe, - .remove = dw_mci_rockchip_remove, + .remove_new = dw_mci_rockchip_remove, .driver = { .name = "dwmmc_rockchip", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:52 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: 119654 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1679404vqm; Thu, 13 Jul 2023 01:42:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlHncgC8p7dznr2QzNyBRQiPDhUg+ZpGyuURDY/wkmvumSXXKX3Gn5JIxFBuxOx7EPze1DBf X-Received: by 2002:a17:907:1257:b0:957:2e48:5657 with SMTP id wc23-20020a170907125700b009572e485657mr685196ejb.68.1689237746318; Thu, 13 Jul 2023 01:42:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237746; cv=pass; d=google.com; s=arc-20160816; b=uba6L2K/5s5gzyxd/6vNiHG86s5+/2D3GdyD4SywKDAxJXufkrxOIy2eiRtuyvX2We KQ9vPgFnV9PEsFnMZq60+5n1BHs2ZghQnvgxvtwT+ZeGr7w5nhr8yLgHFAxGylvs/UWh iL/rUxooQVxpGN2KZwPtNLvCIs2IUFSPNDrFU5E472gONJ6AWt22gTgmRi1lsu5lrM41 XJWaZAJ7IIPEtwVv6D3728l3zMHuvrymPhMC8UHCPst0IRqDQwe68Csj/Ioyc3hm85Ge UcWJHgUKh6JEYQOVnGoeHZGzd4M5C2UKhrxwF/sDUOh9VCG1mUkubBiVAJjxPA+l2+sc nwjQ== 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=nsecs0FraqEkVI69yYtZuIhcDu7CE/3dvX42vrGL9bQ=; fh=5tlb3WzwAtkLE5eDOyUXCz3z4PbNopcGbo7qPwjRx68=; b=bje9uxrxezFz5fIqzKa89YWDIcYFFxfhCQ9Q0v6F3Be2dOPLE56BXOb83ADcpHaWYb EmovKjhag3QAlY+fMq/eoH1qyGIuBtF9ynQZ23x5FT1rZDpwQUsr17yclXkc0wik81FV 1iKeFl1jQDPfxDphtgWtTFuR4klLo5EvDb5X9ER+6+moCCI+t7BKzN9aFIUsI77DfbHT wMDaPAYHnfO8cwEfPWnuE4hlb/vEK8c3eIbApH1UQ4xqxuG2JtJZ0SBC9140l+N/Q29G 18EIZ3dbya6d9tho0CXxSsz0iASYoR5/vLNwP05s/qeOlAJRI+QsPqErefGwOPV3ga0M kZUQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=mPVKroVw; 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 xo26-20020a170907bb9a00b0099280a7eeeasi7563588ejc.526.2023.07.13.01.42.02; Thu, 13 Jul 2023 01:42: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=mPVKroVw; 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 S234415AbjGMIOD (ORCPT + 99 others); Thu, 13 Jul 2023 04:14:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234450AbjGMINC (ORCPT ); Thu, 13 Jul 2023 04:13:02 -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 992113A9D; Thu, 13 Jul 2023 01:10:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CtzfVGbyEzJT81I2HFniJjx9PMzANlkFhtD83mn3DP9dAhI3KNZtlWBroe9a+xvduYbe2vBpG6pbMFhwh6skxwYH0DIafaTMMk6+ItLcl12YbGJ/H0ZZ6ZXIG3oYl4f5KYMG0kEkmriQx+cZMzbCWIwRkntB/HKig/Nhdj0xxli893mGAT8fUEKjo/ub3ysINo4DdjwwoWIuDjIqsmAdJsb350OXOEWV4Q33zfdTgX7GHb9KJP6XHgZoBBkoTTwlecPYBxH3/l7Qh7t2WFtXNWIGlTU7n7GzV4YBJxhyK01/JwmxyVYMtfR2pScTSNZcJFg7DpqrDavaBDPUjiUe9w== 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=nsecs0FraqEkVI69yYtZuIhcDu7CE/3dvX42vrGL9bQ=; b=kqKBEWVY4L7xxw1srMrjuPtwRKgrxH5tq48E0CVyO3j6VhSJjcZAm2EgAfprLfJwS7t/QnKcj9UBOI/hKJ+7YdmMO+AK+5UpPMaEInPhLpu2II7x7Y1seIbpfMyV4aEmAlpXkCfhn1HPR0a/XbUYVGmb/DW4TjnqMMD1mtLAVGS4x3G7mIFX13rztjz9o7jvvZudvjde8uWeD97VLhfcql6Bv1rLg+9etpvt3pNMSlb0323/563nCOGut5rOVuAdiR/lWJGCttXHfEUhXvAn+Vdg+Uush4PgnKTqjyOOkohA/1LviB8YCJHfwf2nzuqh0wCGqjQrDCqNNC0FjIWWLw== 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=nsecs0FraqEkVI69yYtZuIhcDu7CE/3dvX42vrGL9bQ=; b=mPVKroVwhB1GecJN0ZLGjKxhzUHAuBNP1TRGIhYdc52OTP+U3qWCirLIrq652vGpiuqyDE7xmkSmwv0edDODoBeuHWYCaIBdvyNRN/HC9MgEJ6kr8Sj1+8+gvvJSLxg+A3ZRzR9HjPS0zM/WidRr63WXROgoUwPgHkXYlyJkaMj+4G941At/DzjdQ/+Gj5pgp8yePS41X5ild0ql1hsB7jCm3ifmqKcBuc6+Vgp6eE74h/e8T0+0COODK7ctssKva/FqzorMge5ejDc0IL6fWVcEEQsKtOCQKQWmg7t2HQwe44JkapAaW8yrcY4icjbeTwqaHQa+dXCcU0NaHCFIDw== 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:09:59 +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:09:59 +0000 From: Yangtao Li To: Ulf Hansson , =?utf-8?q?Andreas_F=C3=A4rber?= , Manivannan Sadhasivam Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 43/58] mmc: owl: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:52 +0800 Message-Id: <20230713080807.69999-43-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: cee18cfd-0625-4b4f-0841-08db83787ff3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5QgRSbiIigNwH8BBVDzglXNT0nQwCtSUF2YDI7coXCW/012mD1bYwkDXSvpoVzb7M2QFFW/jdrzrIWJnLlP561NWxo+tAKhj9I5B2kQHYewmy/0CSyu+1xix30SKr6joMBIb9lW4B2tqMHvML+TNbbFdHn/J62aqPuk66WiqQ1DpeP5Tl5GSd3Wj6x4CZCmh9UW5HtWMFbv45ScQVqy+GUp1IfTFkpGflm8PSRJfREe70TzA1O5J/gdL1n9bVRuBLUiCkwQGMAec0iB41E96Sgmp8DMkspVn3tOq3+Z5+JKOLf9AymJPo7w6RexFhqNxlsBxeMNAGEVuMxsElovTLqu7mhVkfJ7ldE8XVoKPGJ0La+e0nRPr5oMJiUn8OU2hIbaM49aw5bgeZbNYBd5kMP75CbJmZU0NcSu+uvOSxxhX/U+cYj9E+c5juwRVqAkYVsbAdiDOzU5bfk22b3vLHHmkLLVVrNfYYlTT3iso9EL96rVurk/IxOJk3xvT/jwzWXfJl/ZNWCmXzbS88BBv2+AGaYC5tp288B1duziisMEcz3XKXjidRE9ttnQ9/YMfvUYvxiks7MEQQfuqjxasSTqASeqwe9BqbGJQpiCZAkYlrwzMv7SeSJHnlPNLM3DG 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)(6666004)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(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?GJeuH76lrLzIBUxfc1eTs2E76utG?= =?utf-8?q?NHiIONXRF5Xp8xo4sDECStrFrPZ0V0OYrhq1V4QEQBBXGFzepRVeG0iS6Zp5j3dep?= =?utf-8?q?Ot1K/5v7IH/Eun1FxTi64EV8ErStC5dJQ/RyTAqUsgi9W2nBY42PN6Z3zBhKilj7e?= =?utf-8?q?oqm9wKOFLzWDsb0Fe0ihT++WPmwC/MPZIn+zA/f5Fq3AOXHiHfUKbrSDbm5XYq7Sm?= =?utf-8?q?a0Uq0eNbMptnTmXj4PlvPSRLYTfmf/nAcmKRWdZT8gDuCT/yKnZpp7MYnn42TpPMI?= =?utf-8?q?iLbCYP3PRjCberU1icQQxrzg0CJrooC4Kiq5UH2P2xw1VoZWYHlpL5Os3n9HVY6N6?= =?utf-8?q?igEkfLgkoXESyrvo64gsHp+sFIu5gblagYT20DK+n//dWf7HpwaaQ6qmT/9YR0ObI?= =?utf-8?q?CLyXzrE5YGdJmMBDw3t+9ClkmuN+2TFZ3i1MZhtzclVJ8NaO13seDRY+4L1T4xxHu?= =?utf-8?q?U819oVQ1odabr1j5t4hXvAIEE+XNbba9xVrjWF9t+UNbDbMQAz+gfiHG0KYMyboGz?= =?utf-8?q?U7O3M3Bts9bZxQYKZ2idjDqiSaHGzukm/C4TveNWsUtw8pnbTrTAf/mxoIXR0NddM?= =?utf-8?q?L+xuorHgl3w/gVmUZCsyc/ie5EiWB9HBi6O+ZP3byheYgs4TPJd62ddjooEif1s0h?= =?utf-8?q?5ARJBakSz3Slw2lwguZ/ZguIab+E5OfWua45eAT/luyd4sAk5DLeqJ6+8AutixT1L?= =?utf-8?q?e8SyaJJt9R+cOp48UxS5/siZ4J7ls+Dj+KcBiokfwwtp30imUfk3tXqC2mCsCPJ+S?= =?utf-8?q?o4dnsOYToJ0jdVFJpA7ztYQSDkMUztHNtqUtrA23XZ2sS5vXwmcGN6ZWk7Y/dOWDo?= =?utf-8?q?DaFIl4mZbcQO6UjfAB72V5VpHPqrlGpNOIvNpRs9zPN64Nqn5u3E1HRpgq+ed1uq2?= =?utf-8?q?OwjJq9znCeIbaQDeBXrmglERnL9C9PTN+WXJBao6AqAaX3RPZLH2EZdsKswKKeoEk?= =?utf-8?q?F1U8M0pRfSCdryneJiZzd25QBno+EwmSVQkE4jJC/C2vXasUmwXDsj47txzm0fZj8?= =?utf-8?q?saGOPKdhsj+zZmAOeFGO7gcMC0bcU3dUSqOOM1UNxjABMgIc+CVRJhQL73Egdh8L0?= =?utf-8?q?91omrBychVUdmI+g6TM87YYjh/zwbWyAmQxyWDLJRS992/G7iC42t3t2dOXCh2eIh?= =?utf-8?q?ZNIIVRLnYAjRjI3MWhF5bCQJfYyWl5NgauEizwauBXD/ftUtQ5XybkI9DygqKUBgU?= =?utf-8?q?2TGoaYnK2VfvN+RhlAMOVxkxReMIuFQSRIJGmREW2KM22NaQ3ktl+EIymVnm+Sne+?= =?utf-8?q?uknfYKv8ssFEBziAmzicIKIxeh0gjbzdxehl94Ui9gZUc01eexb/vqP5YsSvUX2Y4?= =?utf-8?q?UBMPmseUW3smYY99QENS/6XiJlKVgD0j6RfwSCZWLWQoaPdtMycN62YMapiFt5NpD?= =?utf-8?q?qxGH4nMg/9ct4ApoPsrnWIdxoY+qBAp+P6Ujj8uNCeAFvE3887DTCG9Bij9gjGPts?= =?utf-8?q?IjlxSuKJZe79Q79dmQhfVtVDPSnpZUP/pfIQk80tCcFomete+9MCuPbgBxvGqfw2V?= =?utf-8?q?q8ihUsneOTW3?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: cee18cfd-0625-4b4f-0841-08db83787ff3 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:37.0317 (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: aOp9e10R59yNVPffQMCIXXkUwk9egrAmP1Ztunup0B/17EZINOo7RtZtL6N4WeJz8UADoZcktO2RJLmxtl8fIQ== 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: 1771294159320015268 X-GMAIL-MSGID: 1771294159320015268 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/owl-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c index 1bf22b08b373..a13bec42554a 100644 --- a/drivers/mmc/host/owl-mmc.c +++ b/drivers/mmc/host/owl-mmc.c @@ -667,7 +667,7 @@ static int owl_mmc_probe(struct platform_device *pdev) return ret; } -static int owl_mmc_remove(struct platform_device *pdev) +static void owl_mmc_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct owl_mmc_host *owl_host = mmc_priv(mmc); @@ -676,8 +676,6 @@ static int owl_mmc_remove(struct platform_device *pdev) disable_irq(owl_host->irq); dma_release_channel(owl_host->dma); mmc_free_host(mmc); - - return 0; } static const struct of_device_id owl_mmc_of_match[] = { @@ -693,7 +691,7 @@ static struct platform_driver owl_mmc_driver = { .of_match_table = owl_mmc_of_match, }, .probe = owl_mmc_probe, - .remove = owl_mmc_remove, + .remove_new = owl_mmc_remove, }; module_platform_driver(owl_mmc_driver); From patchwork Thu Jul 13 08:07:53 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: 119659 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1680151vqm; Thu, 13 Jul 2023 01:44:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlEdbxUH5GzlKrEgv/DpfLn8CfT1OJxk780vXa/28U68KN/chDrJ/yPI0gsKieud+Jim68B5 X-Received: by 2002:a2e:3315:0:b0:2b6:fa8d:ff91 with SMTP id d21-20020a2e3315000000b002b6fa8dff91mr902633ljc.3.1689237858825; Thu, 13 Jul 2023 01:44:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237858; cv=pass; d=google.com; s=arc-20160816; b=iy1ovOULa7XnaOYjQ9PKIwIMtJUzErESxoxmEMzQ/kLb19tCnbbJQtYwUuazM9qUXq wq7dcVpEERAkGWBcWh0VFGkwPDpXqxbi3wvmsIXk0YzJ1lItwu8EmtddY5xWKI5jhVT7 OBGp5Wdn/v2fx4OY4iMiM5/9LqDXs8/qTsV9A92XWAyQZI21vqFbbeHTrPRGjyYUiYeo 7hd0Lqqkzi59b6pMeDKaw8zCGnuv3o28xelM8OLr6seuvxZgkODCZ3o5AJ/XHePie/zR 2dlT4+s7dzp1+ZYRaIvxw8I/IuDDXtoDpG0FkM3AGd501MZGZB8mnyJzMl9Gk4zTBHR4 rM2Q== 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=Sc43eVj8D+jXjv+UOKZmNNsyrS57jCHl9PeQXr9Ahyc=; fh=6cdLzAmRtuylSKIxaYw9sY9DAq4BCLf68zkyCZCuc9k=; b=Af5OPIvMesPGUJFSfPn3pvwuhB/Nvm1spXKXP666BZKRrpQXsEg5hgs6iJqBsM/d1i fGBqEann7H6ENMnmpzXCBy8nJqmCACgXtXj8Gja8u0K9SNcJRYB/0S5/3flHSkEeODsz m4lAWM1mUVeYCuf/5uyK6KI7r45Z45HtX8XrakRKP2tXu93dHsM8cwKk5aLIzmj00E3S nDlj1QM6Xn/UEVbZmSu+bFHA+O5Y1uybrfUPwzePIBLhGEmSZ2G4Z7RHuaJfQJSBAl47 1cFZ9stBvvk1wv7PBtoPkI9m+avmUI3fEQtgUPwpdNo3g85V8QrL8Ly4p7mYnhPsnHTM JyQg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=XJoJsLiX; 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 gs15-20020a170906f18f00b00993150e5326si5973872ejb.626.2023.07.13.01.43.55; Thu, 13 Jul 2023 01:44: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=XJoJsLiX; 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 S234242AbjGMIOW (ORCPT + 99 others); Thu, 13 Jul 2023 04:14:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234036AbjGMINN (ORCPT ); Thu, 13 Jul 2023 04:13:13 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2120.outbound.protection.outlook.com [40.107.255.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AC8A2702; Thu, 13 Jul 2023 01:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k5PS2ZmIeLBXOJBQOTXXng1+4gF4jZk5I+1NDXvLSa/mgVZUwrYj4leGy454IaV+prwnbh6vk/PtDRstX8HrCVLlmkGYk/k2TchI9y06aVszshX+o/GE/WBP5zgZ4Gr34yaFZUhDdcs5mxvUxn5GD/d58g0HT1xNxtqKUDRcUzkRaaPOsJ/Wq2WNB8YrrSRUFfWlYNCl9DiY0aEekd77R9vA2oXDv74qFD4E0IxXCspW/dZfx+zkCkJjKS3DBDNdZK2rp86M6JkiCFpOtcyhm9u53Jhzz3Frn6i8Sp6Se0xkLBgfbyK7C8h2ZxWmUN2sQJtyDrDbOQzX2GJBMuN+0w== 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=Sc43eVj8D+jXjv+UOKZmNNsyrS57jCHl9PeQXr9Ahyc=; b=MLLRSdBed894kxnL3NR7ALsUd7N9uaBogtJpMiwyq+htWv0rrx2oNHi1QDfV7exL0WCUX7CLK0+EDsCMb00OEhsYA+Wjf6flUahG0RuOCLsPkuJ5Duc8UypT9GZ2dxtLUM0Htyvhb5AJD6/GRabMWmkT/4INJxEmUmsUm2/2jTUo2uW9DeSUV90d3l2n0foQyOrkJLuVSZk55lVXBm/My581LL0S9LZZRnHO3urakjzxgwM5cqc9SCrcVyKhUY4zejavR8C9LCJIzcU0s1QQcXNNZzXD19h8R7d7Aw6co3xz4ClYR5M/Y8VuCJDMG2zorDGnh+o8ZM0TF7AfbhadKg== 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=Sc43eVj8D+jXjv+UOKZmNNsyrS57jCHl9PeQXr9Ahyc=; b=XJoJsLiXXXBI/SsaoJnEKyBUFjpEqQjmjRxo5Hge2OfRcjn/9NE52AJlPHczokWJELbCySeBtWB6VkH5MMJ+SrrYJQaZum/KixVciSYneC1e0+9vN+b1RnJzq0XlFUp7OtF/nfxfMFjZQA4kxmrLFvyduCGB55aEvxc+rKp9z6NgHYSaey8MtUccEOdEfyG4ezMA/SGjOop+ObtUK+bBHFcwl90c55m1No7VGcq29tdw23qJ+k07Z+77DSk0q5uNEnfRof9I2NZrbcu60fc00R92BZdnZrq9B6FTEEdDeMn6GQ5jpTG1MQPtcRdBvYxitLyY6hyrwBBbYg6J9fcbXw== 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:09:59 +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:09:59 +0000 From: Yangtao Li To: Pierre Ossman , 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 44/58] mmc: wbsd: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:53 +0800 Message-Id: <20230713080807.69999-44-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: 8cbded1d-7064-4d90-b854-08db837880d0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +GWbHP8OICCMWvBViByBOK3ixyMMdcIqDPsLdscp18R2ciEIpkCRkU2ajLSeqbtOEp6ludZGbPXkjSkD0Fcrde3C0WwtnlmvphXGbooPmSlMFzA5Q3qrMTeLlpTg/2dUWcJCHVrwWBXB6aFfVWMHxsFAa8f4x3Wx3dDSad34JYYr+IpEUGFiumwobDz0xpc+6/MuW2eelWIyqSd9bpbg5ylN3zMHc1Rtp7lQkz6+LTmYyYx8p8A6j57PlTlRrAG9w4xYbyqNPaYNqoHwOomVF0TRzbivRnh8v9u7d0ROZSUEeC5dgJCQ89qMXZ+EaUVSI82LjwtuWQpf6rkYOvx5tbdOV9X+MnHZza42XvDepyIZrOjuKWzvEjmDUOYgh4FGwQsGcCyyT3DlJdK73XFhz4BuqDCFc9waIxw7+IfXQwvp7lN7gYCmS7T3HoS76HftfL58ACS9jOOX+xCuxBfnwpP1KT+82Ys9G27RxIE0bvZkfbLoEWGr725i/8imkOmgOSXPUxDpEjQN5CGgVrzasB10Czm2HzL3DZFUpHqUdCK8P/yc0CSifLsLd4+TMJsTVb8bFWjwCw1/t0AAvftfnghHeadIVd7Xei7rw2wqr/aoukokSgWjUZ9uUysG2acn 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)(6666004)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(4326008)(316002)(41300700001)(2616005)(186003)(2906002)(8936002)(8676002)(38100700002)(6506007)(1076003)(36756003)(26005)(5660300002)(6512007)(86362001)(38350700002)(66574015)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?cBOq+ByCg0/bc/LR2elN68xJrs4M?= =?utf-8?q?rPgZPmHIXE+cG5IbkSl6EAEwcSNIBX04oigUm3sS4Sqgp69duCkCmCx+AkDywg5Aj?= =?utf-8?q?SLmGFjw4L4TcdyTQQYjmnlWpfLXPCuU/8ofrmAT1RkpMhesD9zhWb1ZAfd4pG+R1x?= =?utf-8?q?PXdhE0iA0+LuKH78RT2BR+bKQpjaDWtOAXvJdXG5xhOlhhboe3umu4DUNmCw4d1qt?= =?utf-8?q?l08NEFL2v3Ew5p0K1OmoPFBiKNfOYDQH9cFUY2W5w5W7IoG8YuAIpxCO2dMfhJnb+?= =?utf-8?q?N0vr+eaT+USGi13C26u3r6GIitxySRhk/PqlOQSAYfUnJx3ZIBCVaKHG7NciQiS96?= =?utf-8?q?bVDLBkNOVHeAsALfEOrbNHpCNGVL6Z+PfA/mqNeJqya+2T0dKNusswCL39J1knF+y?= =?utf-8?q?P2Y6fmmZ6UEl1LUYTPbEkmmnJ3yZhtZS7kk3JzSn0ywPxCdWC2p5Acf1F4n9QdxRs?= =?utf-8?q?0e9g8QYPmNhPwRpxPEIjHVHR089F7W+8tYN43XkN104b1x29j71GTh+AIwW4KpT5m?= =?utf-8?q?Ja2ejO5s3uf8TEvOKVhcNujBtU0LsxlMU6lk1MbOujN/TKziyfkhM6ItBRiWor3pb?= =?utf-8?q?UU3GRrEcO07uah6yWYnqOcQ1Vo6+t0VMl2g5T6n1wul6YLhoGs+VVLFSordH89wT2?= =?utf-8?q?a2bV2+s12pzDojnKmTiU1e4b0wnYSeqEp8VfRGuSJbug9Wge/hOVcgU6xVzTeFaTo?= =?utf-8?q?+1DuSMg12G2XZL4e4dbT+YA54x5DVL59iORq46yrF/byl4MELysceXJdt01e+Rpep?= =?utf-8?q?qKzNmRox55lU8VNiKLDjra9RUvq0Gy2fkQvv/I5W6D1beZr0JqKXf6cssinO/ovq6?= =?utf-8?q?l22lkbvCnNAn4vmJKsU1q6sdqEDF0njTzSl7kmPvcXjDTt0c9UBXoxKWOtKANEjmI?= =?utf-8?q?SEhou5HcGIsgCsdssCmq/eWYcAb6pJHROXz3WXTq1xKAovu9uuLMHyTlmafPVCDaO?= =?utf-8?q?pVaFK9CzIS3wzZuUaU83nAJ58lH8fLnk914J8ISjFyE/CwaJCr75zUpJeJDANuHNa?= =?utf-8?q?kR6mdgWjRVeNkQpKdEaJKrZ4JFLQnctDdL3TTLlj5xc79YCUwwVYU3co2muUJgIqq?= =?utf-8?q?dmB2KklxCatAjlzV9pYdF9vGuN0DgJxMxG0ATRIyWsc8OXgnFDWcwtt/AfweVIsOl?= =?utf-8?q?0KFOgmr0giRcgjpnr0ysjvKvw04SFquGdEvsK/pdfjsWVrzrmWLvN+AJ0TIAg/ZDS?= =?utf-8?q?v1R6I44ZC/M42I/kpE3iKWoAuypC7crsiBUbWdFZ3TXIrCtQ2U9hipyChi9A0viKH?= =?utf-8?q?luKPQ/aUDYhVhbfJdvWSdGPIjVYbo1900wS95dNgCsB+QTWZwwrZ4lVtB3c0msn4L?= =?utf-8?q?qhP+zm4+TY8ihK2Au8cmzn+HIvtRAsVEKPZ2lbajv86kFW7AXDJV7WZTKYn873Brr?= =?utf-8?q?7gYInv08eJ23l0he/INSA+GU7JuLAqr/tWzTg+yQg4bWlFEu1o4YCDtMAGgI8cBLm?= =?utf-8?q?TXZcAZRps8nrdylA54nzaPeVzB8+wZmtYi+QXfMcki61bVkLJUmWbY4vNhUcJRAtS?= =?utf-8?q?ujB0D4SW1mv7?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8cbded1d-7064-4d90-b854-08db837880d0 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:38.4901 (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: zfOi5MirEmZMeICPxfJA2CXwNyh98CiHD0kIFTBMSilyz6wn1C1lvSMYhjxxPUl4S9ziEj6Du6Dh1tstjkB2XA== 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: 1771294276931715187 X-GMAIL-MSGID: 1771294276931715187 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/wbsd.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c index 521af9251f33..f361cefcee01 100644 --- a/drivers/mmc/host/wbsd.c +++ b/drivers/mmc/host/wbsd.c @@ -1758,11 +1758,9 @@ static int wbsd_probe(struct platform_device *dev) return wbsd_init(&dev->dev, param_io, param_irq, param_dma, 0); } -static int wbsd_remove(struct platform_device *dev) +static void wbsd_remove(struct platform_device *dev) { wbsd_shutdown(&dev->dev, 0); - - return 0; } /* @@ -1904,8 +1902,7 @@ static struct platform_device *wbsd_device; static struct platform_driver wbsd_driver = { .probe = wbsd_probe, - .remove = wbsd_remove, - + .remove_new = wbsd_remove, .suspend = wbsd_platform_suspend, .resume = wbsd_platform_resume, .driver = { From patchwork Thu Jul 13 08:07:54 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: 119664 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1680604vqm; Thu, 13 Jul 2023 01:45:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlFrvufbU5ImsmJVeOHX3CbMUNDXb6zlyGbpXs0jMkFJ7mT2oNINO3z4ZxAH5r87ePLcqExW X-Received: by 2002:a05:620a:484:b0:765:d53e:3352 with SMTP id 4-20020a05620a048400b00765d53e3352mr1107798qkr.30.1689237917278; Thu, 13 Jul 2023 01:45:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237917; cv=pass; d=google.com; s=arc-20160816; b=UvZ/DeiJfN1bPBHJkUUfJT/7rNz0nHHkh5s3WXN3N5QNGKYAaYz2I9cS2/H85T192E f7AB4i28Q3flzuUlPwo5kDu7ib39iUf1tBg1iaIjgvn482AoOD/AXc1XqWjM4RXcsPnb K/8dCJubqy+rmrLYzjpV+PV17gB1Fj9TQ+n+r/ibz0vHuBiWPDabUQX0GMRSrmBde99N 2vuH9kk1o7G4WGctvn+1VjVuCMmtD6d3TSmzKArnO5MzCv7NyQeAceX4f0Yv+m1ILafY yZzEX6S8HwRJTtIXqWHdOqr20Vp045WtgjdwvjAozTld+/IxORmj6lckYMAyqVt5fkq6 dSbg== 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=1xBenoS6cHFlJZ4Fb3iZ6ctod7pdPtWLiCXA+h9S9tE=; fh=S1ctsIWWA+NJBIV7CTL5lMZDVPIetpuI0q+HVSpGaEg=; b=r2+BF8VJk3p6nQ/PGIf9gN45VgqUFemlEMHhpPdvYwfN3ZFlCEz9cMYLNyBT2K9RrH 86EBXoalsOPSy8lzA5z78CmKw5qP0HHLVoA34z1IYRZAvlBs2zt4tjqnvzo5gtipwtbF tfHhX/k71wD2Wo00x0AQTqRZHX9DvPK4VYSC6c2hP7tY2lkUlAn4mbyKIe6ZUT39PhH8 GSu18MO2peKd8q7xhoUjEmNeXOXf2aXky5KjV51aHWnzuAw4xCB/Olw3Ivu4VDW1UzhT SIrHWH61n13N0GDtISkPc4RlnXpfd4yqw+IPkx4yDSULO9MZhTK9PxgYDuUbOvvuXfoB MVnA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=NYNnr1ie; 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 h6-20020a631206000000b0054392750edfsi4554631pgl.744.2023.07.13.01.45.04; Thu, 13 Jul 2023 01:45:17 -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=NYNnr1ie; 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 S232359AbjGMIO1 (ORCPT + 99 others); Thu, 13 Jul 2023 04:14:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234063AbjGMINN (ORCPT ); Thu, 13 Jul 2023 04:13:13 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2123.outbound.protection.outlook.com [40.107.255.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79A022712; Thu, 13 Jul 2023 01:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UmX0U0CvQUm+jGcUiAEPuI/nPvtRtygC7Iek4ki8pQPDlh94vorOKBtL3Dhhx0C5ruGMK+TgU40g+Ecx+Dl3LPrLMlSt11MxhcPZyqmK3JRX1pltm/AIQcFKPWM68qwzTWcQm4b1W9uYB4FPkV477oVnNduI9nhSBT3criKplic8/ntB1cklwvi+CXHuFYP0zcDqjWciMyvgZsp0msZT9RQPXluZT6/FnOOPfr6jOoaw0rWIexP0zSE4EqllgiplPsoIO5SBjOhmId21wI0TiJ/bIVfRrJ01GrLrNHeslKMPLaVZyTHoJo931MdGC0HnN9K13d1CW4KJgqakTs4PtA== 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=1xBenoS6cHFlJZ4Fb3iZ6ctod7pdPtWLiCXA+h9S9tE=; b=C44O2vWuKgsOjhvJSQrglhUZOuqseDWCM2j2PC4fnaudW7AIA9mn734Wecv7umxYeWN/VXfBL1X9/OYwWPsvb6g8pnACLB1+ePfNgXGeNVJaJiu94pNiW5lHyGGA6M6+CjrFR61Gjg8kFqO25wykB68qCs2wpVngh7s4bKV03Wp3OlgvsHELPn6hHrhAO6qEI2hnfRs1oV5UK6w9QM+nCVKMEV+wEA3TJrwYY1Z5B3BPBz08JV5Z0us0v1VQaefLdPQ3ac5hIpxTRGsKCqj6ceQgQaP9YQbdGydTMeIssXPx6BRw2IlhwPHEyKGL+uPqA7Tr+/xZRUKWCMmFg7PIFg== 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=1xBenoS6cHFlJZ4Fb3iZ6ctod7pdPtWLiCXA+h9S9tE=; b=NYNnr1ieV/CWRL9t9l3VunDRihKgKZQB3oYr87SMfqQAwMGKjJlaQRVAZ7SYGcymCcEcrR7Mf1zHANOnLZJm7oE2QBMO1vkxWQRzJdnuTLx7fau9cV19i6zbVixDbb+7mQET0T9c3IR4JPAW5xtrB6+F4tYpzP1Zrhq+La6dMwFs6suEU5aAo1Bk+IaUMdqsJLCGXebzNN4NC24YGJnsDYGgDKT95ePrAOA/Wi7QgLRazaLBa1uqhBtJHupoGmStQZzDOtfTvpc+RIIlWlO01lEOLb7/3MzaEMdSb63eZ8MtMCOPff/uGzFWIegQAdhkC95CXOEjIOsmg7sTnjGNdA== 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:00 +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:00 +0000 From: Yangtao Li To: Jesper Nilsson , Lars Persson , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-kernel@axis.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 45/58] mmc: usdhi60rol0: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:54 +0800 Message-Id: <20230713080807.69999-45-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: dde8bf72-e21b-42cc-eb7b-08db837881f5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: c/4XVGt/kAI8A9rwIzZk01Dg3qv+q9k/a4s30fX7uJ/NDqsMNu65jpGwwzswoJkv2mRWYDME8RqcgdZJXbWT5TSU4bug3hb1BPeMZURS/RggTsH8uuDpmb2vxpt0kE8S5a2FpBcnFIdgE3YHhxphdrHDLS67bP1QsXFbqgqwpNnYacPIZGZKGMtciQ4/zmBHlc8SBF9UddYqVo0M5BclEEIK/WMxqrK4u8LSGYdhgpev2C+yzXjFIqzxoypuNgQTVhas2dYDi8A/b+y7Nejfw+WZ/Gy1u+rcT2iarxsK6ZxZKnqjzHdZDpfDN+Aj8e9ooRkZfsQSQyn7ioSUAlG74LmLwclRpD/nZZWg2T1WG2YRrwij2uELdLZTa5hBB8A4oiVcV+EXEgasw/htU2YY6VwV++QbjKYiRP59sd/H1N2lVgVohy/bBIm1hSbDGmfGdZ5s2Leg6zdkBxVB17S8g/+nXnuWvKoKEDxpboLddYGyYwpkFdoB3Hc94+Gac3GnyLT1KD1VbeLb3gCukzC0eGHhcoDgKPUSbUlFnxD+WYqrwfoR9NFKk8zvwnQxBECyeLjmwOhqlV0KzNWyo+cDbJ/jKN8/13+4b1hiDbdGai2tXLApOOZ2oNAt/Kba5Wfb 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)(6666004)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(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?DBOhyMDC15gWg1Pm4zvW1P3EOh/S?= =?utf-8?q?6rdDGxNR7jueVm/Vmdf9snmssOtcyyfJbEG4tZE489Rw+YaCdgKIIViCgQtqwuTbq?= =?utf-8?q?WuLYA6+NfNKciOAY3pkfE6DBqp/9QpZkN2/8q18AyK6wAodM8ietdXZBhFmdTp7pJ?= =?utf-8?q?cz9EbMNyGKf+mIcWJz36CnITzrRrR3SH4ETt943n9Vw8UyhsllPxrf8bM2BXbK4WF?= =?utf-8?q?0a5MALN6o/Gks21LILz2FfPtVhIGf0Y68y+vFLUw/eKuUhImuh8r6BcdqWZDmM41K?= =?utf-8?q?l6egmLwT2rY9i2TpTBPMckLuq9DEOl+a3q7o+7HUHUCtJCBBpoyKWYrkpMfQbjVmf?= =?utf-8?q?ruE99m6TpLz/QrOxYsIs7pM3gj1DDvCRjh1Sajuj977PICLBgnqOLTe38fEv9BuIz?= =?utf-8?q?EmHZK9QQATy94HrtMVa9yk5qu87DDpDtM/6uSQURu+YhK+N2pgFDUQ5Tu581ICQVo?= =?utf-8?q?aT6rnUdUCaAd0RJFAKD/TaZNuEv3xvxV80hHwyda4ViffufJLHXJjhx49NcpJFG5T?= =?utf-8?q?Jus4IxIYjbWr6be5lFirxza+R5cUPJ8hdjzmDO5o9C/QjVtHNrpTbeEAZLrIS891D?= =?utf-8?q?vBWEkJblJXCiLaVS/VXHMJHPbRe/YZlyNrbYJXQ0XlrXl8Il1Ccy6YYK46LMoWdPc?= =?utf-8?q?Q1lIcUpeQo3S/DexD0wSDIE2A3D3U/zEAFhz3Ih/9t9jKU3Y43s5tTiLEYmwXJlSs?= =?utf-8?q?inWe2VnuM+rqLN8WZ3dCi2UoshSyhAzDErAgpm1MSab4fknSstoH+1JvZadezK/wh?= =?utf-8?q?tGWbJ3dpokZUvkEdTJ9zJKXubbKqQMlblt0E7wc1S1TQS+2wJ1dUQ97rJ8DtNkiQf?= =?utf-8?q?7/WpjsweoB6KwiphgBpsevrmnFTm4cjOEYgnwmfhpYVNCHhFH0k3iFURuwyQfc7Fo?= =?utf-8?q?sf/l8G+9mXt4Fpki5ZqKKLeRCJpK9t52HTpqgEpmuYrI0EoDpS9vhRW/GNwBQRmOM?= =?utf-8?q?69LRXM3SvTfcYXP1vZz+PDwEStMe1JAFUEgNOKE7Do4KuhZUCr3N7IgYB8j/faPVJ?= =?utf-8?q?3GvifpJUYt+yNoTBDOY9mFt1JNdCXbXeEzUX4VRZXqwed3NeRvG2zxK22jZ9EaQ2B?= =?utf-8?q?ckv9zVM6p/7oJrOfNOxcK89ENc1eEHp7ZurZ9N/9ma2Bq6ImRvtrfGHIZdLzMb73z?= =?utf-8?q?Gcv+HvxPhWb8Brwgwj+WQWVViE2HbTNQwkfu79Fs8PxrPpSJADfUMa5cGgS22KDk8?= =?utf-8?q?DqoJ/46UD9uxZhikOrDcDsNKyoAvzP281oYEXT3kg4IFchbImhNQwWMmxrvsgx4/S?= =?utf-8?q?SiaXdpFtHT/xvBlwZs/S38O/M+t1nPUkPBIC5c0JVkjYF1PL9mGN8gd2x6mvVAJVT?= =?utf-8?q?ZEnAWqQ/TGeheJR4vZVkWn5dI4xUIF6I/E9tyyx5np/yUjfV8GPjSJngaIyMKYWBy?= =?utf-8?q?h8Rs1sfqLlA3YpuTPeTYJ95h18QpIrcOoobJ24YQOTXKMpHye0zZJH8fAdwYiXUG0?= =?utf-8?q?dsL+fDD8e4TD64y7wsHU6zdQHtI2arssJHUSkptdbBeGWqrZ2t95BA7kmZLfvaMoC?= =?utf-8?q?e9+l7GYUhMNT?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: dde8bf72-e21b-42cc-eb7b-08db837881f5 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:40.4184 (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: nULjHEMRtraFf4TnfdJndH3Pl9FiPUrtVrQoQ+aRmWWSAzlV3Zpj08mI7B/GMYSXALtNYx7RoONSZL0S2qFI7A== 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: 1771294338708480695 X-GMAIL-MSGID: 1771294338708480695 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: Jesper Nilsson --- drivers/mmc/host/usdhi6rol0.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c index 2e17903658fc..6e421445d56c 100644 --- a/drivers/mmc/host/usdhi6rol0.c +++ b/drivers/mmc/host/usdhi6rol0.c @@ -1884,7 +1884,7 @@ static int usdhi6_probe(struct platform_device *pdev) return ret; } -static int usdhi6_remove(struct platform_device *pdev) +static void usdhi6_remove(struct platform_device *pdev) { struct usdhi6_host *host = platform_get_drvdata(pdev); @@ -1895,13 +1895,11 @@ static int usdhi6_remove(struct platform_device *pdev) usdhi6_dma_release(host); clk_disable_unprepare(host->clk); mmc_free_host(host->mmc); - - return 0; } static struct platform_driver usdhi6_driver = { .probe = usdhi6_probe, - .remove = usdhi6_remove, + .remove_new = usdhi6_remove, .driver = { .name = "usdhi6rol0", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:55 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: 119657 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1680046vqm; Thu, 13 Jul 2023 01:44:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlGdsmcOP35TGF7pO+QROlmjr6QuTCHw99v2IG4Ssm6jhwy73JrhggG/HW1TJWEGP8RLPQP9 X-Received: by 2002:a17:907:a428:b0:988:d1d5:cd5b with SMTP id sg40-20020a170907a42800b00988d1d5cd5bmr875040ejc.75.1689237843108; Thu, 13 Jul 2023 01:44:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237843; cv=pass; d=google.com; s=arc-20160816; b=XRhX9Oha+QN7iwjnyFPsvhw+NwPzDLqCULfVZPQLl80hIr/yjkPYSy+StrfUhB0gc4 v/o9FnxMg6rWkn87KEFXEDQ2qQTyQnvMsbc3hebeOfWwGy8BXBV56TqEOyvQzqI6TCd7 V2s1oKQEUCLGr4+5/ExeKBk5fqO27Ae0pyL1Lp5yAQYb+zpnmdpNU+w/vCU3hNOXHe+a VUg0H2kS/yZZ8qHhp7zTGdMYvWr0w1/jr3cTFRFwBcbW/uEpj1ojD1ySFIdkA7J5axlW symme/Nlxxh3NUcjULEw15d8zada/YuIlYQx6MuZSuU6n7cm4FIEN3BrUfNaqQOMX0qp vEEA== 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=TLrIU4EUdrLqb7T0bkwRGkvgLMm9bmDLScwtsrZ+fTw=; fh=/iS3GMUzRg2/LaJKGORKyjWGeAQGYKw/hpkHadSzFUk=; b=U74X9hzsffNxPm0r6Xca2utMhNZ7BAUWvvUKiGtmTABc4HXOTmebybCAJbDbXnerAV hZ/phOs887enIMWW4wuAIiw+itnCOdluJeWHr7VyvMd4FrOgmjdOaxtefsakXTTn1JPm c1Za1SpP+ny1kIybTJgfyBwH/ZGM0epQfe/Rjut58mNHy9yH9rF/KZsiHkXWL68IJ/9R JzQHWHFJCHBBuJqrKZCKEALnCEyGSdIkUhoIVMg2SzgD/5u19k/3EikrezA4zyw68kqn 3YO/lEqqQ3AWur3T9cmNehOrCCLHgcQo07CjX6hqxAfPGGjMr7Xmf2Z+Djb0sKhYPP5+ eXnQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=dgTMNzw1; 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 k18-20020a170906a39200b0099396546fffsi6641346ejz.782.2023.07.13.01.43.39; Thu, 13 Jul 2023 01:44:03 -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=dgTMNzw1; 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 S234041AbjGMIOp (ORCPT + 99 others); Thu, 13 Jul 2023 04:14:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233842AbjGMINc (ORCPT ); Thu, 13 Jul 2023 04:13:32 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2120.outbound.protection.outlook.com [40.107.255.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E723270F; Thu, 13 Jul 2023 01:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e6OFLE5USJPw9cGX18srZfGrG/3nWgXybbDaT4l9fgDktTKaklW2Pt2eATcM+hY0Rr1vvym8dGd818tEOvicplKbs46ZhSEIp4BSSd8kt3Z8PMT4oVIhb5kV59ANLLXGtmKXfMX4Xk9uQLBVMOm75uW9rxETTM0S8NT56bCfZEG7g8aksn7+n4IhqQNIQjAaWibwbUWbc89Pt1R22KRvh1NKdIAHgDqeL5E2ffEW9EPGW98zH6hCohF89OTam7sLnSvZsgerQEyNM+X1BKNHwBJ6U4OgPrkevWSN8d5Y1xpA75ynDp7YY4VGsbjnXuEO3+OAJ/ZiOxlXo9nEZ9I2Zw== 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=TLrIU4EUdrLqb7T0bkwRGkvgLMm9bmDLScwtsrZ+fTw=; b=MSYdDCEYdBTXxyZ8jJ7hpgfyEoOSwKb86B/uN91CaR02/e7LyHlpF9RtLtX/7iD5qZF8eSm3NV1ciE13oEnRKf5yClJRqicbYmNqbHiqmiI8uvjsWrzJ+ZVnaAXr/khtC1d11+Vr2/Y+ngVvarSM4qjhy2TqiHTEu2btf1ESNp2dkZh/9chPakOwRdKbSSMVQ2ziOBMbG/e43qaT9q+YFCYIDoRNP+QJa4oS/kibQsw6ZT5hMmS2uE/nxY8j/hAgI1UKpDCoDX0DVuNIazQsrqp+eNoqIePdC5pYaPINwxE4saSfSDCEDlGjujqcxSnPmgRZUDj5h0EVrfG5JriSig== 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=TLrIU4EUdrLqb7T0bkwRGkvgLMm9bmDLScwtsrZ+fTw=; b=dgTMNzw1Op9zdBxKZW/L53YneOtZNoGIgN4KVim/nCq/XKz+Vi045cAR/RrJJFB++CsAT2wBqcDghHhLuGK/OR1wVO8raWJckCp6boLy5OxoggaSONnQfE6fdpaz5jxjxiOgltUG+8/mA25srXuIvmapLa+qmGjIJhFhVQRgli2rXIv99FsGjPsBwHkIOcbKSiYnEHlv8dxUtHzXAuVJz6ZcDzq8en9LvH3/oHMGfkaG1UMBqx4ZLuTNn5c78LP8kpMApzxv0zlpplt+nZZGQvMnfLnX/Tht4FscTyyQOgSRZXGLx/u/8yCydrUbV7FBR7mO1qT1vXPfCD0oz4XZ+Q== 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:00 +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:00 +0000 From: Yangtao Li To: Ludovic Desroches , Ulf Hansson , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 46/58] mmc: atmel-mci: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:55 +0800 Message-Id: <20230713080807.69999-46-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: e1b111f1-20c5-4eb5-5a34-08db83788316 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VgKPut229kyjXbczrK9i1FHBdKSoUegiVz8WoA4LNFyeLQ4cXJ8ZibCSlQ40F6WGBwAZXPr5hKZ39aWfyBOQegZVU2pJzmuvQmx0xtUFwQSVAPvkpd7KoUxcF7u9jnTSdB/b+bcuwpwdjPYOjdYM6R61bm5CDPlCBdVnUwt7tqJIs8uIKJz1AqvZGb5RpKkS+WA6kuqbrPRER/0AnUfmog9ZujuR1okSNyvcAjhssoBGO2eKM4s+Rc+NxkAIdIaFvLw7Ip9L1PDLqTofCEs11v/Cwdng7pnjJlUY4FDs2XBCc1Pa4M1I671NoZ1ffFRqgFmHmX8yDqtCjQw30KyS4jqxK1ED8xJa3EZcgCbpumVBE1lJ9hWUkGBaTqbvzff809ZrZsjgiXiC76PeYW4QDoKMNCY6NGmsVaD0+G5pMrIDyRtNUUv9iBLcZtAZBa34ChaBRgn25zmctqr3sKh4QUqLgWu0rCQFFnQ2y51orlK5SpmGioZs+CLPivLNlzday//UG3uVuMfoC5v/rRSFgEi/HTmMYHY0bSJs4IacXAHV+KEh4KsVqF73GCN5p9DDSTMWmIbW3BUkBhc4CFyPhGv9UM22ZBD09CGWLBWr4cAsGrR+IGStJSGw4wl1dXrR 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)(6666004)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(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?FdUpLWrAU7llhdV5FdyFHedvY7m2?= =?utf-8?q?+3o/KeBDXqmSCwDCKEKJRvfrIBjcfVq5ziGClguk/FqMDm+xDnVey1c0oY5pMoyWa?= =?utf-8?q?xaaCrfmEX9teME0TYFvIH3nJucUnMjJ602M4U6kbhzUXlI28EgkwSVxSvmO9iZDdP?= =?utf-8?q?wOEOZ8ANytQKkWDZ1J77yTXWOxpNSn0EcVQC6NmHHdM+n0BL/A1u0IGTS/1rXuC/Y?= =?utf-8?q?rFMkcefNMB93OyGMa4gh0Po6KlzuaKRSJ31eHQo6B/1X51ZqInmSKLOk855wn5gkh?= =?utf-8?q?0DeSxjeN/1XZuwV3/2H3klGki3SQKUnN1/zLCYEWYpVTZzgT3z2uxrg2IqsGLKbNt?= =?utf-8?q?zEPb7hWHDrtwR9qGC6RygYOVi103xI462IUihZyCGzznWxWJv8SPLNPG4/ZijrmiT?= =?utf-8?q?/NirT1i92OLRb99I9C4IjBFvMUZXiU2SMEdivtRjJ3iT0F1UooZhtIJqKXWKJZWjR?= =?utf-8?q?p6faw3sOvtMeYRSo9gKZNAQwBzKaO0SMptR4GvMtajgUYl3hzyUHSIT6ohb46+yCL?= =?utf-8?q?AQjqvE2qjkRvxtUpa1IGbImFxTN73TlpBlPq2oBQPcqO7W0IXnT5EuCUqGBrUEiw/?= =?utf-8?q?mYzk4J8r+UadtAG0pikrIGmfqmEKN/JLuQEPelbHTaPn25pqE3PevRRA/kKAbA6Xs?= =?utf-8?q?c6lqj5CFfmOcy6j98iB0jItYpmKpkmrd6n1/NKT62UWPUBBEVPIc/lqQ4Zjbsg1V2?= =?utf-8?q?O22THR14SjZkTeZKz9YtPvqOFYhU9cSrUR8YhBUVtFtjNU1JELxChw0U2ZawRFaG4?= =?utf-8?q?8rG90GZ/cazrl/S8I94XZ3Dg1qlXcC9XmpPA4QunLNtzu6TYWMMGZk4MEgv9lOwTu?= =?utf-8?q?pgl9PFyx0TcoDE61rZR+6uNPYv9T33gaAhuO8r1Bj+JBarc3EzMsY5oLPxoppXE/M?= =?utf-8?q?q8e25YVJJryskCwxEIJtg8HQWiJimUTIAgR+8y3qG6T82HrVMgiz7DVzBOZY+V9QM?= =?utf-8?q?u/OoAFlCjBbHcDK+p9A7q3PGE+8QzLUnp2Gt/0VqACtVoTs1vO9ETksIhVncrCsX/?= =?utf-8?q?/bToFhGyEB/mB91bCoPGtH1HesSiW0rimTlIEaA8rO41AdwBCK0UVeDrGGZC+wHsL?= =?utf-8?q?ZWhanu+Hfs4TQknwz9/2y2TWBIk27kXmb5gcnT5JYInnBnMO82iVmiEc7/atCVZdO?= =?utf-8?q?r3X3XFQs5rLcE+yrVYNTwL9k/jKu6w3YYDHCd9X1FohPT8MjBSlLsZlAE32E9WslQ?= =?utf-8?q?ryeKBv7lcUM3uSby6e4VzMfC8RdGf/M9JUIu/6R2F25dJrtrOc6HXSCz7CLz0KAGd?= =?utf-8?q?gEKiaO/DQceRWskEw8qJHisQDl9+3LBTyulX9FOfRjc1AaNDFEKNbc8Qn6SFF+YbR?= =?utf-8?q?xl27Zg1DgCLqjyQi98H886JY+wjX5khgMV57vdCoCzFZ9PxVz97GtlSB6g72nSRIr?= =?utf-8?q?yiZQNjMT1ejJRDDWYRluQeqPGJWVNvilDQeuNA1N6x1A7gJXj479vFhVlVjFhYWbj?= =?utf-8?q?0iO2xDjaJVh7JyMnIB4Jc60CRYhWRi2Z5kz2uMeFb0MXrT5ykE6c7xbWcv7aUnEeP?= =?utf-8?q?lXKWFwXKbhQm?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1b111f1-20c5-4eb5-5a34-08db83788316 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:42.2953 (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: hbSvHRvCLx/0I3gDa8idvi6VCNqMZkXDk90YDzqPaN0KtCOWzNGhpM4ogbT1Hdn/1XtTZIkeXvzkJupS1AeVow== 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: 1771294260505574824 X-GMAIL-MSGID: 1771294260505574824 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/atmel-mci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index dd18440a90c5..b4ae9aa939a5 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -2600,7 +2600,7 @@ static int atmci_probe(struct platform_device *pdev) return ret; } -static int atmci_remove(struct platform_device *pdev) +static void atmci_remove(struct platform_device *pdev) { struct atmel_mci *host = platform_get_drvdata(pdev); unsigned int i; @@ -2630,8 +2630,6 @@ static int atmci_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); - - return 0; } #ifdef CONFIG_PM @@ -2664,7 +2662,7 @@ static const struct dev_pm_ops atmci_dev_pm_ops = { static struct platform_driver atmci_driver = { .probe = atmci_probe, - .remove = atmci_remove, + .remove_new = atmci_remove, .driver = { .name = "atmel_mci", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:56 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: 119643 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1678338vqm; Thu, 13 Jul 2023 01:39:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlE4lymIx9G2t1EVNaXHiYa2pfXjZEYZvJNJnqoS4mEvMkJWvow3AaD0MAzPd2y4wfabZaog X-Received: by 2002:a05:6402:6c2:b0:51a:200b:d8ff with SMTP id n2-20020a05640206c200b0051a200bd8ffmr1296482edy.13.1689237588109; Thu, 13 Jul 2023 01:39:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237588; cv=pass; d=google.com; s=arc-20160816; b=o17PY4cvP8c+CDDLmk/XWNzcWt8UWnapdbSgkxattMgmnt/kzbBF3u+xN8Psb3MmtS VbtFCG/GFggMD6wloHOcldAQGP9cmaoFIOqMW2rKBrZ4ahRjxya24Gm/tcCfEpegNbEV CtPlaUpMVbR+qzLM9GEuYAAcLZeVrJI+Yd4xcz77JTxmL86wf+vqGAu5ac4HfopFqPcX u9koszuBziMy1OsdD0PwBUc1tD7jxVJ/j4mYunhP5sTqXKc4NuK97RfYKrhPlfY7clJG BM4MQcD7Q8Px5qB8oxnhf2rIPdRuSZOGj83BE4SAzHNwa7mBjN5KE8Br85UHm5Ecmtec KTSg== 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=lg9rpO+O+Vuwq16/2wqHAmJUAen0JpqCAiTPkimHe0w=; fh=qYKcpxoW+O+dL/lpX5ppS70VDzcSQglRrCk51gd2vYk=; b=lfRWXIo2xW2kFXjLeNFT7+1DVMqK02bzRdKKvYFjyHYMZIgcz1bDHyRSNxVl5FZiJi bxF/Woev6+txj9L3wbtd9HT8UA327v9ObP2auDAZV5jVjLEXeS3V6nndobpUBcB3uKhJ cJEcgpolGo3okGKOb2IxXrQi8tjADCSTYTumVdqeD7I7IkUrZJMzjLLUd6LqSMarWHCY q5ibuUuR2bU8Ik0zWk8g7gGIDF5pIxEfQml+LpBOBZVnUQT2qkdARYOTmyPqnryDmuAh fti4t028crXnx8KhYeJD7oj0ogweM8SMfH4EiNLPumgdxEBBJJpDaLrmFsmrQbzX4QkB gKKw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=FRg4ZNPa; 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 bo5-20020a0564020b2500b0051bfa6da365si6499138edb.585.2023.07.13.01.39.24; Thu, 13 Jul 2023 01:39:48 -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=FRg4ZNPa; 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 S234491AbjGMIO5 (ORCPT + 99 others); Thu, 13 Jul 2023 04:14:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234207AbjGMINd (ORCPT ); Thu, 13 Jul 2023 04:13:33 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2120.outbound.protection.outlook.com [40.107.255.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B91C92727; Thu, 13 Jul 2023 01:10:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SEVKgUIX5ptW+J++rQJyPea6R5hmFJTD6CeGbRe8YUGEaC+Gjm+HKPHajEx7FXt/yTflLHNEfMznxE+KVEqiqErTIKnqdH99hZxsPuw9vM4sb2lWszY/p08vkB4YDfVQ2hgEkqWmOzgyE/nKc2iTJQaB4bRrGZHu3EBRcS4ENdCpZIQqvXL8iRJwzipWLmt6euEevgeisRJ8jUN9HwTdKBmx+51wJoxRbKRAsxYBDvfNnO3zO0WfBpEiNi9wlKjdJ9d7E5XVwHk3nxy8kleWRf0ojc9tImph3UrGpoFvjD6YXm/6Zh5vioxrJqEa3UJ9dV4+Y3WgHk7Ld4k84tBTlw== 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=lg9rpO+O+Vuwq16/2wqHAmJUAen0JpqCAiTPkimHe0w=; b=LYEvBE7zCwHc9em5Vv8ErG4yhtQwyvwHH8ltzbc82UbobPwmOPwzr/bm3hi1d0t6Fvn047gx1AkMXBVeNE+V8LrBC4DyUQz6Onml3pT9gnW2hBsmfSh2LqOHvZPJzpL2FeLCZXtAa3JlURkLu4iUVAd0YQgXw0Ym5m/Pray/FeWDZ6SZas5rYMQz7+zuxfQmelRKhceUDjznwMtKraM8bERRFeQsrsriJ+9Y/k8jVfPMTrLGKd0sPsqKzTv/jul12FeuwtyGrlXucTgWHIebKc5ycFlLDN7kQM1i34QCXLsZtdoKCLWu9WFXMVM8gmwCxlwA7XB8xAWcycFBqqUaIw== 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=lg9rpO+O+Vuwq16/2wqHAmJUAen0JpqCAiTPkimHe0w=; b=FRg4ZNPaNY3/os0KGxbNeLiB5gOwBw1IiQI7E1aj9G0mHBXS+/a7ex38O0UHorbgRpIMICjcOB5l/K6lQpOrs7uOrIRK81JDGJ6yaExZ0iLngBt/0S0KBhbly+XlBwe/ZU8c+tCJesJZxPQZXm/Bue8far+8XaatZRm9sTdJIhK9Fs+OKvBV1kq5XWJSK5TvvYwb/Rzo27ChoSzdd3yJauYRGUMAsr2wKCq83dVykD8u7N8b0e3zv0TxTHl4H4CyqujnAtjtXWxbuQBADNNyygr4MgcF4O4/TegOkHN8Vg33EDnVpHcGJSrKx9v5OBgcRl5ri2DRPZVmnkYmdSxugA== 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:01 +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:01 +0000 From: Yangtao Li To: Patrice Chotard , Adrian Hunter , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 47/58] mmc: sdhci-st: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:56 +0800 Message-Id: <20230713080807.69999-47-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: 949d9c4e-d828-4641-75bb-08db83788466 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sHBab60dx36JBcUZOeOFHs95I9VPsWPHpvJnmMfszYPLqsOEzc67HovDmj4AiajwtxDgmYOXDiW34775CW6y6Z1J9uLp2Au7w92FY3SpX5dF3oFktrrSmmADZ3AFWfCypXGqPYompg7+8YdS6HBrcK/8FKgyKB9k/3zW2yL5/4HtLV1oExnQxCOlGbubfFzVVoam7gA5AHkGTnNQC7xZ3+HfIUDElmxXdoRGbS+SiR8EReya9LriZTcQZAdnnRCjbjblLcDoOoxO8wn8RLX6uf30JbaRYzJtqGfy2c4g7yTw8Pj2MraU0Kk66k95yqbqJvQKOCRZWQo4jTXaK4OssLUC4NSvW2K4srL77brxY/hHOBpN3DZw7FKVMGmSGUSlyX5LFyd5y3LbJN0MF7a8CMgAHIlcBUcE8m4dUcZ1q1jS5FR+8R3ryxjWGzp7Sfb+NxPxxCSWibsimpNpRu6q0w33w/wsJ8TXtPyi4ylkIMzCkl30vxSfuv+BceuWYLI+XVfNcf41zIaTkDaq9bBIy3zhFCvngMfFrc5KuaXSjpxz9p240Cw4WwT7Vvcw4PBLdxdVUMm4ncGBLOk59kYfoBkqvh11uWLB2SNsLhDtojGCBg0yaWJMR+Ud/vGqCnIQ 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)(6666004)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(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?2K6Qt9WColUXxQV1lBIlbuxgIoke?= =?utf-8?q?/Mp2PCUunFo2n4ODyYtgDusM0XIRQMgxnVhAqZ8z/6lWMb7W6olpyk1ZM7p8ulTTu?= =?utf-8?q?dXceO/33fWQfghK+dNE4y46xxmgzzFS5KTIl4waiEA1ZfmHOYI8VqxdqJzhAOIb+3?= =?utf-8?q?c9eAUc/io5erSG3lkuYk/VdVoLj3Nv+/oA/+MZh98vuO4dkBV/bXiCri7mTNX2rsP?= =?utf-8?q?ZJ8pD5//NwRSjJ+ZjoXImdG6WSnyx7gm0qiOIQus2NqDk3NFqjRrk8Rte6MkNqd3K?= =?utf-8?q?vbM+mF3gMdWI3P7yyx5dU/3Yn5G+0fNHHvvTInpwI32MqOz4ZmC9D8AWGxO4m+k4y?= =?utf-8?q?AtqPvDb6ip7ED1KhW1HVnfJ/swba8J91efmmxy8M4o25BTQMshU5Lv9BoE4DENHDO?= =?utf-8?q?w/AfAmGeEj3HeGDzEGKogUOU9kzV2g+wQ/Tbtx2JRnK3RfuUvIVjKP8aIDbejRp80?= =?utf-8?q?lajL7lMZA922Fi0/S5ULVAOMIQ4qBP6BFO3aR83Towq4sbrKns4NnccVfIH+Iszcd?= =?utf-8?q?urbojFd1hsE5Y4ggvurBfMqoLTG9zFzDCxpFePLC1/XlbxVHXXl8OyhhmzaFAuQTj?= =?utf-8?q?zf4/C9QotwgsSkBSbvwnc8xY/Sy6xaqQriTOW40svShtFkR//5k3IKCHVcPu6BaSH?= =?utf-8?q?c1SVsj9FR8j71i6cgDrJOy/qI5/RPANgSMypfIq86+2+5y3WsoFiA9Z+EiZZ3a6+c?= =?utf-8?q?uxyCqMtVTyYBryhNU5sBDIqHyIuTDaO/vDOmQvTWDnkUe+HeCc/69vmzyYSlB0Hce?= =?utf-8?q?WQsm39fqLoATntoIA/xF8jQcj3+u/eZBKjcPyZazZDD1CemuS7Faid4+rcgdMkmAh?= =?utf-8?q?wmtspTsqtvToaDRRTaypq1KOhVFB1j2ni+dIxRV0RdvC73P61HLUBW4RZE9I0HE8A?= =?utf-8?q?4VofDcwHm6X541SF9fZ94pbQDAi652RGYhqW8kCg5XPR7U/2vjjFvQE3l/YSljtdC?= =?utf-8?q?VM+HMAO20UfCGFvEEpga5j8wXkjtwQIs9swytNDzNTPTM9Z4gD6+i86aDJe0ltI+m?= =?utf-8?q?ZalZb4T+dJ6pUOR2HySfQpOdEsQin7ebyeoBFJwZ6Izex7APlAc28EpIzIAGICySk?= =?utf-8?q?hjdhhGyL5ha0nXOBTSNvY50oUyJirSzwETRtJ0alOj04iwhsgxSATq6l3Np0jDXbW?= =?utf-8?q?1PftAEvkER/aNDzXKMX0TeNe4PjfOxSotQ8IONrkdgIgxjg6pYLHHdRfuP6gIX82s?= =?utf-8?q?eCKHoF6mHEYG0I2ovzExBNEQ+ylvV7RRl+K7xV4Z0geoyNQsFT3uc1+m0MQLKPj0N?= =?utf-8?q?wkqZlhrnyBEfA4qTYnJaqE8pC16oSZkGy9useVcAhxfWRpNJ9Jo8hmvdJA8g+b0WY?= =?utf-8?q?8poXwC7ZI0HwRHI0pgleo+2uJtQaINWK22vGAz/Fe9bBTWILdIuOXcVjBUvKUcGGZ?= =?utf-8?q?HL9FSuJj/acKlb+KEeVeyKULPox2B/mMkISMKyFh+4/gDubOdv8dej0tkS40bmcpx?= =?utf-8?q?EJBtj6EhVG38cZZfz8Jcxd9+cflSKFnKpJ0v+cYwdoNTXYiNvSBY5tlesrswxQm8c?= =?utf-8?q?Vxvlbir8Ttq7?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 949d9c4e-d828-4641-75bb-08db83788466 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:44.5079 (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: ty0m3SmZoCGk/8YKYAjw0UaobfdzimOnWIvoxpBSi8Z2PShjrmbSKKT8lHD5D3FkAKhFpmNJodcYuNSI/7/Ifg== 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: 1771293993076503756 X-GMAIL-MSGID: 1771293993076503756 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/sdhci-st.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c index 6415916fbd91..d955b5f4b7e9 100644 --- a/drivers/mmc/host/sdhci-st.c +++ b/drivers/mmc/host/sdhci-st.c @@ -434,7 +434,7 @@ static int sdhci_st_probe(struct platform_device *pdev) return ret; } -static int sdhci_st_remove(struct platform_device *pdev) +static void sdhci_st_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -446,8 +446,6 @@ static int sdhci_st_remove(struct platform_device *pdev) clk_disable_unprepare(pdata->icnclk); reset_control_assert(rstc); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -510,7 +508,7 @@ MODULE_DEVICE_TABLE(of, st_sdhci_match); static struct platform_driver sdhci_st_driver = { .probe = sdhci_st_probe, - .remove = sdhci_st_remove, + .remove_new = sdhci_st_remove, .driver = { .name = "sdhci-st", .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:57 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: 119660 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1680344vqm; Thu, 13 Jul 2023 01:44:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlGbCPHbm6+22nQsQjE/gaxqVDTcEbOHenhytU94wV2g2aa9JKTrORhS2UiRI93hBtSvllDv X-Received: by 2002:a05:6a00:1399:b0:681:ee3c:c5fe with SMTP id t25-20020a056a00139900b00681ee3cc5femr667950pfg.33.1689237885648; Thu, 13 Jul 2023 01:44:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237885; cv=pass; d=google.com; s=arc-20160816; b=SMTNmgBT8FuQR7YnCkTStxWfHNOu8eVDgbmTMsYYqpg4QAgkZJGzHmhZDx+hje9ynB F3uN7efl4NP8iPlJlov1/E+1qcOlaFf2qrvFit8aV4rijAW7ucd5VgLMFoBnkIabkeC3 9PzUr2a2ZiFapZEBgNXC2CPyByuFsaDfD25LiMcQGpnqA/KQ0JOOtOVemtTiZJCTqb/n PHwJalFW6uEoDaeE0vXux5KmMOOWNd6fwMhx8BX/xS0wbaWG7skXJr9WmPU+SY31D/mH 3sK8xC0yYpaU+lJRTl5bQaw4MUypdWojdeUn3wlnFCV26Cjru50+1rYHLiPeprkCO1fF MFRw== 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=K1UBCsQ7z6bjOfCJhKMKvjOrHl91zL75OXa3zGFD5pw=; fh=VgrQwm1O7S562Nu0EHXj1yIoeXgypBRfDN0sIz9nJ0s=; b=zUGVnzZZh2WO+Xq6LUWT6Y2s71XZyYcy0J1bYovPHEtMyEiVPg7/o11zs/6tyZR5Hh +PZJ54bMv6aGuHB3ZWOpPx6ScgHLFKEfHvtI9FSzsDYN5MrVlU/p6QDVQ5jRj27SgdL8 XVfObuNKxiUwKqBHupQdVl22jUaZxGXwjXDCx/6h65qS39QU7wyuJxgbGVeg9Sl18zqW LF57A8/svELR618oyc69VAditBCj6023pzUz4v6E0v1qA2qgM0a5YbFt6JIDYUHjPTyb yPCPXV9hYcQ5YGYUjWzH8qIQLjxuBHTcN/hjNJ/OQxqWTgd6HFk5fKYD/O5XKEi846Jh 7WSA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=WKdIcpNf; 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 h6-20020a631206000000b0054392750edfsi4554631pgl.744.2023.07.13.01.44.33; Thu, 13 Jul 2023 01:44:45 -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=WKdIcpNf; 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 S234297AbjGMIOw (ORCPT + 99 others); Thu, 13 Jul 2023 04:14:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233999AbjGMINd (ORCPT ); Thu, 13 Jul 2023 04:13:33 -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 B8F9E2713; Thu, 13 Jul 2023 01:10:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WiJzUt/r1HqE+HIGcnxkbGtA0ftUcGcWrRsYMgsnGl8Pfc9Pa/+IqXAK3/xJzJtFu6HIs+ILUibxHyuc50ESeZyY8XsK8xUvY9jiKx7OYslJyoaWWjR0vzoKsM2cj9xoq05WnfKSWFavZrzzlKIwKr26us57T3VKjI229RiKl2MgApO3Rl6bv3aBU9vhARmZOciFSpe20IyHLgqO689DCAZJe8YGQH00w36LjK+kJwOIHlvZ8dU8PCh+6+5bUbz+vm7FruFIySIknwSjsJ+OcVpFHjON2xU7YFo2wPlruwLuriAKE2w89NCLW92CP2x0TPbnoeiAQfu8SFGqyltpwQ== 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=K1UBCsQ7z6bjOfCJhKMKvjOrHl91zL75OXa3zGFD5pw=; b=cgNRixQ3hqrr142mWck/6YcqfFjCxOJDHJZOczV3uOdnFd43jQXnfLlD1JVeOW49oLj3DUgIYIQT2YAk4ohSelnkDMF8bDVVDh9ILIfzHAUpMiXAdaUpVzwL6g2MXHAjbwBeDmKyhCVgi4BXg9yIxMUQLXH0wXVcL+EOg+hZCV06WDot5oo+DVoo48j5yjg6oqknn9WFx11THxdXuNxVcC0Z/DDlLqe4FeXgOUZkXUHeVS7yHHljcRS2n8Np+YI6qKU74E52ydua0/6KHjiJUcqCcvjqaV8kho4b0Cy0kRsi2xtNtmB2stbMKhVXVSD1+WTuuc5Kc6pQwwZw/UQbPA== 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=K1UBCsQ7z6bjOfCJhKMKvjOrHl91zL75OXa3zGFD5pw=; b=WKdIcpNfGhjdxj3Tnqw5dwYVLqlMq/SQJ0YJ21F0TmejP1OOPD2g+tJC+KmRLVqM6V/j5HdDOjdFy/1d0g+IvWr3/k1BhKL0g/5YUyvaWRO80+qY0rz/TD37QqN+XPftJeEI/rEwc/R7lQXuHI8kETD8Zgupr5Cea/H0LNGnfUhsYeUG59hY0GNxwTrsO9WmSYyFmsLFTaZCyS84z8TOLQ9/k1q2Ye3XZMRuuNbcRbVoZXgnTI2tZGfX/8AV47rdch86H0iIy7Ov3i03+KV9GWZJj4XCk74ro7hhpPtRPmouFh8qHOjvRkgYOE7S64X3RBkKOCSFEUFLeCYCT9bCGA== 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:01 +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:01 +0000 From: Yangtao Li To: Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 48/58] mmc: wmt-sdmmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:57 +0800 Message-Id: <20230713080807.69999-48-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: a6190350-d205-4c88-c375-08db83788541 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: k9Nu7LrpaNN1Wxq5GYKW2hAYSIjgTxmSeJQCXMVu1KYrjE8/1BldY2Mrw2vwKV7ne6xQx8OyqaYg/EgSDf6JWk86okYhHnPsddO/RxYVTYaVrh1E3orJy4i7c4YgABPgPVL7An+AvRJaiXbKbSkcnpMB4g5umK43VDoPF/EdPXlvwW9x68uNPcWwvgV+Uejy/7N+jSXbeIVx2feSQ4PuxNBWr2+uVdiyVB0jiATxvZBWYu2rL5MdkGGbKQvW5oCR5XhEdTTO9WyE8d+Kb133NiNHL4Zyj74JZ3ziEX7vYVqfsMNnMpSb15rIHHFNnEQ6HJfbgkuhjld/KQs0EAJpf+RWng1YTxjSMER42qsO5EAaemYQM1IGlDHOk2EfpfnzFgk7tj2A59FZB/S5tT8Z7pRYrrTBeng+pIOo5slQA7EOrhib92YUP+dhOX+ExPeQtOnF+RUxqrh/92+V2nHkFQzteFdqvTfsz94zKW6MuwqCILx4UzoT3t74bFL/vEp6h4pHemetu+6eFy+tSz/8nmMk0Twj2SUfkx+psnvjok22tyfGb6h6oJgsevGKDGXWk0oa07cdpnGMFs5RC+q9tx2XQuRebZQRKQoPb/87jaMVtIqMNOiCTFyRSdBFMLGr 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)(6666004)(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?6Kf8Hx67PKHDRZw1zoQ/HYaQDqHu?= =?utf-8?q?zbZMJ1t0ociY5AdkTVs4kHDOFxvkDDynyZk15rUnFABinSelKDk+FNOaQKurlEwhS?= =?utf-8?q?M7BaV5Y+XiJOYUT1yPRkG2tgfZaTuTd0qUMW/vb6RnUHukB96SdlzTOyxRvK0s7s4?= =?utf-8?q?FD8VsWLagBYsWlkgVdmEp91FfRlsMpjUw65KSzAfP6BO5js/O/eyMLSSdhZbpVV3c?= =?utf-8?q?IYXeIiek9SkmnOCZC5chFsUYjQK9caFcSYsPP74ODAW4Stp83mN+C1XVCyP8bCbL2?= =?utf-8?q?p312ABSLBYGPg3ZslOKQm24GxBlDges++1zL50DuilUm7ytkSCIkNoifiumZtdJwJ?= =?utf-8?q?sui6PE9QxpbwDcerH3snTdSQeS71LNjcI79qPw7Ho8AisrI0zCC/GKdDY3y29eTad?= =?utf-8?q?QrwaLCHtKUWW39DEbEtyvwZBpNEBHVqSXjeP5jxSZ+QPrPgzmE1a9AudUF5fvzbhr?= =?utf-8?q?h+zShbf5OZhZ1JBkOhku64Mxc+mmAntWUVgnE2inWEs1vI0S0RuDxAWwRFzoNpW8G?= =?utf-8?q?CswkDEXtfTbQqy86KQjeDa3HAWbj6lsdm5J2V6aftyjd6pnWZqttsXwRSB3BwTf1Q?= =?utf-8?q?QD2wujQeVkIe21rB18vZzkHDLzJbzwARtBdFbKJdxH5/6Y0p3/QLHAYBJPUEopXPJ?= =?utf-8?q?AhuRzWwfyQyr6vyVysKjxMCWR7pDVtAZo0bMlZPg1pA1X3tQTYRGFM7vpTk0zriZb?= =?utf-8?q?Fa59DKoJfIktGZU+dxGkkKnQIp02iB4Mg9/KOSYMmR2hzVn1TZ2e+644ojoV+Z0/X?= =?utf-8?q?Ts1mQxTBmR9dlyLr9JkuemuNEQLd/PBN0Hz487Y/GJXlMIe60eMsWVxp3alUMmrpA?= =?utf-8?q?v/zYDxNJ5p0PjgqlQHNlXbVI7K592557u86PCb8gq/aeXqvRUGw9OXUZdgeouMkCP?= =?utf-8?q?u37a2cbz9SmFTn2Chs9mtVa9aOQXbGLOGe6f8yWfiiV8gE07UcAKVGBi3NyCYYN8T?= =?utf-8?q?TCfdV5ksuhEs38kuMdDC1i7P/ijUZVoWJBOn4SY91cx4QPEnCYdst2avoQP75nQhB?= =?utf-8?q?iwd0qWr7pvN+6FR4wEoEDcdN0BZmIAbpWLMvf4PNQmoZ+Sg/kpvik8c2svSx8IHx1?= =?utf-8?q?6QNgr/N1eRVBr5B4DBDk6dmBRu9eo58Iz0cX8naZmoOp7O/vHpEe18OBmwc2Cw3Gf?= =?utf-8?q?MM4izCyW80CA5PT9w4oCo2vQPdsoQqPO1UNuSnM5roYTNpyZ+hgYk6LTxD75k+wc/?= =?utf-8?q?RBQv2MTbWik9yqV9BKRDsXyJ2QGzTtJEo0oofGwEOnNgCWC3wFcAR79QtO8ZEu3Kx?= =?utf-8?q?vWZBao6JyGqeNYUnIb+/nMQstdLfoxvRIf2RCxUT4kzf8+drU0u8GTHBel80Tr/ON?= =?utf-8?q?1QKtB3x5y2OTrrLsCiYr0Z2SSTad2I9EIrOuG6dbv/Jmj5MH00gF7kBxIOcnnxkSc?= =?utf-8?q?g4I/aPZppqmErATtpbxSUWmrGmxE5axZ6AcUQBiUVMAsPCNt6leNQtmD5iZz8E11J?= =?utf-8?q?Thbi1OMesLreAmEku92oECBQZcwQpgjswaHiyJBeLJBYmwWteNKQ7ZLlOzioa34e4?= =?utf-8?q?X2khu8p15Lf2?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6190350-d205-4c88-c375-08db83788541 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:45.9649 (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: t8c2JydYd8+5owYGLYvLtWJG7yYyjfN3UVenSEXpgzLDHKENNHJL8kBxFydd8w3x/WDRI4igOU+srwaqGFMW7w== 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: 1771294304999431496 X-GMAIL-MSGID: 1771294304999431496 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/wmt-sdmmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c index 68525d900046..74c475d071b7 100644 --- a/drivers/mmc/host/wmt-sdmmc.c +++ b/drivers/mmc/host/wmt-sdmmc.c @@ -880,7 +880,7 @@ static int wmt_mci_probe(struct platform_device *pdev) return ret; } -static int wmt_mci_remove(struct platform_device *pdev) +static void wmt_mci_remove(struct platform_device *pdev) { struct mmc_host *mmc; struct wmt_mci_priv *priv; @@ -918,8 +918,6 @@ static int wmt_mci_remove(struct platform_device *pdev) mmc_free_host(mmc); dev_info(&pdev->dev, "WMT MCI device removed\n"); - - return 0; } #ifdef CONFIG_PM @@ -989,7 +987,7 @@ static const struct dev_pm_ops wmt_mci_pm = { static struct platform_driver wmt_mci_driver = { .probe = wmt_mci_probe, - .remove = wmt_mci_remove, + .remove_new = wmt_mci_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:07:58 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: 119680 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1686907vqm; Thu, 13 Jul 2023 02:01:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlGYj0RcVTEuo2ueBgQfGKNbl9VKgcroLeN1A9mJSUvCeDiZHiJeFYyehYX8FxJwQg7rFD6h X-Received: by 2002:a05:6402:1b0e:b0:51e:57e7:3f0c with SMTP id by14-20020a0564021b0e00b0051e57e73f0cmr1468331edb.13.1689238884865; Thu, 13 Jul 2023 02:01:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689238884; cv=pass; d=google.com; s=arc-20160816; b=l0UHeBKxIXPIdVmknEdCrOP7sYlwZq40oSRTMZbccA6hw6UeMj1UnnQm8X2iX0n7CA 6jMNbMMOGnzCbroYYWpUQCmzhBvwfHID8MUfQj7XRE3ocwTWa0fd3eglYQqGSfTMstpt QsRadFU2XGYPsurYZsriZ7yjtXJCw4FkWFimOdRytrw4L+VFjeDm90sb98+ksMcQTi2E cpBmxp76V/FiOAlrplEdq6vvX77Mba5jGHpD8U7yplxSUFmR+0GqbVuNETnE/44Ie84p GdOZlmlYsuhx8ivjfW0NbYm9alfzTVwzD5blFuLIGWk+U5g4xeH693gMLJA2VTfPNgh4 OFRw== 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=P9Dfs5F2gSSKlNfyHZt5vKY/Z4kFZTv/2MR5XySfA8w=; fh=M8OwPB4xxHq8UKL6c3Cis5twdEf52Lh9rLE4k56F3W0=; b=VwBuWKxKhWMcQ19/fogF2ibzj8H/l6biRY1DZTo3bGXnkvPqEIlo2gJpiMf+xeRpW2 hJEjH/BsRrTo167AJxw/oDEwHgFqFhjS0QNWDC5M2jYb2gXG7V+js7UrWbgGmY7Og5aU 6QLyIclityorPRzPiiIJ4AjcegNsnsne+aQoMAxfrKHkIZY8atzIi4yBS5zsig3nQq69 3qdLFI//dwdBvXIee+f720GPwzWjCXVKVDjJlemrqs0+BmF+ZKD8dyNBHw1AE9ec8umr FgjD14Lw3quOTFogRDXc/wKyw9Av7+H9wkk8anjmZ+H3da/QczDAN+Pmo0Y8XWWfB1h9 EMNw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=UISrpoqi; 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 t25-20020aa7d4d9000000b0051dd511f0c1si6872910edr.177.2023.07.13.02.01.00; Thu, 13 Jul 2023 02:01:24 -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=UISrpoqi; 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 S233305AbjGMIPB (ORCPT + 99 others); Thu, 13 Jul 2023 04:15:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234172AbjGMINd (ORCPT ); Thu, 13 Jul 2023 04:13:33 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2123.outbound.protection.outlook.com [40.107.255.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25EC3272A; Thu, 13 Jul 2023 01:10:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XJBThyzzJiCwNittwYp4PUGRov9nGj3vUJekVmNFPDeROohoYdGNV8R98qpnH1k64nJbVFab1aNqYdGlVBLzHUI52i0SlNsp1G/t4XcBWLic4wpBO9T1JGrKrRahZxwQRuvaR42cloteFwIAXzCykXXuZa/DzWTWUitZWoqxEF80iULWuslpsXePilbiZB6S1OHPZNh+E+eeWBIiJ1bN6cdA+WVQPenrXvwgTRUNIymAmUpW0hUmfRLrJceYpnAHrmRLl6UleHMWeOgxncaX0juoAnn3st1iUjEZmYme9jEIdy0udPksJnz4WfsbIKlk95Cmnqgg7Dco9nSEX5BeQg== 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=P9Dfs5F2gSSKlNfyHZt5vKY/Z4kFZTv/2MR5XySfA8w=; b=W4FUOyCQjezyC/7l7rQlm+9CAt7sCBggsHhelDjEH+e5CmeF62xeTPXSFiFQnXARflZeuYXEse47uW+OZbN132lUie7Xe2nk+RbCIs8gi8AuUFJ5tM/Bij3Jmm5Jj1STvW+/iwZumm9L4yICc9X5B/kLiHcvpgsMASGt0/AudUpHDnSbUiv0b/AUfJkWiEZGT1KjjovdnqiyIZyP1r12UL1h/pPBZrwMSROPXPVg9hvK61K2jEgZXeIcSZaV+3qxuQBfKXP7PFxgRPK43I73R8rwSRBIZ0MHu2S7YRukS7cOoZPzjs0r+yJFlaPzpDJ12jH4DRfJKoGg4t0WhZimng== 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=P9Dfs5F2gSSKlNfyHZt5vKY/Z4kFZTv/2MR5XySfA8w=; b=UISrpoqiEOwUWaLBvo2A4JbmxnDnTrdsWmUrMOIkeJfCiW/vLMqfaHxyf8uKcoFFpGicFk+2uvI+VW9aEBYTR46f+SYahsbaAHoUE2aNcR0zmq3bT6Pp6YweSK7OG447gGi8gyX/itXgb9PszLH5s/j2+UUnxd1LLSOjdNloxC/WKY4v/TnGx3sQAKKzjOH4hk8l46R3bypoKo2PeU4rlkwdbc/W5ptiILb/uZ/KbzRzj8PZfZFndMIF3vVpZP984ThehkhaEoksHI7fPeRX8NG/rni7I5egoAMWZ92uKYjL4HwHJZWXzBv4X5l9BcegNjHIo2fU2nqkOcRZ2R9QnQ== 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:02 +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:02 +0000 From: Yangtao Li To: Adrian Hunter , Angelo Dureghello , 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 49/58] mmc: sdhci-esdhc-mcf: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:58 +0800 Message-Id: <20230713080807.69999-49-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: 196059cc-3ff2-48d3-8561-08db83788632 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iwyLlIvjgaPBNtEIeSotWGjnE/0ui97yaC0vd6tVd3xrW2w/Wnj7bVm/u7Ia9LTrdz91ZJqLx+0QRdT/G50qlOVHxRyF4cVBO+l2pK0kGXBEXa2E0Ppc3TK1yLBzDGRm7bRCXnc6BGj4IQuoJlwLPrwGhFCd9Z64mGczr3gFBxh3wl64I4kUABoqbxywkuM9CoWTsSgF8Rol8aVIdAtuoyy7cKSosrcUnV9yuhCJmOKMZMXcowZDaf10igT+zwqPWkeZZOHXbPLtlbMZJ+aUiAOozr798WxO4m/cAZraNzspPyNdnMp/6/MnqugKPEMcshX5NizsgRNZIdjdInnwHC6euh0JMIW7O/l4guDfh4KEAovG07qcXqzTboOGUbcWPM630znMbVCf4BPdEYcQZT/SdVfIzdgE020efQ4DaOkFyLTZgL+BTecG3dwoLX4SPGHZbreUvV5dIUX+EtUvq7RKd4F2SG8vyN3JondG+LKUfT99zqCsp64UlOuuTYN9i0YykK9muFbDF2QcNOpWgju3WJPWP+G1ITLdznw7zmgobxk5SktnxYOMg5b2N3HX2cZkWptfwjgn3NVx1uKBXsa60XZtpQivvwUTQVg/Rg93Syz7sgrV4yucIn771U3d 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)(6666004)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(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?sBkfQdWXcQvRRhxfg90v9dilQmcm?= =?utf-8?q?6uEGuY1lK0xXA05GaWw7jJqSmfP/J3oLr/27chWCz0gzQVhi2SUYNE45IvzMqCNFt?= =?utf-8?q?K5AYSrKUSns1K2K7ImWJzG9J3O1M6rLNz0EB0UADUFZvqOMNBjW5dSiTjt8p7ot3b?= =?utf-8?q?OaMbVu0oW+eE/6sbdKsri5Ia12A27YpaYgEjKUyGoobHVIv/EGZnKE2Quj7D2EouQ?= =?utf-8?q?wUiWDhq3Pnv0cL++EfiwNbL/NkeIxSwW0q47yDwrDsTEKBRYNw/EsFCLz1G9mwxJH?= =?utf-8?q?RP289coKYZj5YHcTThKfHJMMjk1UOsLgc/c/un3cGDuYJ1nyayp0olMiJltZ8YIMy?= =?utf-8?q?C9KjawwFch2UDcGVBTKKrs92ivLgm6rFp/zUxW15jdTatoCvwQn/FxEH9U5I2+oIx?= =?utf-8?q?mJaA92s3va+jdn8v59cTSnkPgmu/U9aJC8bEtekcX9HcP6UdmCZFbsSzvTa7M57xk?= =?utf-8?q?9fwFvYlUsZB1wfYwiL5tyVxLYnUHysLRwKpN+s+QvrZa/qvhnR6/J+/Dz9jVhDQRc?= =?utf-8?q?WvGFQaSactA/eQ288Y/J74jq/JpvxfxQU2FecZrbOXnfaTW8FRSyDuznS1cZE04oj?= =?utf-8?q?EIeGPyu+uc/VY7idYPo+uHmvM2JF+WZvQJuxnQwTbdjh0SjeI6JRPHeTwdABCRBeY?= =?utf-8?q?kPzr22IzwDiVzraWyGqRCELHZmxgBAQLM0Ah6DF+dZt4Hbtta8G9qHhWKNQxLgW9N?= =?utf-8?q?AUintZBFEDZdCPCkLHryWBEtkxDWRsQZM9v6pNgDViHk0X/CUgBm9Q8qZBNj4xKxE?= =?utf-8?q?8vVor+C0h7gOn/HC1rHiIkNK+G1dmN/QMa3HGMatWezy9Kco4N495u6aRlEahwUfV?= =?utf-8?q?xMmhehuKcn8nt7IksRQKxSDqVfwZdEEDGbk+7ClRofqv7ew6v/YM6hlBOUOZlno2i?= =?utf-8?q?Z4Su+Gwd1zKD2qBC6pWg+ojGCuyHQ+yHMzaIC+mg3voMZwqfgcwiX66mm2FFxXdXX?= =?utf-8?q?asaLNtwL+LDPrOem6RCqbLZ07ip2T7lbusFIvbI/G49eFv4qiGUsg6C1t62NlxqZQ?= =?utf-8?q?CughJ+REtJX3dnVw2JZ45D3aaOKY/wlTvEls8dnWnxaWq/UWyXaNKS3va+tv/tTzz?= =?utf-8?q?L8nhYWnFS69BdX+U6C6SeYsQflEn2XobpVFyQ+ix1aGE8pTx/0c24bSZNo56aHmFm?= =?utf-8?q?FqD1w3lcKRDizo8jQzZFQrt5NLVi7V5cbYTJtsVijUbFSVTazfS7sGjYEa106TxAh?= =?utf-8?q?qgh0AneQmPNta9KOgjqA5qLGQQUe6WrmXWzUVa6XKuo9+VXBVrA+VjjfTCtarBA+v?= =?utf-8?q?ZvCry4dmkRuGXACdPAEvZFmm2jsA9mz+zG8ij6k39fybHIXI77+NoEQlddQ+QVUna?= =?utf-8?q?7Kpdev1ygn7urgiGlRd1w4IRUyHTA6aYTM7ZF8VZ1k4ahxgxWidDJjYNlH9dJGFXK?= =?utf-8?q?K53U0BTZ5OetZt9AWWaP1N/x69VcoibsDdqiGqtIkIQu/zFKgdzsf3oH9tJRD3kvC?= =?utf-8?q?cj0D1yDu3kppLX1xun3GyIBeMBDK9bk/8jQNSD3lEa80Xz3UFj0Y9B005Uy01zcvI?= =?utf-8?q?UPBcENf9AT1/?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 196059cc-3ff2-48d3-8561-08db83788632 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:47.5281 (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: 10+ozMp3kmmHKcNV0CEG+Wirb++c9NAod9kZ2OUNgMNyRDQgQ+jC/STvMipbgw9Z7fYYiuJJHH+oK7ZoNQpRRg== 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: 1771295352580390887 X-GMAIL-MSGID: 1771295352580390887 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: Angelo Dureghello --- drivers/mmc/host/sdhci-esdhc-mcf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-mcf.c b/drivers/mmc/host/sdhci-esdhc-mcf.c index 05926bf5ecf9..a07f8333cd6b 100644 --- a/drivers/mmc/host/sdhci-esdhc-mcf.c +++ b/drivers/mmc/host/sdhci-esdhc-mcf.c @@ -489,7 +489,7 @@ static int sdhci_esdhc_mcf_probe(struct platform_device *pdev) return err; } -static int sdhci_esdhc_mcf_remove(struct platform_device *pdev) +static void sdhci_esdhc_mcf_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -502,8 +502,6 @@ static int sdhci_esdhc_mcf_remove(struct platform_device *pdev) clk_disable_unprepare(mcf_data->clk_per); sdhci_pltfm_free(pdev); - - return 0; } static struct platform_driver sdhci_esdhc_mcf_driver = { @@ -512,7 +510,7 @@ static struct platform_driver sdhci_esdhc_mcf_driver = { .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = sdhci_esdhc_mcf_probe, - .remove = sdhci_esdhc_mcf_remove, + .remove_new = sdhci_esdhc_mcf_remove, }; module_platform_driver(sdhci_esdhc_mcf_driver); From patchwork Thu Jul 13 08:07:59 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: 119696 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1690937vqm; Thu, 13 Jul 2023 02:08:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlEwFibbheqX1ipynTHrRPK259oe1reBRG1iZBo40Ys6ujd+k1GAEtGO6HbUJwfHix8UeSsk X-Received: by 2002:a05:651c:d1:b0:2b6:fe75:b8f3 with SMTP id 17-20020a05651c00d100b002b6fe75b8f3mr861306ljr.29.1689239335390; Thu, 13 Jul 2023 02:08:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689239335; cv=pass; d=google.com; s=arc-20160816; b=kDJErd/hmL1Mp/T23rj5X0fLnTns5/1DlfysQB5IITuDURIty14zRXShyv+CUSLorq E3hJ2A9ZR9x22bfj0+rpvx/B2zaNgNPk7nsoFRdAmOpf6fg9VYtv3U0nmt0eV63SBMxQ p7VNPKHzqAWcbi7DLgbLX4uGaCcFmyUnxW3xPUhSGxNA42FR8KkjkOI9UKOBf3N9UP/y +FYNrpwTAVX5Vyf++ZHrU8nnlzisD0CU2lY6Hb/rHqCh2iR/IbXoTK5NyLJnoOs4fFgv NtPiY4W8zwtnWh65TzJTRkT9D7BQ0fFa0JHDuJrRTZyNpoSqg0xHqJ8Qxv6qb9eo7lb4 fDVQ== 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=NkSQcIRpO9SN+/pqpfb45OlxvpHWWTo36AUup9m79dw=; fh=DltQIqE9+pGXrPR5WLFAdWiPosppoWjSKQ/zZl2z5K8=; b=RufBKgn2XjxbGCzULJLylBCvyBExPuyELuXp1szED3R4vmUry3/YwTOuu/gPhEivdk LD69ol6fzFSrfcyOLYI49vd/ubOTuC2JNWncJkU/1Q8kJoH6U2Gah6o6BZPO/7K7YOVV x+EP2aiXISS67eiiWfPHGE/EPT/Go5g+tvfQ1Z9YK95NCnbq28ktw/p8qnJByZ00SXgu dRB73MjClPRWleL0EYDefPDrk7rXjl8UYvuHgH1o40GnrSE+wlrfEf5y0W2o6TnQ7vI1 SxRO2PIRREJEWtZ0sU2afRM9xBGy7stNR41zEFUkRBU+xlaBXi9yl2a631WIve0gWiim BTMA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=JByY01VZ; 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 gw23-20020a170906f15700b00988699d64cdsi7372856ejb.959.2023.07.13.02.08.31; Thu, 13 Jul 2023 02:08:55 -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=JByY01VZ; 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 S234172AbjGMIPH (ORCPT + 99 others); Thu, 13 Jul 2023 04:15:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234225AbjGMINe (ORCPT ); Thu, 13 Jul 2023 04:13:34 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2120.outbound.protection.outlook.com [40.107.255.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D33F62724; Thu, 13 Jul 2023 01:10:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D6p4PAqt0K4KnEtXbavfQPtiiHb9AqaD/8zFt3Zo3aaOoz1eOudqma9Wjd5M1VI6IuoiOzCoAqXu5MrYDBZeVTkappP7ds71bvbxDqLwMhyGCRfy9TErVV55t1boLsEYIW0QBmkFfMHCUvM5vi6ig7ZK3YNwYoJEZPfLUiN5fMFgvuGFuyMG68vqi7JZcjHI/8iQD+ohBH7Rfxj7/wEJIFtWgBk0NNQm5hCqQsp3JdQEzzC3ixh4+/BMS6j1kl/JlGOPLqYhiCtlR3xpVyqGbAP3KZ8vSBUPatEpiKEWmo0CTlOmghEN7g1uQQ39yZUQ6YPwE12fNpBR1YYP7IWN4g== 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=NkSQcIRpO9SN+/pqpfb45OlxvpHWWTo36AUup9m79dw=; b=LhZC8qe6r8bpEUU/4pPeN5nt6NIwtskip+oGrfrU24CL6eCaHqPfjeYnHES9tDZxKirxgr3b0elhlJv23h29XVMiIKz3GCxdETTtLY0U40N1ZxYLgVUFimNiYXzydA6EewJnGuVFnOsUM5D+GkEhIJ0PMe3GWiK4A+G4J9a78IOKexf85djUjc2N1W4YP4VnqzSazR2LQaMO5p4Qh7lwQBymZweA2+JXHmNJD3FKQBNHCefcWzW3IiqLWFXr5B4cplZ6adY5ocWY88o6ZQTJJ42ZWvCVVFWj3soREXJQviw3LaTsoHh5Lq/Klv85+5rqBCYOB34LtvQj7OKz2Yx7eA== 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=NkSQcIRpO9SN+/pqpfb45OlxvpHWWTo36AUup9m79dw=; b=JByY01VZDKyYHT8U1apfQXT7ZVWAxmeurB402TUVYy8vhoCaR+ZzmQHykOMlqiyWc58bO11Dh51RXiiYRYumE/nZAg0Vobd7UivHKWKVFA+1HB4TNyvLj5FxtjJ2HNYZHl4LxqQ+URFEjY+VfTEkE+DiSX3o95qG9tx8qMDQnMYprjKoRtAJUu/jF27QafTwDpARcP2NNWS+SxoPVXlbeZdsVuZT/S4s5u8qiC+rk01xut3bolRBGszOX0MIxq5vFoHVuoQQiNKMcUpN5ec/g9gKfNveuwJn+lU6V/W0cOSokB8jzhAoGFfw4YqEalvhaF0Wm4O4Dov4CTrrUNVpCQ== 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:02 +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:02 +0000 From: Yangtao Li To: Tony Huang , Li-hao Kuo , 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 50/58] mmc: sunplus-mmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:07:59 +0800 Message-Id: <20230713080807.69999-50-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: fbfe7e13-0bea-4aff-6b38-08db83788749 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8qYXY39w9weRl1RvJOYKrRxKg+xwRctkUQDYejvi6jXPJlQWwf9MT4xIZR/gl4WEoXiaPFN23jHP6cFGhZipYHcVbIk+LueoXwG+go+lTxkqguQa30fn/3lOzTFbNvTp6lq+quLONEmIaRVbpevGJlWbx24LBpEk+T1Lj4AlM/7gO/OHMJOTPM2mkYMo4vLoB2Y+WJGvXQr4ouYas9ddDa/9ctO30+u5pSoJ7yHerFKXAVT4d9VH2//TVsKFbW/vvmtMkco+nbPXS4jyinAv3USe3KYM6extL22Xcq4A93bCa6m9SgK99/tgRwTv9JqYGBZeeGmEyfUZo9fyZgX5How8pLpOvuAqt/QwpLA/Mv+0/0FVqv/He0mxmq1iOHwU2i73btyxn1GWfB7Y5A7EnRcWUA0LOWRVo20q0cO7aAca2BpnpigXeRHFOuedQd3Ufj4MZ9nnwVMMdkG8RUXCN6AvurGK6izmjTXd14mOLnyHi2ODK9GNDc8G4cW2pZpIqVzZSCZWLt/6lOKPEJY2wO+4ZvUkNfal7sy/vqI8WYIoBpCHaQgmHHTEv1rNg0CWE9aLFVJod5emSnAkZYRV9e6KKGUyhTscBHGe9IwYcf4mLn6GBebQ+r0d2hAaCfXw 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)(6666004)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(4326008)(316002)(41300700001)(2616005)(186003)(2906002)(8936002)(8676002)(38100700002)(6506007)(1076003)(36756003)(26005)(5660300002)(6512007)(86362001)(38350700002)(66574015)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?IeFUertbdU4zOsbkDQgbl6lPZR1n?= =?utf-8?q?uVwXTYCQ+nEuWD6W8BTAUyzLOZS4W2pHVwy/IS1NkHNT0pDJJ/usWjsX6n+RLotnX?= =?utf-8?q?CK2NEg52ULNftG7+iv/3m5qNHm0MR8vIr1VxvqCCDDTCj/QZGJPyzYv6/RC+2DXuy?= =?utf-8?q?bvKQu1i7riSSV2GILmUClfbESlPZlY+K03Kb+RljJEIJNoLWEf4R55Qir11dnxug3?= =?utf-8?q?bRsuPdp03ahjUE/xsRLRTmk/mbvm/hSOiMWaezZD8pWRQG9g59En7QkT9mVjJ2+ae?= =?utf-8?q?PMXN6h5Rf5gM8ZgZOm4EVECu0VbV521R0ktve94xqodxTZB5pH5aV0tSJ/JWgHIra?= =?utf-8?q?PuT8QtdvtjOMQcyJbJDqBEHUPuKbyCD2ajipUJL4/PcZLoxvqN346CCdzEmm8iaYe?= =?utf-8?q?ysWcsKSLTPSTGAtR9m6sYkRv2Jd9Gt2geAw/PjDC4OBGZwFQVZwUjQsnPG1vQ9uba?= =?utf-8?q?8Wu0wx+9HDbpBI/392EqmMXep1kXxiTiFrTgVpT2QunttnnEhU3/+CQTQPnwAusuL?= =?utf-8?q?E4W2ViDL/KxPnOfbzGdE/z+XLjXTkE4eCa3XaX0rCpLaobINMJE7AbL1fXYizVL13?= =?utf-8?q?Fq3xtCV7j7oRXyDF/8D/AkaOJNhd45C3LaxkA+TBcJEiptYBbiN3xqP3AdxYyZPYE?= =?utf-8?q?Gye2Hv3D0f9HyHWqS+hwdQnhUdq3hnuMCsdBTzbi2ZWsChe07CvusrDcvLVWmBYTI?= =?utf-8?q?Ic3o2nfcjjU3gd/e7gOFhpafprQiCYVpT1HiLhWFiRYD4SnpMyoHvYXQHnD/nXZ3p?= =?utf-8?q?Juq0pXK9ypdEcldEHhIgsUTQMnnapg7AFHU5cjDwtXHamxbsCTLjevpcguIAgjqVX?= =?utf-8?q?eUw7bMUibQ9Q7sQu0KYBvcothZdwsGFXpwKjjkvcrudj00W0JtAMfTdIuCIncDitb?= =?utf-8?q?XQnKAt2SA1puYv/FK6SI3tSCe9+yu+5mwgRij9a0IviW/ZuIEzLCw7WUVi7aSJt6j?= =?utf-8?q?CwzH/QF0WwUL17/4e8xJ6+Pl2L8dbJjXi1IfY2NZJ5fV7HXA8/bINEQ2fuob2eh4J?= =?utf-8?q?3xGN1Nf6z6ykvEPBuBVsMTKsnvi4uMr53P1JMVYq/01/FjSK9Rn+YM1wBX4eXviR9?= =?utf-8?q?wbnmBNICWSO/jEappjkuw32oeUompYWh5ASDX/fGDLzAQLRr3DvYM7P+iHYPpweWi?= =?utf-8?q?8LtB5lwo5bvg7CnfiRJTjSYL8Z8GQWSpNbzU0Jhjt5vLpBqLGHloZWxS+e0YByF5z?= =?utf-8?q?MVLAtbKW10mELescvtA/lBnzTV8KFkylVInN8I5M7bTscYd2qfHHu/j3f1wRIeyZ/?= =?utf-8?q?uHRxD0QElp8V4lcMeamm9T5RExyPHBybHeqLCeq+ipBi1GudV5njzP25Nqs8HEkCM?= =?utf-8?q?jxtD9TyjOsThl1RbtyM8anNjMg8YTpMkKggdxvvVI4LHnlGqiJOKUZijWNQpq88pw?= =?utf-8?q?tOd/bri20hc2rolxsnPN3Y3RXl8YKRXwMu1LiW4/vuQIElKbCnsaEAZPD9QX7BN4r?= =?utf-8?q?dKTzPSPLfasCzEmlrNlgsx2pgZe1CF1tttWSHhy7bOAun0svjq5PnTaws7zsqup09?= =?utf-8?q?2DkmJNAhxKQU?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: fbfe7e13-0bea-4aff-6b38-08db83788749 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:49.3469 (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: KTb/VrSVdNgVNnccGu6pmVW1i4W/gEhihU2OmYE7yN8F+HYQAgjMlKNzKTvWaLy1j0Xej3ZQJ3uvuAdyYhiSzA== 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: 1771295825126506610 X-GMAIL-MSGID: 1771295825126506610 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/sunplus-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sunplus-mmc.c b/drivers/mmc/host/sunplus-mmc.c index db5e0dcdfa7f..a15371e98fd9 100644 --- a/drivers/mmc/host/sunplus-mmc.c +++ b/drivers/mmc/host/sunplus-mmc.c @@ -938,7 +938,7 @@ static int spmmc_drv_probe(struct platform_device *pdev) return ret; } -static int spmmc_drv_remove(struct platform_device *dev) +static void spmmc_drv_remove(struct platform_device *dev) { struct spmmc_host *host = platform_get_drvdata(dev); @@ -949,8 +949,6 @@ static int spmmc_drv_remove(struct platform_device *dev) pm_runtime_disable(&dev->dev); platform_set_drvdata(dev, NULL); mmc_free_host(host->mmc); - - return 0; } static int spmmc_pm_runtime_suspend(struct device *dev) @@ -985,7 +983,7 @@ MODULE_DEVICE_TABLE(of, spmmc_of_table); static struct platform_driver spmmc_driver = { .probe = spmmc_drv_probe, - .remove = spmmc_drv_remove, + .remove_new = spmmc_drv_remove, .driver = { .name = "spmmc", .pm = pm_ptr(&spmmc_pm_ops), From patchwork Thu Jul 13 08:08:00 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: 119723 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1700644vqm; Thu, 13 Jul 2023 02:32:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlE77nof9YIOBZldJzKuloUWhSA6ASWxR2+sn81mmNxXYAioL2SyAJukHqjrzOh5hK/hFwRf X-Received: by 2002:a05:6102:4af:b0:444:c2cb:d525 with SMTP id r15-20020a05610204af00b00444c2cbd525mr535867vsa.31.1689240756493; Thu, 13 Jul 2023 02:32:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689240756; cv=pass; d=google.com; s=arc-20160816; b=BfkfDLqUXg/xncs99XfpPS4khYXTW8+PAGHhiqz2RzU1mZGCX+fojrgpZbbIlF/D7y A1SbyTedS6phIXJylW4QTx9iNmLc702M8CI8QCXkNS2/TWdM53RPma2p2WS+PxPjRYx/ HZTf+HBf46oc5gFupN4frO2alowbR+R7ija9HfHwwOvNpiu4zxNry2D84f/+jlkZcVI9 jaRngKVdovcLMUk6gJYPyp14uNTHOQ9FemVrXkU+Vjs5uEhRbu1eGmj6zxo33svPtFS6 dzoZnCZilj2/NFJkpI2KIbYm3SbbJF/ST58J3pw4ODZrfpWFH2zoes/dOhr0/rmPe746 8xkA== 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=Lzc76DvqbeLdANjdlgr7IRp51JS5qEoM+mpDP8TQFvI=; fh=tTSVtf6q8OfbM0hXkAxHjhSfLD/31yPe1j3YBl4aaF8=; b=uRM+a7bX5uhmRT1ZuJQ+foF9QQCvpLYwYgyNJDGMR5guAKG4+FOvdh/sLeYTD+rN3E jTGpGLxHxQmgM7gmukbeiBZYKygfOsgbgTYt7B9pcFPP5CC56eO3F/d5sWxjtRa0VsaS 0X8FAiKrIfW8QAqKKJmnUTiW/UvmdqzUMajxJ2tBsTty30pi5n7D73ICscl7TRuo0x1o HwbzV8FX4mD27f8rf8Sk/MIlQCvduutJmPpOaB3GRkp6iRUjUDKRmv8sfURaomK7TOqj ecqdlg16idz/5oW/6/fF+tUd3mZ51EG//fJsHqDuQD02GnQe87840+uRR51heUXwnlcF KDjA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=lv7EkZQj; 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 h6-20020a631206000000b0054392750edfsi4604639pgl.744.2023.07.13.02.32.23; Thu, 13 Jul 2023 02:32:36 -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=lv7EkZQj; 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 S232627AbjGMIPM (ORCPT + 99 others); Thu, 13 Jul 2023 04:15:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234231AbjGMINe (ORCPT ); Thu, 13 Jul 2023 04:13:34 -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 E63AE30F8; Thu, 13 Jul 2023 01:10:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RncbgkD3jLy8Z5mDADFUDPT66yOMLh/ObfKVgfWCXhfSFdDhyr+v7csM3n2/I1IeH150MR2JTyske38oQUweEB5l4UwTCayYnVxV2ZLbrb2EeMx+YkBuD5DMUnX48KistLe+xC+9Oi0oUtsh5+ZD7gxZRi8zeNI4Isffxn8o5V7HWsJebEjLPMIh7J9Y0ZWiUqO5On5xwRaR5LYctgkiOU/3PDX4QeytMd4YqwAM90XhRAzwPqSkITmjOs0f+l80dNqID3Ma0kSn0Yevpu+GhI7hmlwR0LqUJVv7/pS0KuyIbLqQt2fYGx9LsQK38rKLDdmzDB70S/UO4/AR2i0qFg== 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=Lzc76DvqbeLdANjdlgr7IRp51JS5qEoM+mpDP8TQFvI=; b=bfb6ai7jvmUYgiXL5LrtGdYWriTEEBHYXycqQlQYml6TSpESV9iIYANzdfChhHbrD3jDtUr6vCXw50ei8pIOj9b5ORZ0xRLRPs8tw9MWbwwQoPxecsa4eLPYyin9LSPJSZuT9hBoJcsN7A1/3wuODuRCsgQlnknlML/1BEUA9CBv43mmTZJQkFEcFzmFWgFCtG25bNh8N+QmTRt3E6fLUDenOqi76pf85mTJRJebruEjh9Held39k+NmXdLYetD97IhunuVmSfX84PdofSSYbQuwphp27PgeNJ8J/05Y7IjV0pEYUPyvHH3aevNJhHGEk3XZQQ3778eI+97WHRNV2A== 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=Lzc76DvqbeLdANjdlgr7IRp51JS5qEoM+mpDP8TQFvI=; b=lv7EkZQjFkhmeR0kOrUTpTz3E0U+EO90ZpKoSP4wOfhfbjKYSJj9scDlIizLKb7EFDlz3W7AH4al3/8JytbBtYLlyx56yyXC8fO466nr86SY7erJ6fuEeycSo0mWFoR8THtJsQkT5oPeu52znljShnd2hZLL7p4EKehP8wK2FTH53QWmVlgQWDttkHjlGdcXG4yLQey/AVmgZ+izVDmYA08gLf0YKVzk6obprrpDV9H60TqczBuQXwRKqXzUETTlC8Ln2jehAd3lwQV68KZPPG/5K90IdwqiNCZFEikTsSRw0Iet1Hgxhv/WRWhMLRuQ+P4u/qld2UBSPf14DRbO3A== 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:02 +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:02 +0000 From: Yangtao Li To: Viresh Kumar , Adrian Hunter , 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 51/58] mmc: sdhci-spear: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:08:00 +0800 Message-Id: <20230713080807.69999-51-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: dbe3bf47-bed3-4793-50fa-08db83788860 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Rdlw5NozevH2kuUcFqSbfdDzQfcgYAmJcuY2fo3C38dt3tXIYEFpS7G4Bi8KEXpNWUkePO+QHbEbk4AOODKTaJ8/5PfWPmIBoS43Pz9PZ/bx0E2LgTIEymOqIEku5O5OuVrmGt7GePQA7DweLcDFNYPoXACbxLTUBoCavg6uo79CeHV/dX93+MBWYBbiNfHkGnnfg97GncNObXMciJ5/6Cq2pBN9Q+EAFnS5HsVDVR/LCfYqltnel9oPeaanz3iCsCQi1nxr4YbmPMWkb93jfWJN8c5bM3ThegotTQlvpH5tQwdspr7mKGpPuQFp05F+ebRhN4GmTVtyPHptqr/oUIV165NHlDcjjeG4ittalYYbBFvOJ5RH0Zb6c431/NC9aUMdqaQUYpkgGSxMQxAGcFmGZsItsNSmIpst7+BicNyx9wYVJth3XqsHy5DORAxN447d1BlwnGqFzUY/zpG50KYXZ7NVe3Yq0SGzOdpGWT1Gst7akf62jCa7gxn+xnH9xc4XTLh66THi6tIxJ4fq1wwnYTbm3ysuN6Xx6ngEAeZozeTv/p3TYZx9pG1UzCw+YXnwJ9NahCtvgbuXsHn1BycIoobnfEJ4ffovLkTZBnWqCMJ8YBapHKcDSCOb266Z 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)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(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?P7OMAcEXEypcKVb3DzoKMmIVkaPU?= =?utf-8?q?jdN/ySF6Pen7yVpKGAhhfjEf+MECnBgRFR9i4m6VR0m7qSDltPX+xUOwXY1LJowND?= =?utf-8?q?rkkWIEBuUzRDxDS24UMs5ZVHdOQer6+kEhui+tTvx46jqBYAIho12uze/vK5+sOij?= =?utf-8?q?FD+csD4vFiZL26kfXpJGbz+DQgylyi7KbV+nUhAwlgAA6x8ZNLnjK9BXVSQVh032N?= =?utf-8?q?vALO638SKl7+Y7nxgsybzq2bhrF9K/u5GIZTq4xKDVVJYJSht2UMZVe2e8Aa1WyFa?= =?utf-8?q?vriwx0Mcz53S+4mqxN529UeG+7g0Pdz+ZhgypqVO2mufuAX96WZqgTMlAlmKQ/JgS?= =?utf-8?q?uSj8Ed27BUgDtGmKLwc/9WMfafDvqBcuy63yBy2s2XRTNj2JfmEtg6Kn6sTfQ0jik?= =?utf-8?q?ZZ5Q4K99zRUV3U2E+PZlOB2YlrSGSRGZt0EsKqpP6nt958caoNzsLIDOP/nsUyMhu?= =?utf-8?q?M9DWCzxLHNRLCwQahHzZHSJflfqt72rOQeMDwLEmZmz+RPR9scijGJkdVh+vjBMb3?= =?utf-8?q?HMYIIBbamg0fB/UMLz9nzhjk5J3Y8a+8hFEfdjnJFw72mfuqAzyDf893ho3M01UMW?= =?utf-8?q?XDX2Di1VXXB5LA000hl6NaXts78CXw79SLPFYZSGBXCCYC4DZ12gO5Sa+j3n6N6X5?= =?utf-8?q?kQP01x9Z5wG/7ThvvwtMX7sHzBCEuBAfc1UskfaWuGtit1YmLRMG9phQn0WWeKT1O?= =?utf-8?q?tZSxJdtALvgA61jYZz3zS2mKXLL4uiwx4bC3wyoULgFFn27xhWoIgrSmH7yiJb3ZC?= =?utf-8?q?QaTo1nmEDZSUqdHXOnpVXAQ4D/oNQ/7Y7RK7Ivu0ahWiFTYm175zndu4zCGaVllk7?= =?utf-8?q?TDpGy2lBtDyXqOhZ2+sPW3JxVXeoNyCEjIHOtzqHO/CJFb162qsjV772N1Gu/EYWA?= =?utf-8?q?Ver9w/jcUPXgIYCHOyYsTg+oHIUOz//am5Hn6SBolY3Yt7nXVC+FUXdlzI+Ql8FeL?= =?utf-8?q?siYXIl9dUTIBIvk9LUZqtx7bvJ/IOday50L3e4X6bhROCXPzT7vj1wb8rfiSMaBE+?= =?utf-8?q?Y2VyqflyAmOjQywYzlvKoutEqqRtKRGvkHaPuMhuZ/2DHMlfdAIQ0UsMmyo0XFajH?= =?utf-8?q?MIYsZ2lQ7KlSsG/zN6DVDRiKm9WLQOsz4/RtcwoySBObTC1gmy2ReKjuHOxxkL8v6?= =?utf-8?q?WnBOGNz3O1ffgVzj1FNs6FLfiLsz+MPkJYKKj3nN7NZ1KpRO8wwVgkzXo8YxShJ7H?= =?utf-8?q?Cl6vO+HDA1GcbPkiTBgwIQiQnCQcVBJqNrJpJjln/dnCIkELtDUlSEaxTGeNXpS1X?= =?utf-8?q?VeZLQQFOxCgttI8e/38DI6X4mYaoNH6HGtuPDbfookKANhe9oEdbH1SLORMuLeylL?= =?utf-8?q?rwbuNpxXFPjEHFnPDbH7OL/qmgncSC7/rrwQSWfUmCWTeumwtUaIBtVCUQDSB/Rrq?= =?utf-8?q?4WTrze82Ks9DKyh0SN6QuWR9FJNQ8OQ7lErpE2S/C37SnK2N+xMpPVnJpiJ4fjfyt?= =?utf-8?q?a8qCxuJqVJ9kT4GGWm6JNO4ZWNeIFx+cIBUtJwXlqQAJV6/KDbp0nszIpay4dVvel?= =?utf-8?q?tDC02OWlDyFL?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: dbe3bf47-bed3-4793-50fa-08db83788860 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:51.1673 (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: 4ogRaHnDfHoIW1pUY7RoplPDUS14SuzOQdwPiQEbyYzg62tL25xFR4DfGk2n/Es+inmxts8ll9jb8Bmo0nA5vQ== 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: 1771295481270908148 X-GMAIL-MSGID: 1771297315284057518 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/sdhci-spear.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c index c79035727b20..ec6c7d8e3736 100644 --- a/drivers/mmc/host/sdhci-spear.c +++ b/drivers/mmc/host/sdhci-spear.c @@ -117,7 +117,7 @@ static int sdhci_probe(struct platform_device *pdev) return ret; } -static int sdhci_remove(struct platform_device *pdev) +static void sdhci_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct spear_sdhci *sdhci = sdhci_priv(host); @@ -131,8 +131,6 @@ static int sdhci_remove(struct platform_device *pdev) sdhci_remove_host(host, dead); clk_disable_unprepare(sdhci->clk); sdhci_free_host(host); - - return 0; } #ifdef CONFIG_PM_SLEEP @@ -186,7 +184,7 @@ static struct platform_driver sdhci_driver = { .of_match_table = of_match_ptr(sdhci_spear_id_table), }, .probe = sdhci_probe, - .remove = sdhci_remove, + .remove_new = sdhci_remove, }; module_platform_driver(sdhci_driver); From patchwork Thu Jul 13 08:08:01 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: 119663 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1680477vqm; Thu, 13 Jul 2023 01:45:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlG43MDXCfFeeQMQaTf6p45cttD2ErL/Fe+/X6+HjyoFroiPecreWuNGqi9EhTdX2NiyPdx+ X-Received: by 2002:a17:907:1011:b0:97d:ee91:df83 with SMTP id ox17-20020a170907101100b0097dee91df83mr768768ejb.61.1689237903132; Thu, 13 Jul 2023 01:45:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237903; cv=pass; d=google.com; s=arc-20160816; b=Uae6lD+zVbMyPJUh9D2XluceDjR/3AOq8/yVcavE8m3kHHaSC2qFySLXRT5fnZ7wu5 K9upo9vLiuFH+nkwwDpmFfsHxLEhsWEb/NbbmUDG3DlgEYKlkFDd8Q3mwUGDpgMVY21U 3sjDDG3zAbrbcQQI8m84Y4pqBXEWcaHweg/iOugfFGRCYwlS63Us5U9MavGDXbsRqIKD p2xEMxjsXmdrKf/XI2mgrJOnDzWJ4y4jUJDZ/bDYYxqHzPmJ0L8EhtjNyrKJooF9uIXn Y9qjY8/kTdVonzZtjnHkw625G+48f3fom3TTPsish+t3J23rftwn7ceL5Evk2MTnLDOi FTgQ== 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=gufcrtSc7ru1/F0WuXeyzF62082GBJEpWsdrwZ/EIrE=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=QteX9CiAkfza0A0QuzMSOkQbMbcYvx3PZgAEC/xTe1nf+2rpJvEJsKCHTgHAXt3+Ty X7GPQ6VKGIbs512QQ5aaVhdMnNz/rNZRmHufbFK30aizcLWAM3OSzsRKKnIhauaIrI/z UBif96VxMnf9kT9ZjZTBbUEfVMc2HcSTnaEwrhSBDi+pOaQc/ARYDkMt/79F5s0B3LTy XVsy05lRhV9BgkG9HfeVhyiqy4B8RaJqvTmjgm/4CaWf67VWnAjoa2P/krVlK1D3M/vw Omb9eUW2vPc3DLeY9SV/u7qjPuETeWpIqHkVqOZM1IFcXzp8rsGIqabERKQ3DJpb9Ocp Ey1g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=nU9NtELb; 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 k18-20020a170906a39200b0099396546fffsi6641346ejz.782.2023.07.13.01.44.39; Thu, 13 Jul 2023 01:45:03 -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=nU9NtELb; 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 S234343AbjGMIPP (ORCPT + 99 others); Thu, 13 Jul 2023 04:15:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233141AbjGMINg (ORCPT ); Thu, 13 Jul 2023 04:13:36 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2123.outbound.protection.outlook.com [40.107.255.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC36D272C; Thu, 13 Jul 2023 01:10:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VqAMPMlPlBQCWF7NTB5SSxSqLcjQKNJicwcXR3/2BE3mesAgG2bi3aroYSAxxnCOxv+DnVCknriacpblSreYbM9ABxw7soxinN49EE4AA58vpNv58PiNsEFIIkP3cjtS2AQUgsYls4/t63NUX1SJCyase4dgecI6QAy28jlubPEduKPS6Ti1ZoRxHkwsBYEvyLpg6Zg3vZdoVimT9giXd38FjDgDs5sye2zhYGRQi9aR71VVV4PUaQbm3dDFCmaXIeJHCOt0u0ptaEaKfRlVJqvAnmrnHoWTPzp9KSILnOGvBrX8IzBnDcdYEFsskqYnkbdjNkM+0hCv9LBtCEUBXA== 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=gufcrtSc7ru1/F0WuXeyzF62082GBJEpWsdrwZ/EIrE=; b=F3yDA9wUxKdLUdC0Tv8TxQzg7H5kscuwn5OSr0ainEE3AG6lBWGlcr3TUShp5aCclbp4CGjVToRRjDQFwv5Blz9zeC1DgFbsJHHjOvIjYKJYlb7+torN/piZOhrG8b4NqoHkVXqrtp/1W/C4YFpDvRyot68iY9WN4mu34VRCB9kQPIA08/S5PXwRmXqku5kQU1ObTt2/E5jBtXUM4QZ12+xEU1BjXl3+AjVt7xE+WxGmAQAa3JSJhtejYIExk9VqEA2p3DkFKU+u/B18SbUmjR8g4RDLbZKUf/SDC9lwwDp9zQNGf+IgRxR/Oivj4Kdw8B4ghtmKWy9hLKsImUOA/g== 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=gufcrtSc7ru1/F0WuXeyzF62082GBJEpWsdrwZ/EIrE=; b=nU9NtELbuMTVU4/gqQ5Rhl2l8FxPMJfu/QB5QZSlF8uMDhlPsOKGsBGqZ3IVqvxEwnDqxDk6gbevid3RkepzweQqeEYOGhM8KXPN+IaJ8PPX/73zgQquZEUCYgWncWOzNPPdepaAmwQCh/HsWGwMqynGeNvtKnDe66J9lvJD5Kh0khxX8fdpkGE8LJ2n/bUXnriBlEMxJuqZQYzM3557l7YoIVc5Q5PPOAZ+exqXW/nTz6VDXGEECcloaV8iXtPl+G5uFk0udaY6LbUuVzHp0Qz2keHzSO5a32ewNTmZx/JahhOXn43bY5P5JoxvbtbB1y934HTsymS7nUF1MCtkgg== 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 52/58] mmc: mxcmmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:08:01 +0800 Message-Id: <20230713080807.69999-52-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: eb25ffa8-e46c-4ebc-8cd2-08db83788928 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tC2P5CFRChKkNBAg8h2KSIxmHO+uENeFUjd67eL/9CUV8TzyG5h1E0uAV3vIxkQKHqFGwjDS38CJq5r7hsD7jpLJs1YA9GdpqtTgeJYVdh8F35kQUiMcwYW2HWU4on8ApMfvHfVDAJtW3JuCIVpUhEsvZ4Gk4IntafvEPPSsL2aol7XPZsLOFms9wiH1Vso/OzFfRPpfDdlB+J0P89m+yMRoOC5ucZKLilMgj9V39DwKpZM+hYSn2JcPf4uxdbTCmvYH4ce6tAWqFGhbBkDOCjHXj/3kN8dRNPDFhcjX6o3jTyh+r3ZYtfKJjSIvsI0YNU90QtKtm5B1zawAcrbALIBWRh7+A49RtGNZnGoKCKtANIdpELK8K0DCCdyIbzo/D+nguIbx4BTJzt5LjgMQ7Ut/CYyEBSoML7U6nTZeLBARnP8IHpDMVySS0woRWYUuFKsXbNBa9PnJ+YF7j3Yqwd4RkwUTnasUhRPayM41SS6jeg8FFO/srThDzWnxuDHSyLKBhJULFLthlQOpyck8FWHesUxc9Xtx9A9OCOcrHaN98x6Ik+YiM91fNZbZfEFT7TbPfhP8/iPpxght4+0gxq8dCN/3IHaE9zyEfWs7rNxE2asnRpTqPw3w+cqlxky4 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)(66574015)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/HrhEFoRZbJYRmrH1lc8btgvMCTG?= =?utf-8?q?CzX34joDNvyyykkDwAAi4sI1XM6h4Le0lvI83dSTjnFcdj8v3nK5emrFGOQIlfvvi?= =?utf-8?q?kRY8Y8iQuXwglAFBLtsBASUHevyTIj26WW1moGCFZPA1L1vLJFfXDj/eeV5dGYNTs?= =?utf-8?q?hmIFYxYeMmQtXwqtyaKNoFLxPv1lWio3FeWYTSrGqp+5yes3IlV7ihZDFTYm2gyqD?= =?utf-8?q?PlpGgMYfJyY0cHTp4ylfDDHWVs+hRTahEKVJxf9AEEfvLsDAq3qJhpinannEYOa1T?= =?utf-8?q?clO34zl1D39f47be6yK30MgUBOBOTeLrolLgjCPDmiiWBuAxv9KEw4G+jL2O8Kwtf?= =?utf-8?q?8EW98tKPaoyWfFwESvVEMxqajA7XAOS7RHdLpzOqeOS+acMY9S9YFBAdrn2bM4CyL?= =?utf-8?q?o07Bir8oh6Y4amk0UvXJOK0cS0sG5rAxECFT/D8444aqlhN+gy5yWNAuuJkqcDdn9?= =?utf-8?q?Rr6W2BwvwF/L1DuZpXrRsEq/7YMAkvemWAlaT2co66V8qKXYy3UqAZ7K8n7FWEtrJ?= =?utf-8?q?LsBL4dYd8RnxiNoDb49qKogXbWgXCpBxI5QfK1Er+u193NCK5NlR0/px4Dl2iOi+1?= =?utf-8?q?9IS491uxd22IglmoAdIrcYFc0k9/8y6zMyipn5slc5y8XLQZGQVQd1o5uQz6+ePhd?= =?utf-8?q?O2HP7PvFHylkYtsdlZrgAjev900MbXK+Dhd7gO7Qas93maKwKGm6PgkDle7DYHS6P?= =?utf-8?q?/lGB2jPyz+YedxbqeejqimuqKxO/cp0Uq7lN7s863gsCGtKskPmsWkUDq62oP3IvH?= =?utf-8?q?gOPjQQeBifSmLSUVC103zbpoL3ih1ofjPOdytxw06uKkgSdc3E/alYHq5EY2IhhDj?= =?utf-8?q?fkuCvtQ7RIwByaHdgG237U02t6dRd9tWiBfyn7y3zXwIaWTaSajJLYZLibsEd4kiG?= =?utf-8?q?+mYedF/JxwDdkP28rI7A1a+J22tuOIWfJT5d/13O4khmRIoYDzRXjXSYtIHFQKxEB?= =?utf-8?q?mfwIBib7dhbrmXvTROJ2b9ui8FsJ8FpyPbTRBEarPL3tW+K49tGJRnjC49x0ZKe7J?= =?utf-8?q?YAvRtPC5FOxfaDAsaSfbq7f1iBQlacIE7IzmX2PKh0oLcl0bhAlIEQXVEB2GyAY24?= =?utf-8?q?fQuGZZSVWbuUotiJOsi867v4JrcI4BKQzO9HyzCuRYtF7exlTNtRivHjkiCzL0TUF?= =?utf-8?q?FkgIHlcsXygyvCc+feIlM9dsVNyWa4DRIxUqHIG7GuTb8hZ01jFuEcI8zsvStT1aV?= =?utf-8?q?GFm5H0BsYb6jFtraImu4n/T4Cul8qxW/sa2CHWo1Yb4T34bptEClYL9TKmeBP90D+?= =?utf-8?q?VrtUdy+Pg+nRiHt2HmQZFim4/dxPdTTnvHk4GIL8uzvgOXYnWYDhyzEQv232VMKaq?= =?utf-8?q?CFHQcKSUgGEGe9r21TDMuPSHCbiSJJ4oEP5OrQXhYUay5yF6ECPHawkhWmk6lqKQ2?= =?utf-8?q?1KxgUkpbTmevY8OlvN2lFG9p+FBiw9K21S8UNwbX3i5v8fVqJpLNSwH0d3/E2S9Ek?= =?utf-8?q?g80LHfkUZAe3K0vqv1N5WUlGo/lTOhokljMFQS9lRgfLa7qXPImnl444IFpf7ABB5?= =?utf-8?q?DDpNMTskokBk?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: eb25ffa8-e46c-4ebc-8cd2-08db83788928 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:52.4880 (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: 2QTu+e9zs53vgbmOGX2Rvio35189z2plDzGcZoT8pzz7WxhmD/qfpRvGkMgiLInefETl/SP8CLhfk+su3HN6Bg== 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: 1771294323386915382 X-GMAIL-MSGID: 1771294323386915382 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/mxcmmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index 668f865f3efb..c46276bc21cd 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c @@ -1164,7 +1164,7 @@ static int mxcmci_probe(struct platform_device *pdev) return ret; } -static int mxcmci_remove(struct platform_device *pdev) +static void mxcmci_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); struct mxcmci_host *host = mmc_priv(mmc); @@ -1181,8 +1181,6 @@ static int mxcmci_remove(struct platform_device *pdev) clk_disable_unprepare(host->clk_ipg); mmc_free_host(mmc); - - return 0; } static int mxcmci_suspend(struct device *dev) @@ -1216,7 +1214,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(mxcmci_pm_ops, mxcmci_suspend, mxcmci_resume); static struct platform_driver mxcmci_driver = { .probe = mxcmci_probe, - .remove = mxcmci_remove, + .remove_new = mxcmci_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Thu Jul 13 08:08:02 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: 119630 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1676145vqm; Thu, 13 Jul 2023 01:34:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlFeo8G1eJ0FY5tklUyI4pGGjzQkBt61t/EBZgdAbR+o4PVpie1yqklbg6cNQ1n1OkuAZeRk X-Received: by 2002:aa7:d3cd:0:b0:51d:9130:3c54 with SMTP id o13-20020aa7d3cd000000b0051d91303c54mr1030447edr.26.1689237275185; Thu, 13 Jul 2023 01:34:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237275; cv=pass; d=google.com; s=arc-20160816; b=H4tGLpTzFEC8TWaC+jsw2FyUxywpw/LHieEXAJNvlDxMCtAi2kDcXxNfr9kpsKY6yV VRbb/KPsB2PtlWnbMBpwTfdkHNthTFN0/Oaklp6kKpGcRpTZo3uXMM6zzUoyJmP6Vzo5 MlXg9srRv2plaFHI7k6ovZ/p40vEa2jpg6j/weuOFAQp1Q98Va6ofjvehLuiuF7asiuQ O2GHoaZltt/ZEJJ7q7k+bnDMzKlYm1Z4HDHR17uz69lppOqbJCniuUCWCXBA2j04RuIQ Dc0u2Wg1oJ1p2PpbazrSH2iy9xXzVPy6pahqld4YzyJC8VrgzsmBQm43i94JZR8CxhtR p2rw== 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=Wphu4Q5Iae50th4Q/VjZF6H8HkQGUHhGQ950+qm5eQs=; fh=WUayfhwsFyI2R0meOGTXjXcOW9Lju/3B5D3r7aLramk=; b=rl1BZZEPZzuQatZ84F4cmITEFntR/NpBnpdbqdfDOS5ApF5LF0LX+A/jeGbLoCVuwL YsgKWpVyMVFugq2d9PiabnD7RN7nbdFI7WF38y3Bj6jaX2ynlQIZacAP0iby8P3NMEdI JCw3uTL650y6Rvm8VA5H+hpQyLgURx8nnwsW6WlwtwECATvbyasX2SY9vh09sfuvcHYF 1zjocPU2CrpgYDHZpDkQlNmYAAEvrr2LoO7D1tvTgucKJjm7wM9TwYYDRKrIlI0hFoXO lYSOWz2t5D0zLmrzk/g+S6VP1G2awJlqdrLwNMuGM4ULMRhErXgqtS829Mk1t2nRPk+r QpNg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=VudOY0In; 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 y24-20020aa7d518000000b0051df3a080besi22586edq.72.2023.07.13.01.34.11; Thu, 13 Jul 2023 01:34: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=VudOY0In; 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 S234508AbjGMIPZ (ORCPT + 99 others); Thu, 13 Jul 2023 04:15:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233770AbjGMINh (ORCPT ); Thu, 13 Jul 2023 04:13:37 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2120.outbound.protection.outlook.com [40.107.255.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E0E430F9; Thu, 13 Jul 2023 01:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EkYuSPPKk6NQCwUMKpjwRbeAlV6bMCKKUSfGG09wl/9EumS/kKTpxVSfu1oUq+hHwhWTIqfAEXet0E/GiYMeWCgRvsqu65odDw/9Naq6xowJXyIdGktOh2I/aol6EXUllTUwmFH0+q8zaiBDeksnxkvomeJxN9O8mV8C2xuJHcDekrhHAsvaJRQvMSmMk/P78YAtwChEk71i+vTAguGRg86wJc9Zk+uB5KbkEnLQUBC/pIMJ1XmN+oFlanZxOVcb+wx9bHP6cCRW+7BsJwJojX+mzkq9P4S14OVEW5GKHGiwn4awHRKcrcUC6nzjyIB1XdHERSvRAQkPALDEE7teZw== 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=Wphu4Q5Iae50th4Q/VjZF6H8HkQGUHhGQ950+qm5eQs=; b=iIzrZUbx0JMdyvdJ0FTDI1QPkloNeIL6t62y8KzpZ43db8XnPbGWCX3MBZdbZhIFh+1tovoOa9DTpfGVioSNfw4Pfc8UlgwO9CnXct9arwoRLb59xqTQkzropg4BBmI1RSLygdAChNsZgCL6yPD4dCNiee9mnOVwS9QWn1vfxsHLnY8MEjmp0FbdbgbizsTmx6LaKOZrW4GFCrquYR35DA7YdcMCIKBYyCYTU1eZIs2OYQ6Wx6xscysFVoJrsqyKxp2tVjF7mevi5/MvrM1X1TVgOy9JaKmdXhDf2/jRinrky+p92H4xVwKG9Cz1AubWiUhXILroq+38OZkKjYjgow== 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=Wphu4Q5Iae50th4Q/VjZF6H8HkQGUHhGQ950+qm5eQs=; b=VudOY0InlJ/MO6FuZlBu75VEN0oguPr99Q1FQ8jW00FF6GpP5LTwreEdNE/MEPXlFE4eei1c/6/NU6v77rUYyHMJt7M67KPgxG8wphZ4H3E7NxvokHgVRbnD90ul0DVwFyHzRLl0UrK4S+jV+QNqvykYJvrWeyRLo7PZpzlo1zPwjdZ2aIZH0Q4girOY8LN1a/VKIqiGpobcuAx2tf03XRJ6B6Urxgc+RzAAS/g2TmcddXZp1bbXaq0ZPn2HpjVrzHnz0T8sKsR3ym/+mame4YDNzhTY640HEzzI9Nd8WEtZ9O1fgH/uOCS36txhgtgFNeIOm01E2QYL/LwY5tsZMQ== 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: Nicolas Pitre , 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 53/58] mmc: mvsdio: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:08:02 +0800 Message-Id: <20230713080807.69999-53-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: c7127a01-a44b-4be0-60a9-08db83788a2c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9P7MaUa+lPX+bpbjfDWnZct7XEANSkkbYE5t+phWd3jhmWEiUSoPnaoENK4trM4r6uq2YyRgv+Y9/xEEP8mp9Fprt7Dh9rrJEK6VSS1kX6RE289yqUKViO2oOl8yQOvPZ7DsDnpexXa7fsD5yMqmbjD0O7Fx6bBmEogoVh61eX/egZkJxySDE8T+izBx7HAFdPgMWBwDnZsv6uAyDlo6tNvAD+AIA6ikVc458LWTI+uG0Qu2xoJFIfybmob9iHhHoQpVzqM8iAz/211T1KGaO3JZqFHnb1VG6PCUrJ2kKsWcywt5NBv0qyOiD7SktP1hG2VDujRM/1PWci8PYq/4TctSiy8B6OJ019RLoQ3c8ZGRuva98+zpXwnrAQgAU2dE2rSpflvIgI2/fBf15yD+Z90qvEzAm2R4lVWP6ywZODVZ1eesxSsFAR2mK7xMyj8h92RiAfoX1kFm57KbIRHKpWauKMJpeq6bXgGxpH/eFGU+2Z4tUYKvWSQD2ctcuG1MwuE0VeAF6uI2a/MNiwxkqxOLhen2TpGn6xmRaTUJ/U4D0n8p97MaMXmg81PrNYQ+JcLOxuF53Q1MLKGm8auMn2R3TAySWt6QUfwcX+he8E08y50TFitQpDccFtT0FYjz 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)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(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?2eKJw5N9NvnSxUuBTOh/4RqhBiAj?= =?utf-8?q?mgd5XpMk+/8+zGNlhmrSghQBvTS8WwR9YiQb2buywl1/0LFEkridzlPI8WxsOgP2s?= =?utf-8?q?lDqfyKltBZH7sK2uTU9F2o5wgOkWG2pDvqZGztFnUy+AdvI2lu1O1SnEIbL9VMB7J?= =?utf-8?q?+TEHEFVnzA5yEQ5upqZiMfkRClMG+Dzv0+o2n45oTf5MaXwq3bUfkPuZqPWlLZG5N?= =?utf-8?q?ez4ukBXw93Um7bN9C+61LDkJ124sTjukI86NttxyFvxtgxSqAN3AHlCFPfCBPvnqk?= =?utf-8?q?BWheRNgrDsylacyj2AP+n073G8VirJB4gKo2lzH25Omp8JBwszjwt0dhlzTMMW30W?= =?utf-8?q?M4ag0KO+DXJ3lQ3l7FqkyeFUNDVZ+XZjWulhvng2u1lJLAQx9u/Jp5Q/xvAG1L07H?= =?utf-8?q?ZulAIZ6YYSUSXBN7kWQHwILRSYI1Myx4e+r45+c4COrgsVaEQbKuEAnvZ6w+Jt5HN?= =?utf-8?q?aQrFKtYTmnEVlPg0oS51FKZ5UJ4jsh2v7G1tgPjQ7k3T81YIfPkDOrWDaNuTCfso6?= =?utf-8?q?L9wCr6UyB1hgFavMfgItJo+u//nPR0SfdpL0qlUPhSZQD57vhIiV5kYvRkMaFTB1S?= =?utf-8?q?01MExjDLKnDxw7nbUseqY1iogHFIhHbeXEWrwqrogFbtWcEBMINrY4/V8kWD6Yljc?= =?utf-8?q?oDZpf8JRF9F9A6ofhKHvG1LecPJoBOYAUgcEAnPwm4QK8gA2INarhGJQT7oTB1EoQ?= =?utf-8?q?zUFDF8dHmqH6kML/zgcXIA+TcmSx9C5em3p6onDFog0QSrvCegQh9iqHIHOFPYOkw?= =?utf-8?q?unVhwfyRacdaGSL2LHw6DESu//2S2o9RZoxNwzraYvdddTw5D8IBsaSn2okF1JsOP?= =?utf-8?q?jB2mvZ4r1QshxeU2yvAugfqsxLCXEAJdtp3mPX+kZsWC+NytixuTKmKTtetvVRGiF?= =?utf-8?q?Sn+MS/HRXFgRvzPDY8ApXhMl9eiTrZRSVx4Hl5CEQoA8qcByo6m6tEJqPURkxQgHN?= =?utf-8?q?Wl3B+M0I3VpgjM8ucQUrbIp4/CzSWaN8pjKJB9kQO9e56knfcbptmx71bV+akh/lc?= =?utf-8?q?x2wYhB6MuCkFjtLIn0S0kIdKszY2uQGL9aw4JQubIQX5k5BVzVjjSSA3jdj0Lbti/?= =?utf-8?q?OZ+1a9iu7hq7ePiOdGVe0nPZtS/YoD8ZWoMRmciZWkZX52A02RJSYnd/jyOE5P+eN?= =?utf-8?q?w2tCccLJTU4kQ74kRmgn8AbAlhZQanKTVqZYqxoYQjZM6A0dk0ddykHC1Zj60FCyY?= =?utf-8?q?v4H3PhMDb6Dmd1PYUqyIpWR+wzJdY1f/wm1NVWuLC9qZ2gtOxHAcEGiTFsJx7IXD7?= =?utf-8?q?PeUoed+EAE4qt2DzpsFVbh27X9gpm+kBiblWjhpIKJDdEZZ9eikSGNpxiwehjxixr?= =?utf-8?q?SFPRyH0dq4Z7rmh7F2n+lv0YRWYvVyuaY6l+6SYZLL0r1/Q0PAE32T3aycP7xuifI?= =?utf-8?q?5cuJCpih8U9OOqDAR1eEiZUSqQ2m7xWJ4EMgjH1mEgYtUNdyDNeEBGDPBX5mufjtI?= =?utf-8?q?qVEjSmrgAE476Q6qLwrRAcrlNHpLtPv9WXHcyQU/atYFuvaf2qt4WB0SSVq/oscdH?= =?utf-8?q?eXVFOkIku4jE?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7127a01-a44b-4be0-60a9-08db83788a2c 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:54.1836 (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: EJ1DgpHISCAhqFs0moPXXrjAL6eRJyClNEtvKhB+kCj0gb2L7/DiH8r7bHMUDGeZqV+yRxtPP939Q/SoDezqtQ== 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: 1771293665411476535 X-GMAIL-MSGID: 1771293665411476535 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/mvsdio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c index b4f6a0a2fcb5..ca01b7d204ba 100644 --- a/drivers/mmc/host/mvsdio.c +++ b/drivers/mmc/host/mvsdio.c @@ -796,7 +796,7 @@ static int mvsd_probe(struct platform_device *pdev) return ret; } -static int mvsd_remove(struct platform_device *pdev) +static void mvsd_remove(struct platform_device *pdev) { struct mmc_host *mmc = platform_get_drvdata(pdev); @@ -809,8 +809,6 @@ static int mvsd_remove(struct platform_device *pdev) if (!IS_ERR(host->clk)) clk_disable_unprepare(host->clk); mmc_free_host(mmc); - - return 0; } static const struct of_device_id mvsdio_dt_ids[] = { @@ -821,7 +819,7 @@ MODULE_DEVICE_TABLE(of, mvsdio_dt_ids); static struct platform_driver mvsd_driver = { .probe = mvsd_probe, - .remove = mvsd_remove, + .remove_new = mvsd_remove, .driver = { .name = DRIVER_NAME, .probe_type = PROBE_PREFER_ASYNCHRONOUS, 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+3l4wHjjzVDlZ4uPVR6Xno/hYZZlyBIwZDzsAJfJ/mQ2s/GygMhltJF?= =?utf-8?q?UrbVuDg09mCOQOzo6Wk55I04SwwywFwrtNjBqSRcWnCeOtJBQOmvHJSCpmDHU6sQh?= =?utf-8?q?3awtxwa8cmCqe6QojVrgW5nhkk1u3BMafz+hozu4tr2HYqg4W6A9yk24qC/f7zHwm?= =?utf-8?q?9DwuIRqdPJi9B+Xa6WKZ4VGND+5WHVhkS6pNZkk9QIwQ7Cf425NdDVTXunRncIhXH?= =?utf-8?q?ViMVtGN0Vb9UKqzWGyBAJzKWqP8j4t2Aiv/fi74gSEhgibQffXSK3Pmr70Nz16Tuy?= =?utf-8?q?eAg69sJJWdLC5QYC+AYIqnJVLel/R7xGX/cAzUyzSwqODBUedWg9wqEHrPVE2VV8j?= =?utf-8?q?X3aMsE4mRNS7cTCZvdg3cD6fyMTzC2iUbYJ/kO4/7YGWc9MsMiCqNgDVg5ouVJ6rv?= =?utf-8?q?juhsf6GDc44WJu/A+QjY5FK7sZrZ9Me4O43jiZXHAETHM4WKgn8NHg9Hzz37xW7xd?= =?utf-8?q?5owwwzH1svPELzfH3asHsAbzsJb5LefZ3YMRumR8vxwBPpi6FOUTd1okSAJC09hMc?= =?utf-8?q?XPGyne5eweI1Iw4sKe9K5mkIvXhs77WbuTSzXP5RMHwAkSuUulcCZT1DiyP1kWyVU?= =?utf-8?q?ozZkmSK+eTx0LkZ7i/u9WgB/ciVdsLFYwwxp0Um67q0B4Uf9wsNWwQC98Rog2HmG0?= =?utf-8?q?hCOIOKwibhjvveiXgcrLDYGMAsKbqpccF8KSNR4omS/CbRTGQbA8m1RYdSjhyXcIg?= =?utf-8?q?v/vNWgbSX6hT8+cz2ZAAko8cdBJ2+N5bNIbQNwhD/khUFE1/REd5rI5ZPN7/dbnlx?= =?utf-8?q?8zslAEIejgTmzysa//TJkOmiXAHEuVO1UJZY6z8XmCxBs/xiyyfdeWq66TqS86Cz8?= =?utf-8?q?HnX7uU4AP/yxm6Ja1Y8K7ChmDa3Yf3Rr3JTjxmhkza95kuVqxYQWMhKh7aQBb/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, From patchwork Thu Jul 13 08:08:04 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: 119697 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1691107vqm; Thu, 13 Jul 2023 02:09:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlFdn/IFF7MDXk8hq7aSBp55Pt/N38UMxeCsinnXrq8RzELC0Ze1I+kmmmPOYmGCZyVLACTE X-Received: by 2002:a17:906:1d4:b0:982:c69c:8c30 with SMTP id 20-20020a17090601d400b00982c69c8c30mr887312ejj.55.1689239355984; Thu, 13 Jul 2023 02:09:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689239355; cv=pass; d=google.com; s=arc-20160816; b=cpGwSk5muziv2HrVe/nTmWipVsyOwERg0f42m4dMiGA7NnhNLHrfd+MUWZYxhblWSF J0eDBWahSyYO3ZdJ9qm8j3Nwz0m9W/94/LI+S2wCdGVNmnGrOyNlsSH3+bKRcdVyQ26f ilqWLrS/jRmAlrMMcMdrDTjxp4g60q/Idzp90q8CCCcIIezRaOW/D7tMRw8LAaVv93Fz cy8Hth2Z8pGAaCkDvC4S0ET7Dtxz9u7ekSfYeiOrnnYGXi0Sd0mWJwpRpsAbl41/7J02 6Bs8zZqQh0N8/WKUtSBVLbCmZ75R6t7qDPCToFalmCV5vxEpI+dqPRzb1z0yBSsN9+FC AIzA== 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=aND6LsV253j6A+ImhvFq6Ers9ahG6p42MJ/hr95mi2iVW229bNLrIVpT9aVv8qT7qr DcC9eioUJSF2A42fpEMMiZ77Qa0ZZFqrH8A517IyLNt8zOtsviT4n8lOZ7Fz/+3FqwHg I5R1iEeGPeYrSIHbuOAx8VIu/gEghShewuauR5vEAdCa5smUN6LI06VkEOYcajPQCPkH 3D7vdBOUZvkyyyNQM4ekAoYGV+LFsktYSBOLp7pUjSJgve9BbHmGduTs/4KNSvQV9xo1 TGWswZIIfrlpjCIQ0mQaagLh2x3y3FggcunMUNfVFieEjAyk03FjnOO4VSDciFheVwBP 6tPw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=jGEVR4Jh; 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 n24-20020a170906119800b00992f7fe9c0bsi6813115eja.328.2023.07.13.02.08.51; Thu, 13 Jul 2023 02:09:15 -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=jGEVR4Jh; 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 S232011AbjGMIPc (ORCPT + 99 others); Thu, 13 Jul 2023 04:15:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233746AbjGMINh (ORCPT ); Thu, 13 Jul 2023 04:13:37 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2123.outbound.protection.outlook.com [40.107.255.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAE2030FD; Thu, 13 Jul 2023 01:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZmqHDE4KgX4HWN8N2mtjFJ84ngQY3HGiVNWIgmQwt4qGIvD0hkmdCO3ZyqZ51N5xHQEBZAJ4CaN+gA+VRcowN3e6UAK1pE5gDseUkBuh9UK/7GIC150L5JkAx6vZ+97EbYKpT4a2VAtCtMRDtcZCkdfBN+qAmw1yktK66+IVEyfjVzI5prO862apF9kOI84W/eyvIvET6nLN4YGf20RHoosFlKToFoz/4/c0zRN5eGVEOensPd26yhEhYx+EAyTjdo+ZtkupPIUBt+7ZPsbeoU1eChpaKC3LkHxR/bVUPCYBD0Qzu77fLvQoby6z0v5DiR6+ZJHJxGsAPE8zdRuCqA== 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=K9HAXPoJwFt90Gqw8u7P1tj8KQFWGHmCCj+os1w78q5KwBxxCLD8Z8EBJx3rms2UN7PrBBdBCNIpyxRxJNLxOtBSc/RSoGwY6zV/XtCNcAQBuazo8f6DX+37MQayLGL7xQFo5x10+/LaFjjajCxBsYZ24vcT1/hbCpjHQ8S95EstpHr3CNdmo/4nhozAjRy85aSie5wtfM3QcfRiJJoi6YlZM15UDDuJlbotZ9DLStV4MlAy7gpuGFQGeK0FQ/VRVNKarGuDG1r3aZc3PW3HWtF9G369mvlmE482ORPGgfpeN4JtyQljijxbuqPj0yM5jeZe653pZ11iQiI0y/Dl4Q== 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=jGEVR4JhSArKKp7YpaSBJZz3egQBLceO00GZOvrjAkpHibCCy5+7FFtmAc7KvOU+Z5G/VX+WcX7h992KOsDtyJMXkfypDgjM3phYnzycnuzhKHVx8m5wPkQUcygxLppfUQ/oOYaM8za13kYqMIKHjJ6kVa7fUDNuxrxLI+LMaY9vqWDIYlfJbK6w4XMZIKHuayt88jheQA23gZMXgZIWZ41aXEQ3BGS+1HqvAS4xd14uiUmwIWSIFn5SOqlDOUPSdLcT6Brzas+3jCKkEddzSy3Qh3BK7V+QdlLBqtwCOgQ8lQmEy8Dbw/ZtVmypO6wNpfJ283Isw6f5pTXMYw7QZg== 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:04 +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:04 +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 55/58] mmc: pwrseq: sd8787: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:08:04 +0800 Message-Id: <20230713080807.69999-55-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: 5c93b580-a866-4199-cfcc-08db83788c19 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uGuwkwYYMfYCsnCQw6g94pV14j18hdvN0sapPP0998AxNU+1jRgci5zlOp+n+WQckFaUBK2PPoxk/4jTsA3EujA4YlbvQSXaKbxM6f+9KDT9MCMQZ2yPt/m3c+Kc2tDmjYavj4cd4FiXaEUQEKeY7ev1nxNHdTH+Nqj/jZwcdELLcuK7TVkOE/85JMVxI0XBKwsUUC1845bYWwn7YHf7EcVAtvMVfDDxIWBRWq/qNy3oktUCoavrF6MpNaJjT8bFylpIrct64SzvfdAVPki0m2dgiV1Iw2h4A9j2uu6SZ7kRqO6FJrRV44CPXeBppt2P/YWTQzuc22RBLihreamWVSJtIyrdRxgjXISIa11k//0CmArQOpJH9CAOa00JcCk10hTXtz0X479nfPh/9IZnOxTy+fvQL4Z5myEfOaYbEw9oy+oLcND8cT68dcasKYq1419UJzQbTcS2ySjX7Kt2YDBnIz5UAdNVAPbgPP0Es3u+esiwVWOyokVbPBRNVyp/VCaafSURN2+H8OjyGBSlOSA2eKTjyufVtKAqk4dLjdwgR93c86U1XUOuv9njZvCM8AhPz3ppdk1qP+PV/8wBlkuCHkPGTBYLkk7SmdyjuJfmxeqTsIhsNZwCQUv50Ice 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?1la8k37r/A2hdNhUlSlB2zvF0iSk?= =?utf-8?q?Tf+iQjAQsMB48X+3TYJftBeMtzPVwajcgWinN1g0SGSEk/hkanElREiX8QDZQvBcU?= =?utf-8?q?pqXIeP58UPoBPdAbIfH/IAhhTlmBKnC01ih1f/LOMZ4ZWZSSJ1Y2MZZ+aP27mOksf?= =?utf-8?q?ZqVt4LWtmKeJL4mynahU++Hf/jECAUO8CBkQ3PJwqR31sNPWBSScuFoKlKXta0rEK?= =?utf-8?q?8pbMfc1/A3dBjo3A2NeZxZ3y+vid8MyWPLaeGxzuztLCbLbjhzBWmQYGiGDcVvzF9?= =?utf-8?q?MKFEYgK4y+H3HGvVok/creLaVxKR0bcS4nlpKDBl+y9bk5ULEkG866aOBI+Qn1Z4i?= =?utf-8?q?6uHdosOoopfYXBJ0ngzk9rQW3duqhYqFZHavIF/5h4rxwrLqikU93Z3v6SR6vi2ID?= =?utf-8?q?RsylwQTk6R2CIpJwtmpwEGpQ0tlM1YbuuhF7Y8sLSiBeuFCpErAGfDdhlxmCr9ns+?= =?utf-8?q?OH4EQeCc42u/UD654xUqauVmTxbxK/YED61p6uJ2oaSB/9J8i+49XQh99tQYSOf/0?= =?utf-8?q?q1hboTCqV8nt2ex8kfiTYCXgMeoutqz1GWgDC2WbNDTWCp59F3Bi6Z7gRMHcQGsAQ?= =?utf-8?q?erYWPx4ghlGVPVlGxf2QI5tgOreYOJ+O/4ytpcH+20YqkLN/kaCXcQDFFhfJUTDnW?= =?utf-8?q?eOSY5jClbHAfkyN/xYyA8XgfxS3ZhoChS8OPhJb8QpGze6l+HAGHPk+QTOsaoMde4?= =?utf-8?q?BLBCnaY4qyp1bF3GL12rK7AeV/4DNUCT8x/g4HVZNEcj3eCeE1/Ty/o6D2wYpNTS1?= =?utf-8?q?VGV2Ah3TaVJjysFCHshUP9ywZNpiHJ471talaqL+aAd0Kk93AoXeM544pvPTrbAGY?= =?utf-8?q?s80gFuL0v8ngLgpgotGa6GExUmqrkh2IFnHS1kz7X075R7E0mpIRtdhvEAyEC2WLN?= =?utf-8?q?YCLaxU/COJG73+5dJHhgWCx3y+C8fPC2Obm2uA3NOQS713ztFbdqonV62RWNTW6zU?= =?utf-8?q?NG1DWvp3Og14DgXrManpsoxtuvxiWuzJQ/c9zdLhw3kN/AcLbV/wHkrz3nUCmTn43?= =?utf-8?q?OyHT2BkKDhi2E9O6/eNrlZyvsSnwIrnBT0kFZ2VhXhS6dQiQlQgfXP5Tr2QLw4qsf?= =?utf-8?q?qgwRLFUcWUPweoiucbUHkpc1n3f1InZQZsQU+mA6jWVCvIrFAyGhsnJGFtXq72FKh?= =?utf-8?q?kiHtEteH80VRVQDsoGe2SKEk86znGPzQbuf2+QyfxplEaNgdfo1e0GB4A/MbCywqQ?= =?utf-8?q?mkfQLV7gkh8PB/lxifKKr/7i6cnFhrGKoW8QGcBKVGym8MmcZdewQNwvWozctEsAh?= =?utf-8?q?JUChuDE4XPNZsgs5+aN3xDqEPR05+5PLYBGQX6T6tr4qZWtkpCrsnuSMvbgeq79gv?= =?utf-8?q?srcZjTqnifEehvuxsNr3an2BbIz1zpDFWFUcp6l1tsu/SQSO6UYO0o1TOPTkSjLXj?= =?utf-8?q?s08XMrcYSiEhpnX7ndOKzZV8aCrQPHN7o/xk99iCjSlb7pw2rdpA7KA0WHWASEXDs?= =?utf-8?q?nkm5/oZNWrXLf+EMYqjwdjn2Xz/AFaIGve6TAC6pAyx/HCMh0u1hfuGRNYvSnkLWl?= =?utf-8?q?DE3s51eBuUH9?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c93b580-a866-4199-cfcc-08db83788c19 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:57.4242 (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: Czk01kq7GZ+A60rU/4OmNn22KHDXnzfKkEfjt90R5EEAUa+aZKSJsqG06pcSeZ7XQYfm7hmHloXJhl907FrlsQ== 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: 1771295847253442819 X-GMAIL-MSGID: 1771295847253442819 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, From patchwork Thu Jul 13 08:08:05 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: 119691 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1689773vqm; Thu, 13 Jul 2023 02:06:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlGJ9e1utJXGynywzfPD9d/BvCyYK4jv4ltkM3vCPMEQ/c0rXPyH0V0bofooUAULYa0h52fn X-Received: by 2002:a05:6402:254c:b0:51e:5bd5:fe7e with SMTP id l12-20020a056402254c00b0051e5bd5fe7emr6015896edb.17.1689239191574; Thu, 13 Jul 2023 02:06:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689239191; cv=pass; d=google.com; s=arc-20160816; b=rcXrvLv0taS/fxESWybTiJSScjFGXwO1G/8S2GIhf/fWI0Z5bRdFCFg9HF1lyE9IJ9 UF0oOYKnRSijjafKZjABtMXNVfD998NxzigkNWPzB2vAsLDU4waqQhC3O2mO67TtsvYP covav1EaELloa1NI19bNjO8qJYZt4waygMF77c3T+LgCmBmyT+mjAX2iR29oPSQdFxcT r06lk2Dmw7u4tJi4KRO73PT3CetO/PEaRipZ2Q1vVsL/RirnRzNFXRcDieelNPp9cRmB KQpmgAv9Kzq0Rot7Xm0w0ed0qqb4RHLUVt5nzsJFwDJ5FPJtp61aFi0fIsCDo++Ldoxx mNWw== 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=VbvoRarTmihEE9SfYnfLmCP64NcG9T0qKBlCHawhwDE=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=qij9t7SsURYgU3mcLOOY/HOEVO6UskjeKJUndidlWRp+1qJcgoXn1WXJbe4rUv+il+ qHZ5g8rI/56iuS+58dy7bYYaWJo1bykS/sh4kyBftZUzd9b+RJDZOdRoRufOUq4mXxTd 3gmMNXCkpwtLj4wiWLekhjcUxBCPbqqJ2XN5X3HQbz5P1aq6ZJb581p8okl5LI3hmCnR qVXVz5s39WO/dxqeJ7gMaJiU/UYYFOoVjKpKSWLELXNcEBVWfgXjSRMCDnovMxA9vNht gkbBUCnLZsU+HnhwIe/KJPuRrYrZOr9v6EEoys/XQTEW+K380Y3P8LZYipfBhEqyYBNy Qmaw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=AYHvr834; 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 p13-20020a056402074d00b0051da08decbdsi7255786edy.636.2023.07.13.02.06.07; Thu, 13 Jul 2023 02:06:31 -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=AYHvr834; 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 S234520AbjGMIPi (ORCPT + 99 others); Thu, 13 Jul 2023 04:15:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233803AbjGMINh (ORCPT ); Thu, 13 Jul 2023 04:13:37 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2120.outbound.protection.outlook.com [40.107.255.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84A293AAD; Thu, 13 Jul 2023 01:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=feYPKqM09Rwe+84PFwBiwzx6IvZx4tLxuB6OjqbNTncKHATg6lke0MiLSU9oWdPEXxKJaDipEFs/EVYEDfErWSKmyL1NJ00XcCg6QOpRFygmyCW81azyJhzmwHRcFfDHGhDFVGN555+zS8qOH7ELtJ6P6S/qdGp6DQGCiUq3nHBiROD652LsoT6vBTFzU8vjgFRxRDVFeu9qukZUwzV0Zpd4n0f715klabRkVeOrWdwsugMDspmf23lxd/v0VPJ8SFS826EDC6XgRFRfb5lQOoKphX6Lz4lkkUZlEw5dX2eAgGuAT+IXt9GgS8k0hP5/He8rV3QbJ2DzgWeRLA9SFQ== 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=VbvoRarTmihEE9SfYnfLmCP64NcG9T0qKBlCHawhwDE=; b=OwrT+VYS7/sj0d6dWPjtCU7n9nKXMsa/9wpcnHEOr0T46o0lIpDdJSU+S7igTsyLu18XU1ff7KGwkBhN+3xNejmvK55Qd8fftFCWk2LO9uFEdAdEjrSAM/21bdZ86lir0Oe68bav05YbdxrfFDZvtDmSaRcU+NQOGjIph8loqXoZIMNHQK8eozlf0HoabaF51VEYsWcmJ7iv294LdplamcvcFru/nbj69kr1E7ge4B9ghVcvOWwt8pqMcBW6z0sIyEcnIXLeBi+go/gFBDLnqYkmVLdXq6S4XEne9cMR9xcfec/L7qPbwgXcpAjBaHgXO8Zx9tmvdGXRKzwVYGICoQ== 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=VbvoRarTmihEE9SfYnfLmCP64NcG9T0qKBlCHawhwDE=; b=AYHvr834Zc2nmgvSQBvvnmkNmzEQdEpqg/Q6aka7kNd5NMKcZYbNtNkwXKrcdteqsrDr4nij6TPGBPG8FfbJfipbMS9iTERE7rn2e6wVrYoFCwXattBUXb5Ddcv+GndoUHCa4sa9IxgjAX18P/3epJdJYHAMfJ+UxC7x9pcClYRChMNw1Cosd8CcBCaxztiNKbdaNXFc3GgQq2V+Px5MfoafOx+VIVdJTSxF6kNfH6B1AWYoVuoqwoCQGI+dasb9YRXi+3X8XyFI9QX71RwcTq5QpCcTPIXYG63WWuB6rejXIQmIHZ84Zksy03iA1YGSt41RHz5qC2Eo/xq+3SgaLQ== 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:04 +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:04 +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 56/58] mmc: pwrseq: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:08:05 +0800 Message-Id: <20230713080807.69999-56-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: 067aa949-a9ec-47d2-3285-08db83788ce9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: du9G7VOMrNu2lIGtZ+FVzXV4xi9u44F0krhpXTMj0APFbd2pno/1CrWHY9CPawacrBQRyjSaNNbB56j/SdbtjPwLEQ2tJkt1vzSUaBtEHz9Aq/d7AV8oUHyRg/b82TrpoC4Cuiis5pHHph6kSTN10y33N/Psc5mn8lBRBpjPXwgom8T1FKm3PU3sOSYQqbsvG8sGE12u9zTJP0fOnxgJ20byHlyY6fp5X7llUEallFZuqBcEGnmvsDf/0ydt7SdEXH8aho+rFNSx+Voaf8YKCqhUJODR1SePstuI2+tfIyWCzCom8kw5AKWA0uyUJexQ9haJwUGtfClmAG3Nv96Y+j9DTIJDGMf1hAPhg0q2LsILWPRvAmLY9g6wK9g+p/kJt5nw0eMfafDd4eHn5VJgREE0ioKMZBMQcCZTul3mqYZhHOmbhvLwcUzgROvF5OyIwvsPdjuga5DBw9vbt18y+120spqu/PHEZViI+D55dgROhpB6akfSrLHJYS9Aj/QAl6QOWw4U1B0bwJceOKR14olq8ATy+J6OXtpXj3LL0kTMkZ4/JQy93sc2Tg0CULjPyXmEAFMxVsdzXkzLUUEZmQhkt5dhBybTU7fhJ3x/+106rfKoW5zE8HK/Fq0yclTB 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?rM+vkmj5bQ83z85FsR0aLl+V9TxV?= =?utf-8?q?/DE2+LuOYPdMbFR9YdLozsxtNwYmgJwzDz1oKHUyEOMwDwOw5wTBz3E9r9bA0F2D7?= =?utf-8?q?wspcNN6Cep4SA9B5DcjtphtyMV7dFTdOq66PiXmqmuD3B1qLtjSEEG4IGZrhIW11i?= =?utf-8?q?MRCqDJBgJfdmpkLOtCEiaA9I+pXJoIQoUQru28Fcrjzw9AxvY96A2rIe9dM4RtkvQ?= =?utf-8?q?VJtaUqR/4F4vtypojc4NWCzQsRXxVovPnjGeBvaBOQ/cR0EQZMTw0sHp0mivB6roq?= =?utf-8?q?tGD/Ygkmqfijwu+a6YfhWvUMg59jlCrqXz9Vp4PEdHc525jdfIK0hNpvkteDPKsEg?= =?utf-8?q?Ma8obTJ9SymAiCla/ZZCrMn3wyVXa1xnAPDNPKLe5EFA0W94ZNuWzbPy1vaMsrjVH?= =?utf-8?q?nVUwaGIJa1JkEFj9SKeNOraORql2ozOWAeGl6wpH71+1WDptUDiYFddMDcHJLqIun?= =?utf-8?q?Mpq/EUbCWzdEF2BUNXOprPWx+usywy5qP9yybkY7MUqG2SGsRnxbE7iLoaUVfxz08?= =?utf-8?q?rv8geSImM/NY6Zg87lvGeh0I3BtA5vquN6vL94TUsytfMmOhbt7x+yTpkeA++m6av?= =?utf-8?q?j865MKbPrtvx6iGUxg7JHG6+Q/5FtJ8vXm6DHAkhjQ09r/T6lYriR4LpBi65TGodT?= =?utf-8?q?LT4Ykkokm66flbvf44lNkv67p3XSV1sV77UZkAVhB1TOqj29QDj7JELAjVv10wBn5?= =?utf-8?q?RONMIFF5e9+MMkXLuGkLlKCNHbx/9M8r/sCnV1i84JTnxL3D6t3NjkD9RHlHighsc?= =?utf-8?q?fiDrxuazY4jQ4Cc0XaFnwyv0V7hxJfzT1scSqeMzcssFjfng1eQkT+pjuedJe+Kjr?= =?utf-8?q?7cOL2WyuPpEXUafZzW9K0zzQwT4x9hwUbjadyTnjkrKJ5kjdtHjiPLLE5y4dwkaGa?= =?utf-8?q?AvAjyrelQKkGc0CR/VUWs9FPAhUBrYBEGxbHaRzJ7TnMTL11L4c4Akt9GSrir538Y?= =?utf-8?q?00UIrXSuzgdhsenVLZUdP4gp/Zk8+h9zP2LNLCgxlHiMcOjquOB8mJ65QKhzTPxzE?= =?utf-8?q?wAMYJNqsyTQOUrVoQCXAD4IrGnzeeMITvxTpgjqN6Ss639QWmrYxwDRkKvLurjl1X?= =?utf-8?q?cwu/TOe6AyQTivrFyYND/xZtjJuMnuqsAEGpOjI6mp6tL5/wE3N4Bi804OtnTywhn?= =?utf-8?q?Gspt8WemQi/2zQYFp9sW5kfvYDK8I09BjRp6R5HWQ/JLM1+4/WhnKopgk9jGpzkTB?= =?utf-8?q?iSaTRfiMRBM/deQO+56yIkRvGCffkxUgu6/NrYpO51n2GV6RQAm8DPmRcxMas6DpQ?= =?utf-8?q?RKMKs5DjGXTey2Y8l5G3qbA/C2KAl91UESvnJm+xtzxSs8yDgjNNj7SWygVlGA83z?= =?utf-8?q?gKwMjixE/TN6q7vjytEJL0qoBqF86v+IKfDeOWYo77FkVnTHc8G9eJBsL5744t/Or?= =?utf-8?q?jeRh0TJIQ1Oy0rQ594ByksfcgFx96cN25sy//2eM6bgFmNYgh1r4UlXicskYji0zK?= =?utf-8?q?6sRDDe7LKfzreu+eUfncwnahgcpc6Mpdprl0kXzIvHgRJxwNz9JCmNG3wK3yfjdA6?= =?utf-8?q?UIk+u1jw5eTm?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 067aa949-a9ec-47d2-3285-08db83788ce9 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:58.7784 (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: lZX3K/eTVawsrFH8gHk0Pn24LwEYnofN4JueXTqE7jnmVjCkCD8FqQRabXCcuPj9gBCidekQiBINznOpIsrjsQ== 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: 1771295674616287365 X-GMAIL-MSGID: 1771295674616287365 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_emmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/core/pwrseq_emmc.c b/drivers/mmc/core/pwrseq_emmc.c index f6dde9edd7a3..3b6d69cefb4e 100644 --- a/drivers/mmc/core/pwrseq_emmc.c +++ b/drivers/mmc/core/pwrseq_emmc.c @@ -90,14 +90,12 @@ static int mmc_pwrseq_emmc_probe(struct platform_device *pdev) return mmc_pwrseq_register(&pwrseq->pwrseq); } -static int mmc_pwrseq_emmc_remove(struct platform_device *pdev) +static void mmc_pwrseq_emmc_remove(struct platform_device *pdev) { struct mmc_pwrseq_emmc *pwrseq = platform_get_drvdata(pdev); unregister_restart_handler(&pwrseq->reset_nb); mmc_pwrseq_unregister(&pwrseq->pwrseq); - - return 0; } static const struct of_device_id mmc_pwrseq_emmc_of_match[] = { @@ -109,7 +107,7 @@ MODULE_DEVICE_TABLE(of, mmc_pwrseq_emmc_of_match); static struct platform_driver mmc_pwrseq_emmc_driver = { .probe = mmc_pwrseq_emmc_probe, - .remove = mmc_pwrseq_emmc_remove, + .remove_new = mmc_pwrseq_emmc_remove, .driver = { .name = "pwrseq_emmc", .of_match_table = mmc_pwrseq_emmc_of_match, From patchwork Thu Jul 13 08:08:06 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: 119666 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1680812vqm; Thu, 13 Jul 2023 01:45:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlFkqmmwATikQAjT8eEGuatpMMBibc15svKjZUU2Ip10+p/nHBGtq7oHXYwmeo0QLUX+oww9 X-Received: by 2002:a2e:9c93:0:b0:2b6:c16a:db06 with SMTP id x19-20020a2e9c93000000b002b6c16adb06mr878149lji.39.1689237946011; Thu, 13 Jul 2023 01:45:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237945; cv=pass; d=google.com; s=arc-20160816; b=EN6XyNQ8z+JFCWoJFNMXk9u/9Mu1h9N+rMhGE6JwqRghaTGwHMS8SxxxTCPRDM5mqm VRnKMAaiVO14HRoUOdoyJzDu1anGCds2HaNWYUZGbCitnIEGUhyJGEpccCarJzFf/zVd X+Gujfz00ivGsYmnkhMVtOHMGvKUCGnJypA7+FS6Zky2WkmbqfNPGxX1Ke7xASRurFod AECQvnZQoi9u0eDo7R4Y5Rj0XBabQa+Px08o8TI/e9JQHXubXWedE/xm+f+/PeX+wkk/ cqQdcS95399Y2QMeELUlvRBt8r43nhBrNZGy7bqGJwC6cssVtssfX+DFQGRi0PwVf/xs 5RUQ== 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=zn1Y0HfAvqC4vDw6hlHUiBXNgQB8DADiyKB9NqPTMOI=; fh=0iHszlw8fNpVBkpURB26xhKwjOImohP+yFot/WpzIGs=; b=BAwLwejBjHqRCf6tolGPlGcRxWy1PFgWVnYxrjixeelxO5veWDmBDSHe8inQI+XTEO JF4JOgk8879Uc79ea+eqlqDFu/vUj0SLs3GrFBH+Y6rcnqXdfjKKLke6Q6lUpOIqqOUN q4CnfztVd0NJSgbXcuaa7Kp5p1dsyl9upr3/hr7AcRSie9e9vSM/dh65izDLzyz14Lii XIMEB3uMT6gDifuRRtqqb79ig8VbO6PpRwnzo/HJCqfY7xoYfVXsolY+L0ogn1jrBGgC JAa/QPSP8O60O4dEFzlRbJ4FDRMcKgoXvLRz36pwzhGAkMa6b4IBwKE1otVsO3/Uwhfp XG4Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Z55meHdK; 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 g15-20020a17090670cf00b00993181656b3si6280843ejk.453.2023.07.13.01.45.22; Thu, 13 Jul 2023 01:45:45 -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=Z55meHdK; 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 S234512AbjGMIP2 (ORCPT + 99 others); Thu, 13 Jul 2023 04:15:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233831AbjGMINi (ORCPT ); Thu, 13 Jul 2023 04:13:38 -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 865433AAE; Thu, 13 Jul 2023 01:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BFG+BmRmKmBMGzF81Gec2TEtUeH2wCPksSuqPKXwnaMFghL1houS00jyCdPhmhtdQZ3kQaTn3F4jcLJb9OKeCfLIC8zbG1Rofl2dPba0fLaIIWdZCOESBs0CfZcr5vT8/uqPOOGyOgRnJvnHM/Z9AqEBpuw04YLYAMp5/bmiBEqpKi2ZgEVLQedMfZY3t/M8y6Zhl2QKRCEftfOvqKMbEy1xcmGsVlMOGlHOHi/UP5r0WxrUScL+K8wj5LX8B33+VgbOn0jpgAaniOiaIQIt/6+VjwwLAnAaUBgs75IQOHACbbuHwB4XNOjQq3dy28KYzcoNP3FGq71fInIyP6sySg== 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=zn1Y0HfAvqC4vDw6hlHUiBXNgQB8DADiyKB9NqPTMOI=; b=HrK6z5AMj70je8YcmBcm+vAiO0m2WcVgwXTDVMTYp8nmf9+8W6gQn3OijJMXAw3YEOFnQZMrEdKI7jBier8e9nJopbbhq7DX3gVDDuf42No8kTZaqw0MzrLPkS6h7GCv63LFcLDp1i/WJhsFOJZr9DIACCbA2kzRZqG3NmUG57SuhO88bY+7uL4/2BuNDSpCkwcHDlMGqQj5zXT9Gc9ukr+zZSl+zeCRAx4E8/WAmgfGs80O3AmBXrYK1zI05kkG8A7KyYiLnZx3ZAzmFPqMrrAdUH1qThQbUbRheHlKtN9fFpBRyDnxZL6Sq3LG1SqbZU3gHPHQWU9rkbVD1zSTuQ== 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=zn1Y0HfAvqC4vDw6hlHUiBXNgQB8DADiyKB9NqPTMOI=; b=Z55meHdKQBxF+JqyXbyIabX1IifDfQOgcmwtPCZDM5VAvamkzuAArkKHEOF2a98n5fg30eo2nTpxH+ilIkPGkIPnwCDLZwbfPzOGix20xU+f+VbSfN9tXhoayA6xzmzS93Way19lF/nrCkp16S98XKQ+HMa1QiwNz/cUo3XAVR8Tx6alVi4Um99hiqucl3GQjxvT8AMXTOx3Ox21HAFXsPgu7NUXP4PzmonzgKBDh+dOpPV3eg5N2f5nHKHPVRylEOD53zDwesMIaNymP6gHqFhceH9tE8IhyFPom7A+DKpUJrEnZRKi41Vc9V+lw3XPf4YzjewRTPNOXjaMSYJ5rQ== 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:04 +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:04 +0000 From: Yangtao Li To: Wolfram Sang , Ulf Hansson Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 57/58] mmc: renesas_sdhi: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:08:06 +0800 Message-Id: <20230713080807.69999-57-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: b64e81ab-a4b7-45ce-b5f7-08db83788dfd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e+ncANHYyQaFGAykaVamhdYGjzksWfXuh4zQq6Ms2iJ4gRtueekeM0HJDXIQuGlJsh8yQMCoDZE1DWx1jIEdLrFK1XWGmOZBtGCJS1t3sFoclx6UiSn1S8k+4jKthCIBjo0vCZLRQXF9dtLds6qKuITesZeK3DT3anURlLMvMHZgGK2jiPE5GCdyHXShVD2mThm204TElSZjd6F2szewW1VCUSHpnY2wpZybCdGImNaTEVxJsLDChEJQ3HehJZcc/ddc/OPGIB4UTz96EiDaxChOJMM9mYAfiPpnBRtA+JEVyG9a9Z0h6ypVfXJuG7XjeE3tuSvnQ1VeTR8CpNt66kD7ltvaFoDlCSGD7FpDv8dUls5ps62edg0sfP1BSU4lde5Vr4CgvojJLi79lHAXb3QoSF08OYQMOSKgeU61nzDTM+lRK8THQZfyxymdgOmoJWeQeB1VxU2u1ZE1+Cj8RaESpUAOFZ6Jji0YRarO5KP8Tc+2UqgAc8HYJQn6NzCky+LgZfL+cODu/EOrci3Ly7I5WFj3ez9YBwwEx3G0P0o3hGdqTR5m/461sSvuKF/1nAsCckWibXjJ7Qr32e4OWXiLX6MNl7pkOamNvg5Iwk/tmpcz8kj73gm9M15eWUpb 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)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(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?NQVT8OXvy7ga1H5/unJfi3rY+yQN?= =?utf-8?q?3QiCCU3Qfrlw36iVimBA2oXpsQNc5ZYa1LirT9G7P9kUEHunaFZGez9tzK2eiBPhY?= =?utf-8?q?ESBR3D/exoEefdKmW/RO7wpO+AiQWZRsaz2Tv1yLG8jCbWwIqpcOG0sFdY0k2FZYA?= =?utf-8?q?nbLXeCWqaXI0cYLqev4A63myrpTEWEyfAhNETZfjMBaUtDLUcfYfV09vnyutBe1VY?= =?utf-8?q?W0CHIOxhdgTxldbJ8sVoy45cXinVjiIoGiJzZ082OqwxqupVNuOqtnxx+BfjuVhiI?= =?utf-8?q?9gKBOZVSOZj+6NgsEEWKUgkJFdy8jS5OoXqjT1gmvloKJa+5v/tPu8hnseVw239g0?= =?utf-8?q?x1Hv5jEru1UHIN04H6ABvTqe78Lb8G/uqT3B1GaSlWdMJVO2tPCED4FilZCMBZSQl?= =?utf-8?q?kOdmcMoHqDeWGEfdW/l0Mr+1XFWODA7gFY5yYItYtjPqVxT6AzUMRR+WEfGBJJr9x?= =?utf-8?q?6YqAns4nFJDsrCDFT1UDpqjPBCf6yg4YXdwRvfkicTIGaNGVD0gq4Fx1/yY790hnA?= =?utf-8?q?ylNYxbMvuimDQZuF4l3TrvFB1NTj3bdQV+ap5FISn1pK0XxaqXWp5cQHLReMGdNZT?= =?utf-8?q?qjEIfaGZ0Jx2OxX2vytkDJGkT4aEU+hvOlGIk6fpB37hgBXK6hhtAtBhSAVk4ENNc?= =?utf-8?q?TbzFi8gZUee8xm16SLnoT/0JhNEi9v/wP0iPKTaaiiR89qP9tQE6GOF75da9Dv8Xr?= =?utf-8?q?yyz6jl8ZHztHJf3lduLMH7ZOOujBOZn51TCSetfjr+E8ifmAngpzqye6X3LvL+H1L?= =?utf-8?q?SzRcVgm4SLeSSzrwwkYzzFbM47fvRrLNh8iRl55VCGwdxn2LiblNwR4W4MFi/xSGX?= =?utf-8?q?ImYmnFD0iGURb76Se717YZq2rJ6z2bHtECKdIjhWgiseSNBTourv+mUtq26TTo3SA?= =?utf-8?q?T8lCgc1znCKQHGKPRKFu0mF2z/elgfi2Gt22ulSRYXUXcZRxu4qHkNEqdNukLIPAl?= =?utf-8?q?oOyaLXx4N4ScgDVm2FdtgLA9wPTiAMoxrKEiy1qVW24O7r77E0t+N7dAU6iT1NxuK?= =?utf-8?q?ZUnT4CpExU98phHbU638ergu1c/JOSGMq8cTazdurumaJgknjNjYvYujNzzNaG8r7?= =?utf-8?q?sDpqIpr6TFRnaBHJ1MMA1qSBEe7OOK6ohdX8EQ89KrnsHorulqme0cbVeDl8fruOJ?= =?utf-8?q?qY2o7IyHNFWU20BgJB528E7mdq0ONPrMWZtUFFqWlkODAxTHBIvQgQn0R8pml/6Zn?= =?utf-8?q?CzP+aIT9lUqy5AWq17m4ieilMHPgC/ntzqoudC5wdMbT49jtcdF3cdMsrRh3bNsOk?= =?utf-8?q?kP3Em5XY+O67B/G06trKA1BJjT+1soFfaOsYfSgLI9GtKRrznQgwfy6O5qfU1U52x?= =?utf-8?q?W6bH/duYBpg5aIKX9UVehXTmQHisOynUhXeQLrjO8m87K7budj0vETAUxwTFvtEHF?= =?utf-8?q?klgbFs04M+JTxAyYdXqaQxLkwj8CQXOT4n0P67+fCRK/a8W1mUxnuO+EUnt5GUXD9?= =?utf-8?q?CMih6G26i67xH/za0k06/5GAqalB34ylGCpscjHCo+DVJAbWmflQs/5cf33YCXzf+?= =?utf-8?q?QFq/sIrIpSS3?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b64e81ab-a4b7-45ce-b5f7-08db83788dfd 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:10:00.5975 (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: PTFK1CBr3S3scj23z27BhXRGu/Qpq4cO84XNpol+x9MJFf4PA4EAVEgl8GRPUt+ablYtCK2TJBwQya7s49vROw== 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: 1771294368647140400 X-GMAIL-MSGID: 1771294368647140400 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 Reviewed-by: Geert Uytterhoeven --- drivers/mmc/host/renesas_sdhi.h | 2 +- drivers/mmc/host/renesas_sdhi_core.c | 4 +--- drivers/mmc/host/renesas_sdhi_internal_dmac.c | 2 +- drivers/mmc/host/renesas_sdhi_sys_dmac.c | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/renesas_sdhi.h b/drivers/mmc/host/renesas_sdhi.h index 68da3da9e2e5..c1fb9740eab0 100644 --- a/drivers/mmc/host/renesas_sdhi.h +++ b/drivers/mmc/host/renesas_sdhi.h @@ -101,5 +101,5 @@ int renesas_sdhi_probe(struct platform_device *pdev, const struct tmio_mmc_dma_ops *dma_ops, const struct renesas_sdhi_of_data *of_data, const struct renesas_sdhi_quirks *quirks); -int renesas_sdhi_remove(struct platform_device *pdev); +void renesas_sdhi_remove(struct platform_device *pdev); #endif diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c index 345934e4f59e..5d3adef144d7 100644 --- a/drivers/mmc/host/renesas_sdhi_core.c +++ b/drivers/mmc/host/renesas_sdhi_core.c @@ -1145,15 +1145,13 @@ int renesas_sdhi_probe(struct platform_device *pdev, } EXPORT_SYMBOL_GPL(renesas_sdhi_probe); -int renesas_sdhi_remove(struct platform_device *pdev) +void renesas_sdhi_remove(struct platform_device *pdev) { struct tmio_mmc_host *host = platform_get_drvdata(pdev); tmio_mmc_host_remove(host); renesas_sdhi_clk_disable(host); tmio_mmc_host_free(host); - - return 0; } EXPORT_SYMBOL_GPL(renesas_sdhi_remove); diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c index 9ab813903b2c..d8efb8035b1f 100644 --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c @@ -609,7 +609,7 @@ static struct platform_driver renesas_internal_dmac_sdhi_driver = { .of_match_table = renesas_sdhi_internal_dmac_of_match, }, .probe = renesas_sdhi_internal_dmac_probe, - .remove = renesas_sdhi_remove, + .remove_new = renesas_sdhi_remove, }; module_platform_driver(renesas_internal_dmac_sdhi_driver); diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c index b559ad38b667..248dfeef942a 100644 --- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c +++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c @@ -470,7 +470,7 @@ static struct platform_driver renesas_sys_dmac_sdhi_driver = { .of_match_table = renesas_sdhi_sys_dmac_of_match, }, .probe = renesas_sdhi_sys_dmac_probe, - .remove = renesas_sdhi_remove, + .remove_new = renesas_sdhi_remove, }; module_platform_driver(renesas_sys_dmac_sdhi_driver); From patchwork Thu Jul 13 08:08:07 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: 119628 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1675651vqm; Thu, 13 Jul 2023 01:33:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlGEfIiNgk+bJKhmVGC/FNcTlgSv684dRoqPMkI+hkvhCO3eFOEo+Zg7TT8O0HTD1U1kT8Cn X-Received: by 2002:a05:6402:1852:b0:51d:d1af:df15 with SMTP id v18-20020a056402185200b0051dd1afdf15mr1239813edy.23.1689237208852; Thu, 13 Jul 2023 01:33:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689237208; cv=pass; d=google.com; s=arc-20160816; b=PzlKfvoGB4DKf0DX6nytV6VBrxlxJkX1lqQnYcGZAein7b98bspyH7n0ioQE3dHub8 dOn687F4tlrn7NGbjKpfzKqrdZZ1IzFhm22utgoZbgRAw3LDeCGGdWwO5JA3BUYwPDl3 AU6+/DwyMe00kLJQUkx7qnq8I3Pheo+k+zgDK8vWwJACvkYQj787UcZbSW0+k4HFVbEj YE7ccmJC6bdtStI7nTvC3aubndOMZeuHyXP1KOYFnBnzyiZK1hANbdloHKzRWMYbZETu 71WhRBzb/uBPVocGv/E262dTlHUsU1+csM2rAh7XV5O4vfZvVvW/laKqD2uwgfyHVh7q rIVA== 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=mpwEOesJAaVQAS0uwMrEHxzMPiBo0LdI9OLganX9nW8=; fh=kC1CexfW9ltpXhMXST8QULziLqJSdvxMWdq29YdIdiQ=; b=ybqU/cPtex3y4EEqzfx2JJLyv6DfZwBaIt/mzsPUhLpNn4Ma347jCI0VjspbHt6+TK vet8vyUpspG20l2nDR6a+xi6OzGVnJ2S29tmSFQeRzNPqNxJAkRoSpvJxybQX5gyZnih uuqmdmqhuPfJ1mTA+tgV0qWpxbOGsTl3OjfySbhtR8JOcTnZf6IXCS6WLRfyTqYXW6Bn r10HmTUdo/PdjkFzFvGoJf+9KfbgCqR2Kl97l106nOPteCLrUZbHoLPZQucbjkHnuYUV MOCgfpiugfPXUKIbf2VNQfkndQx8d7/zLE5Gy4cgtNeE/y6tOUQZIJB0hA3CuAwZeIMk Nz3w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=jlo+AwLd; 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 b10-20020aa7cd0a000000b0051df52adbfasi7336409edw.154.2023.07.13.01.33.05; Thu, 13 Jul 2023 01:33:28 -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=jlo+AwLd; 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 S234504AbjGMIPV (ORCPT + 99 others); Thu, 13 Jul 2023 04:15:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234280AbjGMINj (ORCPT ); Thu, 13 Jul 2023 04:13:39 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2123.outbound.protection.outlook.com [40.107.255.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECCA32736; Thu, 13 Jul 2023 01:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SGwk7e+pguKWNZLfYTnnjOsnpFlyMvbawQi/5cM/16lk8gZ+w2dSc0Rh71TKso9/frYkh8yuQGkqcO7VmgwWC/5GfLsW/6Cu3mjrt5/jkHWxhlZRqjbyAtwHDRpX5dNKPhyt/7Eq9vHtGEOOyqXXqzcRMy1OXxcSTJ49ZotvugRdXEPyhyoq8VBxDM942lJ5LR5c4s9BmiBvKQl1MogW+HRMLP5P4cExjb/MPM9KUU6CG3jz6SKQ2xjwDox/1LTfaUQYRCy5oTv79XxAEUomQ9/K65SteZUKquuSsNy5zUQybtFMxSUbZalODA4QlSgKOoiygG7AWl+yP/Mmh3awrA== 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=mpwEOesJAaVQAS0uwMrEHxzMPiBo0LdI9OLganX9nW8=; b=iWXIVT+tAC296otdRkJOSVRoK//CB2k6mf/4iyuDhtWHDHswoPZIsKncK1V1t3BehN9lgrRuU1kg5HKvJy+Q3fzvzauoshIM/p+Aid4FQeUw8nrHe9TY3ch16UqmfK9jfjp17wZwE7PMtYcTEqZ/Js7siT53st2JFP4B/V15oUtHwYu0OTVzg3s2WD3TxBjspsVPpISmsX3lsOTezdfPVApDL9UCGeOa86hBenBKkxeuPUYu2vVQXtH2cZJj3LEs/DSJHiT0ZSj4tYukEUcRL8SpCB3BnwuMsE42o4PN4EGAL5GiXRqJozezs3JBkASVskj/Sfq/Zmhif4s2Qw5+MA== 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=mpwEOesJAaVQAS0uwMrEHxzMPiBo0LdI9OLganX9nW8=; b=jlo+AwLdi86DxdqKWQzGPQ1QXG5fDbi+5CMsj8cXRa/LyMSC7PtZKF6JomKd7ZQbASbw2kVGSJMahzpNpXKSO22+EwlHFuqhDLKtXavsU8Xuc9vBFmt4VlYA6e+plNxs/k23GTMuiU/xOwhR0f1AgNPUl9GtKjZjUbp+lw3nE9n/UNdCSaJV8DO8SxpNKQ/Ea7Gy296XMQJQuihuTQSY3KfHPAbZPEWr7z5Cl1awYpjCgaHTv5EgRh0SpopUpcokJMcktYM2qC5RkPnWDHGDGtBX4m8zh2EZKO3jGfKRZoIAHqzchp8Oaou2sxIHfSG6V8bqHrOOzvPv9sIxU4AUig== 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:05 +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:05 +0000 From: Yangtao Li To: Adrian Hunter , Ulf Hansson , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Kamal Dasu , Al Cooper , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com Cc: Yangtao Li , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 58/58] mmc: Convert to platform remove callback returning void Date: Thu, 13 Jul 2023 16:08:07 +0800 Message-Id: <20230713080807.69999-58-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: 1a95f51e-207e-44e3-bcf1-08db83789026 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: grxq6O8jAvVjxhUK3fx7LutbTtH5ueUbPOytvi8vNn/2XVKVGiVP/Ca2Pkru6tA9sGbXiLpmw57eDnkmHZCZ8Sqz6QjYKvmRy3PCbAj3PaYXobQVphCllN4REYKPvs9EOKPwfaT7QJKUW+9TmEjTlJiuV3uDaOgsrYBdhc4RZ4RCjdH5JqePWQImsOdOBq3A54aStDpS+cCc/P/gXiUmbasAQYeekD5no0BFX3k1lJk2JCmnn5c8xtTU5As88rxVsK7BbcJd3gloPR85ypuF7Dm+p186MSfIqahFW1t7R6xuys/85ww88oEr/AqmqHzwNQWX1Fam1zM+hxlhJ5eQeshBRTqZAGb4H06UfsSujN3n7A+wFUToi/e0wwOlAFgW1u6dEyLxW3R2Dj9Y4y8k9AtlZn6CSE6SHnW+HVWdUzVs/fUcMiIMayzfw4IB4IGjoLxUYWJm6kjpQ0ylvt7uGO4Qno1X3rGcjRZo13sGnrUHsMrS2Zz29f3GD0Phw3gZu5OQg/7buuXVuqBTxgfGbuTXRR4qb1GQwH9Rp5GU6bUkxcl29LjnG00XNxFyJVMafH8z35UeCO8qrRS9KFR8zLwEbrTHl5/s5UsuvTz3PyKb1IQ2YOZvwP1TbpXwCOdapAhw2UbAvCqdVvuwyiZDdQ== 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)(110136005)(54906003)(52116002)(66476007)(66946007)(66556008)(6486002)(4326008)(316002)(41300700001)(921005)(2616005)(186003)(2906002)(7416002)(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?8WTC/FUnVkMvULByqSaNhQ8Akx9m?= =?utf-8?q?sZaTOC+96WuApy+wyVO83voykaBACudWA+9hBXbHnQVtCOg5VIW2oob2hOhpKv8ac?= =?utf-8?q?GRdTiwmZEmFIFJHuy98/6csHqxaMVed9ByzPiOQMB+9b0+w5L/C4FXcnsh4PFvx/A?= =?utf-8?q?L3Xx3l9wv0yrMvLdoXEDVuh7jY7bTf467qEUip1f4LQ76Gi8sLbAUPT7OqAuBt9QL?= =?utf-8?q?Owkq6i9lECfxVIglwqmZuB8UWm6nvTZQLkh8h2Wvaf/bcM3e4AHuCqT6g4KtsShvq?= =?utf-8?q?YGv40zTlgEaKQLRnSV88Kn6lAJpMhDULmFzSle7uZgwT4ELDaVohs7pUuWMcy588i?= =?utf-8?q?dmqg3jc8MPsPDeKFVftRgTvw7qKosHwkqc6vV9WbUMQ5j+pFRIKR4IL1GnhXOgxEG?= =?utf-8?q?aEHzWH09ymeHt7n24mRS3nkQbSCYuok4BiUfJjUtjnMMsh5OybLUDIm0HBFsSf4ma?= =?utf-8?q?/oznnmzto7HeOsVvfcWnj9quVXcgehD0lwB+NkVvJHBvduj27wmjfgXZbjQBqR6Di?= =?utf-8?q?PqDKe5urbWIkOyCvU8NqU/MVMfwR2p6GWmqhHJwc1Pkjshhcob+0O8qwQL23pU5kw?= =?utf-8?q?csv8aw2IppB0XE0VgRRkE7AGE9mRsAXa02JfrBw2Esi/QysurVx6s27GJgjgkJVIk?= =?utf-8?q?1ZVFPmwQIrzLBPvkIWlbBloU4ZgXnv8A9NcvY/5Kyo0fyrrLQJvdB1lIT9M9aKDsG?= =?utf-8?q?2DjpIEiTGV2H/r0+KeVVdP4zGUT9IdTb4XpieIt08uYQQyTN76wS9bRhTLulbYKKM?= =?utf-8?q?iLpxYluj5ZBHQ4dAIMuUIx+VPw5zSLzho73EsO/xam8T7fnUC5sG42ugz7UO+Y+HR?= =?utf-8?q?FtHs1AeI8iH6sySxw9KWDcxkrszH7wPzn6z4Zp7g+yvMHhhd0i3KCUK2SuJoPQz4j?= =?utf-8?q?yv3kdDlcFhLwGPCvb4oLXo0iNYEF7Q+anJ4HkPedbHDPDYTQ4q4g5j/VtPKm74M9z?= =?utf-8?q?iuHEKwP3LKk/iVopRWpkJseFIAQ5C6OW3U9+59Cku+hJuHVUQuvhqOEkJAyRwZdZP?= =?utf-8?q?8uyP+8m9zQvhRRCRS1gs60glOkZbizUYUiIqSH5RfJB9a9ReO0R4aqWye3i8Mk9Q0?= =?utf-8?q?M/mVu3yF+ZtEFMZRWV6EYLLxo7fqOgT+Yu3+UA92W6blpEEmVg1bzDaUiRUJxPWvo?= =?utf-8?q?b10pTIzNs1aA/pK4mlUdGN5YzAreVYxDA2xcuxVobhzqIJO4Ca7hyKqOS4P5h6gJX?= =?utf-8?q?gx9K9gDXo/t2vOmT5nxyE9s02MVpVpwh85q/XyC5qoFHqMMReZdgaMdxuTwCtFtOA?= =?utf-8?q?CtR23dDuyWh0uJM3zCdAkyyFR29cZwKJ7Q9ySjocAlyK+TL/3yLbcAFOZSfqkiPOd?= =?utf-8?q?QcuH2xE0cO9ez8B+kUqWD52kQAz5bL7yDDQaNtcatU5omwjvW1B+qwzvdCAQDsNj4?= =?utf-8?q?8uYU34MW4Lr9kW79RUpMQTEOuih8GGcj5kzT5IIWHwMrTudEeAIxjRjXSiZDzWZh6?= =?utf-8?q?M0JuvGJJACKUomSFZVZT23NjR8f1S0IpoiuCA6eK1KB3vBTHEyO0+D0EIKGvNB2S5?= =?utf-8?q?CUJ6HAIIFsO4?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1a95f51e-207e-44e3-bcf1-08db83789026 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:10:04.2170 (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: dQh90/ef4W8HJzKtUX1inE4hhsHp653HQjnNDd+EkljAy8rJx8aZkqt51S0sIXLsWgjgeItMHEPDKFEz5lo3XQ== 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: 1771293595446528150 X-GMAIL-MSGID: 1771293595446528150 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: Florian Fainelli # Broadcom Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-bcm-kona.c | 2 +- drivers/mmc/host/sdhci-brcmstb.c | 2 +- drivers/mmc/host/sdhci-cadence.c | 2 +- drivers/mmc/host/sdhci-dove.c | 2 +- drivers/mmc/host/sdhci-iproc.c | 2 +- drivers/mmc/host/sdhci-of-esdhc.c | 2 +- drivers/mmc/host/sdhci-of-hlwd.c | 2 +- drivers/mmc/host/sdhci-of-sparx5.c | 2 +- drivers/mmc/host/sdhci-pltfm.c | 4 +--- drivers/mmc/host/sdhci-pltfm.h | 2 +- drivers/mmc/host/sdhci-pxav2.c | 2 +- 11 files changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c index 6a93a54fe067..2e3736603853 100644 --- a/drivers/mmc/host/sdhci-bcm-kona.c +++ b/drivers/mmc/host/sdhci-bcm-kona.c @@ -319,7 +319,7 @@ static struct platform_driver sdhci_bcm_kona_driver = { .of_match_table = sdhci_bcm_kona_of_match, }, .probe = sdhci_bcm_kona_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_bcm_kona_driver); diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c index 4c22337199cf..a2b6d8f2eeb6 100644 --- a/drivers/mmc/host/sdhci-brcmstb.c +++ b/drivers/mmc/host/sdhci-brcmstb.c @@ -430,7 +430,7 @@ static struct platform_driver sdhci_brcmstb_driver = { .of_match_table = of_match_ptr(sdhci_brcm_of_match), }, .probe = sdhci_brcmstb_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, .shutdown = sdhci_brcmstb_shutdown, }; diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c index d2f625054689..1702a499b36a 100644 --- a/drivers/mmc/host/sdhci-cadence.c +++ b/drivers/mmc/host/sdhci-cadence.c @@ -617,7 +617,7 @@ static struct platform_driver sdhci_cdns_driver = { .of_match_table = sdhci_cdns_match, }, .probe = sdhci_cdns_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_cdns_driver); diff --git a/drivers/mmc/host/sdhci-dove.c b/drivers/mmc/host/sdhci-dove.c index 5e5bf82e5976..75335dbf223c 100644 --- a/drivers/mmc/host/sdhci-dove.c +++ b/drivers/mmc/host/sdhci-dove.c @@ -110,7 +110,7 @@ static struct platform_driver sdhci_dove_driver = { .of_match_table = sdhci_dove_of_match_table, }, .probe = sdhci_dove_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_dove_driver); diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index 86eb0045515e..0dbebcecd8fc 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -432,7 +432,7 @@ static struct platform_driver sdhci_iproc_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_iproc_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, .shutdown = sdhci_iproc_shutdown, }; module_platform_driver(sdhci_iproc_driver); diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index 48ca1cf15b19..5072b59f6165 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -1521,7 +1521,7 @@ static struct platform_driver sdhci_esdhc_driver = { .pm = &esdhc_of_dev_pm_ops, }, .probe = sdhci_esdhc_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_esdhc_driver); diff --git a/drivers/mmc/host/sdhci-of-hlwd.c b/drivers/mmc/host/sdhci-of-hlwd.c index 12675797b296..cba3ba48e9dc 100644 --- a/drivers/mmc/host/sdhci-of-hlwd.c +++ b/drivers/mmc/host/sdhci-of-hlwd.c @@ -85,7 +85,7 @@ static struct platform_driver sdhci_hlwd_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_hlwd_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_hlwd_driver); diff --git a/drivers/mmc/host/sdhci-of-sparx5.c b/drivers/mmc/host/sdhci-of-sparx5.c index 28e4ee69e100..26aaab068e00 100644 --- a/drivers/mmc/host/sdhci-of-sparx5.c +++ b/drivers/mmc/host/sdhci-of-sparx5.c @@ -260,7 +260,7 @@ static struct platform_driver sdhci_sparx5_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_sparx5_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_sparx5_driver); diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index 673e750a8490..72d07b49b0a3 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -187,7 +187,7 @@ int sdhci_pltfm_register(struct platform_device *pdev, } EXPORT_SYMBOL_GPL(sdhci_pltfm_register); -int sdhci_pltfm_unregister(struct platform_device *pdev) +void sdhci_pltfm_unregister(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -196,8 +196,6 @@ int sdhci_pltfm_unregister(struct platform_device *pdev) sdhci_remove_host(host, dead); clk_disable_unprepare(pltfm_host->clk); sdhci_pltfm_free(pdev); - - return 0; } EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister); diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h index 9bd717ff784b..6e6a443dafd9 100644 --- a/drivers/mmc/host/sdhci-pltfm.h +++ b/drivers/mmc/host/sdhci-pltfm.h @@ -102,7 +102,7 @@ extern void sdhci_pltfm_free(struct platform_device *pdev); extern int sdhci_pltfm_register(struct platform_device *pdev, const struct sdhci_pltfm_data *pdata, size_t priv_size); -extern int sdhci_pltfm_unregister(struct platform_device *pdev); +extern void sdhci_pltfm_unregister(struct platform_device *pdev); extern unsigned int sdhci_pltfm_clk_get_max_clock(struct sdhci_host *host); diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c index 91aca8f8d6ef..1c1e763ce209 100644 --- a/drivers/mmc/host/sdhci-pxav2.c +++ b/drivers/mmc/host/sdhci-pxav2.c @@ -359,7 +359,7 @@ static struct platform_driver sdhci_pxav2_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_pxav2_probe, - .remove = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_unregister, }; module_platform_driver(sdhci_pxav2_driver);