Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2037805rwb; Thu, 27 Jul 2023 00:39:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlGVMunpUh7f7dDqFKRkz99EKAp6GSl6cJoioTcaXWaL7qzY2oXbUhvOeyK7HEzABv3Z5Or8 X-Received: by 2002:a17:90a:f409:b0:263:5376:b952 with SMTP id ch9-20020a17090af40900b002635376b952mr2447969pjb.9.1690443581881; Thu, 27 Jul 2023 00:39:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443581; cv=pass; d=google.com; s=arc-20160816; b=SDbsuEQ3iCy+26yU/E6NC9JZOM1AkL34Is9vUI+l03jUmi9BL4aJNc5A8ToKSvherf Yx0NdAskefShBrO/O8SvwvwIog29/hxnWbSk7e73TI3QrvmUKx3QC5p1L1ohdC+YYDV8 wOvRjuP6R3Pm8QumSm9l+fggsbo1RrS246Ndtl79pEoWWHFaNhTu/wMeXXQGM2uuogRJ N3te+pIzLgXHTbLKoXpTpKHUvQ6DOZlnPPMpQ5jad45pTKcyDplox+LY3Pg1Ia/GNLG1 yyO6nRITBEK+WNkBQdZv5O/w6bF5kyMnwUj3xSbLQoBRuANmBN6wdSEgqk3ADaQJDgnC wBGw== 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=ZpaS9jMDnrZmEK/1dIqDJ5lnbNq7D2TPsIcBR4aHSPU=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=GafgMJogAn+v2Fy/BPz8niieW230HDYsQxtBG4dFO7f7s8bfZVP7jt/MIxm1J0RhWi qtQEtfbx1JfTUpNt9lER94kXO1Hr/6Qu5v4Qd4pFgPPjqQ8Ok/tRVQyInvzENt4I6ecK 5GWUx8VeqW1IruGBdUrsGa12RMWCEPw6vHCXof5AU7fUcju2mygHus5wGHlyQnRS0D/u h56cXYIR/xJREvJwpFUD9FZnbKSQwna9I7LXMzPGiG6gcFif6tnyWILHxgF2YAl2tKka hVIMxjOQlYkl4iNR5K0/7mxGv4pyxzbftNEvZ+xcerTW9Jw/qbnmKVtwoNSGIWOyd0YY QSSg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="FvlGX/9U"; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t8-20020a17090ae50800b002637eb7c214si971355pjy.80.2023.07.27.00.39.29; Thu, 27 Jul 2023 00:39: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="FvlGX/9U"; 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 S232906AbjG0HDj (ORCPT + 99 others); Thu, 27 Jul 2023 03:03:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233015AbjG0HDD (ORCPT ); Thu, 27 Jul 2023 03:03:03 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2091.outbound.protection.outlook.com [40.107.215.91]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79F463C06; Thu, 27 Jul 2023 00:02:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TKbvDA/PASz7Y0dq/Ff08FRrbcLF+qh1anGe7Ase314xidFL5iqABbGjZ/slz363OocoXr+uE59t4+0JoHAogs1jeL0qQxyjDKFHs27jfNKc0mb/6eo9YSOFmMYWABvX1SejB4YING4hkl84l9A9rCWs0bzpdX5Q3SAS9ys0+PX8KHDudrk6tEaII2CFjhmfMCU80RBuDFF1qCHM9nC+i2cmQdkx/L3M1xOS2D9sewadYwscH6wNbLBcRNo8JtyUoV6G4ACJIO08hjtsgcDjf+Wsu+603y1QG4s9e98Bzpt2p94sUCCj1KZmfjGF5VMVy3UUITqsV1c93DDukLS6ug== 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=ZpaS9jMDnrZmEK/1dIqDJ5lnbNq7D2TPsIcBR4aHSPU=; b=cv5FwLFVru0Ih7O8rvHQ41rU+ZLWcp1ekZOTLX4NHQ6IG7+jWrXxKz6OISTWiBc0y51FpQAUgtziElZBRrm6QjukB9CJEFWNl9weIrgYeG9rxrdFvu0UluA/aX8+AYpiSa5uvSdSHR7Lz75DO1PZo5Z0Z04WK8QEH4UE6JcwWDdtIjjmYmPH3vM8+BEW11XlSCUAJNpV1z1yGcvIUJFnOeAQo4sZ9USszp2Q+ptiTWTVnMo0416yg5oE3JI0FzirkbmdcIxGzwIKGuCgx7A/CZB4u2OU6XtXS6yc0Ccxwf9q9xxStEuBGlL8anoF9J4FgItn6ha1CjcUR3khMXyBEA== 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=ZpaS9jMDnrZmEK/1dIqDJ5lnbNq7D2TPsIcBR4aHSPU=; b=FvlGX/9UQ9ApPUkfQ88e/cGqLxxQzWKrGpQMpK5SpHov4BivZ0s4xnCQKkgl/wjfgtT9TIQY+Mm3bLMs5sTdPH40jvsPXL7St17Kr+1dqQiaz8MELz7WBnurK6GHUAY1m8uuvltk5HxdwzyGCZjzmagx+twp6s/QKDUyU4ea0R140WTyfNJGRlX2vFA0N5JK1NhZgX4PlKjn7FAKThHaAc/61SmhORslKNJs1ogWthnJcotsSrgwcMvC4PFqZ7HbElLNevi/hM7HAuaEgSiupgBO1Bc9qlAuXX5UVFGdEeqNt4WEYLt52EFZBVJ4X9ipLd0JsivDF5R8wdGHtwfVpA== 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 KL1PR0601MB4276.apcprd06.prod.outlook.com (2603:1096:820:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 07:01:28 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::732f:ea1d:45a1:1e0b]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::732f:ea1d:45a1:1e0b%3]) with mapi id 15.20.6631.026; Thu, 27 Jul 2023 07:01:28 +0000 From: Yangtao Li To: Ulf Hansson Cc: Yangtao Li , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 16/62] mmc: rtsx_pci: Drop if block with always false condition Date: Thu, 27 Jul 2023 15:00:05 +0800 Message-Id: <20230727070051.17778-16-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230727070051.17778-1-frank.li@vivo.com> References: <20230727070051.17778-1-frank.li@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2P153CA0017.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::10) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB4276:EE_ X-MS-Office365-Filtering-Correlation-Id: c7259d54-83dd-4c10-6941-08db8e6f4ccf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bjPs/eMftmPLsFRe9b5X0riBeCsEFxa896+SCuzFu/UpzqtkEjSDBDFW0UI6yCT9+vz4KCj+VzrkbQAL0fgSeQ7MAEhI87Ukiq4oGxrVqgyCKZ/NvGG8jUsJwUHgkVxv50UTUkRf67SwuZrX+wEUrCjrqS4Ps4Lx5ikKkmj6Qt6iaI0+J/k7Lsl0qTqtrNpuTJGkKsA8+z+TdA1C+bxipWI4Ynkr3sU4LO644Yj/ukV+p1DdMSvd5dQc6DpJLa7IMiGGPLaCqIVA3F2AoNzjZNdmNbxRPElrnbKcNbL/QgQYHB8+TSFkHvMZDrDs2z2PYZexXa1GexSyV9cBXM9yt3iCYHPSPvLzGT3ukPm9N0KX4Du87mJmuUwZ8Njr9q/uZa3PDHkaAgi9/s6I6F1W1mJc73EBb0XP6pD2ARmzgcCyY0A4R62jDY1EEbREzb25N7qPvno4Ms0ftTkXm+Z6sPanaLsqGPsWI0/IAaMK3pPiv1tk0bkEWJflidozfHPL+qZoU9LerLyUPt07LsN56uDqGS4+oBfqWT5fPgy3jnJC/Nsfl0BxqjEJwj7CyGs5/uUCCM6IrMVw8LJqBinjpkri/ljdDt4jLA+WAwOWnSFJS03+ZN61v4QyqBWoFUJM X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(136003)(366004)(376002)(396003)(346002)(451199021)(6512007)(6666004)(6486002)(52116002)(66946007)(66556008)(6916009)(4326008)(316002)(54906003)(66476007)(478600001)(38100700002)(83380400001)(38350700002)(26005)(186003)(6506007)(1076003)(2616005)(36756003)(2906002)(8936002)(8676002)(5660300002)(86362001)(4744005)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VGRYU1dvYUR6bFlKL2dXdHI4VWwvcFBxSGNUWGxQTTNFYTA5amNpVUs2dzdo?= =?utf-8?B?MEljK0JtQkRhQ050Z3R4YXFKM1pzR2NMWWE2enVoY1BNaXkzZjVWRXZXUW0w?= =?utf-8?B?b0JlVFNZM3doWnQydEZaZ2ZFOFgvUUtUZjJ4YUVHRFd6MHZLQmR6ck1QVDh3?= =?utf-8?B?VEQxNjc4Yno2WDFCUUF6RW1Ma1ZYdEJEcityRWc1Y0JUaEdlTEtOaTl0Z3N5?= =?utf-8?B?ejU0a3E5ODE3UXBkSDZMb2ZFN3hzaVArMWJuOFg1cE5jRWQxYm5aWkd6NXdY?= =?utf-8?B?WEZCcmFSaVdBSXVxbTg3NzRwWFFFVG95ZGtXVUhjSEF1MzBING8ram9veEM4?= =?utf-8?B?VEhzSEJ0TFhKNUVvdEF5cDNWNGFTWGdLYTNFdlNtQllYNitINGRicE9hODRG?= =?utf-8?B?TlVRVlZHbWow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-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 07:01:28.6381 (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: KKfHT+FjtTmjdswbMF4cXnEKhzoOYhaIqZdJM2OnpBjq3wTQ9e8bnEu0SDP+Pw/zVeRw4LtzQd6dBX61hhbFqA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4276 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 rtsx_pci_sdmmc_drv_remove() is only called for a device after rtsx_pci_sdmmc_drv_probe() returned 0. In that case platform_set_drvdata() was called with a non-NULL value and so platform_get_drvdata() won't return NULL. Cc: Uwe Kleine-König Signed-off-by: Yangtao Li Reviewed-by: Uwe Kleine-König --- drivers/mmc/host/rtsx_pci_sdmmc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index 8098726dcc0b..062d07c2ae5e 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -1529,9 +1529,6 @@ static int rtsx_pci_sdmmc_drv_remove(struct platform_device *pdev) struct rtsx_pcr *pcr; struct mmc_host *mmc; - if (!host) - return 0; - pcr = host->pcr; pcr->slots[RTSX_SD_CARD].p_dev = NULL; pcr->slots[RTSX_SD_CARD].card_event = NULL; -- 2.39.0