Re: drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:58:6: error: redefinition of 'brcmf_debugfs_init'

2017-02-16 Thread Kalle Valo
Arend Van Spriel  writes:

> On 16-2-2017 11:01, Kalle Valo wrote:
>> Arend Van Spriel  writes:
>> 
>>> On 16-2-2017 10:39, Rafał Miłecki wrote:
 On 02/16/2017 10:31 AM, Kalle Valo wrote:
> (Adding linux-wireless)
>
> Arend or Rafał, would you be able to look at this build problem? Kbuild
> found the build errors below, apparently a very old issue. It just
> blames me now because I moved the driver to a new directory :)
>>>
>>> It is a very old issue. The thing is that the issue can not really occur
>>> because we have this:
>>>
>>> # common flags
>>> subdir-ccflags-$(CONFIG_BRCMDBG)+= -DDEBUG
>>>
>>> in drivers/net/wireless/broadcom/brcm80211/Makefile. So no clue what
>>> happens in the "kbuild test robot" scenario.
>> 
>> I actually tried to reproduce this with kbuild bot's instructions and
>> was surprised to see that the build worked ok for me. So the issue is
>> not that simple.
>
> Hi Kalle,
>
> Here is the old email exchange we had about this [1]. In my opinion this
> is a Kbuild issue that needs to be looked into.
>
> Regards,
> Arend
>
> [1] http://www.spinics.net/lists/linux-wireless/msg142122.html

Heh, I had completely forgotten that we had discussed this before :)

Fengguang and the kbuild bot team, do you have any ideas why only the
bot is seeing this?

-- 
Kalle Valo


Re: drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:58:6: error: redefinition of 'brcmf_debugfs_init'

2017-02-16 Thread Arend Van Spriel
On 16-2-2017 11:01, Kalle Valo wrote:
> Arend Van Spriel  writes:
> 
>> On 16-2-2017 10:39, Rafał Miłecki wrote:
>>> On 02/16/2017 10:31 AM, Kalle Valo wrote:
 (Adding linux-wireless)

 Randy Dunlap  writes:

> On 02/07/17 02:02, kbuild test robot wrote:
>> Hi Kalle,
>>
>> FYI, the error/warning still remains.
>>
>> tree:  
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>> master
>> head:   8b1b41ee74f9712c355d66dc105bbea663ae0afd
>> commit: 05491d2ccf20b20a1375303441fbbfbd12b24a4f brcm80211: move
>> under broadcom vendor directory
>> date:   1 year, 3 months ago
>> config: mips-allyesconfig (attached as .config)
>> compiler: mips-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
>> reproduce:
>> wget
>> https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
>>
>> -O ~/bin/make.cross
>> chmod +x ~/bin/make.cross
>> git checkout 05491d2ccf20b20a1375303441fbbfbd12b24a4f
>> # save the attached .config to linux build tree
>> make.cross ARCH=mips
>>
>> All errors (new ones prefixed by >>):
> n
> when both:
>
> CONFIG_BRCM_TRACING=y
> CONFIG_BRCMDBG=y
>
> but DEBUG is not defined.
>
> I think it would help if CONFIG_BRCMDBG set DEBUG
> or if some of the tests for DEBUG used CONFIG_BRCMDBG instead.

 Arend or Rafał, would you be able to look at this build problem? Kbuild
 found the build errors below, apparently a very old issue. It just
 blames me now because I moved the driver to a new directory :)
>>
>> It is a very old issue. The thing is that the issue can not really occur
>> because we have this:
>>
>> # common flags
>> subdir-ccflags-$(CONFIG_BRCMDBG)+= -DDEBUG
>>
>> in drivers/net/wireless/broadcom/brcm80211/Makefile. So no clue what
>> happens in the "kbuild test robot" scenario.
> 
> I actually tried to reproduce this with kbuild bot's instructions and
> was surprised to see that the build worked ok for me. So the issue is
> not that simple.

