From patchwork Fri Aug 9 13:44:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Cooper X-Patchwork-Id: 2841932 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2BB009F295 for ; Fri, 9 Aug 2013 13:45:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 734CB2012F for ; Fri, 9 Aug 2013 13:45:11 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 37E3A20126 for ; Fri, 9 Aug 2013 13:45:10 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7n05-0003IJ-Ev; Fri, 09 Aug 2013 13:45:05 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7n03-0005tc-6C; Fri, 09 Aug 2013 13:45:03 +0000 Received: from mho-03-ewr.mailhop.org ([204.13.248.66] helo=mho-01-ewr.mailhop.org) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7n01-0005sa-9s for linux-arm-kernel@lists.infradead.org; Fri, 09 Aug 2013 13:45:01 +0000 Received: from pool-72-84-113-162.nrflva.fios.verizon.net ([72.84.113.162] helo=titan) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1V7mzX-0009Cg-NJ; Fri, 09 Aug 2013 13:44:31 +0000 Received: from titan.lakedaemon.net (localhost [127.0.0.1]) by titan (Postfix) with ESMTP id 8206F48177B; Fri, 9 Aug 2013 09:44:27 -0400 (EDT) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 72.84.113.162 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+qBNW5d4XlGIPVueM/x24bIduKPIrLMzM= Date: Fri, 9 Aug 2013 09:44:27 -0400 From: Jason Cooper To: Benjamin Herrenschmidt Subject: Re: [PATCHv8 04/10] of: pci: add registry of MSI chips Message-ID: <20130809134427.GC25111@titan.lakedaemon.net> References: <1376000268-18397-1-git-send-email-thomas.petazzoni@free-electrons.com> <1376000268-18397-5-git-send-email-thomas.petazzoni@free-electrons.com> <1376027346.32100.8.camel@pasglop> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1376027346.32100.8.camel@pasglop> User-Agent: Mutt/1.5.20 (2009-06-14) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130809_094501_392252_00F51E3E X-CRM114-Status: GOOD ( 12.36 ) X-Spam-Score: -0.1 (/) Cc: Thomas Petazzoni , Lior Amsalem , Russell King , Andrew Lunn , linux-pci@vger.kernel.org, Rob Herring , Maen Suleiman , Thierry Reding , Ezequiel Garcia , Gregory Clement , Thomas Gleixner , Bjorn Helgaas , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_MED, 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 On Fri, Aug 09, 2013 at 03:49:06PM +1000, Benjamin Herrenschmidt wrote: > On Fri, 2013-08-09 at 00:17 +0200, Thomas Petazzoni wrote: > > > > +#if defined(CONFIG_OF) && defined(CONFIG_PCI_MSI) > > +int of_pci_msi_chip_add(struct msi_chip *chip); > > +void of_pci_msi_chip_remove(struct msi_chip *chip); > > +struct msi_chip *of_pci_find_msi_chip_by_node(struct device_node > > *of_node); > > +#else > > +static inline int of_pci_msi_chip_add(struct msi_chip *chip) { return > > -EINVAL; } > > +static inline void of_pci_msi_chip_remove(struct msi_chip *chip) { } > > Missing a ; at the end of the above line... breaks the build of > CONFIG_PCI_MSI is not set. > > > +static inline struct msi_chip * > > +of_pci_find_msi_chip_by_node(struct device_node *of_node) { return > > NULL }; > > +#endif > > + > > #endif Reproduced, fixed and builds clean !CONFIG_OF and !CONFIG_PCI_MSI with: ---------------->8---------------- diff --git a/include/linux/of_pci.h b/include/linux/of_pci.h index 29631eb..9f69507 100644 --- a/include/linux/of_pci.h +++ b/include/linux/of_pci.h @@ -19,10 +19,11 @@ int of_pci_msi_chip_add(struct msi_chip *chip); void of_pci_msi_chip_remove(struct msi_chip *chip); struct msi_chip *of_pci_find_msi_chip_by_node(struct device_node *of_node); #else -static inline int of_pci_msi_chip_add(struct msi_chip *chip) { return -EINVAL; } -static inline void of_pci_msi_chip_remove(struct msi_chip *chip) { } +static inline int +of_pci_msi_chip_add(struct msi_chip *chip) { return -EINVAL; }; +static inline void of_pci_msi_chip_remove(struct msi_chip *chip) { }; static inline struct msi_chip * -of_pci_find_msi_chip_by_node(struct device_node *of_node) { return NULL }; +of_pci_find_msi_chip_by_node(struct device_node *of_node) { return NULL; }; #endif #endif