From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: [RESEND PATCH] usb: mtu3: fix up undefined reference to usb_debug_root Date: Fri, 24 May 2019 09:45:52 +0200 Message-ID: <20190524074552.GA1080@kroah.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Chunfeng Yun Cc: Matthias Brugger , Randy Dunlap , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org List-Id: linux-mediatek@lists.infradead.org On Fri, May 24, 2019 at 02:11:33PM +0800, Chunfeng Yun wrote: > When CONFIG_USB is not set, and CONFIG_USB_GADGET is set, > there is an issue: > > ld: > drivers/usb/mtu3/mtu3_debugfs.o: in function 'ssusb_debugfs_create_root': > mtu3_debugfs.c:(.text+0xba3): undefined reference to 'usb_debug_root' > > usb_debug_root is only built when CONFIG_USB is enabled, so here drop it > and use NULL instead. > > Reported-by: Randy Dunlap > Signed-off-by: Chunfeng Yun > Acked-by: Randy Dunlap > --- > drivers/usb/mtu3/mtu3_debugfs.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Why resend? > diff --git a/drivers/usb/mtu3/mtu3_debugfs.c b/drivers/usb/mtu3/mtu3_debugfs.c > index 62c57ddc554e..b7c86ccd50b4 100644 > --- a/drivers/usb/mtu3/mtu3_debugfs.c > +++ b/drivers/usb/mtu3/mtu3_debugfs.c > @@ -528,8 +528,7 @@ void ssusb_dr_debugfs_init(struct ssusb_mtk *ssusb) > > void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb) > { > - ssusb->dbgfs_root = > - debugfs_create_dir(dev_name(ssusb->dev), usb_debug_root); > + ssusb->dbgfs_root = debugfs_create_dir(dev_name(ssusb->dev), NULL); This moves the directory to a new location no matter what the configuration is. What's wrong with where it is today? And shoudn't we create the usb root directory if only gadget is enabled? thanks, greg k-h