lkml.org 
[lkml]   [2021]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectkernel/time/clocksource.c:1053:9: warning: no previous prototype for 'sysfs_get_uname'
Hi Arnd,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: cb690f5238d71f543f4ce874aa59237cf53a877c
commit: 686092e7daaa9f43396c57ea0044799e47f0d9da parisc: use legacy_timer_tick
date: 1 year ago
config: parisc-buildonly-randconfig-r005-20210927 (attached as .config)
compiler: hppa64-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=686092e7daaa9f43396c57ea0044799e47f0d9da
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 686092e7daaa9f43396c57ea0044799e47f0d9da
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=parisc

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 >>):

>> kernel/time/clocksource.c:1053:9: warning: no previous prototype for 'sysfs_get_uname' [-Wmissing-prototypes]
1053 | ssize_t sysfs_get_uname(const char *buf, char *dst, size_t cnt)
| ^~~~~~~~~~~~~~~


vim +/sysfs_get_uname +1053 kernel/time/clocksource.c

734efb467b31e56 John Stultz 2006-06-26 1052
891292a767c2453 Patrick Palka 2013-10-11 @1053 ssize_t sysfs_get_uname(const char *buf, char *dst, size_t cnt)
29b5407819f5973 Thomas Gleixner 2013-04-25 1054 {
29b5407819f5973 Thomas Gleixner 2013-04-25 1055 size_t ret = cnt;
29b5407819f5973 Thomas Gleixner 2013-04-25 1056
29b5407819f5973 Thomas Gleixner 2013-04-25 1057 /* strings from sysfs write are not 0 terminated! */
29b5407819f5973 Thomas Gleixner 2013-04-25 1058 if (!cnt || cnt >= CS_NAME_LEN)
29b5407819f5973 Thomas Gleixner 2013-04-25 1059 return -EINVAL;
29b5407819f5973 Thomas Gleixner 2013-04-25 1060
29b5407819f5973 Thomas Gleixner 2013-04-25 1061 /* strip of \n: */
29b5407819f5973 Thomas Gleixner 2013-04-25 1062 if (buf[cnt-1] == '\n')
29b5407819f5973 Thomas Gleixner 2013-04-25 1063 cnt--;
29b5407819f5973 Thomas Gleixner 2013-04-25 1064 if (cnt > 0)
29b5407819f5973 Thomas Gleixner 2013-04-25 1065 memcpy(dst, buf, cnt);
29b5407819f5973 Thomas Gleixner 2013-04-25 1066 dst[cnt] = 0;
29b5407819f5973 Thomas Gleixner 2013-04-25 1067 return ret;
29b5407819f5973 Thomas Gleixner 2013-04-25 1068 }
29b5407819f5973 Thomas Gleixner 2013-04-25 1069

:::::: The code at line 1053 was first introduced by commit
:::::: 891292a767c2453af0e5be9465e95b06b4b29ebe time: Fix signedness bug in sysfs_get_uname() and its callers

:::::: TO: Patrick Palka <patrick@parcs.ath.cx>
:::::: CC: John Stultz <john.stultz@linaro.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-11-10 17:48    [W:0.039 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site