[linux-next:master 2885/4500] drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:929:24: warning: unused variable 'adev'
From: kernel test robot <hidden>
Date: 2021-01-18 11:14:39
Also in:
oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 93bf8b946e5f9a0b0c68155597b53fd8ccce2827 commit: 8f66090b7bb7f2a2183f46e72e367922d836e0dd [2885/4500] drm/amdgpu: Remove references to struct drm_device.pdev config: mips-randconfig-r016-20210118 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 95d146182fdf2315e74943b93fb3bb0cbafc5d89) 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=8f66090b7bb7f2a2183f46e72e367922d836e0dd 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 8f66090b7bb7f2a2183f46e72e367922d836e0dd # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <redacted> All warnings (new ones prefixed by >>):
quoted
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:929:24: warning: unused variable 'adev'
struct amdgpu_device = drm_to_adev(dev);
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set mips64r2
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/atomic.h", .line = 154, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $1, $2 # atomic_fetch_sub
subu $0, $1, $3
sc $0, $2
beqz $0, 1b
.set pop
move $0, $1
'
clang-12: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 12.0.0 (git://gitmirror/llvm_project 95d146182fdf2315e74943b93fb3bb0cbafc5d89)
Target: mips-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/cross/clang-95d146182f/bin
clang-12: note: diagnostic msg:
Makefile arch drivers include kernel scripts source usr
vim +/adev +929 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
923
924 struct drm_framebuffer *
925 amdgpu_display_user_framebuffer_create(struct drm_device *dev,
926 struct drm_file *file_priv,
927 const struct drm_mode_fb_cmd2 *mode_cmd)
928 {
> 929 struct amdgpu_device *adev = drm_to_adev(dev);
930 struct drm_gem_object *obj;
931 struct amdgpu_framebuffer *amdgpu_fb;
932 int ret;
933
934 obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[0]);
935 if (obj == NULL) {
936 drm_dbg_kms(dev, "No GEM object associated to handle 0x%08X, "
937 "can't create framebuffer\n", mode_cmd->handles[0]);
938 return ERR_PTR(-ENOENT);
939 }
940
941 /* Handle is imported dma-buf, so cannot be migrated to VRAM for scanout */
942 if (obj->import_attach) {
943 drm_dbg_kms(dev, "Cannot create framebuffer from imported dma_buf\n");
944 return ERR_PTR(-EINVAL);
945 }
946
947 amdgpu_fb = kzalloc(sizeof(*amdgpu_fb), GFP_KERNEL);
948 if (amdgpu_fb == NULL) {
949 drm_gem_object_put(obj);
950 return ERR_PTR(-ENOMEM);
951 }
952
953 ret = amdgpu_display_framebuffer_init(dev, amdgpu_fb, mode_cmd, obj);
954 if (ret) {
955 kfree(amdgpu_fb);
956 drm_gem_object_put(obj);
957 return ERR_PTR(ret);
958 }
959
960 return &amdgpu_fb->base;
961 }
962
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Attachments
- .config.gz [application/gzip] 46804 bytes