Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4974278ybe; Mon, 16 Sep 2019 23:57:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHxxv8pJ9W4Y+joVMeRV4AY5p5EC6eEnx/0qNIyXLQDo0QVPPmfFcok0a/3f8Z5LPHhd7O X-Received: by 2002:a17:906:19d6:: with SMTP id h22mr3393800ejd.61.1568703420725; Mon, 16 Sep 2019 23:57:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568703420; cv=none; d=google.com; s=arc-20160816; b=LThLsQ+MsFqJ/k1lyPcYiKxAmV3jKhvpmm0MU6NCDGzH5rW77cEesknOBZ5KYJXlmu Kh2KNNEUJ4hbzwDjikWoGCbFv4rpCoP2TqZEfBH0wkIW0KeItwk2Z3UMro1IIae35CIH RtNFl3Nb0hE/qVdRxdBLdljWPHsZrD9BMGJAaEMfKta7Kz6r2P9TiksPlDY1AIwXNmYC Blze7KHOPNQ/qi3kJyEswKKLT++VkRLUF+VpNfK6074iqycmYF4+SvaRrsvvKHeNGe89 Jp0IulgxhA8N3LS616McSLhlE09KoO2p3dw6aVT9EXJXb8UFnBH4qkidMUGRGyBaR6Y3 zlrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ujovi4XPDNySnmAMKOgDa4VaedmyqoxIIAtYaqvsCwo=; b=N5xCzGHC+duDbNLr9N4Gjgp8TMk5wM6i+odTXtLkY6RgA7QRXoFozwQZdM8SEOBp4Q VhC2GOBE8qQfiLooO1CaYtC4uJUg4ZJp5bNN2GFY1UZTSwiezF5lQUBq5s4B+kp+9XhX 8rRjiYxWiD93xxWHMi9wQJpqWga/cG0M0YwA35FC6WOwxydvJd6t1kgQh/Rpj3K2D1fJ EoP/vCGDjW58E3qBzH2l4fXgirqvkyzOJBDIBC/ife9c6ifz3PS5TgTrm58EBtF7HJw2 t31XneWO9VAgeoPDfnMjhdQthsty5pghRMyzHqKIXPSCXSqaSBa/bEV0KIzjcQm0Ovh1 lg3w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gz7si648629ejb.147.2019.09.16.23.56.36; Mon, 16 Sep 2019 23:57:00 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388304AbfIPUrW (ORCPT + 99 others); Mon, 16 Sep 2019 16:47:22 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:38069 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727971AbfIPUrW (ORCPT ); Mon, 16 Sep 2019 16:47:22 -0400 Received: by mail-wm1-f67.google.com with SMTP id o184so706097wme.3; Mon, 16 Sep 2019 13:47:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ujovi4XPDNySnmAMKOgDa4VaedmyqoxIIAtYaqvsCwo=; b=QfDhwKjIJ0ubzz44BRt0mpxEHpE18jjp1L1Iduzq47jtT7F1GeWvFGKK3uVdmu6tqI kyVwMoo77npQvUN4+kqsW68CX3UgHn52lXubKMoAFy2NWdreV5ZrDwl6UlLRME8j+8zH IjLJgXhiq4fgFfGvHnQRdjJeT3dxhqpuN8YWqLZNOHerdEaASkuL6k2YFRwYWVztdZGK TwuVHQ3khtR4adqYsVN5gaVuCf1yt0ovuOq6otyzpfQZ4z8d5di10UQSz4AXJ3uB17zO AfFVBJ0wBieeMQ0mPV1jlT/NnBfO4B3TlCoiNCiQtPM7wNZmBx3oF46nztgQxd7AkKEo drOg== X-Gm-Message-State: APjAAAXe5Z68LHg/XtxgJJxsQ2vChYJurLivdBILMQaO/3K9g3riOYCN 3dnNuJ5VL0dsLlN1ya3IL70TgUDUYSE= X-Received: by 2002:a1c:9cd0:: with SMTP id f199mr652570wme.111.1568666839843; Mon, 16 Sep 2019 13:47:19 -0700 (PDT) Received: from black.home (broadband-188-32-48-208.ip.moscow.rt.ru. [188.32.48.208]) by smtp.googlemail.com with ESMTPSA id x6sm231437wmf.38.2019.09.16.13.47.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2019 13:47:19 -0700 (PDT) From: Denis Efremov To: Bjorn Helgaas Cc: Denis Efremov , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Andrew Murray , linux-fbdev@vger.kernel.org, Bartlomiej Zolnierkiewicz , Daniel Vetter Subject: [PATCH v3 16/26] fbmem: use PCI_STD_NUM_BARS Date: Mon, 16 Sep 2019 23:41:48 +0300 Message-Id: <20190916204158.6889-17-efremov@linux.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190916204158.6889-1-efremov@linux.com> References: <20190916204158.6889-1-efremov@linux.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use define PCI_STD_NUM_BARS instead of PCI_ROM_RESOURCE for the number of PCI BARs. Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Signed-off-by: Denis Efremov --- drivers/video/fbdev/core/fbmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index 64dd732021d8..485e798cd404 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -1784,7 +1784,7 @@ int remove_conflicting_pci_framebuffers(struct pci_dev *pdev, int res_id, const int err, idx, bar; bool res_id_found = false; - for (idx = 0, bar = 0; bar < PCI_ROM_RESOURCE; bar++) { + for (idx = 0, bar = 0; bar < PCI_STD_NUM_BARS; bar++) { if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) continue; idx++; @@ -1794,7 +1794,7 @@ int remove_conflicting_pci_framebuffers(struct pci_dev *pdev, int res_id, const if (!ap) return -ENOMEM; - for (idx = 0, bar = 0; bar < PCI_ROM_RESOURCE; bar++) { + for (idx = 0, bar = 0; bar < PCI_STD_NUM_BARS; bar++) { if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) continue; ap->ranges[idx].base = pci_resource_start(pdev, bar); -- 2.21.0