Hi all, After merging the final tree, today's linux-next build (powerpc allyesconfig) failed like this: drivers/net/built-in.o: In function `pci_get_domain_bus_and_slot': (.opd+0x449e8): multiple definition of `pci_get_domain_bus_and_slot' drivers/pci/built-in.o:(.opd+0x1c98): first defined here Caused by commit 13159183ec7a ("qlcnic: 83xx base driver") from the net-next tree. Why is this commit adding a function that already exists globally? I added this patch for today: From: Stephen Rothwell Date: Thu, 3 Jan 2013 14:19:16 +1100 Subject: [PATCH] qlcnic: do not duplicate infrastructure functions Signed-off-by: Stephen Rothwell --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index e1a3625..3bdb1beae 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c @@ -2,12 +2,6 @@ * QLogic qlcnic NIC Driver * Copyright (c) 2009-2010 QLogic Corporation * - * PCI searching functions pci_get_domain_bus_and_slot & pci_channel_offline - * Copyright (C) 1993 -- 1997 Drew Eckhardt, Frederic Potter, - * David Mosberger-Tang - * Copyright (C) 1997 -- 2000 Martin Mares - * Copyright (C) 2003 -- 2004 Greg Kroah-Hartman . - * * See LICENSE.qlcnic for copyright and licensing details. */ @@ -25,6 +19,7 @@ #include #include #include +#include MODULE_DESCRIPTION("QLogic 1/10 GbE Converged/Intelligent Ethernet Driver"); MODULE_LICENSE("GPL"); @@ -2907,19 +2902,6 @@ reschedule: qlcnic_schedule_work(adapter, qlcnic_fw_poll_work, FW_POLL_DELAY); } -struct pci_dev *pci_get_domain_bus_and_slot(int domain, unsigned int bus, - unsigned int devfn) -{ - struct pci_dev *dev = NULL; - - while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { - if (pci_domain_nr(dev->bus) == domain && - (dev->bus->number == bus && dev->devfn == devfn)) - return dev; - } - return NULL; -} - static int qlcnic_is_first_func(struct pci_dev *pdev) { struct pci_dev *oth_pdev; -- 1.7.10.280.gaa39 -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/