From patchwork Thu Nov 13 18:39:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liviu Dudau X-Patchwork-Id: 40786 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CC929240ED for ; Thu, 13 Nov 2014 18:40:30 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id f15sf8389553lbj.7 for ; Thu, 13 Nov 2014 10:40:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=zif/fJRaOgkqGyxo4iAjw+hVYjiGd2k5XEVMj0M4/Ts=; b=F/z5NO+gzYPexwMJ10pOIULq87eVkozDH6NGwinQHnZGHuz7mxtIhU39yHaqt12QtI FH8TRJL5fdsEmuU/VZSTP/WoudITlVcopLH7YBbumO5sl90OjaeQgAvenSip4zCoSD2g 2bVhUYPjmFqfMsrgvO5KIYdgoHEbTn3cNRZ+3mqakEqM/gS5VPundPQqs9XoAGyA0Pft TLeEs89lbpUxh8dfLG3eoQ2jj70wZmWaTMJ2+oiTrqkAbZHy2HfewDiBIj/wkOBHeDFk mY7gHmS6WFQFODV732dIM5iU8KO7vl0wqsKpVEVc0TiNyVyI7ptuPxw238UfrtSFlfYN k1Ow== X-Gm-Message-State: ALoCoQkJr7LNbIogza/ZvffN7NAGyCq6y5cB3XFxwy1NiMPRcPLpNsGuuYHsQ4Urg5NPNyMTiFNO X-Received: by 10.112.159.199 with SMTP id xe7mr69251lbb.21.1415904029711; Thu, 13 Nov 2014 10:40:29 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.203.233 with SMTP id kt9ls110369lac.36.gmail; Thu, 13 Nov 2014 10:40:29 -0800 (PST) X-Received: by 10.112.235.135 with SMTP id um7mr3704855lbc.96.1415904029530; Thu, 13 Nov 2014 10:40:29 -0800 (PST) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id az19si39496125lab.0.2014.11.13.10.40.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Nov 2014 10:40:29 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by mail-la0-f46.google.com with SMTP id gm9so13543940lab.5 for ; Thu, 13 Nov 2014 10:40:29 -0800 (PST) X-Received: by 10.152.29.8 with SMTP id f8mr3961706lah.56.1415904029399; Thu, 13 Nov 2014 10:40:29 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp639076lbc; Thu, 13 Nov 2014 10:40:28 -0800 (PST) X-Received: by 10.68.69.6 with SMTP id a6mr3822029pbu.163.1415904027725; Thu, 13 Nov 2014 10:40:27 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cp4si18600095pdb.160.2014.11.13.10.40.24 for ; Thu, 13 Nov 2014 10:40:27 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933689AbaKMSkW (ORCPT + 26 others); Thu, 13 Nov 2014 13:40:22 -0500 Received: from fw-tnat.cambridge.arm.com ([217.140.96.21]:51462 "EHLO cam-smtp0.cambridge.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933526AbaKMSkV (ORCPT ); Thu, 13 Nov 2014 13:40:21 -0500 Received: from e106497-lin.cambridge.arm.com (e106497-lin.cambridge.arm.com [10.1.195.53]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id sADIdhtl003185; Thu, 13 Nov 2014 18:39:43 GMT From: Liviu Dudau To: Tony Luck , Fenghua Yu Cc: Bjorn Helgaas , Aaron Lu , Jiang Liu , Mika Westerberg , linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ia64: Be consistent in the type of the PCI_CONTROLLER() macro argument. Date: Thu, 13 Nov 2014 18:39:43 +0000 Message-Id: <1415903983-32588-1-git-send-email-Liviu.Dudau@arm.com> X-Mailer: git-send-email 2.1.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: liviu.dudau@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , PCI_CONTROLLER() macro in include/asm/pci.h expects an argument "busdev" which implies a 'struct pci_bus *' type of variable (or at least that is the type of most of the invocations). Correct the cases where the macro is called with a 'struct pci_dev *' variable as argument. Signed-off-by: Liviu Dudau --- arch/ia64/hp/common/sba_iommu.c | 2 +- arch/ia64/sn/kernel/io_acpi_init.c | 9 +++++---- arch/ia64/sn/kernel/io_common.c | 2 +- arch/ia64/sn/kernel/io_init.c | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index 344387a..fb5b085 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c @@ -256,7 +256,7 @@ static u64 prefetch_spill_page; #ifdef CONFIG_PCI # define GET_IOC(dev) ((dev_is_pci(dev)) \ - ? ((struct ioc *) PCI_CONTROLLER(to_pci_dev(dev))->iommu) : NULL) + ? ((struct ioc *) PCI_CONTROLLER((to_pci_dev(dev))->bus)->iommu) : NULL) #else # define GET_IOC(dev) NULL #endif diff --git a/arch/ia64/sn/kernel/io_acpi_init.c b/arch/ia64/sn/kernel/io_acpi_init.c index 0640739..426ea8e 100644 --- a/arch/ia64/sn/kernel/io_acpi_init.c +++ b/arch/ia64/sn/kernel/io_acpi_init.c @@ -358,18 +358,19 @@ sn_acpi_get_pcidev_info(struct pci_dev *dev, struct pcidev_info **pcidev_info, acpi_handle rootbus_handle; unsigned long long segment; acpi_status status; + struct pci_bus *bus = dev->bus; struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL }; - rootbus_handle = acpi_device_handle(PCI_CONTROLLER(dev)->companion); + rootbus_handle = acpi_device_handle(PCI_CONTROLLER(bus)->companion); 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(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(bus), (char *)name_buffer.pointer); kfree(name_buffer.pointer); return 1; @@ -407,7 +408,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(bus) << 40) | /* bus == 0 */ host_devfn; return 0; diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c index 11f2275..e7d5d07 100644 --- a/arch/ia64/sn/kernel/io_common.c +++ b/arch/ia64/sn/kernel/io_common.c @@ -108,7 +108,7 @@ sn_pcidev_info_get(struct pci_dev *dev) struct pcidev_info *pcidev; list_for_each_entry(pcidev, - &(SN_PLATFORM_DATA(dev)->pcidev_info), pdi_list) { + &(SN_PLATFORM_DATA(dev->bus)->pcidev_info), pdi_list) { if (pcidev->pdi_linux_pcidev == dev) return pcidev; } diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index 0b5ce82..eaff214 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),