All of lore.kernel.org
 help / color / mirror / Atom feed
* [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'}
@ 2021-09-20  4:35 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-09-20  4:35 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: kbuild-all, linux-kernel

[-- 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, &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@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33040 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [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'}
@ 2021-09-20  4:35 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-09-20  4:35 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6094 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, &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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33040 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-20  4:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20  4:35 [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'} kernel test robot
2021-09-20  4:35 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.