From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756129AbbIUGJt (ORCPT ); Mon, 21 Sep 2015 02:09:49 -0400 Received: from cassarossa.samfundet.no ([193.35.52.29]:41595 "EHLO cassarossa.samfundet.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752501AbbIUGJs (ORCPT ); Mon, 21 Sep 2015 02:09:48 -0400 Date: Mon, 21 Sep 2015 08:09:42 +0200 From: Hans-Christian Egtvedt To: Sudip Mukherjee Cc: Haavard Skinnemoen , Felipe Balbi , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Andrew Morton Subject: Re: [PATCH 1/3] avr32: fix build failure Message-ID: <20150921060942.GA17632@samfundet.no> References: <1442682779-20077-1-git-send-email-sudipm.mukherjee@gmail.com> <1442682779-20077-2-git-send-email-sudipm.mukherjee@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1442682779-20077-2-git-send-email-sudipm.mukherjee@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Around Sat 19 Sep 2015 22:42:57 +0530 or thereabout, Sudip Mukherjee wrote: > While building avr32 with allmodconfig, the build used to fail with the > message: > error: implicit declaration of function 'pci_iomap' > error: implicit declaration of function 'pci_iounmap' What has changed recently that start pulling in these? AVR32 does not have PCI at all, and will never have it either. Is this exposing a bug somewhere else? > Create dummy pci_io{map,unmap} functions to fix the build. > > Signed-off-by: Sudip Mukherjee > --- > > Tested with defconfig, allmodconfig, allnoconfig and merisc_defconfig. > Build is at: > https://travis-ci.org/sudipm-mukherjee/parport/builds/81168845 > > Partial idea taken from: > 78857614104a ("MIPS: Expose missing pci_io{map,unmap} declarations") > which solved a similar problem with mips. > > arch/avr32/include/asm/io.h | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/arch/avr32/include/asm/io.h b/arch/avr32/include/asm/io.h > index f855646..1d8c4e4 100644 > --- a/arch/avr32/include/asm/io.h > +++ b/arch/avr32/include/asm/io.h > @@ -276,6 +276,19 @@ extern void __iomem *__ioremap(unsigned long offset, size_t size, > unsigned long flags); > extern void __iounmap(void __iomem *addr); > > +#ifndef CONFIG_PCI > +struct pci_dev; > +static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) > +{ > +} > + > +static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, > + unsigned long maxlen) > +{ > + return NULL; > +} > +#endif > + > /* > * ioremap - map bus memory into CPU space > * @offset bus address of the memory -- mvh Hans-Christian Egtvedt