From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754164AbcFPMpq (ORCPT ); Thu, 16 Jun 2016 08:45:46 -0400 Received: from ducie-dc1.codethink.co.uk ([185.25.241.215]:42632 "EHLO ducie-dc1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751275AbcFPMpo (ORCPT ); Thu, 16 Jun 2016 08:45:44 -0400 Subject: Re: [PATCH] USB: core: fix missing include To: Peter Chen , Arnd Bergmann References: <201606080333.vfFKvIIV%fengguang.wu@intel.com> <16060867.1nFmu0b2lQ@wuerfel> <20160615024355.GB4049@shlinux2> Cc: kbuild test robot , kbuild-all@01.org, linux-kernel@lists.codethink.co.uk, Greg Kroah-Hartman , Philipp Zabel , Alan Stern , Peter Chen , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org From: Ben Dooks Organization: Codethink Limited. Message-ID: <9c942ec3-6611-dd5b-f922-d227fab3f23e@codethink.co.uk> Date: Thu, 16 Jun 2016 13:45:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0 MIME-Version: 1.0 In-Reply-To: <20160615024355.GB4049@shlinux2> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/06/16 03:43, Peter Chen wrote: > On Tue, Jun 14, 2016 at 01:08:08PM +0200, Arnd Bergmann wrote: >> On Wednesday, June 8, 2016 3:04:27 AM CEST kbuild test robot wrote: >>>>> drivers/usb/core/of.c:32:21: error: redefinition of 'usb_of_get_child_node' >>> struct device_node *usb_of_get_child_node(struct device_node *parent, >>> ^~~~~~~~~~~~~~~~~~~~~ >>> In file included from drivers/usb/core/of.c:21:0: >>> include/linux/usb/of.h:36:35: note: previous definition of 'usb_of_get_child_node' was here >>> static inline struct device_node *usb_of_get_child_node >>> ^~~~~~~~~~~~~~~~~~~~~ >>> >>> vim +/usb_of_get_child_node +32 drivers/usb/core/of.c >>> >>> 69bec725 Peter Chen 2016-02-19 26 * @portnum: the port number which device is connecting >>> 69bec725 Peter Chen 2016-02-19 27 * >>> 69bec725 Peter Chen 2016-02-19 28 * Find the node from device tree according to its port number. >>> 69bec725 Peter Chen 2016-02-19 29 * >>> 69bec725 Peter Chen 2016-02-19 30 * Return: On success, a pointer to the device node, %NULL on failure. >>> 69bec725 Peter Chen 2016-02-19 31 */ >>> 69bec725 Peter Chen 2016-02-19 @32 struct device_node *usb_of_get_child_node(struct device_node *parent, >>> 69bec725 Peter Chen 2016-02-19 33 int portnum) >>> 69bec725 Peter Chen 2016-02-19 34 { >>> 69bec725 Peter Chen 2016-02-19 35 struct device_node *node; >>> >>> >> >> I think what we want here is to make the compilation of of.o conditional on >> CONFIG_OF, so we get only one of the two definitions. >> >> Arnd > > Thanks, Arnd. It is the correct solution, I will send patch soon. Aha, I didn't think of that. Thanks. -- Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius