Re: [PATCH 11/11] Staging: rtl8192e: Implement BIT macro for bit shift ops

kernel test robot
2024-03-11T09:24:45Z

Hi Tree,

kernel test robot noticed the following build warnings:

[auto build test WARNING on staging/staging-testing]

url: https://github.com/intel-lab-lkp/linux/commits/Tree-Davies/Staging-rtl8192e-Rename-variable-ReturnPoint/20240311-075949
base: staging/staging-testing
patch link: https://lore.kernel.org/r/20240310235552.4217-12-tdavies%40darkphysics.net
patch subject: [PATCH 11/11] Staging: rtl8192e: Implement BIT macro for bit shift ops
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20240311/202403111745.3SiSUhkl-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 503c55e17037436dcd45ac69dea8967e67e3f5e8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240311/202403111745.3SiSUhkl-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/202403111745.3SiSUhkl-lkp@intel.com/

All warnings (new ones prefixed by >>):

In file included from drivers/staging/rtl8192e/rtllib_module.c:18:
In file included from include/linux/if_arp.h:22:
In file included from include/linux/skbuff.h:17:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:8:
In file included from include/linux/cacheflush.h:5:
In file included from arch/powerpc/include/asm/cacheflush.h:7:
In file included from include/linux/mm.h:2188:
include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
509 | item];
| ~~~~
include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
516 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
528 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
537 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/staging/rtl8192e/rtllib_module.c:35:
>> drivers/staging/rtl8192e/rtllib.h:422:9: warning: 'WLAN_CAPABILITY_ESS' macro redefined [-Wmacro-redefined]
422 | #define WLAN_CAPABILITY_ESS BIT(0)
| ^
include/linux/ieee80211.h:3218:9: note: previous definition is here
3218 | #define WLAN_CAPABILITY_ESS (1<<0)
| ^
In file included from drivers/staging/rtl8192e/rtllib_module.c:35:
>> drivers/staging/rtl8192e/rtllib.h:423:9: warning: 'WLAN_CAPABILITY_IBSS' macro redefined [-Wmacro-redefined]
423 | #define WLAN_CAPABILITY_IBSS BIT(1)
| ^
include/linux/ieee80211.h:3219:9: note: previous definition is here
3219 | #define WLAN_CAPABILITY_IBSS (1<<1)
| ^
In file included from drivers/staging/rtl8192e/rtllib_module.c:35:
>> drivers/staging/rtl8192e/rtllib.h:424:9: warning: 'WLAN_CAPABILITY_PRIVACY' macro redefined [-Wmacro-redefined]
424 | #define WLAN_CAPABILITY_PRIVACY BIT(4)
| ^
include/linux/ieee80211.h:3231:9: note: previous definition is here
3231 | #define WLAN_CAPABILITY_PRIVACY (1<<4)
| ^
In file included from drivers/staging/rtl8192e/rtllib_module.c:35:
>> drivers/staging/rtl8192e/rtllib.h:425:9: warning: 'WLAN_CAPABILITY_SHORT_PREAMBLE' macro redefined [-Wmacro-redefined]
425 | #define WLAN_CAPABILITY_SHORT_PREAMBLE BIT(5)
| ^
include/linux/ieee80211.h:3232:9: note: previous definition is here
3232 | #define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
| ^
In file included from drivers/staging/rtl8192e/rtllib_module.c:35:
>> drivers/staging/rtl8192e/rtllib.h:426:9: warning: 'WLAN_CAPABILITY_SHORT_SLOT_TIME' macro redefined [-Wmacro-redefined]
426 | #define WLAN_CAPABILITY_SHORT_SLOT_TIME BIT(10)
| ^
include/linux/ieee80211.h:3239:9: note: previous definition is here
3239 | #define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10)
| ^
10 warnings generated.
--
In file included from drivers/staging/rtl8192e/rtllib_crypt_tkip.c:15:
In file included from include/linux/skbuff.h:17:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:8:
In file included from include/linux/cacheflush.h:5:
In file included from arch/powerpc/include/asm/cacheflush.h:7:
In file included from include/linux/mm.h:2188:
include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
509 | item];
| ~~~~
include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
516 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
528 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
537 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/staging/rtl8192e/rtllib_crypt_tkip.c:23:
>> drivers/staging/rtl8192e/rtllib.h:422:9: warning: 'WLAN_CAPABILITY_ESS' macro redefined [-Wmacro-redefined]
422 | #define WLAN_CAPABILITY_ESS BIT(0)
| ^
include/linux/ieee80211.h:3218:9: note: previous definition is here
3218 | #define WLAN_CAPABILITY_ESS (1<<0)
| ^
In file included from drivers/staging/rtl8192e/rtllib_crypt_tkip.c:23:
>> drivers/staging/rtl8192e/rtllib.h:423:9: warning: 'WLAN_CAPABILITY_IBSS' macro redefined [-Wmacro-redefined]
423 | #define WLAN_CAPABILITY_IBSS BIT(1)
| ^
include/linux/ieee80211.h:3219:9: note: previous definition is here
3219 | #define WLAN_CAPABILITY_IBSS (1<<1)
| ^
In file included from drivers/staging/rtl8192e/rtllib_crypt_tkip.c:23:
>> drivers/staging/rtl8192e/rtllib.h:424:9: warning: 'WLAN_CAPABILITY_PRIVACY' macro redefined [-Wmacro-redefined]
424 | #define WLAN_CAPABILITY_PRIVACY BIT(4)
| ^
include/linux/ieee80211.h:3231:9: note: previous definition is here
3231 | #define WLAN_CAPABILITY_PRIVACY (1<<4)
| ^
In file included from drivers/staging/rtl8192e/rtllib_crypt_tkip.c:23:
>> drivers/staging/rtl8192e/rtllib.h:425:9: warning: 'WLAN_CAPABILITY_SHORT_PREAMBLE' macro redefined [-Wmacro-redefined]
425 | #define WLAN_CAPABILITY_SHORT_PREAMBLE BIT(5)
| ^
include/linux/ieee80211.h:3232:9: note: previous definition is here
3232 | #define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
| ^
In file included from drivers/staging/rtl8192e/rtllib_crypt_tkip.c:23:
>> drivers/staging/rtl8192e/rtllib.h:426:9: warning: 'WLAN_CAPABILITY_SHORT_SLOT_TIME' macro redefined [-Wmacro-redefined]
426 | #define WLAN_CAPABILITY_SHORT_SLOT_TIME BIT(10)
| ^
include/linux/ieee80211.h:3239:9: note: previous definition is here
3239 | #define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10)
| ^
drivers/staging/rtl8192e/rtllib_crypt_tkip.c:641:7: warning: variable 'iv32' set but not used [-Wunused-but-set-variable]
641 | u32 iv32 = tkey->tx_iv32;
| ^
11 warnings generated.
--
In file included from drivers/staging/rtl8192e/rtllib_softmac_wx.c:16:
>> drivers/staging/rtl8192e/rtllib.h:422:9: warning: 'WLAN_CAPABILITY_ESS' macro redefined [-Wmacro-redefined]
422 | #define WLAN_CAPABILITY_ESS BIT(0)
| ^
include/linux/ieee80211.h:3218:9: note: previous definition is here
3218 | #define WLAN_CAPABILITY_ESS (1<<0)
| ^
In file included from drivers/staging/rtl8192e/rtllib_softmac_wx.c:16:
>> drivers/staging/rtl8192e/rtllib.h:423:9: warning: 'WLAN_CAPABILITY_IBSS' macro redefined [-Wmacro-redefined]
423 | #define WLAN_CAPABILITY_IBSS BIT(1)
| ^
include/linux/ieee80211.h:3219:9: note: previous definition is here
3219 | #define WLAN_CAPABILITY_IBSS (1<<1)
| ^
In file included from drivers/staging/rtl8192e/rtllib_softmac_wx.c:16:
>> drivers/staging/rtl8192e/rtllib.h:424:9: warning: 'WLAN_CAPABILITY_PRIVACY' macro redefined [-Wmacro-redefined]
424 | #define WLAN_CAPABILITY_PRIVACY BIT(4)
| ^
include/linux/ieee80211.h:3231:9: note: previous definition is here
3231 | #define WLAN_CAPABILITY_PRIVACY (1<<4)
| ^
In file included from drivers/staging/rtl8192e/rtllib_softmac_wx.c:16:
>> drivers/staging/rtl8192e/rtllib.h:425:9: warning: 'WLAN_CAPABILITY_SHORT_PREAMBLE' macro redefined [-Wmacro-redefined]
425 | #define WLAN_CAPABILITY_SHORT_PREAMBLE BIT(5)
| ^
include/linux/ieee80211.h:3232:9: note: previous definition is here
3232 | #define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
| ^
In file included from drivers/staging/rtl8192e/rtllib_softmac_wx.c:16:
>> drivers/staging/rtl8192e/rtllib.h:426:9: warning: 'WLAN_CAPABILITY_SHORT_SLOT_TIME' macro redefined [-Wmacro-redefined]
426 | #define WLAN_CAPABILITY_SHORT_SLOT_TIME BIT(10)
| ^
include/linux/ieee80211.h:3239:9: note: previous definition is here
3239 | #define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10)
| ^
5 warnings generated.
--
In file included from drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:10:
In file included from drivers/staging/rtl8192e/rtl8192e/rtl_core.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:24:
In file included from include/linux/mm.h:2188:
include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
509 | item];
| ~~~~
include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
516 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
528 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
537 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:10:
In file included from drivers/staging/rtl8192e/rtl8192e/rtl_core.h:35:
>> drivers/staging/rtl8192e/rtl8192e/../rtllib.h:422:9: warning: 'WLAN_CAPABILITY_ESS' macro redefined [-Wmacro-redefined]
422 | #define WLAN_CAPABILITY_ESS BIT(0)
| ^
include/linux/ieee80211.h:3218:9: note: previous definition is here
3218 | #define WLAN_CAPABILITY_ESS (1<<0)
| ^
In file included from drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:10:
In file included from drivers/staging/rtl8192e/rtl8192e/rtl_core.h:35:
>> drivers/staging/rtl8192e/rtl8192e/../rtllib.h:423:9: warning: 'WLAN_CAPABILITY_IBSS' macro redefined [-Wmacro-redefined]
423 | #define WLAN_CAPABILITY_IBSS BIT(1)
| ^
include/linux/ieee80211.h:3219:9: note: previous definition is here
3219 | #define WLAN_CAPABILITY_IBSS (1<<1)
| ^
In file included from drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:10:
In file included from drivers/staging/rtl8192e/rtl8192e/rtl_core.h:35:
>> drivers/staging/rtl8192e/rtl8192e/../rtllib.h:424:9: warning: 'WLAN_CAPABILITY_PRIVACY' macro redefined [-Wmacro-redefined]
424 | #define WLAN_CAPABILITY_PRIVACY BIT(4)
| ^
include/linux/ieee80211.h:3231:9: note: previous definition is here
3231 | #define WLAN_CAPABILITY_PRIVACY (1<<4)
| ^
In file included from drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:10:
In file included from drivers/staging/rtl8192e/rtl8192e/rtl_core.h:35:
>> drivers/staging/rtl8192e/rtl8192e/../rtllib.h:425:9: warning: 'WLAN_CAPABILITY_SHORT_PREAMBLE' macro redefined [-Wmacro-redefined]
425 | #define WLAN_CAPABILITY_SHORT_PREAMBLE BIT(5)
| ^
include/linux/ieee80211.h:3232:9: note: previous definition is here
3232 | #define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
| ^
In file included from drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:10:
In file included from drivers/staging/rtl8192e/rtl8192e/rtl_core.h:35:
>> drivers/staging/rtl8192e/rtl8192e/../rtllib.h:426:9: warning: 'WLAN_CAPABILITY_SHORT_SLOT_TIME' macro redefined [-Wmacro-redefined]
426 | #define WLAN_CAPABILITY_SHORT_SLOT_TIME BIT(10)
| ^
include/linux/ieee80211.h:3239:9: note: previous definition is here
3239 | #define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10)
| ^
10 warnings generated.

vim +/WLAN_CAPABILITY_ESS +422 drivers/staging/rtl8192e/rtllib.h

421
> 422 #define WLAN_CAPABILITY_ESS BIT(0)
> 423 #define WLAN_CAPABILITY_IBSS BIT(1)
> 424 #define WLAN_CAPABILITY_PRIVACY BIT(4)
> 425 #define WLAN_CAPABILITY_SHORT_PREAMBLE BIT(5)
> 426 #define WLAN_CAPABILITY_SHORT_SLOT_TIME BIT(10)
427

--
0-DAY CI Kernel Test Service