Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4608458ybe; Mon, 16 Sep 2019 15:24:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwn/a2MHE6earY8fARzLGmz4geHHgSqRQka5UL+VUNGluFa5gddlR034vA6g/XuJ1G1AKrH X-Received: by 2002:a17:906:168f:: with SMTP id s15mr2041482ejd.109.1568672696422; Mon, 16 Sep 2019 15:24:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568672696; cv=none; d=google.com; s=arc-20160816; b=mUACMWdSlg3P+O+tF9aeMtPdM3pWSa3zKr8fwpVeYTI3DQ6F08aypw94arG0/N9LaG rJnO5XTqiAXdLnt+y0TlRG2WtxGCgOYts6jbnOSrHjaHG7JctTzP/csQV7RMJNJ3M7Mn OPycwdSV96T9r4p57uqsrZ3KeETuHuVp0KRmaPCvGgkKtpUjwJ6Ow/UdUbWIZ2SM7pRT PHvXjY5ElZf7dKTUv9BFfjhyfP3yrVDgAnSGepFUmvh0tBPe5lVA5pHFaBhLiNXHx8dQ PnD9VZUsCuw+UmJVwLcBmplnoYIxg+naCl0NYY7ooH+xECesPHBBcx1SwRDYt+Kc3uxO cMvg== 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=z7l3aUvXVj0B4HmmemvPXtwnQthJwDdKiNtC0WPyylI=; b=0OCn58xpSHwHTPzX311Xu/c3bJF59UV94FxvGAeuRXU9PiDATFhfqyXJ2kFo+5b0rM MpaDCke6xMMtZq/MTqoaYF3wURqH0mIiavcaO+KtTGPHvrMZEA/Lu8HB2dFfXwJ3sSLT 0LyzheQUExFRSiiXbKH8FjzC18aGjUk0G1sfFloQxnj/laS1vlTXQppU1Zvi9OKX4LKH F1HfvlBrxUs5rgUhqYTvd187xfnlE0VG22C12CGAat4d/AZOvBT5rGh4T2qU/jZNwZy6 WoEsI9akeVBfwUS57O0FKF+leP4OF2qb+NeAryq3ynMoG4iNv4F4t9FF3PrbqhMOYCnd OGdQ== 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 c7si126268ejr.360.2019.09.16.15.24.32; Mon, 16 Sep 2019 15:24:56 -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 S2391519AbfIPUop (ORCPT + 99 others); Mon, 16 Sep 2019 16:44:45 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:36942 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387513AbfIPUoo (ORCPT ); Mon, 16 Sep 2019 16:44:44 -0400 Received: by mail-wm1-f67.google.com with SMTP id r195so707315wme.2; Mon, 16 Sep 2019 13:44:41 -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=z7l3aUvXVj0B4HmmemvPXtwnQthJwDdKiNtC0WPyylI=; b=oHehi/5o+BNYiojA1ENYI+u+vp9T+Lgkqy3Be/I6t/Tjgi+v+UkbCjzDRZutcHXVwv /HtBZKhgsJrf/03M/hTnaa7pegqPXX6GbvrHInnUKo4cCf7C06Xtri3dwwMTv9rl59bF upXd0SczvWHwmEwKxCXNtEByPsc02QTURs7GJUA2KgxZ1Nm/0eaZs0Yc2ixNMarXlWhf EJ3wSW6S9VTEsQrkGB9sE8vMRsLcihYlLbZJrO5c+NgTeRWqpF+f1ad2n/Cqssyh6CqQ wHebEfvC5CATftzY68Zfq8BhmPRtbgtVBDYIyj60AU39cyWr7iGFEqTyWe3rIdqsh2xr VxfA== X-Gm-Message-State: APjAAAXeJPo88eYbvib/m3Ozp4fhxFlAzHKdURAKZYSmupHAkRCM0FHn V4D++mcTrMn6Ahi2TWVhlz8= X-Received: by 2002:a1c:9cd0:: with SMTP id f199mr646857wme.111.1568666681325; Mon, 16 Sep 2019 13:44:41 -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.44.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2019 13:44:40 -0700 (PDT) From: Denis Efremov To: Bjorn Helgaas Cc: Denis Efremov , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Andrew Murray , linux-ia64@vger.kernel.org, Tony Luck , Fenghua Yu Subject: [PATCH v3 09/26] ia64: Use PCI_STD_NUM_BARS Date: Mon, 16 Sep 2019 23:41:41 +0300 Message-Id: <20190916204158.6889-10-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: Tony Luck Cc: Fenghua Yu Signed-off-by: Denis Efremov --- arch/ia64/sn/pci/pcibr/pcibr_dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/ia64/sn/pci/pcibr/pcibr_dma.c b/arch/ia64/sn/pci/pcibr/pcibr_dma.c index 1e863b277ac9..ff981e415a28 100644 --- a/arch/ia64/sn/pci/pcibr/pcibr_dma.c +++ b/arch/ia64/sn/pci/pcibr/pcibr_dma.c @@ -295,14 +295,14 @@ void sn_dma_flush(u64 addr) /* find a matching BAR */ for (i = 0; i < DEV_PER_WIDGET; i++,p++) { common = p->common; - for (j = 0; j < PCI_ROM_RESOURCE; j++) { + for (j = 0; j < PCI_STD_NUM_BARS; j++) { if (common->sfdl_bar_list[j].start == 0) break; if (addr >= common->sfdl_bar_list[j].start && addr <= common->sfdl_bar_list[j].end) break; } - if (j < PCI_ROM_RESOURCE && common->sfdl_bar_list[j].start != 0) + if (j < PCI_STD_NUM_BARS && common->sfdl_bar_list[j].start != 0) break; } -- 2.21.0