From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4875C433F5 for ; Mon, 9 May 2022 23:00:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 196FD6B0072; Mon, 9 May 2022 19:00:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 144176B0073; Mon, 9 May 2022 19:00:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 031996B0074; Mon, 9 May 2022 19:00:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id E3D676B0072 for ; Mon, 9 May 2022 19:00:07 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id C24C9614FE for ; Mon, 9 May 2022 23:00:07 +0000 (UTC) X-FDA: 79447724454.16.6FC32DE Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by imf20.hostedemail.com (Postfix) with ESMTP id A311B1C00A2 for ; Mon, 9 May 2022 22:59:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652137206; x=1683673206; h=date:from:to:cc:subject:message-id:mime-version; bh=wb4kQzIr687GOHBkN/UzAQ1V5VME/8twWG/lEtQPEnw=; b=l1oN6blY2VNDjjXiwpi3hkHCcIKFeC1cLT/cD8u/9GBN9EKzq2/DyK68 YhkUg1FGC+vI18vwXhfIfM+kSY1+9CEjaVLxM2SqyKwM+QodDBOe/0moT 2KRrJvQI6jihHRtmR/KrhYTFJlE5Oj2BPwrDmIdCRvOoXhqUNJMTP2I1W mTbjzrggAw6U7R9ka2EJkk87VSeT1nKpzzsDi/eC5GWbkKkj5WksQMuBT w318efEXlZ0f7SwQaZgSzDg8qcfRrLd7IfUZaRkrH4YRLOaWwt7Sp2J0T zwE8skD4DaQ70E/yqpXiNvfKivaq+U068i5Mq//BrzwYm4747Rs2JErlJ w==; X-IronPort-AV: E=McAfee;i="6400,9594,10342"; a="329787551" X-IronPort-AV: E=Sophos;i="5.91,212,1647327600"; d="scan'208";a="329787551" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2022 16:00:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,212,1647327600"; d="scan'208";a="696794373" Received: from lkp-server01.sh.intel.com (HELO 5056e131ad90) ([10.239.97.150]) by orsmga004.jf.intel.com with ESMTP; 09 May 2022 16:00:00 -0700 Received: from kbuild by 5056e131ad90 with local (Exim 4.95) (envelope-from ) id 1noCMC-000Gz4-1D; Mon, 09 May 2022 23:00:00 +0000 Date: Tue, 10 May 2022 06:59:50 +0800 From: kernel test robot To: Likun Gao Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, Linux Memory Management List , Alex Deucher , Andrey Grodzovsky , Hawking Zhang Subject: [linux-next:master 9592/10218] drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:3467:29: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' Message-ID: <202205100612.ZAcTYE6P-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=l1oN6blY; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf20.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.31) smtp.mailfrom=lkp@intel.com X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: A311B1C00A2 X-Rspam-User: X-Stat-Signature: ji5nj9qpu4uxqhotibypyris347mmcwx X-HE-Tag: 1652137197-423163 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: ab38272e99730375c5db3db1c4cebf691a0550ab commit: 31aad22e2b3cfe89aef45015a9c7e4f7c0646daa [9592/10218] drm/amdgpu/psp: Add vbflash sysfs interface support config: mips-randconfig-r015-20220509 (https://download.01.org/0day-ci/archive/20220510/202205100612.ZAcTYE6P-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 3abb68a626160e019c30a4860e569d7bc75e486a) 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 # install mips cross compiling tool for clang build # apt-get install binutils-mips-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=31aad22e2b3cfe89aef45015a9c7e4f7c0646daa git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 31aad22e2b3cfe89aef45015a9c7e4f7c0646daa # 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=mips SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:3459:3: error: implicit declaration of function 'vfree' [-Werror,-Wimplicit-function-declaration] vfree(adev->psp.vbflash_tmp_buf); ^ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:3467:31: error: implicit declaration of function 'vmalloc' [-Werror,-Wimplicit-function-declaration] adev->psp.vbflash_tmp_buf = vmalloc(AMD_VBIOS_FILE_MAX_SIZE_B); ^ >> drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:3467:29: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion] adev->psp.vbflash_tmp_buf = vmalloc(AMD_VBIOS_FILE_MAX_SIZE_B); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:3514:2: error: implicit declaration of function 'vfree' [-Werror,-Wimplicit-function-declaration] vfree(adev->psp.vbflash_tmp_buf); ^ 1 warning and 3 errors generated. vim +3467 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