Received: by 10.213.65.68 with SMTP id h4csp2118744imn; Sun, 8 Apr 2018 20:10:12 -0700 (PDT) X-Google-Smtp-Source: AIpwx49yOJZQ54fLEbbG5P14kPldYrUs9v3o6aAkjSPoU58yrQS4ipiARpJyC51L6Vd0tjOA3JKC X-Received: by 10.101.96.135 with SMTP id t7mr13599873pgu.382.1523243412063; Sun, 08 Apr 2018 20:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243412; cv=none; d=google.com; s=arc-20160816; b=LAn/FGn9qdtS4UYeX5tE0/6PvLlthPt29tvj/RJX1Og9zalccLeN1f9V/4tbung27C GH2Ohwi2gveTr62Gofl2/fFlJGFJ3VlCotMFC7ZzaWfu0Uke+uVQbaT70A7MAxZwfyUi x7jZ6ixj3z3IsVR/zPFw9t8y6oUkXHXztrR5a6HsYZJ2Mt07IZyOGDGq1UnnQKhoL8aJ RoGno8FCUNNrgVRCU4Hni+VUhL5R5+RY2CF6cNO1Ntf++vrwrnnkJb791ldkACSoAZEL xM8oFgqg1T4M2CTpXdLCp422c322nS9X4njJplTjQRZN5nro7ddPjmsANH8le84RFm2w 0WTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=D8VG+OC4dVGTGMC6YTmPWhhOi8w+Ljm1yIWLfr73EBA=; b=gqBKhjw3o6BNDeU3z/iJFWswi2KcNwHArsoZo0GnBIfpFD9JD/qNGyTrRDu+6278/X 6JEfsNOdzUguQWtvRZKoFmV7B0ccCv9aSxRULBgreXGkpLXpM/wiZxPWIEVf52PAHScM T8eJuRWCFzaE39Aovc9QWcK7SMQLy1j6+xWeGCvXyjlRvu7DHSiM1xkX6ppNACfPKvJj LHb7sUXEIy6VK8DyAZm8hswkqAHxT8orCVG/+D4K6sF0eGkdGYYHgFDovovbm91Jfr0w XVegsVPWaM1idpR/SQuppWj+BSqRVB19X1zx4X49UkHTcE1g4mvF+cc4OTYq0lwkBYrI bArQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=HqucqdNj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3-v6si13643635plb.285.2018.04.08.20.09.35; Sun, 08 Apr 2018 20:10:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=HqucqdNj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932735AbeDIBei (ORCPT + 99 others); Sun, 8 Apr 2018 21:34:38 -0400 Received: from mail-sn1nam02on0098.outbound.protection.outlook.com ([104.47.36.98]:45151 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932595AbeDIAfL (ORCPT ); Sun, 8 Apr 2018 20:35:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=D8VG+OC4dVGTGMC6YTmPWhhOi8w+Ljm1yIWLfr73EBA=; b=HqucqdNjDrPavu/UYdXp5cW4FV+GCceATGD0iwaH6gs+PezgpxPMHB6O1wMaiiIHGKZ1i+frjYuldgKeN2H1mFiYJgQogVUZR6zERrmCdW30eRjrgCzPLv4hP2gkwxNa/ofHvvgFMDfyNNcFJ//XY/M83Npj5c/VOT0Cb83qz8M= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0725.namprd21.prod.outlook.com (10.167.107.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:35:08 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:35:08 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Bjorn Helgaas , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 028/162] PCI: Correct PCI_STD_RESOURCE_END usage Thread-Topic: [PATCH AUTOSEL for 4.4 028/162] PCI: Correct PCI_STD_RESOURCE_END usage Thread-Index: AQHTz5mffdEG0RkUEUumcnd6H+oHnQ== Date: Mon, 9 Apr 2018 00:28:03 +0000 Message-ID: <20180409002738.163941-28-alexander.levin@microsoft.com> References: <20180409002738.163941-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002738.163941-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0725;7:z2A2Scde5wRd+tIGiZvTWtugR+qngw9ZMjnLFXuZ7fgRYLAXjfrqwjjvPgPYY11ql9w5ogyDlHvZIfNEiIZBZ1WaO8F5LW+U5rLZ9r7vi4xE6IyNB78mh5OCH7FHaXcwgco0kWPbzWfNi0OyR6xlQin5C/GwK/uC1Yxot3gZ06i2RGHRlBbOFgG461bXlzVHM/R0puB2+SP2ZK/VOb8BlLWgoeR46CvSeZrDMN87+KvF1uhZoY0rhZtE3eUZ++cK;20:z2+L9xX7fn9EZUAYluTfjQxHn6rRABD7vgXrn/K2h+exHU8pRmnetQFUNSpIla45ClV+q0sbC6feO4rgM7B0O5wTNdmHJ+mUbdmhSUhDHw8k1fBD5S9BhSf/LUbR8O4G3LtkBpNse+TXltDGhl/VM2dW6KfuKv44Pv0h/2pXgwE= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 1fe657f4-b86a-4510-766f-08d59db1bf0c x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0725; x-ms-traffictypediagnostic: DM5PR2101MB0725: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(211936372134217)(153496737603132); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231221)(944501327)(52105095)(93006095)(93001095)(3002001)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB0725;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0725; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(396003)(376002)(39380400002)(346002)(366004)(189003)(199004)(86612001)(575784001)(102836004)(5660300001)(14454004)(476003)(68736007)(11346002)(66066001)(446003)(99286004)(76176011)(486006)(10090500001)(3660700001)(110136005)(305945005)(106356001)(316002)(105586002)(3280700002)(59450400001)(3846002)(10290500003)(6116002)(22452003)(6506007)(2616005)(1076002)(7736002)(54906003)(478600001)(2900100001)(2501003)(5250100002)(8936002)(25786009)(81156014)(8676002)(6666003)(6436002)(4326008)(26005)(6512007)(6486002)(81166006)(107886003)(53936002)(2906002)(86362001)(186003)(97736004)(36756003)(72206003)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0725;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: /usNTDp6zdmCA6LeUQoBVKFMHOUXcFofJnDTCvBRBc3eo/8IPsurcMS9lET0DanvhqMPgzdVl/l6oQFNSQOQ/u1n/7WsIe0H9br6jfA6GCCRwJ+LzPypNN9whyzCtCt8VPp9jq5cPOVZIWNJyZNpZiLN8GR0t+uS4+2hBDYBe52zBUmZA/JPwYqQayKgVjbeSGX1KYGMlT5bReCsD2v5MBwrWmIfH3ew7qxu5S/flOALBvkXDdJ/C4UZIsuV9+lJLcQrPBLLhVshc2YGM5BR0HS3x71bW6oNYThYaLyR6SnKQT0EJB36Q82utayaWinaFOHSwm5tJSO2I3ImOgb1LEYWLioanrT8ZPWRmgN/vokzeX3jfGGAGl4UL7+OGWDzbOnxV2BUiThRlbiMe0DxXJCLGf/swkTbCQfv2laP8fQ= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1fe657f4-b86a-4510-766f-08d59db1bf0c X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:28:03.0361 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0725 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bjorn Helgaas [ Upstream commit 2f686f1d9beee135de6d08caea707ec7bfc916d4 ] PCI_STD_RESOURCE_END is (confusingly) the index of the last valid BAR, not the *number* of BARs. To iterate through all possible BARs, we need to include PCI_STD_RESOURCE_END. Fixes: 9fe373f9997b ("PCI: Increase IBM ipr SAS Crocodile BARs to at least = system page size") Signed-off-by: Bjorn Helgaas Signed-off-by: Sasha Levin --- drivers/pci/quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 4eb1cf0ed00c..ae6aa7b385c2 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -304,7 +304,7 @@ static void quirk_extend_bar_to_page(struct pci_dev *de= v) { int i; =20 - for (i =3D 0; i < PCI_STD_RESOURCE_END; i++) { + for (i =3D 0; i <=3D PCI_STD_RESOURCE_END; i++) { struct resource *r =3D &dev->resource[i]; =20 if (r->flags & IORESOURCE_MEM && resource_size(r) < PAGE_SIZE) { --=20 2.15.1