From patchwork Wed Jan 21 00:30:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yijing Wang X-Patchwork-Id: 5673911 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C85B4C058D for ; Wed, 21 Jan 2015 02:41:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EFE4920251 for ; Wed, 21 Jan 2015 02:41:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 171282021F for ; Wed, 21 Jan 2015 02:41:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755235AbbAUCl2 (ORCPT ); Tue, 20 Jan 2015 21:41:28 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:12958 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751691AbbAUCcg (ORCPT ); Tue, 20 Jan 2015 21:32:36 -0500 Received: from 172.24.2.119 (EHLO szxeml433-hub.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BAQ96924; Wed, 21 Jan 2015 10:32:31 +0800 (CST) Received: from localhost.localdomain (10.175.100.166) by szxeml433-hub.china.huawei.com (10.82.67.210) with Microsoft SMTP Server id 14.3.158.1; Wed, 21 Jan 2015 10:32:24 +0800 From: Yijing Wang To: Bjorn Helgaas CC: Jiang Liu , , Yinghai Lu , , Marc Zyngier , , Russell King , , Thomas Gleixner , Benjamin Herrenschmidt , Rusty Russell , Tony Luck , , "David S. Miller" , "Guan Xuetao" , , , Liviu Dudau , "Arnd Bergmann" , Geert Uytterhoeven , "Yijing Wang" , Fenghua Yu Subject: [PATCH v2 16/30] PCI/IA64: Fix the build warning about pci_domain_nr() Date: Wed, 21 Jan 2015 08:30:11 +0800 Message-ID: <1421800225-26230-17-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1421800225-26230-1-git-send-email-wangyijing@huawei.com> References: <1421800225-26230-1-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.100.166] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.54BF0FBF.0086, ss=1, re=0.001, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 757facdf28b1dfff6b16eff797b4506b Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Should pass pci_bus * instead of pci_dev * to pci_domain_nr(). Signed-off-by: Yijing Wang CC: Tony Luck CC: Fenghua Yu CC: linux-ia64@vger.kernel.org --- arch/ia64/sn/kernel/io_acpi_init.c | 6 +++--- arch/ia64/sn/kernel/io_init.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/ia64/sn/kernel/io_acpi_init.c b/arch/ia64/sn/kernel/io_acpi_init.c index 0640739..2fd7414 100644 --- a/arch/ia64/sn/kernel/io_acpi_init.c +++ b/arch/ia64/sn/kernel/io_acpi_init.c @@ -364,12 +364,12 @@ sn_acpi_get_pcidev_info(struct pci_dev *dev, struct pcidev_info **pcidev_info, status = acpi_evaluate_integer(rootbus_handle, METHOD_NAME__SEG, NULL, &segment); if (ACPI_SUCCESS(status)) { - if (segment != pci_domain_nr(dev)) { + if (segment != pci_domain_nr(dev->bus)) { acpi_get_name(rootbus_handle, ACPI_FULL_PATHNAME, &name_buffer); printk(KERN_ERR "%s: Segment number mismatch, 0x%llx vs 0x%x for: %s\n", - __func__, segment, pci_domain_nr(dev), + __func__, segment, pci_domain_nr(dev->bus), (char *)name_buffer.pointer); kfree(name_buffer.pointer); return 1; @@ -407,7 +407,7 @@ sn_acpi_get_pcidev_info(struct pci_dev *dev, struct pcidev_info **pcidev_info, /* Build up the pcidev_info.pdi_slot_host_handle */ host_devfn = get_host_devfn(pcidev_match.handle, rootbus_handle); (*pcidev_info)->pdi_slot_host_handle = - ((unsigned long) pci_domain_nr(dev) << 40) | + ((unsigned long) pci_domain_nr(dev->bus) << 40) | /* bus == 0 */ host_devfn; return 0; diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index bcdc5b8..a97fad4 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c @@ -164,7 +164,7 @@ sn_io_slot_fixup(struct pci_dev *dev) panic("%s: Unable to alloc memory for sn_irq_info", __func__); /* Call to retrieve pci device information needed by kernel. */ - status = sal_get_pcidev_info((u64) pci_domain_nr(dev), + status = sal_get_pcidev_info((u64) pci_domain_nr(dev->bus), (u64) dev->bus->number, dev->devfn, (u64) __pa(pcidev_info),