drivers/net/wireless/intel/iwlwifi/fw/dbg.c:86: warning: Excess struct/union/enum/typedef member 'trans_len' description in 'iwl_fw_dump_ptrs'

From: kernel test robot
Date: Fri Nov 24 2023 - 16:54:56 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f1a09972a45ae63efbd1587337c4be13b1893330
commit: 7174beb60c53209c6e98c9cee20efdee97ef880f iwlwifi: refactor firmware debug code
date: 6 years ago
config: powerpc-randconfig-003-20231123 (https://download.01.org/0day-ci/archive/20231125/202311250305.tf8Cus1Y-lkp@xxxxxxxxx/config)
compiler: powerpc-linux-gcc (GCC) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231125/202311250305.tf8Cus1Y-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/202311250305.tf8Cus1Y-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

In file included from include/linux/bug.h:4:0,
from arch/powerpc/include/asm/cmpxchg.h:8,
from arch/powerpc/include/asm/atomic.h:10,
from include/linux/atomic.h:4,
from include/linux/debug_locks.h:5,
from include/linux/lockdep.h:25,
from include/linux/spinlock_types.h:18,
from include/linux/mutex.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:15,
from include/linux/kobject.h:21,
from include/linux/device.h:17,
from include/linux/devcoredump.h:23,
from drivers/net/wireless/intel/iwlwifi/fw/dbg.c:65:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/powerpc/include/asm/page.h:129:32: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
#define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr)
^
arch/powerpc/include/asm/bug.h:75:27: note: in definition of macro 'BUG_ON'
if (__builtin_constant_p(x)) { \
^
include/linux/dma-mapping.h:307:9: note: in expansion of macro 'pfn_valid'
BUG_ON(pfn_valid(PHYS_PFN(phys_addr)));
^~~~~~~~~
arch/powerpc/include/asm/page.h:129:32: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
#define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr)
^
arch/powerpc/include/asm/bug.h:76:7: note: in definition of macro 'BUG_ON'
if (x) \
^
include/linux/dma-mapping.h:307:9: note: in expansion of macro 'pfn_valid'
BUG_ON(pfn_valid(PHYS_PFN(phys_addr)));
^~~~~~~~~
arch/powerpc/include/asm/page.h:129:32: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
#define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr)
^
arch/powerpc/include/asm/bug.h:84:25: note: in definition of macro 'BUG_ON'
"r" ((__force long)(x))); \
^
include/linux/dma-mapping.h:307:9: note: in expansion of macro 'pfn_valid'
BUG_ON(pfn_valid(PHYS_PFN(phys_addr)));
^~~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/fw/dbg.c:86: warning: Excess struct/union/enum/typedef member 'trans_len' description in 'iwl_fw_dump_ptrs'


vim +86 drivers/net/wireless/intel/iwlwifi/fw/dbg.c

72
73 /**
74 * struct iwl_fw_dump_ptrs - set of pointers needed for the fw-error-dump
75 *
76 * @fwrt_ptr: pointer to the buffer coming from fwrt
77 * @trans_ptr: pointer to struct %iwl_trans_dump_data which contains the
78 * transport's data.
79 * @trans_len: length of the valid data in trans_ptr
80 * @fwrt_len: length of the valid data in fwrt_ptr
81 */
82 struct iwl_fw_dump_ptrs {
83 struct iwl_trans_dump_data *trans_ptr;
84 void *fwrt_ptr;
85 u32 fwrt_len;
> 86 };
87

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