From patchwork Sun Oct 3 02:54:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= X-Patchwork-Id: 12532473 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2237DC433F5 for ; Sun, 3 Oct 2021 02:57:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C8F7761A0A for ; Sun, 3 Oct 2021 02:57:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C8F7761A0A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=UlWJ0Hv9p6V61dhxAJfEdJlOU73ErZUlg0m8bw80SUw=; b=JOVyxYgRUBlyaY eXi1CtKGE6uOF8ivcMLBHtXbVBegNvwvkQrGcjYgrA2P4bllkL/JdY55kfGmppCjD7zuy2ThZSB9J dOjw/lBo2OLucmBAxRAColRPWNc+OwXetE3UtluMWDSgQgbqBkGCUKdipHi8G5OuAr05HypX0lKwi W8ZLLyGFM+ls2avtyJ9h1bfOIdWGwraqdsbwpaJquhLF/kKEemVdLvgnoAD4jrlY3F7DRqBHssM9V jZCudK91RHoZAzGAsVUFK0kuckrXNfPjKOKbhxCBAPWms9glni7vqN0vM/m84wFonPPLi5Lb8ODOb TZr/clD5rQJeDf4wUirg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mWreI-0036kP-Ht; Sun, 03 Oct 2021 02:54:46 +0000 Received: from mail-ed1-f50.google.com ([209.85.208.50]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mWreF-0036jz-Pl for linux-arm-kernel@lists.infradead.org; Sun, 03 Oct 2021 02:54:45 +0000 Received: by mail-ed1-f50.google.com with SMTP id bd28so50001133edb.9 for ; Sat, 02 Oct 2021 19:54:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Tb0JYaOAZxreZsr7ftz6TvhnTsZs54RbRFVXYC69MIQ=; b=QNnccRhWYxpB9m5p+wGtuTFjNY9ewKixjYOcYyDyW5H2ecWaNwRudQ62OTp9ubLNck 6+9MiL5Qlw2cwQet+ohUMebPqu7C/yV2HslsoZAEcD+m70KMDWNP/Nz/rwmsNIwWPaPA CKtLGoG3ekKL1raOGdRHTvkigJj+siuXVuMuHmlxqLDDTpHC7b7KyYG1+0qeE1eJ56eV VEvWHuAWyqHDnKC6ejmbuQ63xD677v+U53GnFWL9qWIZnnxCx71ITxQaKouBAgpiga9D bpMbJxNG28iqBT3hCdqBQ7YxoaWzx2BtUvL2uWijXyN/+5NtEeXqFdmqhGFx/jV+FKoC NfGw== X-Gm-Message-State: AOAM5306C399g/i3NivlpHQE2nlbjR1X6mR+CZL5nsWKhS3Oj30NvBLm YFSZGZHtUq3IlqwmKAgwQAs= X-Google-Smtp-Source: ABdhPJxyRkCB3OnTnsKwYlQSC3exOWmehjdkHvreqTAHHLadaVfoEAOzpy6BRm4Vm3Fo58Jh5f29TA== X-Received: by 2002:a05:6402:181a:: with SMTP id g26mr8138818edy.54.1633229681836; Sat, 02 Oct 2021 19:54:41 -0700 (PDT) Received: from workstation.lan ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id e3sm4683525ejr.118.2021.10.02.19.54.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 19:54:41 -0700 (PDT) From: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= To: Bjorn Helgaas Cc: Lorenzo Pieralisi , Richard Zhu , Lucas Stach , Rob Herring , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] PCI: imx6: Remove unused assignment to variable ret Date: Sun, 3 Oct 2021 02:54:39 +0000 Message-Id: <20211003025439.84783-1-kw@linux.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211002_195443_860328_E26152D2 X-CRM114-Status: GOOD ( 15.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Previously, the maximum link speed was set following an "fsl,max-link-speed" property read, and should the read failed, then the PCIe generation was manually set to PCIe Gen1 and thus limiting the link speed to 2.5 GT/s. Code refactoring completed in the commit 39bc5006501c ("PCI: dwc: Centralize link gen setting") changed to the logic that was previously used to limit the maximum link speed leaving behind an unused assignment to a variable "ret". Since the value returned from the of_property_read_u32() and stored in the variable "ret" is never used in any meaningful way, and it's also immediately reassigned in the code that follows, the assignment can be removed. Signed-off-by: Krzysztof WilczyƄski --- drivers/pci/controller/dwc/pci-imx6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 80fc98acf097..26f49f797b0f 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -1132,7 +1132,7 @@ static int imx6_pcie_probe(struct platform_device *pdev) /* Limit link speed */ pci->link_gen = 1; - ret = of_property_read_u32(node, "fsl,max-link-speed", &pci->link_gen); + of_property_read_u32(node, "fsl,max-link-speed", &pci->link_gen); imx6_pcie->vpcie = devm_regulator_get_optional(&pdev->dev, "vpcie"); if (IS_ERR(imx6_pcie->vpcie)) {