From patchwork Tue Sep 30 13:19:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 5002811 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3AD41BEEA6 for ; Tue, 30 Sep 2014 13:19:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 657DC201FB for ; Tue, 30 Sep 2014 13:19:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 872F7201C7 for ; Tue, 30 Sep 2014 13:19:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751376AbaI3NTq (ORCPT ); Tue, 30 Sep 2014 09:19:46 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:59903 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750844AbaI3NTp (ORCPT ); Tue, 30 Sep 2014 09:19:45 -0400 Received: from wuerfel.localnet (HSI-KBW-134-3-133-35.hsi14.kabel-badenwuerttemberg.de [134.3.133.35]) by mrelayeu.kundenserver.de (node=mreue103) with ESMTP (Nemesis) id 0LoaZ0-1Y9fzr0PLW-00gUKx; Tue, 30 Sep 2014 15:19:09 +0200 From: Arnd Bergmann To: Bjorn Helgaas Cc: Liviu Dudau , Catalin Marinas , Rob Herring , Grant Likely , devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] of/pci: add pci_pio_to_address dummy for !CONFIG_OF Date: Tue, 30 Sep 2014 15:19:05 +0200 Message-ID: <706416181.hbVGLDA3o6@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V02:K0:0SmIMmY0RYykU1Lqgb7jOd1at2TEoitqeW5DtXCqbWb XJB5Y8LHjHP1P8qUxnGm1x+X/nktuJFWExLE6XyrOuFl+l79fZ 0dFCJCsUmrtH3kwyDxWPZnxS49u6QIl72hWi71CDbVb9IOX4Nj nGnHeb8lrd34NDoF92dfOlQyJ2Kr/4vbx2sJ/2rsq5rlsCHgAs 8DA9ZBYO2dfxiF0AGQVswV8KCsA5vEeIQRuo9w2iTodJ8O27yN nY2BK0voQItBaumOlnyIZJp59jhPDyKpIRtO2YDfucNo9hah9p G2XJJfJO9dYWoKJs0IIX5q1lWJF4JZB6f3OSzTeynZfywW0V6H pMTghSZmL8ppcNr1vCzU= X-UI-Out-Filterresults: notjunk:1; Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 The pci_register_io_range() and pci_pio_to_address() were recently introduced to generalize the handling of memory mapped PCI I/O space, but they are only valid when CONFIG_OF is set, leading to a possible build error: drivers/pci/host/pcie-rcar.c: In function 'rcar_pcie_setup_window': drivers/pci/host/pcie-rcar.c:340:3: error: implicit declaration of function 'pci_pio_to_address' [-Werror=implicit-function-declaration] res_start = pci_pio_to_address(res->start); ^ drivers/pci/host/pcie-rcar.c: In function 'rcar_pcie_probe': drivers/pci/host/pcie-rcar.c:945:3: error: implicit declaration of function 'of_pci_range_to_resource' [-Werror=implicit-function-declaration] err = of_pci_range_to_resource(&range, pdev->dev.of_node, ^ cc1: some warnings being treated as errors This provides inline dummy implementations for the case that CONFIG_OF is disabled, to allow better build testing. Signed-off-by: Arnd Bergmann Fixes: 279c5dd046 ("of/pci: Add pci_register_io_range() and pci_pio_to_address()") Acked-by: Liviu Dudau --- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/of_address.h b/include/linux/of_address.h index 7ebb877b07c2..851097aab115 100644 --- a/include/linux/of_address.h +++ b/include/linux/of_address.h @@ -71,6 +71,11 @@ static inline const __be32 *of_get_address(struct device_node *dev, int index, return NULL; } +static inline phys_addr_t pci_pio_to_address(unsigned long pio) +{ + return 0; +} + static inline int of_pci_range_parser_init(struct of_pci_range_parser *parser, struct device_node *node) { @@ -144,6 +149,12 @@ static inline const __be32 *of_get_pci_address(struct device_node *dev, { return NULL; } +static inline int of_pci_range_to_resource(struct of_pci_range *range, + struct device_node *np, + struct resource *res) +{ + return -ENOSYS; +} #endif /* CONFIG_OF_ADDRESS && CONFIG_PCI */ #endif /* __OF_ADDRESS_H */