mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/net/ethernet/intel/i40e/i40e_ddp.c:53:1: warning: the frame size of 1040 bytes is larger than 1024 bytes
@ 2024-11-26 15:01 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-11-26 15:01 UTC (permalink / raw)
  To: Aleksandr Loktionov; +Cc: oe-kbuild-all, linux-kernel, Jeff Kirsher

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   7eef7e306d3c40a0c5b9ff6adc9b273cc894dbd5
commit: cdc594e00370e153c323cf8aa9c43b66679e09a0 i40e: Implement DDP support in i40e driver
date:   6 years ago
config: xtensa-allyesconfig (https://download.01.org/0day-ci/archive/20241126/202411262240.7uamxDkb-lkp@intel.com/config)
compiler: xtensa-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241126/202411262240.7uamxDkb-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/202411262240.7uamxDkb-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from include/linux/kernel.h:11,
                    from include/linux/list.h:9,
                    from include/net/tcp.h:23,
                    from drivers/net/ethernet/intel/i40e/i40e.h:7,
                    from drivers/net/ethernet/intel/i40e/i40e_ddp.c:4:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   arch/xtensa/include/asm/page.h:182:16: warning: comparison of unsigned expression in '>= 0' is always true [-Wtype-limits]
     182 |         ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
         |                ^~
   include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
      77 | # define unlikely(x)    __builtin_expect(!!(x), 0)
         |                                             ^
   include/linux/scatterlist.h:143:9: note: in expansion of macro 'BUG_ON'
     143 |         BUG_ON(!virt_addr_valid(buf));
         |         ^~~~~~
   arch/xtensa/include/asm/page.h:190:33: note: in expansion of macro 'pfn_valid'
     190 | #define virt_addr_valid(kaddr)  pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
         |                                 ^~~~~~~~~
   include/linux/scatterlist.h:143:17: note: in expansion of macro 'virt_addr_valid'
     143 |         BUG_ON(!virt_addr_valid(buf));
         |                 ^~~~~~~~~~~~~~~
   In file included from ./arch/xtensa/include/generated/asm/bug.h:1,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/xtensa/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/skbuff.h:19,
                    from include/linux/tcp.h:21,
                    from include/net/tcp.h:24:
   include/linux/dma-mapping.h: In function 'dma_map_resource':
   arch/xtensa/include/asm/page.h:182:16: warning: comparison of unsigned expression in '>= 0' is always true [-Wtype-limits]
     182 |         ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
         |                ^~
   include/asm-generic/bug.h:148:34: note: in definition of macro 'WARN_ON_ONCE'
     148 |         int __ret_warn_once = !!(condition);                    \
         |                                  ^~~~~~~~~
   include/linux/dma-mapping.h:359:26: note: in expansion of macro 'pfn_valid'
     359 |         if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
         |                          ^~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e_ddp.c: In function 'i40e_ddp_does_profile_exist':
   drivers/net/ethernet/intel/i40e/i40e_ddp.c:49:70: warning: array subscript i is outside array bounds of 'struct i40e_profile_info[0]' [-Warray-bounds=]
      49 |                 if (i40e_ddp_profiles_eq(pinfo, &profile_list->p_info[i]))
         |                                                  ~~~~~~~~~~~~~~~~~~~~^~~
   drivers/net/ethernet/intel/i40e/i40e.h:338:34: note: while referencing 'p_info'
     338 |         struct i40e_profile_info p_info[0];
         |                                  ^~~~~~
   In function 'i40e_ddp_profiles_eq',
       inlined from 'i40e_ddp_does_profile_exist' at drivers/net/ethernet/intel/i40e/i40e_ddp.c:49:7:
   drivers/net/ethernet/intel/i40e/i40e_ddp.c:20:38: warning: array subscript i is outside array bounds of 'struct i40e_profile_info[0]' [-Warray-bounds=]
      20 |                 !memcmp(&a->version, &b->version, sizeof(a->version)) &&
         |                                      ^~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e.h: In function 'i40e_ddp_does_profile_exist':
   drivers/net/ethernet/intel/i40e/i40e.h:338:34: note: while referencing 'p_info'
     338 |         struct i40e_profile_info p_info[0];
         |                                  ^~~~~~
   In function 'i40e_ddp_profiles_eq',
       inlined from 'i40e_ddp_does_profile_exist' at drivers/net/ethernet/intel/i40e/i40e_ddp.c:49:7:
   drivers/net/ethernet/intel/i40e/i40e_ddp.c:21:35: warning: array subscript i is outside array bounds of 'struct i40e_profile_info[0]' [-Warray-bounds=]
      21 |                 !memcmp(&a->name, &b->name, I40E_DDP_NAME_SIZE);
         |                                   ^~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e.h: In function 'i40e_ddp_does_profile_exist':
   drivers/net/ethernet/intel/i40e/i40e.h:338:34: note: while referencing 'p_info'
     338 |         struct i40e_profile_info p_info[0];
         |                                  ^~~~~~
>> drivers/net/ethernet/intel/i40e/i40e_ddp.c:53:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
      53 | }
         | ^
   drivers/net/ethernet/intel/i40e/i40e_ddp.c: In function 'i40e_ddp_does_profile_overlap':
   drivers/net/ethernet/intel/i40e/i40e_ddp.c:104:21: warning: array subscript i is outside array bounds of 'struct i40e_profile_info[0]' [-Warray-bounds=]
     104 |                 if (i40e_ddp_profiles_overlap(pinfo,
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     105 |                                               &profile_list->p_info[i]))
         |                                               ~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/i40e/i40e.h:338:34: note: while referencing 'p_info'
     338 |         struct i40e_profile_info p_info[0];
         |                                  ^~~~~~
   drivers/net/ethernet/intel/i40e/i40e_ddp.c:109:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
     109 | }
         | ^


vim +53 drivers/net/ethernet/intel/i40e/i40e_ddp.c

    23	
    24	/**
    25	 * i40e_ddp_does_profile_exist - checks if DDP profile loaded already
    26	 * @hw: HW data structure
    27	 * @pinfo: DDP profile information structure
    28	 *
    29	 * checks if DDP profile loaded already.
    30	 * Returns >0 if the profile exists.
    31	 * Returns  0 if the profile is absent.
    32	 * Returns <0 if error.
    33	 **/
    34	static int i40e_ddp_does_profile_exist(struct i40e_hw *hw,
    35					       struct i40e_profile_info *pinfo)
    36	{
    37		struct i40e_ddp_profile_list *profile_list;
    38		u8 buff[I40E_PROFILE_LIST_SIZE];
    39		i40e_status status;
    40		int i;
    41	
    42		status = i40e_aq_get_ddp_list(hw, buff, I40E_PROFILE_LIST_SIZE, 0,
    43					      NULL);
    44		if (status)
    45			return -1;
    46	
    47		profile_list = (struct i40e_ddp_profile_list *)buff;
    48		for (i = 0; i < profile_list->p_count; i++) {
    49			if (i40e_ddp_profiles_eq(pinfo, &profile_list->p_info[i]))
    50				return 1;
    51		}
    52		return 0;
  > 53	}
    54	

-- 
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:[~2024-11-26 15:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-26 15:01 drivers/net/ethernet/intel/i40e/i40e_ddp.c:53:1: warning: the frame size of 1040 bytes is larger than 1024 bytes kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®