From: kernel test robot <lkp@intel.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [lunn:v5.15-rc1-net-mv88e6161-mtu 4/4] drivers/net/dsa/mv88e6xxx/port.c:1280:29: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' {aka 'long unsigned int'}
Date: Mon, 20 Sep 2021 12:35:49 +0800 [thread overview]
Message-ID: <202109201242.4WQrIR97-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5978 bytes --]
tree: https://github.com/lunn/linux.git v5.15-rc1-net-mv88e6161-mtu
head: edfa13dec25e22ef6404588b86932dd161bdb8c0
commit: edfa13dec25e22ef6404588b86932dd161bdb8c0 [4/4] DEBUG
config: alpha-randconfig-r002-20210920 (attached as .config)
compiler: alpha-linux-gcc (GCC) 11.2.0
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=gcc-11.2.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/dma-mapping.h:7,
from include/linux/skbuff.h:31,
from include/net/net_namespace.h:39,
from include/linux/netdevice.h:37,
from include/linux/if_bridge.h:12,
from drivers/net/dsa/mv88e6xxx/port.c:12:
drivers/net/dsa/mv88e6xxx/port.c: In function 'mv88e6165_port_set_jumbo_size':
>> drivers/net/dsa/mv88e6xxx/port.c:1280:29: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
1280 | dev_info(chip->dev, "%s: port %d, size %d\n", __func__, port, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:150:58: note: in expansion of macro 'dev_fmt'
150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/net/dsa/mv88e6xxx/port.c:1280:9: note: in expansion of macro 'dev_info'
1280 | dev_info(chip->dev, "%s: port %d, size %d\n", __func__, port, size);
| ^~~~~~~~
drivers/net/dsa/mv88e6xxx/port.c:1280:49: note: format string is defined here
1280 | dev_info(chip->dev, "%s: port %d, size %d\n", __func__, port, size);
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/dma-mapping.h:7,
from include/linux/skbuff.h:31,
from include/net/net_namespace.h:39,
from include/linux/netdevice.h:37,
from include/linux/if_bridge.h:12,
from drivers/net/dsa/mv88e6xxx/port.c:12:
drivers/net/dsa/mv88e6xxx/port.c:1284:29: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
1284 | dev_info(chip->dev, "%s: port %d, size %d\n", __func__, port, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:150:58: note: in expansion of macro 'dev_fmt'
150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/net/dsa/mv88e6xxx/port.c:1284:9: note: in expansion of macro 'dev_info'
1284 | dev_info(chip->dev, "%s: port %d, size %d\n", __func__, port, size);
| ^~~~~~~~
drivers/net/dsa/mv88e6xxx/port.c:1284:49: note: format string is defined here
1284 | dev_info(chip->dev, "%s: port %d, size %d\n", __func__, port, size);
| ~^
| |
| int
| %ld
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, ®);
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@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33040 bytes --]
reply other threads:[~2021-09-20 4:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202109201242.4WQrIR97-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrew@lunn.ch \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome