linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND] staging: rtlwifi: convert to DEFINE_SHOW_ATTRIBUTE
@ 2018-12-15  8:56 Yangtao Li
  2018-12-15 12:08 ` kbuild test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yangtao Li @ 2018-12-15  8:56 UTC (permalink / raw)
  To: gregkh, natechancellor, kernelpatch; +Cc: devel, linux-kernel, Yangtao Li

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/staging/rtlwifi/debug.c | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/rtlwifi/debug.c b/drivers/staging/rtlwifi/debug.c
index 8999feda29b4..543889923864 100644
--- a/drivers/staging/rtlwifi/debug.c
+++ b/drivers/staging/rtlwifi/debug.c
@@ -79,24 +79,13 @@ struct rtl_debugfs_priv {
 
 static struct dentry *debugfs_topdir;
 
-static int rtl_debug_get_common(struct seq_file *m, void *v)
+static int common_show(struct seq_file *m, void *v)
 {
 	struct rtl_debugfs_priv *debugfs_priv = m->private;
 
 	return debugfs_priv->cb_read(m, v);
 }
-
-static int dl_debug_open_common(struct inode *inode, struct file *file)
-{
-	return single_open(file, rtl_debug_get_common, inode->i_private);
-}
-
-static const struct file_operations file_ops_common = {
-	.open = dl_debug_open_common,
-	.read = seq_read,
-	.llseek = seq_lseek,
-	.release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(common);
 
 static int rtl_debug_get_mac_page(struct seq_file *m, void *v)
 {
@@ -439,7 +428,7 @@ static ssize_t rtl_debugfs_common_write(struct file *filp,
 	return debugfs_priv->cb_write(filp, buffer, count, loff);
 }
 
-static const struct file_operations file_ops_common_write = {
+static const struct file_operations common_write_fops = {
 	.owner = THIS_MODULE,
 	.write = rtl_debugfs_common_write,
 	.open = simple_open,
@@ -488,7 +477,7 @@ static int rtl_debugfs_open_rw(struct inode *inode, struct file *filp)
 	int ret = 0;
 
 	if (filp->f_mode & FMODE_READ)
-		ret = single_open(filp, rtl_debug_get_common, inode->i_private);
+		ret = single_open(filp, common_show, inode->i_private);
 	else
 		filp->private_data = inode->i_private;
 
@@ -509,7 +498,7 @@ static struct rtl_debugfs_priv rtl_debug_priv_phydm_cmd = {
 	.cb_data = 0,
 };
 
-static const struct file_operations file_ops_common_rw = {
+static const struct file_operations common_rw_fops = {
 	.owner = THIS_MODULE,
 	.open = rtl_debugfs_open_rw,
 	.release = rtl_debugfs_close_rw,
@@ -523,7 +512,7 @@ static const struct file_operations file_ops_common_rw = {
 		rtl_debug_priv_ ##name.rtlpriv = rtlpriv;		   \
 		debugfs_create_file(#name, mode, parent,		   \
 				    &rtl_debug_priv_ ##name,		   \
-				    &file_ops_ ##fopname);		   \
+				    &fopname ##fops);		   	   \
 	} while (0)
 
 #define RTL_DEBUGFS_ADD(name)						   \
-- 
2.17.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RESEND] staging: rtlwifi: convert to DEFINE_SHOW_ATTRIBUTE
  2018-12-15  8:56 [RESEND] staging: rtlwifi: convert to DEFINE_SHOW_ATTRIBUTE Yangtao Li
@ 2018-12-15 12:08 ` kbuild test robot
  2018-12-17 13:52 ` Greg KH
  2018-12-20 21:24 ` kbuild test robot
  2 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2018-12-15 12:08 UTC (permalink / raw)
  To: Yangtao Li
  Cc: kbuild-all, gregkh, natechancellor, kernelpatch, devel,
	Yangtao Li, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 9359 bytes --]

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-rc6 next-20181214]
[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-randconfig-x004-201849 (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 error/warnings (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);
     ^~~~~~~~~~~~~~~~~~

vim +519 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  
56bde846 Ping-Ke Shih       2017-08-17  525  void rtl_debug_add_one(struct ieee80211_hw *hw)
56bde846 Ping-Ke Shih       2017-08-17  526  {
56bde846 Ping-Ke Shih       2017-08-17  527  	struct rtl_priv *rtlpriv = rtl_priv(hw);
56bde846 Ping-Ke Shih       2017-08-17  528  	struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
56bde846 Ping-Ke Shih       2017-08-17  529  	struct dentry *parent;
56bde846 Ping-Ke Shih       2017-08-17  530  
56bde846 Ping-Ke Shih       2017-08-17  531  	rtlpriv->dbg.msg_buf = vzalloc(80 * 25);
56bde846 Ping-Ke Shih       2017-08-17  532  
a575de2d Larry Finger       2017-08-17  533  	snprintf(rtlpriv->dbg.debugfs_name, 18, "%pMF", rtlefuse->dev_addr);
56bde846 Ping-Ke Shih       2017-08-17  534  
56bde846 Ping-Ke Shih       2017-08-17  535  	rtlpriv->dbg.debugfs_dir =
56bde846 Ping-Ke Shih       2017-08-17  536  		debugfs_create_dir(rtlpriv->dbg.debugfs_name, debugfs_topdir);
56bde846 Ping-Ke Shih       2017-08-17  537  	if (!rtlpriv->dbg.debugfs_dir) {
56bde846 Ping-Ke Shih       2017-08-17  538  		pr_err("Unable to init debugfs:/%s/%s\n", rtlpriv->cfg->name,
56bde846 Ping-Ke Shih       2017-08-17  539  		       rtlpriv->dbg.debugfs_name);
56bde846 Ping-Ke Shih       2017-08-17  540  		return;
56bde846 Ping-Ke Shih       2017-08-17  541  	}
56bde846 Ping-Ke Shih       2017-08-17  542  
56bde846 Ping-Ke Shih       2017-08-17  543  	parent = rtlpriv->dbg.debugfs_dir;
56bde846 Ping-Ke Shih       2017-08-17  544  
56bde846 Ping-Ke Shih       2017-08-17 @545  	RTL_DEBUGFS_ADD(mac_0);
56bde846 Ping-Ke Shih       2017-08-17  546  	RTL_DEBUGFS_ADD(mac_1);
56bde846 Ping-Ke Shih       2017-08-17  547  	RTL_DEBUGFS_ADD(mac_2);
56bde846 Ping-Ke Shih       2017-08-17  548  	RTL_DEBUGFS_ADD(mac_3);
56bde846 Ping-Ke Shih       2017-08-17  549  	RTL_DEBUGFS_ADD(mac_4);
56bde846 Ping-Ke Shih       2017-08-17  550  	RTL_DEBUGFS_ADD(mac_5);
56bde846 Ping-Ke Shih       2017-08-17  551  	RTL_DEBUGFS_ADD(mac_6);
56bde846 Ping-Ke Shih       2017-08-17  552  	RTL_DEBUGFS_ADD(mac_7);
56bde846 Ping-Ke Shih       2017-08-17  553  	RTL_DEBUGFS_ADD(bb_8);
56bde846 Ping-Ke Shih       2017-08-17  554  	RTL_DEBUGFS_ADD(bb_9);
56bde846 Ping-Ke Shih       2017-08-17  555  	RTL_DEBUGFS_ADD(bb_a);
56bde846 Ping-Ke Shih       2017-08-17  556  	RTL_DEBUGFS_ADD(bb_b);
56bde846 Ping-Ke Shih       2017-08-17  557  	RTL_DEBUGFS_ADD(bb_c);
56bde846 Ping-Ke Shih       2017-08-17  558  	RTL_DEBUGFS_ADD(bb_d);
56bde846 Ping-Ke Shih       2017-08-17  559  	RTL_DEBUGFS_ADD(bb_e);
56bde846 Ping-Ke Shih       2017-08-17  560  	RTL_DEBUGFS_ADD(bb_f);
56bde846 Ping-Ke Shih       2017-08-17  561  	RTL_DEBUGFS_ADD(mac_10);
56bde846 Ping-Ke Shih       2017-08-17  562  	RTL_DEBUGFS_ADD(mac_11);
56bde846 Ping-Ke Shih       2017-08-17  563  	RTL_DEBUGFS_ADD(mac_12);
56bde846 Ping-Ke Shih       2017-08-17  564  	RTL_DEBUGFS_ADD(mac_13);
56bde846 Ping-Ke Shih       2017-08-17  565  	RTL_DEBUGFS_ADD(mac_14);
56bde846 Ping-Ke Shih       2017-08-17  566  	RTL_DEBUGFS_ADD(mac_15);
56bde846 Ping-Ke Shih       2017-08-17  567  	RTL_DEBUGFS_ADD(mac_16);
56bde846 Ping-Ke Shih       2017-08-17  568  	RTL_DEBUGFS_ADD(mac_17);
56bde846 Ping-Ke Shih       2017-08-17  569  	RTL_DEBUGFS_ADD(bb_18);
56bde846 Ping-Ke Shih       2017-08-17  570  	RTL_DEBUGFS_ADD(bb_19);
56bde846 Ping-Ke Shih       2017-08-17  571  	RTL_DEBUGFS_ADD(bb_1a);
56bde846 Ping-Ke Shih       2017-08-17  572  	RTL_DEBUGFS_ADD(bb_1b);
56bde846 Ping-Ke Shih       2017-08-17  573  	RTL_DEBUGFS_ADD(bb_1c);
56bde846 Ping-Ke Shih       2017-08-17  574  	RTL_DEBUGFS_ADD(bb_1d);
56bde846 Ping-Ke Shih       2017-08-17  575  	RTL_DEBUGFS_ADD(bb_1e);
56bde846 Ping-Ke Shih       2017-08-17  576  	RTL_DEBUGFS_ADD(bb_1f);
56bde846 Ping-Ke Shih       2017-08-17  577  	RTL_DEBUGFS_ADD(rf_a);
56bde846 Ping-Ke Shih       2017-08-17  578  	RTL_DEBUGFS_ADD(rf_b);
56bde846 Ping-Ke Shih       2017-08-17  579  
56bde846 Ping-Ke Shih       2017-08-17  580  	RTL_DEBUGFS_ADD(cam_1);
56bde846 Ping-Ke Shih       2017-08-17  581  	RTL_DEBUGFS_ADD(cam_2);
56bde846 Ping-Ke Shih       2017-08-17  582  	RTL_DEBUGFS_ADD(cam_3);
56bde846 Ping-Ke Shih       2017-08-17  583  
56bde846 Ping-Ke Shih       2017-08-17  584  	RTL_DEBUGFS_ADD(btcoex);
56bde846 Ping-Ke Shih       2017-08-17  585  
56bde846 Ping-Ke Shih       2017-08-17 @586  	RTL_DEBUGFS_ADD_W(write_reg);
b55ade19 Larry Finger       2017-08-24  587  	RTL_DEBUGFS_ADD_W(write_h2c);
b55ade19 Larry Finger       2017-08-24  588  	RTL_DEBUGFS_ADD_W(write_rfreg);
56bde846 Ping-Ke Shih       2017-08-17  589  
56bde846 Ping-Ke Shih       2017-08-17 @590  	RTL_DEBUGFS_ADD_RW(phydm_cmd);
56bde846 Ping-Ke Shih       2017-08-17  591  }
56bde846 Ping-Ke Shih       2017-08-17  592  

:::::: The code at line 519 was first introduced by commit
:::::: 56bde846304ea05d5f8c8de0e3a42627a7a92be6 staging: r8822be: Add existing rtlwifi and rtl_pci parts for new driver

:::::: TO: Ping-Ke Shih <pkshih@realtek.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36513 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RESEND] staging: rtlwifi: convert to DEFINE_SHOW_ATTRIBUTE
  2018-12-15  8:56 [RESEND] staging: rtlwifi: convert to DEFINE_SHOW_ATTRIBUTE Yangtao Li
  2018-12-15 12:08 ` kbuild test robot
@ 2018-12-17 13:52 ` Greg KH
  2018-12-20 21:24 ` kbuild test robot
  2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2018-12-17 13:52 UTC (permalink / raw)
  To: Yangtao Li; +Cc: natechancellor, kernelpatch, devel, linux-kernel

On Sat, Dec 15, 2018 at 03:56:35AM -0500, Yangtao Li wrote:
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
>  drivers/staging/rtlwifi/debug.c | 23 ++++++-----------------
>  1 file changed, 6 insertions(+), 17 deletions(-)

Always test build your patches so you do not get grumpy maintainers
telling you to not break the build :(

Please fix up.

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RESEND] staging: rtlwifi: convert to DEFINE_SHOW_ATTRIBUTE
  2018-12-15  8:56 [RESEND] staging: rtlwifi: convert to DEFINE_SHOW_ATTRIBUTE Yangtao Li
  2018-12-15 12:08 ` kbuild test robot
  2018-12-17 13:52 ` Greg KH
@ 2018-12-20 21:24 ` kbuild test robot
  2 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2018-12-20 21:24 UTC (permalink / raw)
  To: Yangtao Li
  Cc: kbuild-all, gregkh, natechancellor, kernelpatch, devel,
	Yangtao Li, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 10398 bytes --]

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@lwfinger.net>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 66679 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-12-20 21:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-15  8:56 [RESEND] staging: rtlwifi: convert to DEFINE_SHOW_ATTRIBUTE Yangtao Li
2018-12-15 12:08 ` kbuild test robot
2018-12-17 13:52 ` Greg KH
2018-12-20 21:24 ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).