netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net:master 45/81] drivers/ptp/ptp_sysfs.c:182:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
@ 2021-07-05  8:57 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-07-05  8:57 UTC (permalink / raw)
  To: Yangbo Lu; +Cc: kbuild-all, netdev

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master
head:   b43c8909be52f2baca8884f967b418a88424494a
commit: 73f37068d540eba5f93ba3a0019bf479d35ebd76 [45/81] ptp: support ptp physical/virtual clocks conversion
compiler: h8300-linux-gcc (GCC) 9.3.0

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

cppcheck warnings: (new ones prefixed by >>)

>> drivers/ptp/ptp_sysfs.c:182:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]

vim +182 drivers/ptp/ptp_sysfs.c

73f37068d540eb Yangbo Lu 2021-06-30  172  
73f37068d540eb Yangbo Lu 2021-06-30  173  static ssize_t n_vclocks_show(struct device *dev,
73f37068d540eb Yangbo Lu 2021-06-30  174  			      struct device_attribute *attr, char *page)
73f37068d540eb Yangbo Lu 2021-06-30  175  {
73f37068d540eb Yangbo Lu 2021-06-30  176  	struct ptp_clock *ptp = dev_get_drvdata(dev);
73f37068d540eb Yangbo Lu 2021-06-30  177  	ssize_t size;
73f37068d540eb Yangbo Lu 2021-06-30  178  
73f37068d540eb Yangbo Lu 2021-06-30  179  	if (mutex_lock_interruptible(&ptp->n_vclocks_mux))
73f37068d540eb Yangbo Lu 2021-06-30  180  		return -ERESTARTSYS;
73f37068d540eb Yangbo Lu 2021-06-30  181  
73f37068d540eb Yangbo Lu 2021-06-30 @182  	size = snprintf(page, PAGE_SIZE - 1, "%d\n", ptp->n_vclocks);
73f37068d540eb Yangbo Lu 2021-06-30  183  
73f37068d540eb Yangbo Lu 2021-06-30  184  	mutex_unlock(&ptp->n_vclocks_mux);
73f37068d540eb Yangbo Lu 2021-06-30  185  
73f37068d540eb Yangbo Lu 2021-06-30  186  	return size;
73f37068d540eb Yangbo Lu 2021-06-30  187  }
73f37068d540eb Yangbo Lu 2021-06-30  188  

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-05  8:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-05  8:57 [net:master 45/81] drivers/ptp/ptp_sysfs.c:182:9: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] 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).