[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202503200024.WkseT3sA-lkp@intel.com>
Date: Thu, 20 Mar 2025 01:27:31 +0800
From: kernel test robot <lkp@...el.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-usb@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, Andrew Lunn <andrew+netdev@...n.ch>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>
Subject: Re: [PATCH net v2 1/2] net: phy: Fix formatting specifier to avoid
potential string cuts
Hi Andy,
kernel test robot noticed the following build errors:
[auto build test ERROR on net/main]
url: https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/net-phy-Fix-formatting-specifier-to-avoid-potential-string-cuts/20250319-190433
base: net/main
patch link: https://lore.kernel.org/r/20250319105813.3102076-2-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH net v2 1/2] net: phy: Fix formatting specifier to avoid potential string cuts
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20250320/202503200024.WkseT3sA-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250320/202503200024.WkseT3sA-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503200024.WkseT3sA-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/broadcom/genet/bcmmii.c:17:
drivers/net/ethernet/broadcom/genet/bcmmii.c: In function 'bcmgenet_mii_pd_init':
>> include/linux/phy.h:312:20: warning: '%02hhx' directive output may be truncated writing 2 bytes into a region of size between 0 and 60 [-Wformat-truncation=]
312 | #define PHY_ID_FMT "%s:%02hhx"
| ^~~~~~~~~~~
drivers/net/ethernet/broadcom/genet/bcmmii.c:604:53: note: in expansion of macro 'PHY_ID_FMT'
604 | snprintf(phy_name, MII_BUS_ID_SIZE, PHY_ID_FMT,
| ^~~~~~~~~~
include/linux/phy.h:312:24: note: format string is defined here
312 | #define PHY_ID_FMT "%s:%02hhx"
| ^~~~~~
include/linux/phy.h:312:20: note: using the range [0, 255] for directive argument
312 | #define PHY_ID_FMT "%s:%02hhx"
| ^~~~~~~~~~~
drivers/net/ethernet/broadcom/genet/bcmmii.c:604:53: note: in expansion of macro 'PHY_ID_FMT'
604 | snprintf(phy_name, MII_BUS_ID_SIZE, PHY_ID_FMT,
| ^~~~~~~~~~
drivers/net/ethernet/broadcom/genet/bcmmii.c:604:17: note: 'snprintf' output between 4 and 64 bytes into a destination of size 61
604 | snprintf(phy_name, MII_BUS_ID_SIZE, PHY_ID_FMT,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
605 | mdio_bus_id, pd->phy_address);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
loongarch64-linux-ld: arch/loongarch/kernel/head.o: relocation R_LARCH_B26 overflow 0xfffffffff3911f74
arch/loongarch/kernel/head.o: in function `smpboot_entry':
>> (.ref.text+0x15c): relocation truncated to fit: R_LARCH_B26 against symbol `start_secondary' defined in .text section in arch/loongarch/kernel/smp.o
loongarch64-linux-ld: final link failed: bad value
vim +312 include/linux/phy.h
310
311 /* Used when trying to connect to a specific phy (mii bus id:phy device id) */
> 312 #define PHY_ID_FMT "%s:%02hhx"
313
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists