Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751605AbdFGKt2 (ORCPT ); Wed, 7 Jun 2017 06:49:28 -0400 Received: from ozlabs.org ([103.22.144.67]:40231 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751008AbdFGKt0 (ORCPT ); Wed, 7 Jun 2017 06:49:26 -0400 From: Michael Ellerman To: Murilo Opsfelder Araujo , linux-kernel@vger.kernel.org Cc: kvm@vger.kernel.org, Alex Williamson , linuxppc-dev@lists.ozlabs.org, Murilo Opsfelder Araujo Subject: Re: [PATCH] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH In-Reply-To: <20170606120914.15851-1-mopsfelder@gmail.com> References: <20170606120914.15851-1-mopsfelder@gmail.com> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Wed, 07 Jun 2017 20:49:23 +1000 Message-ID: <87a85kf4y4.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1181 Lines: 31 Murilo Opsfelder Araujo writes: > When CONFIG_EEH=y and CONFIG_VFIO_SPAPR_EEH=n, build fails with the > following: > > drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_release': > vfio_pci.c:(.text+0xa98): undefined reference to `.vfio_spapr_pci_eeh_release' > drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_open': > vfio_pci.c:(.text+0x1420): undefined reference to `.vfio_spapr_pci_eeh_open' > > In this case, vfio_pci.c should use the empty definitions of > vfio_spapr_pci_eeh_open and vfio_spapr_pci_eeh_release functions. > > This patch fixes it by guarding these function definitions with > CONFIG_VFIO_SPAPR_EEH, the symbol that controls whether vfio_spapr_eeh.c is > built, which is where the non-empty versions of these functions are. > > This issue was found during a randconfig build. Logs are here: > > http://kisskb.ellerman.id.au/kisskb/buildresult/12982362/ > > Signed-off-by: Murilo Opsfelder Araujo > --- > include/linux/vfio.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Acked-by: Michael Ellerman Alex I assume you will take this, thanks. cheers