Re: [RESEND] staging: rtlwifi: convert to DEFINE_SHOW_ATTRIBUTE

From: kbuild test robot
Date: Thu Dec 20 2018 - 16:29:40 EST


Hi Yangtao,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.20-rc7 next-20181220]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Yangtao-Li/staging-rtlwifi-convert-to-DEFINE_SHOW_ATTRIBUTE/20181215-194101
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All errors (new ones prefixed by >>):

drivers/staging//rtlwifi/debug.c: In function 'rtl_debug_add_one':
>> drivers/staging//rtlwifi/debug.c:519:46: error: 'commonfops' undeclared (first use in this function); did you mean 'common_fops'?
RTL_DEBUGFS_ADD_CORE(name, S_IFREG | 0444, common)
^
drivers/staging//rtlwifi/debug.c:515:10: note: in definition of macro 'RTL_DEBUGFS_ADD_CORE'
&fopname ##fops); \
^~~~~~~
drivers/staging//rtlwifi/debug.c:545:2: note: in expansion of macro 'RTL_DEBUGFS_ADD'
RTL_DEBUGFS_ADD(mac_0);
^~~~~~~~~~~~~~~
drivers/staging//rtlwifi/debug.c:519:46: note: each undeclared identifier is reported only once for each function it appears in
RTL_DEBUGFS_ADD_CORE(name, S_IFREG | 0444, common)
^
drivers/staging//rtlwifi/debug.c:515:10: note: in definition of macro 'RTL_DEBUGFS_ADD_CORE'
&fopname ##fops); \
^~~~~~~
drivers/staging//rtlwifi/debug.c:545:2: note: in expansion of macro 'RTL_DEBUGFS_ADD'
RTL_DEBUGFS_ADD(mac_0);
^~~~~~~~~~~~~~~
>> drivers/staging//rtlwifi/debug.c:521:46: error: 'common_writefops' undeclared (first use in this function); did you mean 'common_write_fops'?
RTL_DEBUGFS_ADD_CORE(name, S_IFREG | 0222, common_write)
^
drivers/staging//rtlwifi/debug.c:515:10: note: in definition of macro 'RTL_DEBUGFS_ADD_CORE'
&fopname ##fops); \
^~~~~~~
drivers/staging//rtlwifi/debug.c:586:2: note: in expansion of macro 'RTL_DEBUGFS_ADD_W'
RTL_DEBUGFS_ADD_W(write_reg);
^~~~~~~~~~~~~~~~~
>> drivers/staging//rtlwifi/debug.c:523:46: error: 'common_rwfops' undeclared (first use in this function); did you mean 'common_rw_fops'?
RTL_DEBUGFS_ADD_CORE(name, S_IFREG | 0666, common_rw)
^
drivers/staging//rtlwifi/debug.c:515:10: note: in definition of macro 'RTL_DEBUGFS_ADD_CORE'
&fopname ##fops); \
^~~~~~~
drivers/staging//rtlwifi/debug.c:590:2: note: in expansion of macro 'RTL_DEBUGFS_ADD_RW'
RTL_DEBUGFS_ADD_RW(phydm_cmd);
^~~~~~~~~~~~~~~~~~
--
>> drivers/staging/rtlwifi/debug.c:545:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:546:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:547:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:548:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:549:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:550:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:551:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:552:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:553:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:554:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:555:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:556:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:557:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:558:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:559:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:560:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:561:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:562:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:563:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:564:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:565:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:566:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:567:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:568:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:569:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:570:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:571:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:572:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:573:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:574:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:575:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:576:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:577:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:578:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:580:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:581:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:582:9: error: undefined identifier 'commonfops'
drivers/staging/rtlwifi/debug.c:584:9: error: undefined identifier 'commonfops'
>> drivers/staging/rtlwifi/debug.c:586:9: error: undefined identifier 'common_writefops'
drivers/staging/rtlwifi/debug.c:587:9: error: undefined identifier 'common_writefops'
drivers/staging/rtlwifi/debug.c:588:9: error: undefined identifier 'common_writefops'
>> drivers/staging/rtlwifi/debug.c:590:9: error: undefined identifier 'common_rwfops'
drivers/staging/rtlwifi/debug.c: In function 'rtl_debug_add_one':
drivers/staging/rtlwifi/debug.c:519:46: error: 'commonfops' undeclared (first use in this function); did you mean 'common_fops'?
RTL_DEBUGFS_ADD_CORE(name, S_IFREG | 0444, common)
^
drivers/staging/rtlwifi/debug.c:515:10: note: in definition of macro 'RTL_DEBUGFS_ADD_CORE'
&fopname ##fops); \
^~~~~~~
drivers/staging/rtlwifi/debug.c:545:2: note: in expansion of macro 'RTL_DEBUGFS_ADD'
RTL_DEBUGFS_ADD(mac_0);
^~~~~~~~~~~~~~~
drivers/staging/rtlwifi/debug.c:519:46: note: each undeclared identifier is reported only once for each function it appears in
RTL_DEBUGFS_ADD_CORE(name, S_IFREG | 0444, common)
^
drivers/staging/rtlwifi/debug.c:515:10: note: in definition of macro 'RTL_DEBUGFS_ADD_CORE'
&fopname ##fops); \
^~~~~~~
drivers/staging/rtlwifi/debug.c:545:2: note: in expansion of macro 'RTL_DEBUGFS_ADD'
RTL_DEBUGFS_ADD(mac_0);
^~~~~~~~~~~~~~~
drivers/staging/rtlwifi/debug.c:521:46: error: 'common_writefops' undeclared (first use in this function); did you mean 'common_write_fops'?
RTL_DEBUGFS_ADD_CORE(name, S_IFREG | 0222, common_write)
^
drivers/staging/rtlwifi/debug.c:515:10: note: in definition of macro 'RTL_DEBUGFS_ADD_CORE'
&fopname ##fops); \
^~~~~~~
drivers/staging/rtlwifi/debug.c:586:2: note: in expansion of macro 'RTL_DEBUGFS_ADD_W'
RTL_DEBUGFS_ADD_W(write_reg);
^~~~~~~~~~~~~~~~~
drivers/staging/rtlwifi/debug.c:523:46: error: 'common_rwfops' undeclared (first use in this function); did you mean 'common_rw_fops'?
RTL_DEBUGFS_ADD_CORE(name, S_IFREG | 0666, common_rw)
^
drivers/staging/rtlwifi/debug.c:515:10: note: in definition of macro 'RTL_DEBUGFS_ADD_CORE'
&fopname ##fops); \
^~~~~~~
drivers/staging/rtlwifi/debug.c:590:2: note: in expansion of macro 'RTL_DEBUGFS_ADD_RW'
RTL_DEBUGFS_ADD_RW(phydm_cmd);
^~~~~~~~~~~~~~~~~~

