[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202508011121.dDTSwRyY-lkp@intel.com>
Date: Fri, 1 Aug 2025 11:32:00 +0800
From: kernel test robot <lkp@...el.com>
To: Mande Imran Ahmed <immu.ahmed1905@...il.com>, johannes@...solutions.net
Cc: oe-kbuild-all@...ts.linux.dev, linux-wireless@...r.kernel.org,
linux-kernel@...r.kernel.org,
Mande Imran Ahmed <immu.ahmed1905@...il.com>
Subject: Re: [PATCH] net/mac80211: replace scnprintf() with sysfs_emit() for
sysfs output
Hi Mande,
kernel test robot noticed the following build warnings:
[auto build test WARNING on wireless-next/main]
[also build test WARNING on wireless/main linus/master v6.16 next-20250731]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Mande-Imran-Ahmed/net-mac80211-replace-scnprintf-with-sysfs_emit-for-sysfs-output/20250730-180128
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link: https://lore.kernel.org/r/20250730095634.3754-1-immu.ahmed1905%40gmail.com
patch subject: [PATCH] net/mac80211: replace scnprintf() with sysfs_emit() for sysfs output
config: powerpc-randconfig-001-20250801 (https://download.01.org/0day-ci/archive/20250801/202508011121.dDTSwRyY-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 13.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250801/202508011121.dDTSwRyY-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508011121.dDTSwRyY-lkp@intel.com/
All warnings (new ones prefixed by >>):
net/mac80211/debugfs_sta.c: In function 'sta_flags_read':
>> net/mac80211/debugfs_sta.c:99:16: warning: 'buf' is used uninitialized [-Wuninitialized]
99 | return simple_read_from_buffer(userbuf, count, ppos, buf, strlen(buf));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/string.h:65,
from include/linux/bitmap.h:13,
from include/linux/cpumask.h:12,
from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/spinlock.h:63,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:7,
from include/linux/debugfs.h:15,
from net/mac80211/debugfs_sta.c:11:
arch/powerpc/include/asm/string.h:22:24: note: by argument 1 of type 'const char *' to 'strlen' declared here
22 | extern __kernel_size_t strlen(const char *);
| ^~~~~~
net/mac80211/debugfs_sta.c:87:14: note: 'buf' declared here
87 | char buf[16 * NUM_WLAN_STA_FLAGS], *pos = buf;
| ^~~
vim +/buf +99 net/mac80211/debugfs_sta.c
c84387d2f2c83d Johannes Berg 2016-03-17 83
e9f207f0ff90bf Jiri Benc 2007-05-05 84 static ssize_t sta_flags_read(struct file *file, char __user *userbuf,
e9f207f0ff90bf Jiri Benc 2007-05-05 85 size_t count, loff_t *ppos)
e9f207f0ff90bf Jiri Benc 2007-05-05 86 {
c84387d2f2c83d Johannes Berg 2016-03-17 87 char buf[16 * NUM_WLAN_STA_FLAGS], *pos = buf;
e9f207f0ff90bf Jiri Benc 2007-05-05 88 struct sta_info *sta = file->private_data;
c84387d2f2c83d Johannes Berg 2016-03-17 89 unsigned int flg;
c84387d2f2c83d Johannes Berg 2016-03-17 90
c84387d2f2c83d Johannes Berg 2016-03-17 91 BUILD_BUG_ON(ARRAY_SIZE(sta_flag_names) != NUM_WLAN_STA_FLAGS);
c2c98fdeb5c897 Johannes Berg 2011-09-29 92
c84387d2f2c83d Johannes Berg 2016-03-17 93 for (flg = 0; flg < NUM_WLAN_STA_FLAGS; flg++) {
c84387d2f2c83d Johannes Berg 2016-03-17 94 if (test_sta_flag(sta, flg))
ec95570844b7a6 Mande Imran Ahmed 2025-07-30 95 pos += sysfs_emit(pos, "%s\n",
c84387d2f2c83d Johannes Berg 2016-03-17 96 sta_flag_names[flg]);
c84387d2f2c83d Johannes Berg 2016-03-17 97 }
5bade101eceedb Johannes Berg 2011-09-29 98
c84387d2f2c83d Johannes Berg 2016-03-17 @99 return simple_read_from_buffer(userbuf, count, ppos, buf, strlen(buf));
e9f207f0ff90bf Jiri Benc 2007-05-05 100 }
e9f207f0ff90bf Jiri Benc 2007-05-05 101 STA_OPS(flags);
e9f207f0ff90bf Jiri Benc 2007-05-05 102
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists