All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [djiang:cxl/fwctl 21/28] drivers/fwctl/cxl/cxl.c:68:12: error: use of undeclared identifier '__free_kvfree'; did you mean '__free_pages'?
Date: Sun, 17 Nov 2024 07:09:43 +0800	[thread overview]
Message-ID: <202411170749.kYYAaKTi-lkp@intel.com> (raw)

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

                 reply	other threads:[~2024-11-16 23:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202411170749.kYYAaKTi-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.