* [miquelraynal:nvmem-layouts-and-of-cleanup /35] drivers/of/module.c:62:6: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int'
@ 2023-03-07 22:46 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-03-07 22:46 UTC (permalink / raw)
To: Miquel Raynal; +Cc: llvm, oe-kbuild-all
tree: https://github.com/miquelraynal/linux-0day.git nvmem-layouts-and-of-cleanup
head: 4dbec5e07ef322a0458183244c9a11e92eebd61d
commit: 71414eadef0bb9ab9e3688498d0dc11f2739b5f2 [/35] of: Move the request module helper logic to module.c
config: i386-randconfig-a013-20230306 (https://download.01.org/0day-ci/archive/20230308/202303080602.l78Xfpcf-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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://github.com/miquelraynal/linux-0day/commit/71414eadef0bb9ab9e3688498d0dc11f2739b5f2
git remote add miquelraynal https://github.com/miquelraynal/linux-0day.git
git fetch --no-tags miquelraynal nvmem-layouts-and-of-cleanup
git checkout 71414eadef0bb9ab9e3688498d0dc11f2739b5f2
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/nvmem/ drivers/of/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303080602.l78Xfpcf-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/of/module.c:62:8: error: implicit declaration of function 'kmalloc' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
str = kmalloc(size, GFP_KERNEL);
^
drivers/of/module.c:62:8: note: did you mean 'mm_alloc'?
include/linux/sched/mm.h:16:26: note: 'mm_alloc' declared here
extern struct mm_struct *mm_alloc(void);
^
>> drivers/of/module.c:62:6: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
str = kmalloc(size, GFP_KERNEL);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/of/module.c:69:2: error: implicit declaration of function 'kfree' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
kfree(str);
^
drivers/of/module.c:69:2: note: did you mean 'kvfree'?
include/linux/rcutiny.h:99:13: note: 'kvfree' declared here
extern void kvfree(const void *addr);
^
1 warning and 2 errors generated.
vim +62 drivers/of/module.c
45
46 int of_request_module(struct device_node *np)
47 {
48 char *str;
49 ssize_t size;
50 int ret;
51
52 if (!np)
53 return -ENODEV;
54
55 size = of_modalias(np, NULL, 0);
56 if (size < 0)
57 return size;
58
59 /* Reserve an additional byte for the trailing '\0' */
60 size++;
61
> 62 str = kmalloc(size, GFP_KERNEL);
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-07 22:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-07 22:46 [miquelraynal:nvmem-layouts-and-of-cleanup /35] drivers/of/module.c:62:6: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.