Hi Kalle,

Here is the old email exchange we had about this [1]. In my opinion this
is a Kbuild issue that needs to be looked into.

Regards,
Arend

[1] http://www.spinics.net/lists/linux-wireless/msg142122.html


Re: drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:58:6: error: redefinition of 'brcmf_debugfs_init'

2017-02-16 Thread Kalle Valo
Arend Van Spriel  writes:

> On 16-2-2017 10:39, Rafał Miłecki wrote:
>> On 02/16/2017 10:31 AM, Kalle Valo wrote:
>>> (Adding linux-wireless)
>>>
>>> Randy Dunlap  writes:
>>>
 On 02/07/17 02:02, kbuild test robot wrote:
> Hi Kalle,
>
> FYI, the error/warning still remains.
>
> tree:  
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> master
> head:   8b1b41ee74f9712c355d66dc105bbea663ae0afd
> commit: 05491d2ccf20b20a1375303441fbbfbd12b24a4f brcm80211: move
> under broadcom vendor directory
> date:   1 year, 3 months ago
> config: mips-allyesconfig (attached as .config)
> compiler: mips-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
> wget
> https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
>
> -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout 05491d2ccf20b20a1375303441fbbfbd12b24a4f
> # save the attached .config to linux build tree
> make.cross ARCH=mips
>
> All errors (new ones prefixed by >>):
n
 when both:

 CONFIG_BRCM_TRACING=y
 CONFIG_BRCMDBG=y

 but DEBUG is not defined.

 I think it would help if CONFIG_BRCMDBG set DEBUG
 or if some of the tests for DEBUG used CONFIG_BRCMDBG instead.
>>>
>>> Arend or Rafał, would you be able to look at this build problem? Kbuild
>>> found the build errors below, apparently a very old issue. It just
>>> blames me now because I moved the driver to a new directory :)
>
> It is a very old issue. The thing is that the issue can not really occur
> because we have this:
>
> # common flags
> subdir-ccflags-$(CONFIG_BRCMDBG)+= -DDEBUG
>
> in drivers/net/wireless/broadcom/brcm80211/Makefile. So no clue what
> happens in the "kbuild test robot" scenario.

I actually tried to reproduce this with kbuild bot's instructions and
was surprised to see that the build worked ok for me. So the issue is
not that simple.

-- 
Kalle Valo


Re: drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:58:6: error: redefinition of 'brcmf_debugfs_init'

2017-02-16 Thread Arend Van Spriel
On 16-2-2017 10:39, Rafał Miłecki wrote:
> On 02/16/2017 10:31 AM, Kalle Valo wrote:
>> (Adding linux-wireless)
>>
>> Randy Dunlap  writes:
>>
>>> On 02/07/17 02:02, kbuild test robot wrote:
 Hi Kalle,

 FYI, the error/warning still remains.

 tree:  
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
 master
 head:   8b1b41ee74f9712c355d66dc105bbea663ae0afd
 commit: 05491d2ccf20b20a1375303441fbbfbd12b24a4f brcm80211: move
 under broadcom vendor directory
 date:   1 year, 3 months ago
 config: mips-allyesconfig (attached as .config)
 compiler: mips-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
 reproduce:
 wget
 https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross

 -O ~/bin/make.cross
 chmod +x ~/bin/make.cross
 git checkout 05491d2ccf20b20a1375303441fbbfbd12b24a4f
 # save the attached .config to linux build tree
 make.cross ARCH=mips

 All errors (new ones prefixed by >>):
>>>
>>> when both:
>>>
>>> CONFIG_BRCM_TRACING=y
>>> CONFIG_BRCMDBG=y
>>>
>>> but DEBUG is not defined.
>>>
>>> I think it would help if CONFIG_BRCMDBG set DEBUG
>>> or if some of the tests for DEBUG used CONFIG_BRCMDBG instead.
>>
>> Arend or Rafał, would you be able to look at this build problem? Kbuild
>> found the build errors below, apparently a very old issue. It just
>> blames me now because I moved the driver to a new directory :)

