Re: [PATCH 1/2] x86: Conditional init of pcengines leds/keys gpios
From: kernel test robot
Date: Wed Oct 21 2020 - 20:53:59 EST
Hi Ed,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tip/master]
[also build test WARNING on linus/master linux/master platform-drivers-x86/for-next v5.9 next-20201021]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Ed-Wildgoose/x86-Conditional-init-of-pcengines-leds-keys-gpios/20201022-054433
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 2ee263eb855963c3ce8d04191c8a92e13e6096f2
config: x86_64-randconfig-a011-20201021 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 2eac8ce820e6c9fe51bf93b55cb8a781b8b9fc7c)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/f8923b8d1bb4907e1138ee7b92f01a7f767e54b8
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ed-Wildgoose/x86-Conditional-init-of-pcengines-leds-keys-gpios/20201022-054433
git checkout f8923b8d1bb4907e1138ee7b92f01a7f767e54b8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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/platform/x86/pcengines-apuv2.c:231:5: warning: no previous prototype for function 'cmp_version' [-Wmissing-prototypes]
int cmp_version(const char *base, const char *test)
^
drivers/platform/x86/pcengines-apuv2.c:231:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int cmp_version(const char *base, const char *test)
^
static
1 warning generated.
vim +/cmp_version +231 drivers/platform/x86/pcengines-apuv2.c
230
> 231 int cmp_version(const char *base, const char *test)
232 {
233 int i;
234 int oct_base[4], oct_test[4];
235 int matched_base, matched;
236
237 matched_base = sscanf(base, "v%4d.%4d.%4d.%4d",
238 &oct_base[0], &oct_base[1],
239 &oct_base[2], &oct_base[3]);
240 matched = sscanf(test, "v%4d.%4d.%4d.%4d",
241 &oct_test[0], &oct_test[1],
242 &oct_test[2], &oct_test[3]);
243
244 /* opinionated: match as lower if we can't parse test version */
245 if (matched == 0)
246 return -1;
247
248 if (matched_base < matched)
249 matched = matched_base;
250
251 for (i = 0; i < matched; i++) {
252 if (oct_test[i] > oct_base[i])
253 return 1;
254 else if (oct_test[i] < oct_base[i])
255 return -1;
256 }
257
258 return 0;
259 }
260
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip