llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [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')
@ 2021-09-20  1:11 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-09-20  1:11 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: llvm, kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 4066 bytes --]

tree:   https://github.com/lunn/linux.git v5.15-rc1-net-mv88e6161-mtu
head:   edfa13dec25e22ef6404588b86932dd161bdb8c0
commit: edfa13dec25e22ef6404588b86932dd161bdb8c0 [4/4] DEBUG
config: x86_64-randconfig-a013-20210919 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c8b3d7d6d6de37af68b2f379d0e37304f78e115f)
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@intel.com>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 43647 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:64: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long')
@ 2021-09-30  8:01 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-09-30  8:01 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: llvm, kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 4066 bytes --]

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@intel.com>

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

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

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

end of thread, other threads:[~2021-09-30  8:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20  1:11 [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') kernel test robot
2021-09-30  8:01 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;
as well as URLs for NNTP newsgroup(s).