It is a very old issue. The thing is that the issue can not really occur
because we have this:

# common flags
subdir-ccflags-$(CONFIG_BRCMDBG)+= -DDEBUG

in drivers/net/wireless/broadcom/brcm80211/Makefile. So no clue what
happens in the "kbuild test robot" scenario.

Regards,
Arend

> Something like this maybe? Note I didn't test it with above config.
> 
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
> b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
> index 6687812770cc..8c7695fde482 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
> @@ -108,7 +108,7 @@ do {\
>  extern int brcmf_msg_level;
> 
>  struct brcmf_pub;
> -#ifdef DEBUG
> +#ifdef CONFIG_BRCMDBG
>  void brcmf_debugfs_init(void);
>  void brcmf_debugfs_exit(void);
>  int brcmf_debug_attach(struct brcmf_pub *drvr);
> 


Re: drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:58:6: error: redefinition of 'brcmf_debugfs_init'

2017-02-16 Thread Rafał Miłecki

On 02/16/2017 10:31 AM, Kalle Valo wrote:

(Adding linux-wireless)

Randy Dunlap  writes:


On 02/07/17 02:02, kbuild test robot wrote:

Hi Kalle,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   8b1b41ee74f9712c355d66dc105bbea663ae0afd
commit: 05491d2ccf20b20a1375303441fbbfbd12b24a4f brcm80211: move
under broadcom vendor directory
date:   1 year, 3 months ago
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
-O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 05491d2ccf20b20a1375303441fbbfbd12b24a4f
# save the attached .config to linux build tree
make.cross ARCH=mips

All errors (new ones prefixed by >>):


when both:

CONFIG_BRCM_TRACING=y
CONFIG_BRCMDBG=y

but DEBUG is not defined.

I think it would help if CONFIG_BRCMDBG set DEBUG
or if some of the tests for DEBUG used CONFIG_BRCMDBG instead.


Arend or Rafał, would you be able to look at this build problem? Kbuild
found the build errors below, apparently a very old issue. It just
blames me now because I moved the driver to a new directory :)


Something like this maybe? Note I didn't test it with above config.

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h 
b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
index 6687812770cc..8c7695fde482 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
@@ -108,7 +108,7 @@ do {
\
 extern int brcmf_msg_level;

 struct brcmf_pub;
-#ifdef DEBUG
+#ifdef CONFIG_BRCMDBG
 void brcmf_debugfs_init(void);
 void brcmf_debugfs_exit(void);
 int brcmf_debug_attach(struct brcmf_pub *drvr);



Re: drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:58:6: error: redefinition of 'brcmf_debugfs_init'

2017-02-16 Thread Kalle Valo
(Adding linux-wireless)

Randy Dunlap  writes:

> On 02/07/17 02:02, kbuild test robot wrote:
>> Hi Kalle,
>> 
>> FYI, the error/warning still remains.
>> 
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
>> master
>> head:   8b1b41ee74f9712c355d66dc105bbea663ae0afd
>> commit: 05491d2ccf20b20a1375303441fbbfbd12b24a4f brcm80211: move
>> under broadcom vendor directory
>> date:   1 year, 3 months ago
>> config: mips-allyesconfig (attached as .config)
>> compiler: mips-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
>> reproduce:
>> wget
>> https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
>> -O ~/bin/make.cross
>> chmod +x ~/bin/make.cross
>> git checkout 05491d2ccf20b20a1375303441fbbfbd12b24a4f
>> # save the attached .config to linux build tree
>> make.cross ARCH=mips 
>> 
>> All errors (new ones prefixed by >>):
>
> when both:
>
> CONFIG_BRCM_TRACING=y
> CONFIG_BRCMDBG=y
>
> but DEBUG is not defined.
>
> I think it would help if CONFIG_BRCMDBG set DEBUG
> or if some of the tests for DEBUG used CONFIG_BRCMDBG instead.

Arend or Rafał, would you be able to look at this build problem? Kbuild
found the build errors below, apparently a very old issue. It just
blames me now because I moved the driver to a new directory :)

