From patchwork Wed Aug 21 23:39:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 2847956 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CB5949F271 for ; Wed, 21 Aug 2013 23:39:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ED3F9205C8 for ; Wed, 21 Aug 2013 23:39:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1FC10205B9 for ; Wed, 21 Aug 2013 23:39:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752864Ab3HUXjc (ORCPT ); Wed, 21 Aug 2013 19:39:32 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:54080 "EHLO mail-ob0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752369Ab3HUXjc (ORCPT ); Wed, 21 Aug 2013 19:39:32 -0400 Received: by mail-ob0-f169.google.com with SMTP id wc20so2242018obb.0 for ; Wed, 21 Aug 2013 16:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=KpzXdpJtdt7jsbTIGI50n4VIBiLl1Sjd8dHCpwALvBU=; b=kG01wlMMaA+mzGcBicqXYW5cGrDx0egSWSANraB5gQKgul0YRgojKCs8Za1UrnzDhg apQv17A5eY67pYxdhBmdG8gW1dN5tdauJDocs2Y38MRDwmhjqtaUHc4ZYQnAZigrhsDw iTvGbog807skm4m1n9Qgi9v6DCrGkTGV7VeLUGdp0erKr6T9NP38rGCeB3Sajoha99lM MJL1K5Qn6uyYbmpLfaoc/bfpyMIyfQ57mBE1k1uOjKpU25x8LtexewhOj47qbfAIF2Uk FeuRcGZygbesCObLsnCtCVe5dIBmixf1XIu59PSiUwk7DcWWPcCdjPev38/PVI2zS8Z5 pykQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=KpzXdpJtdt7jsbTIGI50n4VIBiLl1Sjd8dHCpwALvBU=; b=i9KtLeoR7FUfpab2rqovGSdilHHphyiRQf6iA3yZxuvkwj4rVwPHOtB2wqZS/UdePT YL7OSi3LgE17W43H6nemnfz/Kv/CxPK9brszJRmZPJ3VM2WDnksiooyu+PGhxpoxAJYK yflsjzbKeASzfukn6Gg6zU/puEpRiTwwyPBdKyfLUs87IJbrskFUOStW9UcIAbEIK8vx 5h95bbxL1Wi+5ht3xssEUffiQq2DG+xPF/+UeiQPMgY6AVLufSFxaWJFFFUcfYrw87O6 qxxfB4SgYNqcheagNf5RLZK+zYLNITm8YHPM/Dff1v9OhWQ9w4o0z3FMCtbbfgo+/6Jc 6U3A== X-Gm-Message-State: ALoCoQmKDM3QGh23kaKBGQ4Jc8WqDyun6+Sf0ftQMealY6b+cvCr0R+JCFmpU6aZniE+lJtaT+JcqtD+J13PFLuudSw0YLys4Y4y/Fa7oqi4dHjPt7FG1NCkn92Qcu8KNTaIwfapZngRnSrYsyqkROQUlrXuYrmpVbyBX8s120shrGezIpTXZvusyWW03V2jfPOAMBqag52gnBHS3nbqtsYYMcZauV8Usw== X-Received: by 10.60.96.131 with SMTP id ds3mr10967902oeb.50.1377128371639; Wed, 21 Aug 2013 16:39:31 -0700 (PDT) Received: from localhost ([172.29.122.86]) by mx.google.com with ESMTPSA id z2sm13950221obi.3.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 21 Aug 2013 16:39:31 -0700 (PDT) Subject: [PATCH v7 3/5] PCI: Remove unnecessary check for pcie_get_mps() failure To: Yijing Wang From: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, Jon Mason , jiang.liu@huawei.com, Hanjun Guo Date: Wed, 21 Aug 2013 17:39:29 -0600 Message-ID: <20130821233929.2300.74057.stgit@bhelgaas-glaptop> In-Reply-To: <20130821233722.2300.81773.stgit@bhelgaas-glaptop> References: <20130821233722.2300.81773.stgit@bhelgaas-glaptop> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Yijing Wang After 59875ae489 ("PCI/core: Use PCI Express Capability accessors"), pcie_get_mps() never returns an error, so don't bother to check for it. No functional change. [bhelgaas: changelog, fix pcie_get_mps() doc] Signed-off-by: Yijing Wang Signed-off-by: Bjorn Helgaas --- drivers/pci/pci.c | 3 --- 1 file changed, 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index e37fea6..5bb97ee 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -3525,8 +3525,6 @@ int pcie_set_readrq(struct pci_dev *dev, int rq) if (pcie_bus_config == PCIE_BUS_PERFORMANCE) { int mps = pcie_get_mps(dev); - if (mps < 0) - return mps; if (mps < rq) rq = mps; } @@ -3543,7 +3541,6 @@ EXPORT_SYMBOL(pcie_set_readrq); * @dev: PCI device to query * * Returns maximum payload size in bytes - * or appropriate error value. */ int pcie_get_mps(struct pci_dev *dev) {