tree:
https://github.com/0day-ci/linux/commits/UPDATE-20200613-235004/Borislav-...
head: 24611fae296234f2f3d5e95062d44390a482887b
commit: 24611fae296234f2f3d5e95062d44390a482887b [1/1] x86/msr: Filter MSR writes
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (
https://github.com/llvm/llvm-project
d7e6f116f4517952fbdf5ad4b5ff67e378600c60)
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
git checkout 24611fae296234f2f3d5e95062d44390a482887b
# 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(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
error: fallthrough annotation does not directly precede switch label
> arch/x86/kernel/msr.c:281:21: error: passing 'const char
*' to parameter of type 'char *' discards qualifiers
[-Werror,-Wincompatible-pointer-types-discards-qualifiers]
char *s = strstrip(val);
^~~
include/linux/string.h:76:49: note: passing argument to parameter 'str' here
static inline __must_check char *strstrip(char *str)
^
2 errors generated.
vim +281 arch/x86/kernel/msr.c
278
279 static int set_allow_writes(const char *val, const struct kernel_param *cp)
280 {
281 char *s = strstrip(val);
282
283 if (!strcmp(s, "on"))
284 allow_writes = MSR_WRITES_ON;
285 else if (!strcmp(s, "off"))
286 allow_writes = MSR_WRITES_OFF;
287 else
288 allow_writes = MSR_WRITES_DEFAULT;
289
290 return 0;
291 }
292
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org