[lunn:v5.15-rc1-net-mv88e6161-mtu 4/4] drivers/net/dsa/mv88e6xxx/port.c:1280:64: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long')

From: kernel test robot
Date: Thu Sep 30 2021 - 04:04:18 EST


tree: https://github.com/lunn/linux.git v5.15-rc1-net-mv88e6161-mtu
head: edfa13dec25e22ef6404588b86932dd161bdb8c0
commit: edfa13dec25e22ef6404588b86932dd161bdb8c0 [4/4] DEBUG
config: x86_64-randconfig-a015-20210930 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 28981015526f2192440c18f18e8a20cd11b0779c)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/lunn/linux/commit/edfa13dec25e22ef6404588b86932dd161bdb8c0
git remote add lunn https://github.com/lunn/linux.git
git fetch --no-tags lunn v5.15-rc1-net-mv88e6161-mtu
git checkout edfa13dec25e22ef6404588b86932dd161bdb8c0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/net/dsa/mv88e6xxx/port.c:1280:64: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
dev_info(chip->dev, "%s: port %d, size %d\n", __func__, port, size);
~~ ^~~~
%lu
include/linux/dev_printk.h:150:67: note: expanded from macro 'dev_info'
dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
_p_func(dev, fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
drivers/net/dsa/mv88e6xxx/port.c:1284:64: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
dev_info(chip->dev, "%s: port %d, size %d\n", __func__, port, size);
~~ ^~~~
%lu
include/linux/dev_printk.h:150:67: note: expanded from macro 'dev_info'
dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
_p_func(dev, fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
2 warnings generated.


vim +1280 drivers/net/dsa/mv88e6xxx/port.c

1273
1274 int mv88e6165_port_set_jumbo_size(struct mv88e6xxx_chip *chip, int port,
1275 size_t size)
1276 {
1277 u16 reg;
1278 int err;
1279
> 1280 dev_info(chip->dev, "%s: port %d, size %d\n", __func__, port, size);
1281
1282 size += VLAN_ETH_HLEN + ETH_FCS_LEN;
1283
1284 dev_info(chip->dev, "%s: port %d, size %d\n", __func__, port, size);
1285
1286 err = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_CTL2, &reg);
1287 dev_info(chip->dev, "%s: %4x\n", __func__, reg);
1288 if (err)
1289 return err;
1290
1291 reg &= ~MV88E6XXX_PORT_CTL2_JUMBO_MODE_MASK;
1292
1293 if (size <= 1522)
1294 reg |= MV88E6XXX_PORT_CTL2_JUMBO_MODE_1522;
1295 else if (size <= 2048)
1296 reg |= MV88E6XXX_PORT_CTL2_JUMBO_MODE_2048;
1297 else if (size <= 10240)
1298 reg |= MV88E6XXX_PORT_CTL2_JUMBO_MODE_10240;
1299 else {
1300 dev_info(chip->dev, "Invalid size\n");
1301 return -ERANGE;
1302 }
1303 dev_info(chip->dev, "%s: %4x\n", __func__, reg);
1304
1305 return mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_CTL2, reg);
1306 }
1307

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip