Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH] net: prestera: avoid overreading a short firmware tail
       [not found] <20260830142404.37663-1-pengpeng@iscas.ac.cn>
@ 2026-09-02 13:06 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-02 13:06 UTC (permalink / raw)
  To: Pengpeng Hou, Elad Nachman
  Cc: llvm, oe-kbuild-all, Pengpeng Hou, Andrew Lunn, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel

Hi Pengpeng,

kernel test robot noticed the following build errors:

[auto build test ERROR on 08dbfad3f5040f5bdb6c529da20d6d4e81fefd72]

url:    https://github.com/intel-lab-lkp/linux/commits/Pengpeng-Hou/net-prestera-avoid-overreading-a-short-firmware-tail/20260830-222403
base:   08dbfad3f5040f5bdb6c529da20d6d4e81fefd72
patch link:    https://lore.kernel.org/r/20260830142404.37663-1-pengpeng%40iscas.ac.cn
patch subject: [PATCH] net: prestera: avoid overreading a short firmware tail
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20260902/202609022030.0pnwZKgS-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260902/202609022030.0pnwZKgS-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/202609022030.0pnwZKgS-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/net/ethernet/marvell/prestera/prestera_pci.c:603:18: error: call to undeclared function 'get_unaligned'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     603 |                 writel_relaxed(get_unaligned((u32 *)(buf + i)),
         |                                ^
   1 error generated.


vim +/get_unaligned +603 drivers/net/ethernet/marvell/prestera/prestera_pci.c

   589	
   590	static int prestera_ldr_send(struct prestera_fw *fw, const u8 *buf, size_t len)
   591	{
   592		size_t write_len = ALIGN(len, sizeof(u32));
   593		size_t i;
   594		int err;
   595	
   596		err = prestera_ldr_wait_buf(fw, write_len);
   597		if (err) {
   598			dev_err(fw->dev.dev, "failed wait for sending firmware\n");
   599			return err;
   600		}
   601	
   602		for (i = 0; i + sizeof(u32) <= len; i += sizeof(u32)) {
 > 603			writel_relaxed(get_unaligned((u32 *)(buf + i)),
   604				       prestera_ldr_wr_ptr(fw));
   605			prestera_ldr_wr_idx_move(fw, 4);
   606		}
   607		if (i < len) {
   608			u32 last = 0;
   609	
   610			memcpy(&last, buf + i, len - i);
   611			writel_relaxed(last, prestera_ldr_wr_ptr(fw));
   612			prestera_ldr_wr_idx_move(fw, 4);
   613		}
   614	
   615		prestera_ldr_wr_idx_commit(fw);
   616		return 0;
   617	}
   618	

--
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:[~2026-09-02 13:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260830142404.37663-1-pengpeng@iscas.ac.cn>
2026-09-02 13:06 ` [PATCH] net: prestera: avoid overreading a short firmware tail 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