>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:58:6:
>> error: redefinition of 'brcmf_debugfs_init'
void brcmf_debugfs_init(void)
 ^~
   In file included from 
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h:20:0,
from 
drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:24:
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h:118:20: note: 
previous definition of 'brcmf_debugfs_init' was here
static inline void brcmf_debugfs_init(void)
   ^~
>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:65:6:
>> error: redefinition of 'brcmf_debugfs_exit'
void brcmf_debugfs_exit(void)
 ^~
   In file included from 
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h:20:0,
from 
drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:24:
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h:121:20: note: 
previous definition of 'brcmf_debugfs_exit' was here
static inline void brcmf_debugfs_exit(void)
   ^~
>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:74:5:
>> error: redefinition of 'brcmf_debug_attach'
int brcmf_debug_attach(struct brcmf_pub *drvr)
^~
   In file included from 
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h:20:0,
from 
drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:24:
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h:124:19: note: 
previous definition of 'brcmf_debug_attach' was here
static inline int brcmf_debug_attach(struct brcmf_pub *drvr)
  ^~
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c: In function 
'brcmf_debug_attach':
>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:81:6:
>> error: 'struct brcmf_pub' has no member named 'dbgfs_dir'
 drvr->dbgfs_dir = debugfs_create_dir(dev_name(dev), root_folder);
 ^~
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:82:17: error: 
'struct brcmf_pub' has no member named 'dbgfs_dir'
 if (IS_ERR(drvr->dbgfs_dir))
^~
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:83:22: error: 
'struct brcmf_pub' has no member named 'dbgfs_dir'
  return PTR_ERR(drvr->dbgfs_dir);
 ^~
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c: At top level:
>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:90:6:
>> error: redefinition of 'brcmf_debug_detach'
void brcmf_debug_detach(struct brcmf_pub *drvr)
 ^~
   In file included from 
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h:20:0,
from 
drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:24:
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h:128:20: note: 
previous definition of 'brcmf_debug_detach' was here
static inline void brcmf_debug_detach(struct brcmf_pub *drvr)
   ^~
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c: In function 
'brcmf_debug_detach':
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:94:26: error: 
'struct brcmf_pub' has no member named 'dbgfs_dir'
 if (!IS_ERR_OR_NULL(drvr->dbgfs_dir))
 ^~
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:95:32: error: 
'struct brcmf_pub' has no member named 'dbgfs_dir'
  debugfs_remove_recursive(drvr->dbgfs_dir);
   ^~
   drivers/net/wireless/broadcom/brcm80211/brcmfmac/debu

Re: drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c:58:6: error: redefinition of 'brcmf_debugfs_init'

2017-02-07 Thread Randy Dunlap
On 02/07/17 02:02, kbuild test robot wrote:
> Hi Kalle,
> 
> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
> master
> head:   8b1b41ee74f9712c355d66dc105bbea663ae0afd
> commit: 05491d2ccf20b20a1375303441fbbfbd12b24a4f brcm80211: move under 
> broadcom vendor directory
> date:   1 year, 3 months ago
> config: mips-allyesconfig (attached as .config)
> compiler: mips-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
> wget 
> https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
>  -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout 05491d2ccf20b20a1375303441fbbfbd12b24a4f
> # save the attached .config to linux build tree
> make.cross ARCH=mips 
> 
> All errors (new ones prefixed by >>):

when both:

CONFIG_BRCM_TRACING=y
CONFIG_BRCMDBG=y

but DEBUG is not defined.

I think it would help if CONFIG_BRCMDBG set DEBUG
or if some of the tests for DEBUG used CONFIG_BRCMDBG instead.


-- 
~Randy