vim +521 drivers/staging//rtlwifi/debug.c

56bde846 Ping-Ke Shih 2017-08-17 509
56bde846 Ping-Ke Shih 2017-08-17 510 #define RTL_DEBUGFS_ADD_CORE(name, mode, fopname) \
56bde846 Ping-Ke Shih 2017-08-17 511 do { \
56bde846 Ping-Ke Shih 2017-08-17 512 rtl_debug_priv_ ##name.rtlpriv = rtlpriv; \
e206a0d4 Greg Kroah-Hartman 2018-05-29 513 debugfs_create_file(#name, mode, parent, \
e206a0d4 Greg Kroah-Hartman 2018-05-29 514 &rtl_debug_priv_ ##name, \
9a2ced62 Yangtao Li 2018-12-15 515 &fopname ##fops); \
56bde846 Ping-Ke Shih 2017-08-17 516 } while (0)
56bde846 Ping-Ke Shih 2017-08-17 517
56bde846 Ping-Ke Shih 2017-08-17 518 #define RTL_DEBUGFS_ADD(name) \
56bde846 Ping-Ke Shih 2017-08-17 @519 RTL_DEBUGFS_ADD_CORE(name, S_IFREG | 0444, common)
56bde846 Ping-Ke Shih 2017-08-17 520 #define RTL_DEBUGFS_ADD_W(name) \
b55ade19 Larry Finger 2017-08-24 @521 RTL_DEBUGFS_ADD_CORE(name, S_IFREG | 0222, common_write)
56bde846 Ping-Ke Shih 2017-08-17 522 #define RTL_DEBUGFS_ADD_RW(name) \
b55ade19 Larry Finger 2017-08-24 @523 RTL_DEBUGFS_ADD_CORE(name, S_IFREG | 0666, common_rw)
56bde846 Ping-Ke Shih 2017-08-17 524

:::::: The code at line 521 was first introduced by commit
:::::: b55ade192b51c67db34b0a62c28fe294b2107fb7 staging: rtlwifi: Improve debugging by using debugfs

:::::: TO: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
:::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip