Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [djiang:cxl/fwctl 21/25] drivers/fwctl/cxl/cxl.c:44:9: error: call to undeclared function 'kzalloc'; ISO C99 and later do not support implicit function declarations
@ 2024-09-27  0:48 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-09-27  0:48 UTC (permalink / raw)
  To: Dave Jiang; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/djiang/linux.git cxl/fwctl
head:   b4f2900f53c72de8fc639b62e44763c6a9695d3b
commit: 69c31732e72a4e65881d0894e34b8f16a9d529c2 [21/25] fwctl/cxl: Add support for get driver information
config: um-allmodconfig (https://download.01.org/0day-ci/archive/20240927/202409270849.KwaVae6m-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 7773243d9916f98ba0ffce0c3a960e4aa9f03e81)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240927/202409270849.KwaVae6m-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409270849.KwaVae6m-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/fwctl/cxl/cxl.c:44:9: error: call to undeclared function 'kzalloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      44 |         info = kzalloc(sizeof(*info), GFP_KERNEL);
         |                ^
>> drivers/fwctl/cxl/cxl.c:44:7: error: incompatible integer to pointer conversion assigning to 'struct fwctl_info_cxl *' from 'int' [-Wint-conversion]
      44 |         info = kzalloc(sizeof(*info), GFP_KERNEL);
         |              ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   2 errors generated.


vim +/kzalloc +44 drivers/fwctl/cxl/cxl.c

    37	
    38	static void *cxlctl_info(struct fwctl_uctx *uctx, size_t *length)
    39	{
    40		struct cxlctl_uctx *cxlctl_uctx =
    41			container_of(uctx, struct cxlctl_uctx, uctx);
    42		struct fwctl_info_cxl *info;
    43	
  > 44		info = kzalloc(sizeof(*info), GFP_KERNEL);
    45		if (!info)
    46			return ERR_PTR(-ENOMEM);
    47	
    48		info->uctx_caps = cxlctl_uctx->uctx_caps;
    49	
    50		return info;
    51	}
    52	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-09-27  0:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-27  0:48 [djiang:cxl/fwctl 21/25] drivers/fwctl/cxl/cxl.c:44:9: error: call to undeclared function 'kzalloc'; ISO C99 and later do not support implicit function declarations kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox