Re: [PATCH 01/28] usb: common: change usb_debug_root as static variable

Chunfeng Yun
2019-11-06T09:16:31Z

Hi Greg,

On Wed, 2019-11-06 at 09:51 +0100, Greg Kroah-Hartman wrote:
> On Wed, Nov 06, 2019 at 11:15:02AM +0800, Chunfeng Yun wrote:
> > Try to avoid using extern global variable, and provide two
> > functions for the usage cases
> >
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> > drivers/usb/common/common.c | 16 ++++++++++++++--
> > include/linux/usb.h | 5 ++++-
> > 2 files changed, 18 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c
> > index 1433260d99b4..639ee6d243a2 100644
> > --- a/drivers/usb/common/common.c
> > +++ b/drivers/usb/common/common.c
> > @@ -293,8 +293,20 @@ struct device *usb_of_get_companion_dev(struct device *dev)
> > EXPORT_SYMBOL_GPL(usb_of_get_companion_dev);
> > #endif
> >
> > -struct dentry *usb_debug_root;
> > -EXPORT_SYMBOL_GPL(usb_debug_root);
> > +static struct dentry *usb_debug_root;
>
> You just broke the kernel build, which is not acceptable at all :(
Vey sorry, I didn't get what you mean before, now get it.

>
> greg k-h