All of lore.kernel.org
 help / color / mirror / Atom feed
* [pkshih-rtw:rtw-next 21/49] drivers/net/wireless/realtek/rtw89/debug.c:164:21: error: implicit declaration of function 'wiphy_locked_debugfs_read'
@ 2025-02-10 10:16 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-10 10:16 UTC (permalink / raw)
  To: Ping-Ke Shih; +Cc: oe-kbuild-all

tree:   https://github.com/pkshih/rtw rtw-next
head:   6b39cc01af66a32c4d03952e0b3aae19cdf4b66e
commit: 8fdf78f3cd5f87eced0c4f7eed7160a2ec31a008 [21/49] wifi: rtw89: debugfs: use wiphy_locked_debugfs_{read,write}() if needed
config: loongarch-randconfig-002-20250210 (https://download.01.org/0day-ci/archive/20250210/202502101810.3CUpUL7p-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250210/202502101810.3CUpUL7p-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502101810.3CUpUL7p-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/net/wireless/realtek/rtw89/debug.c: In function 'rtw89_debugfs_file_read':
>> drivers/net/wireless/realtek/rtw89/debug.c:164:21: error: implicit declaration of function 'wiphy_locked_debugfs_read' [-Wimplicit-function-declaration]
     164 |                 n = wiphy_locked_debugfs_read(rtwdev->hw->wiphy, file, buf, bufsz,
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/realtek/rtw89/debug.c: In function 'rtw89_debugfs_file_write':
>> drivers/net/wireless/realtek/rtw89/debug.c:204:21: error: implicit declaration of function 'wiphy_locked_debugfs_write' [-Wimplicit-function-declaration]
     204 |                 n = wiphy_locked_debugfs_write(rtwdev->hw->wiphy,
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/wiphy_locked_debugfs_read +164 drivers/net/wireless/realtek/rtw89/debug.c

   140	
   141	static ssize_t rtw89_debugfs_file_read(struct file *file, char __user *userbuf,
   142					       size_t count, loff_t *ppos)
   143	{
   144		struct rtw89_debugfs_priv *debugfs_priv = file->private_data;
   145		struct rtw89_debugfs_priv_opt *opt = &debugfs_priv->opt;
   146		struct rtw89_dev *rtwdev = debugfs_priv->rtwdev;
   147		size_t bufsz = opt->rsize ? opt->rsize : PAGE_SIZE;
   148		char *buf;
   149		ssize_t n;
   150	
   151		if (!debugfs_priv->rbuf)
   152			debugfs_priv->rbuf = devm_kzalloc(rtwdev->dev, bufsz, GFP_KERNEL);
   153	
   154		buf = debugfs_priv->rbuf;
   155		if (!buf)
   156			return -ENOMEM;
   157	
   158		if (*ppos) {
   159			n = debugfs_priv->rused;
   160			goto out;
   161		}
   162	
   163		if (opt->rlock) {
 > 164			n = wiphy_locked_debugfs_read(rtwdev->hw->wiphy, file, buf, bufsz,
   165						      userbuf, count, ppos,
   166						      rtw89_debugfs_file_read_helper,
   167						      debugfs_priv);
   168			debugfs_priv->rused = n;
   169	
   170			return n;
   171		}
   172	
   173		n = rtw89_debugfs_file_read_helper(rtwdev->hw->wiphy, file, buf, bufsz,
   174						   debugfs_priv);
   175		debugfs_priv->rused = n;
   176	
   177	out:
   178		return simple_read_from_buffer(userbuf, count, ppos, buf, n);
   179	}
   180	
   181	static ssize_t rtw89_debugfs_file_write_helper(struct wiphy *wiphy, struct file *file,
   182						       char *buf, size_t count, void *data)
   183	{
   184		struct rtw89_debugfs_priv *debugfs_priv = data;
   185		struct rtw89_dev *rtwdev = debugfs_priv->rtwdev;
   186	
   187		return debugfs_priv->cb_write(rtwdev, debugfs_priv, buf, count);
   188	}
   189	
   190	static ssize_t rtw89_debugfs_file_write(struct file *file,
   191						const char __user *userbuf,
   192						size_t count, loff_t *loff)
   193	{
   194		struct rtw89_debugfs_priv *debugfs_priv = file->private_data;
   195		struct rtw89_debugfs_priv_opt *opt = &debugfs_priv->opt;
   196		struct rtw89_dev *rtwdev = debugfs_priv->rtwdev;
   197		char *buf __free(kfree) = kmalloc(count + 1, GFP_KERNEL);
   198		ssize_t n;
   199	
   200		if (!buf)
   201			return -ENOMEM;
   202	
   203		if (opt->wlock) {
 > 204			n = wiphy_locked_debugfs_write(rtwdev->hw->wiphy,
   205						       file, buf, count + 1,
   206						       userbuf, count,
   207						       rtw89_debugfs_file_write_helper,
   208						       debugfs_priv);
   209			return n;
   210		}
   211	
   212		if (copy_from_user(buf, userbuf, count))
   213			return -EFAULT;
   214	
   215		buf[count] = '\0';
   216	
   217		return debugfs_priv->cb_write(rtwdev, debugfs_priv, buf, count);
   218	}
   219	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-10 10:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-10 10:16 [pkshih-rtw:rtw-next 21/49] drivers/net/wireless/realtek/rtw89/debug.c:164:21: error: implicit declaration of function 'wiphy_locked_debugfs_read' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.