Search Linux Wireless

Re: [PATCH] iwlegacy: Sanity check for sta_id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Chen,

kernel test robot noticed the following build errors:

[auto build test ERROR on wireless-next/main]
[also build test ERROR on wireless/main linus/master v6.17-rc4 next-20250905]
[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/Chen-Yufeng/iwlegacy-Sanity-check-for-sta_id/20250906-174354
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link:    https://lore.kernel.org/r/20250906094232.1580-1-chenyufeng%40iie.ac.cn
patch subject: [PATCH] iwlegacy: Sanity check for sta_id
config: x86_64-buildonly-randconfig-002-20250907 (https://download.01.org/0day-ci/archive/20250907/202509071251.YuF4EGpk-lkp@xxxxxxxxx/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250907/202509071251.YuF4EGpk-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509071251.YuF4EGpk-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/net/wireless/intel/iwlegacy/common.c:1742:3: error: incompatible pointer types initializing 'const char *' with an expression of type 'struct il_priv *' [-Werror,-Wincompatible-pointer-types]
    1742 |                 IL_ERR(il, "invalid sta_id %u", sta_id);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/intel/iwlegacy/common.h:31:25: note: expanded from macro 'IL_ERR'
      31 | #define IL_ERR(f, a...) dev_err(&il->pci_dev->dev, f, ## a)
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:154:2: note: expanded from macro 'dev_err'
     154 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:109:3: note: expanded from macro 'dev_printk_index_wrap'
     109 |                 dev_printk_index_emit(level, fmt);                      \
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:105:2: note: expanded from macro 'dev_printk_index_emit'
     105 |         printk_index_subsys_emit("%s %s: ", level, fmt)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:481:2: note: expanded from macro 'printk_index_subsys_emit'
     481 |         __printk_index_emit(fmt, level, subsys_fmt_prefix)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:447:12: note: expanded from macro '__printk_index_emit'
     447 |                                 .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
         |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/intel/iwlegacy/common.c:1742:10: error: incompatible pointer types passing 'struct il_priv *' to parameter of type 'const char *' [-Werror,-Wincompatible-pointer-types]
    1742 |                 IL_ERR(il, "invalid sta_id %u", sta_id);
         |                        ^~
   drivers/net/wireless/intel/iwlegacy/common.h:31:52: note: expanded from macro 'IL_ERR'
      31 | #define IL_ERR(f, a...) dev_err(&il->pci_dev->dev, f, ## a)
         |                                                    ^
   include/linux/dev_printk.h:154:57: note: expanded from macro 'dev_err'
     154 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                                ^~~
   include/linux/dev_printk.h:19:22: note: expanded from macro 'dev_fmt'
      19 | #define dev_fmt(fmt) fmt
         |                      ^~~
   include/linux/dev_printk.h:110:16: note: expanded from macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:50:53: note: passing argument to parameter 'fmt' here
      50 | void _dev_err(const struct device *dev, const char *fmt, ...);
         |                                                     ^
   2 errors generated.


vim +1742 drivers/net/wireless/intel/iwlegacy/common.c

  1736	
  1737	/* il->sta_lock must be held */
  1738	static int
  1739	il_sta_ucode_activate(struct il_priv *il, u8 sta_id)
  1740	{
  1741		if (sta_id >= IL_STATION_COUNT) {
> 1742			IL_ERR(il, "invalid sta_id %u", sta_id);
  1743			return -EINVAL;
  1744		}
  1745		if (!(il->stations[sta_id].used & IL_STA_DRIVER_ACTIVE))
  1746			IL_ERR("ACTIVATE a non DRIVER active station id %u addr %pM\n",
  1747			       sta_id, il->stations[sta_id].sta.sta.addr);
  1748	
  1749		if (il->stations[sta_id].used & IL_STA_UCODE_ACTIVE) {
  1750			D_ASSOC("STA id %u addr %pM already present"
  1751				" in uCode (according to driver)\n", sta_id,
  1752				il->stations[sta_id].sta.sta.addr);
  1753		} else {
  1754			il->stations[sta_id].used |= IL_STA_UCODE_ACTIVE;
  1755			D_ASSOC("Added STA id %u addr %pM to uCode\n", sta_id,
  1756				il->stations[sta_id].sta.sta.addr);
  1757		}
  1758		return 0;
  1759	}
  1760	

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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux