All of lore.kernel.org
 help / color / mirror / Atom feed
* [djiang:cxl/fwctl 21/28] drivers/fwctl/cxl/cxl.c:68:12: error: use of undeclared identifier '__free_kvfree'; did you mean '__free_pages'?
@ 2024-11-16 23:09 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-11-16 23:09 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:   81cb57f64be6af29f39bde3b3ca4203975a84377
commit: 8d042dccf81ccdd81279cd26a9bbd89f705fea56 [21/28] fwctl/cxl: Add hw_info callback
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20241117/202411170749.kYYAaKTi-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241117/202411170749.kYYAaKTi-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/202411170749.kYYAaKTi-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/fwctl/cxl/cxl.c:47:9: error: call to undeclared function 'kzalloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      47 |         info = kzalloc(sizeof(*info), GFP_KERNEL);
         |                ^
   drivers/fwctl/cxl/cxl.c:47:7: error: incompatible integer to pointer conversion assigning to 'struct fwctl_info_cxl *' from 'int' [-Wint-conversion]
      47 |         info = kzalloc(sizeof(*info), GFP_KERNEL);
         |              ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/fwctl/cxl/cxl.c:68:12: error: use of undeclared identifier '__free_kvfree'; did you mean '__free_pages'?
      68 |         void *out __free(kvfree) = kvzalloc(*out_len, GFP_KERNEL);
         |                   ^
   include/linux/cleanup.h:200:33: note: expanded from macro '__free'
     200 | #define __free(_name)   __cleanup(__free_##_name)
         |                                   ^
   <scratch space>:11:1: note: expanded from here
      11 | __free_kvfree
         | ^
   include/linux/gfp.h:371:13: note: '__free_pages' declared here
     371 | extern void __free_pages(struct page *page, unsigned int order);
         |             ^
>> drivers/fwctl/cxl/cxl.c:68:12: error: 'cleanup' function '__free_pages' must take 1 parameter
      68 |         void *out __free(kvfree) = kvzalloc(*out_len, GFP_KERNEL);
         |                   ^
   include/linux/cleanup.h:200:33: note: expanded from macro '__free'
     200 | #define __free(_name)   __cleanup(__free_##_name)
         |                                   ^
   <scratch space>:11:1: note: expanded from here
      11 | __free_kvfree
         | ^
>> drivers/fwctl/cxl/cxl.c:68:29: error: call to undeclared function 'kvzalloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      68 |         void *out __free(kvfree) = kvzalloc(*out_len, GFP_KERNEL);
         |                                    ^
>> drivers/fwctl/cxl/cxl.c:68:8: error: incompatible integer to pointer conversion initializing 'void *' with an expression of type 'int' [-Wint-conversion]
      68 |         void *out __free(kvfree) = kvzalloc(*out_len, GFP_KERNEL);
         |               ^                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   6 errors generated.


vim +68 drivers/fwctl/cxl/cxl.c

    55	
    56	static void *cxlctl_hw_info(struct fwctl_uctx *uctx, int commands, size_t *out_len)
    57	{
    58		struct cxlctl_uctx *cxlctl_uctx =
    59			container_of(uctx, struct cxlctl_uctx, uctx);
    60		struct fwctl_device *fwctl = uctx->fwctl;
    61		struct cxlctl_dev *cxlctl =
    62			container_of(fwctl, struct cxlctl_dev, fwctl);
    63		int rc;
    64	
    65		if (commands > cxlctl_uctx->nr_commands)
    66			return ERR_PTR(-EINVAL);
    67	
  > 68		void *out __free(kvfree) = kvzalloc(*out_len, GFP_KERNEL);
    69		if (!out)
    70			return ERR_PTR(-ENOMEM);
    71	
    72		rc = cxl_mailbox_user_commands_info_get(cxlctl->mbox,
    73							commands, out, out_len);
    74		if (rc)
    75			return ERR_PTR(rc);
    76	
    77		return_ptr(out);
    78	}
    79	

-- 
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-11-16 23:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-16 23:09 [djiang:cxl/fwctl 21/28] drivers/fwctl/cxl/cxl.c:68:12: error: use of undeclared identifier '__free_kvfree'; did you mean '__free_pages'? 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.