drivers/firmware/efi/libstub/string.c:83:20: warning: no previous prototype for 'simple_strtoull'

From: kernel test robot
Date: Mon Jun 29 2020 - 15:05:57 EST


Hi Ard,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9ebcfadb0610322ac537dd7aa5d9cbc2b2894c68
commit: 91d150c0cc637b9d9d6394936add7cd2b7ccc410 efi/libstub: Clean up command line parsing routine
date: 4 months ago
config: arm-randconfig-r005-20200629 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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
git checkout 91d150c0cc637b9d9d6394936add7cd2b7ccc410
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm

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

All warnings (new ones prefixed by >>):

>> drivers/firmware/efi/libstub/string.c:83:20: warning: no previous prototype for 'simple_strtoull' [-Wmissing-prototypes]
83 | unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base)
| ^~~~~~~~~~~~~~~
>> drivers/firmware/efi/libstub/string.c:108:6: warning: no previous prototype for 'simple_strtol' [-Wmissing-prototypes]
108 | long simple_strtol(const char *cp, char **endp, unsigned int base)
| ^~~~~~~~~~~~~

vim +/simple_strtoull +83 drivers/firmware/efi/libstub/string.c

75
76 /**
77 * simple_strtoull - convert a string to an unsigned long long
78 * @cp: The start of the string
79 * @endp: A pointer to the end of the parsed string will be placed here
80 * @base: The number base to use
81 */
82
> 83 unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base)
84 {
85 unsigned long long result = 0;
86
87 if (!base)
88 base = simple_guess_base(cp);
89
90 if (base == 16 && cp[0] == '0' && TOLOWER(cp[1]) == 'x')
91 cp += 2;
92
93 while (isxdigit(*cp)) {
94 unsigned int value;
95
96 value = isdigit(*cp) ? *cp - '0' : TOLOWER(*cp) - 'a' + 10;
97 if (value >= base)
98 break;
99 result = result * base + value;
100 cp++;
101 }
102 if (endp)
103 *endp = (char *)cp;
104
105 return result;
106 }
107
> 108 long simple_strtol(const char *cp, char **endp, unsigned int base)

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

Attachment: .config.gz
Description: application/gzip