From patchwork Thu Jul 27 07:00: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: 126725 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp920154vqo; Thu, 27 Jul 2023 00:34:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlGvQrCsbYtq65Db7kqFL/7rmdFpH5rOxHqxBM6R6I0eQ+vlzc4inW5S15HgI5+xFqR0hV9P X-Received: by 2002:a17:90a:fe85:b0:268:5e70:507c with SMTP id co5-20020a17090afe8500b002685e70507cmr2432699pjb.4.1690443297830; Thu, 27 Jul 2023 00:34:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690443297; cv=pass; d=google.com; s=arc-20160816; b=rIjdTcd9XMhJXc4p/vi73oedTQH8YmxBX2zVeFem6A2gw8drcgQYH5yFOr/NAGmzu2 m2yCAtpSQOBZGeTDJsRnoGQS/Dj7ycDqY6BEvvYc6t6jYedFCZ/olTc7PDHbip/Gm9tq wtASdJmSmOao7p9nIFJd0suvCC19oPCkTLgeEXKHKUjnM8PXEDJKKxThkRVmA0I6KrJ7 jEhhKYZwyyV1uWOa8yaBJJL8MRfCgH80YZYopjx+k/YEifxWWSYjzgrSS4Px4zhDjTuo 1osdpy93jJEClqjhSdcdemB8sf+wCBBYK53uoCo2ieCVTA7us15gAOu0O/xel8fqqIYy BH0w== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g12-20020a17090a9b8c00b002636d222400si2538205pjp.14.2023.07.27.00.34.44; Thu, 27 Jul 2023 00:34: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="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 S232915AbjG0HDk (ORCPT + 99 others); Thu, 27 Jul 2023 03:03:40 -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_Kleine-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> 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?q?TdXSWoaDzlYJ/gWtr8Ul/pPqHcTX?= =?utf-8?q?lPM3Ea09jciUK6w7h0Ic+BmBDaCNtgtxaqJ3ZsGcLYa6zuhcPMiy3f5VEvWQm0oBe?= =?utf-8?q?TSY3whZt2tFZgfE8X/QKTf2xaEGDWz0vKBdzrMPT8wTD1678bz6X1BQAzEmLkVXtB?= =?utf-8?q?Dr+rEg5cBThGeLKNi9tgsyz54kq9817QpdH6LofE7xsiP+1bn8X5pNcEd1bnZZGz5?= =?utf-8?q?wXXFBraRiWAIuqm8774pXQEToydkWUHcHAu30H4o+jooxC8THsHBtLXJ5EotAyp3V?= =?utf-8?q?4aSXgKa3EvSmBYX6+H4dbpOa84FNUQVVGmj0WLtu6THNXi9fNQeFetdILDzZnWyqo?= =?ut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MdbYFiD9wEjb7hQtMWYyh1j1aRi+pewYPbKdZQl7GIRA5bL5xtgSPvgMhRlOzZIIK?= =?utf-8?q?dLruFi49sC/bnRL+OyBycPUMpZ8+hv2NAbeWa3UsxVXkQYpdYnwrLSOwVKy7xZDir?= =?utf-8?q?Zfes2d0L7NQJdr3RBfajebd52XFU+vsL5CddBF7GW4NFlL3KOftpB9np/CZHqg+R5?= =?utf-8?q?qw9PUOYVjE6fsJhPGUGX+IssIunRgyq0l9BcTYLzqMa26NbkJef+sfNYuOJY8f9Ad?= =?utf-8?q?Xwk8sh3xzAAjqGeatx8sbRBGiCjidI0atqvy8/nfkesKWvcHQWokxGZ/ZAT95UKra?= =?utf-8?q?7qxU94CP5RC5?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7259d54-83dd-4c10-6941-08db8e6f4ccf X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 07: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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772558271649689060 X-GMAIL-MSGID: 1772558271649689060 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;