From patchwork Wed Jul 26 03:59: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: 126063 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp163616vqo; Tue, 25 Jul 2023 21:10:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlGyUnW/w1WhSCeqIYCpVW5V2k4UBGhCivhOibfOEDByVnCc/UhS74SmxjgKncR5UFBHW87o X-Received: by 2002:a17:907:2cc1:b0:991:e458:d16 with SMTP id hg1-20020a1709072cc100b00991e4580d16mr492389ejc.72.1690344614572; Tue, 25 Jul 2023 21:10:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690344614; cv=pass; d=google.com; s=arc-20160816; b=DDoBNXCPECslytHqFksjruYlE7JsjzYNR6z2t7iAJd3vil/ONYYdfVTEfqmRtRE+78 /q3MZviZlRq2leUWDOy5cmxHr1zQlihY4WcVy4QYgjckRZtlxNG4EK2Pg5tGe0UrXYYM KTjM9zjWJpQ9qh2NFp+8v5cj6yVHsEknRpov6cvTYP82ExSj6gjnTu6Hv1pMqtpeCLE2 g83/n91Szy63yO3GnUfQ8VQhNqG2xmvd3KQFECqIj3z97NbysNY6dJPX7dcm3+2uYj1z zP7AFAufFqAOAogIMVn0A+dkQYBG2W1DPvhyf6qAgqmN2nHNBOYbggdQ+8ffvpduTKzu pm5A== 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=kf/c3z4jK3Dfm6LT+fxuyv4IoKncH6+TN8IV41mX6co=; fh=ZYodWTe0KCUO3NR7BtRFAqGMu45kjt7wn2F8buQXmlM=; b=dZwQyi8CrMa53E/RMKKlH15grNG/SyRpjDSS8gSXiZPE0ZqM2AGHd9KUAsTKQIw6qP SHccAFVS+fMSkLg6nMhr3LoI8uWaihEU1Pa1m/nfh/ZWlgR9zIuNOCnRnuwce0/ttRJb Kdj8rBr2odSaYJr4qAdOCH0Ra+5Zsbl1Es1AgV6Wr0x+VLmZokUwUCDEXGOR6SNTohTV 9yqAa2YL3cSHPz6xZevUp7UWp+4XhPQEkhXOGiXXjp16P1gzKD1+D+frn38BE67byG3E kazQvA4GkJlVK+c+pf8CSUkgb2LgLtmGGx3JaGAzAtV1CmNe7UICh5uTOfMoTvBNx9jo EXsA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=KIO620I0; 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 xa19-20020a170907b9d300b00996e0a8a2dfsi9201398ejc.78.2023.07.25.21.09.50; Tue, 25 Jul 2023 21:10: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=KIO620I0; 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 S231540AbjGZEDW (ORCPT + 99 others); Wed, 26 Jul 2023 00:03:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231666AbjGZECy (ORCPT ); Wed, 26 Jul 2023 00:02:54 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2110.outbound.protection.outlook.com [40.107.117.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB96230F0; Tue, 25 Jul 2023 21:01:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CY5dvD8eVSKw7kSxj+2HqZ5jDL3Xk7YNZWQOSN2Dr+9comgsFcPJKn5kRp4LaMgjk0kz6zF10qpmlmL0u/3Lutd1JvZq1+/hHKD6ht4pzNB4Y+25MoQRFvm5l6OfVT3Ipt2H+/XswCg1w3sRxXcFQVQ3u/aWiOzbeFDZU1q68rLgDN2BOvAt9ahy9bs0zn4qp4ZKwgJehvEfJjw1I4iJUMk9YkQFUAodBUIaVf0JhD1wDupBlbNOpVu7UVMVf0s8WOWecTXy3aVcZLPLivLXVD79AMWBo7bx6DjAHHG1GrlCJZ4DDGqJjHCgoxw2oxulejZv0qIQklRX/hGrZ/nPHw== 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=kf/c3z4jK3Dfm6LT+fxuyv4IoKncH6+TN8IV41mX6co=; b=X1nXqh3lCJsTxOZPJ2F+UhZGmHqZNL3MyH9n1aBv5/o41rCdKhFR6WFVoCqui3ixIS9l1itrHTYqN5ldtljo3sfHhcjafwo9g+USllbJijUfW7cnn1kY4swiJT9GmbTnhEVAsH6sqVW92GX0vHC1V9F/GCAevGNaoXG5Q3dIuEPDfqkj9X3AtSkkS8S4n/nVBMe5A6EKMG84wjaTpM9xKLFDfZ1P4xioer13f/Mj2sTsPejUN98sBRO8eyQH6Ab9/sRgCHaaNP8zJtFBP4Ekw3j+sk1e5BUovo0FCxsoYKCxWqkum372hquUhopRHlQjM3OQErtOCOaN4ktx9ZdWJQ== 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=kf/c3z4jK3Dfm6LT+fxuyv4IoKncH6+TN8IV41mX6co=; b=KIO620I07EL6bFgsh8kkO95r5crbvKCyu5PaCh8p2IzOddxSYxhuGYpFWxil0aaiaDaA5cZUDQWKAQlxbqjpFfEspePqwCRrnyIzZ5lVtK6SmfBFiRrpw34cwU0onfeoMzcB0l/XRLoIjbBJpvTMre+U7B/b7Vgz/1NSke2P0BdihHNMLHRclmsAX/xQh+XvZZ/1c9Orz8ueweKbp6N7EmwaxAq4mU1d5GPQvS9E3QJxfdhARl8Gh4X8Z1xSF4noMibRegxSHN5PZL8nu5g3kZSTbMejA6c/WsBwSX/9tG6x66QF1wnVRj6pmrpOTD+tgaZlVFlooRnyVtHs2L1yrw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by TYZPR06MB3934.apcprd06.prod.outlook.com (2603:1096:400:7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Wed, 26 Jul 2023 04:01:26 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::732f:ea1d:45a1:1e0b]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::732f:ea1d:45a1:1e0b%3]) with mapi id 15.20.6631.026; Wed, 26 Jul 2023 04:01:26 +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 v2 16/61] mmc: rtsx_pci: Drop if block with always false condition Date: Wed, 26 Jul 2023 11:59:56 +0800 Message-Id: <20230726040041.26267-16-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230726040041.26267-1-frank.li@vivo.com> References: <20230726040041.26267-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR02CA0093.apcprd02.prod.outlook.com (2603:1096:4:90::33) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB3934:EE_ X-MS-Office365-Filtering-Correlation-Id: 5202d598-0408-45b3-31d0-08db8d8cfba8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: B819JqcATNe9qM9hYXgmqPD14CD7WPFd2PkoGBHfTIOLFCtTI+91dslpyna1fWYezQVloahUj1HgcWzCiVK4jGHVg6FkZW/0nFi9mnbAg6UexVnnz9pZIM6LJzb28PYe+BdM/A5sV5EB+coiDXXQk7uJ8SspO5NTidAqZ9i6UGiedYUwEsG2GaVS/nC+N0W4Or9qGnqPOasjbXk8TpJcPfegGCxEifMI7kZof+uraaM+5eRzgb2yubrjBhD7XZtyNBuJ8Z29zIpTMEMYs8Vjm1T66Bokuh6ehqkZYdJSCDk9lD+AzQAtvz7EG0sBhCqojtQZvft/UCQA18VdHBoOYjNHC3SXqiOkdJg2lId6u1uQPL/tQbp25r+rp+CqtMIwiFh9FIk4gba1NKzY8ud2SKN7jj/7atq5j/UYRNIjTf+aaEDRd1vAjmGM25mNSgdt3PLSzstC1L8tmMFk4mSnaDi8b6O/vXnRy9ccHyP78gVUzmvOjqLYVa1wnxp8kxTExgCgMfUrszsfwHnNdu+/0yzK3/2l3TiL55oBqKsJEnHez1hl+HgPYEdVLHq09mxFnq5xZXOx/9imYKQk893GFyqagWJgQOsNT9o1bhF59d6F3dIun5jPiMjMiLD9y5bO X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(396003)(346002)(39860400002)(366004)(136003)(451199021)(66946007)(66556008)(83380400001)(2616005)(41300700001)(38100700002)(38350700002)(86362001)(36756003)(8936002)(8676002)(5660300002)(478600001)(6486002)(52116002)(54906003)(66476007)(316002)(6916009)(4326008)(6666004)(2906002)(6512007)(1076003)(186003)(26005)(6506007)(4744005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?0Bnrjyvggw5lDFB8+h9QmDSvHPrt?= =?utf-8?q?S48JquE49MFgJtRhzv0FVkPkXMfELjZl0WQltb25jPvjjUkDPaN3zzDVYAj6jKL0C?= =?utf-8?q?5jzcxb4xj1POz7Cv78o6tUTtpysP5pLtm6UZVqXUsxgYuqyc6d4qye+Je5l00wXgX?= =?utf-8?q?tZfFXkAkQPWbQZAQoSOPT4vdXYxrKlNyP9zSYAon+TRTkd+m84WK0SYZWXkPZaSye?= =?utf-8?q?SEVlQbPjJr1DYHA05igIFOvc6QN9c4aTJYWBS88BenL4KIhketvwApQMoZAWho2au?= =?utf-8?q?IZkHxZASBxK6FvgHH8LkGBPrELUON53Z5WZTclzXjsHKkmLQ7ACDLOa4+OrAuovFQ?= =?utf-8?q?rB2UxF6TBcLJlm4E6aopqsRID55ClEsnZf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hgYG3dVu3+lUk1/hIiY4nZsI6+3wUUGoo1JKUmRiS?= =?utf-8?q?6drVr5MYBBVV7InCEgBQYysvQbz6IraLzw9o3Gssia0rd1ivk8wRYh5tXQdg4itGF?= =?utf-8?q?KVFFfbk666juEPdnp7XyrsxExgZMaQa/uRJUrA17Bj1QLxkhmT9TZnOlW9YSb69Vc?= =?utf-8?q?M+n7mmv50DRnLnnsvabsOEKED8rYqipIukULRa1l7IMtdygewUzqhlinzPWzIaUmr?= =?utf-8?q?ki0MqemskHRe+dh4gWl51ZfXjr9zdGKD9oFYLlMFE0q2d0q/0Elkl7TagmVxs+jMX?= =?utf-8?q?tovZPTbG/O5q?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5202d598-0408-45b3-31d0-08db8d8cfba8 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 04:01:26.2065 (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: TKsUSwmPsYn3/wYiMVBsT1h9qk+Xa53U4r5rSrPgJfKH0PqUVCDmhqUebC7jTPa7aSB7uZZ11x7ntT6y4rJ3kg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3934 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772454794503031654 X-GMAIL-MSGID: 1772454794503031654 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;