mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Likun Gao <Likun.Gao@amd.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Alex Deucher <alexander.deucher@amd.com>,
	Andrey Grodzovsky <andrey.grodzovsky@amd.com>,
	Hawking Zhang <Hawking.Zhang@amd.com>
Subject: [agd5f:drm-next 585/599] drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:3459:17: error: implicit declaration of function 'vfree'; did you mean 'kfree'?
Date: Sat, 7 May 2022 13:01:09 +0800	[thread overview]
Message-ID: <202205071258.p2FKbi8O-lkp@intel.com> (raw)

tree:   https://gitlab.freedesktop.org/agd5f/linux.git drm-next
head:   3170f5f234272247989fafee4cba4cbbc822631c
commit: 31aad22e2b3cfe89aef45015a9c7e4f7c0646daa [585/599] drm/amdgpu/psp: Add vbflash sysfs interface support
config: alpha-randconfig-r026-20220506 (https://download.01.org/0day-ci/archive/20220507/202205071258.p2FKbi8O-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.3.0
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
        git remote add agd5f https://gitlab.freedesktop.org/agd5f/linux.git
        git fetch --no-tags agd5f drm-next
        git checkout 31aad22e2b3cfe89aef45015a9c7e4f7c0646daa
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c: In function 'amdgpu_psp_vbflash_write':
>> drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:3459:17: error: implicit declaration of function 'vfree'; did you mean 'kfree'? [-Werror=implicit-function-declaration]
    3459 |                 vfree(adev->psp.vbflash_tmp_buf);
         |                 ^~~~~
         |                 kfree
>> drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:3467:45: error: implicit declaration of function 'vmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration]
    3467 |                 adev->psp.vbflash_tmp_buf = vmalloc(AMD_VBIOS_FILE_MAX_SIZE_B);
         |                                             ^~~~~~~
         |                                             kvmalloc
>> drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:3467:43: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    3467 |                 adev->psp.vbflash_tmp_buf = vmalloc(AMD_VBIOS_FILE_MAX_SIZE_B);
         |                                           ^
   cc1: some warnings being treated as errors


vim +3459 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

  3447	
  3448	static ssize_t amdgpu_psp_vbflash_write(struct file *filp, struct kobject *kobj,
  3449						struct bin_attribute *bin_attr,
  3450						char *buffer, loff_t pos, size_t count)
  3451	{
  3452		struct device *dev = kobj_to_dev(kobj);
  3453		struct drm_device *ddev = dev_get_drvdata(dev);
  3454		struct amdgpu_device *adev = drm_to_adev(ddev);
  3455	
  3456		/* Safeguard against memory drain */
  3457		if (adev->psp.vbflash_image_size > AMD_VBIOS_FILE_MAX_SIZE_B) {
  3458			dev_err(adev->dev, "File size cannot exceed %u", AMD_VBIOS_FILE_MAX_SIZE_B);
> 3459			vfree(adev->psp.vbflash_tmp_buf);
  3460			adev->psp.vbflash_tmp_buf = NULL;
  3461			adev->psp.vbflash_image_size = 0;
  3462			return -ENOMEM;
  3463		}
  3464	
  3465		/* TODO Just allocate max for now and optimize to realloc later if needed */
  3466		if (!adev->psp.vbflash_tmp_buf) {
> 3467			adev->psp.vbflash_tmp_buf = vmalloc(AMD_VBIOS_FILE_MAX_SIZE_B);
  3468			if (!adev->psp.vbflash_tmp_buf)
  3469				return -ENOMEM;
  3470		}
  3471	
  3472		mutex_lock(&adev->psp.mutex);
  3473		memcpy(adev->psp.vbflash_tmp_buf + pos, buffer, count);
  3474		adev->psp.vbflash_image_size += count;
  3475		mutex_unlock(&adev->psp.mutex);
  3476	
  3477		dev_info(adev->dev, "VBIOS flash write PSP done");
  3478	
  3479		return count;
  3480	}
  3481	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-05-07  5:02 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=202205071258.p2FKbi8O-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Hawking.Zhang@amd.com \
    --cc=Likun.Gao@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=andrey.grodzovsky@amd.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®