lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210705085702.GC2022171@shao2-debian>
Date:   Mon, 5 Jul 2021 16:57:02 +0800
From:   kernel test robot <rong.a.chen@...el.com>
To:     Yangbo Lu <yangbo.lu@....com>
Cc:     kbuild-all@...ts.01.org, netdev@...r.kernel.org
Subject: [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]

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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