Messages in this thread | | | Date | Wed, 4 Aug 2021 13:24:40 +0800 | From | kernel test robot <> | Subject | [agd5f:amd-staging-drm-next 417/435] drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:399:5: warning: no previous prototype for function 'amdgpu_vkms_output_init' |
| |
tree: https://gitlab.freedesktop.org/agd5f/linux.git amd-staging-drm-next head: 2f56b0d631eba0e76cfc789d85cc5632256ad42d commit: 16dcf291698ca37e89c481ae622cd5dc50afa6f4 [417/435] drm/amdgpu: replace dce_virtual with amdgpu_vkms (v3) config: s390-randconfig-r011-20210803 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 4f71f59bf3d9914188a11d0c41bedbb339d36ff5) 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 s390 cross compiling tool for clang build # apt-get install binutils-s390x-linux-gnu git remote add agd5f https://gitlab.freedesktop.org/agd5f/linux.git git fetch --no-tags agd5f amd-staging-drm-next git checkout 16dcf291698ca37e89c481ae622cd5dc50afa6f4 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:3: In file included from include/drm/drm_atomic_helper.h:31: In file included from include/drm/drm_crtc.h:31: In file included from include/linux/fb.h:17: In file included from arch/s390/include/asm/io.h:75: include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __raw_readb(PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x)) ^ include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16' #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x)) ^ In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:3: In file included from include/drm/drm_atomic_helper.h:31: In file included from include/drm/drm_crtc.h:31: In file included from include/linux/fb.h:17: In file included from arch/s390/include/asm/io.h:75: include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) ^ include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32' #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x)) ^ In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:3: In file included from include/drm/drm_atomic_helper.h:31: In file included from include/drm/drm_crtc.h:31: In file included from include/linux/fb.h:17: In file included from arch/s390/include/asm/io.h:75: include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ >> drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:399:5: warning: no previous prototype for function 'amdgpu_vkms_output_init' [-Wmissing-prototypes] int amdgpu_vkms_output_init(struct drm_device *dev, ^ drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:399:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int amdgpu_vkms_output_init(struct drm_device *dev, ^ static 13 warnings generated.
vim +/amdgpu_vkms_output_init +399 drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
ba5317109d0ce7 Ryan Taylor 2021-06-07 398 ba5317109d0ce7 Ryan Taylor 2021-06-07 @399 int amdgpu_vkms_output_init(struct drm_device *dev, ba5317109d0ce7 Ryan Taylor 2021-06-07 400 struct amdgpu_vkms_output *output, int index) ba5317109d0ce7 Ryan Taylor 2021-06-07 401 { ba5317109d0ce7 Ryan Taylor 2021-06-07 402 struct drm_connector *connector = &output->connector; ba5317109d0ce7 Ryan Taylor 2021-06-07 403 struct drm_encoder *encoder = &output->encoder; ba5317109d0ce7 Ryan Taylor 2021-06-07 404 struct drm_crtc *crtc = &output->crtc; ba5317109d0ce7 Ryan Taylor 2021-06-07 405 struct drm_plane *primary, *cursor = NULL; ba5317109d0ce7 Ryan Taylor 2021-06-07 406 int ret; ba5317109d0ce7 Ryan Taylor 2021-06-07 407 ba5317109d0ce7 Ryan Taylor 2021-06-07 408 primary = amdgpu_vkms_plane_init(dev, DRM_PLANE_TYPE_PRIMARY, index); ba5317109d0ce7 Ryan Taylor 2021-06-07 409 if (IS_ERR(primary)) ba5317109d0ce7 Ryan Taylor 2021-06-07 410 return PTR_ERR(primary); ba5317109d0ce7 Ryan Taylor 2021-06-07 411 ba5317109d0ce7 Ryan Taylor 2021-06-07 412 ret = amdgpu_vkms_crtc_init(dev, crtc, primary, cursor); ba5317109d0ce7 Ryan Taylor 2021-06-07 413 if (ret) ba5317109d0ce7 Ryan Taylor 2021-06-07 414 goto err_crtc; ba5317109d0ce7 Ryan Taylor 2021-06-07 415 ba5317109d0ce7 Ryan Taylor 2021-06-07 416 ret = drm_connector_init(dev, connector, &amdgpu_vkms_connector_funcs, ba5317109d0ce7 Ryan Taylor 2021-06-07 417 DRM_MODE_CONNECTOR_VIRTUAL); ba5317109d0ce7 Ryan Taylor 2021-06-07 418 if (ret) { ba5317109d0ce7 Ryan Taylor 2021-06-07 419 DRM_ERROR("Failed to init connector\n"); ba5317109d0ce7 Ryan Taylor 2021-06-07 420 goto err_connector; ba5317109d0ce7 Ryan Taylor 2021-06-07 421 } ba5317109d0ce7 Ryan Taylor 2021-06-07 422 ba5317109d0ce7 Ryan Taylor 2021-06-07 423 drm_connector_helper_add(connector, &amdgpu_vkms_conn_helper_funcs); ba5317109d0ce7 Ryan Taylor 2021-06-07 424 ba5317109d0ce7 Ryan Taylor 2021-06-07 425 ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_VIRTUAL); ba5317109d0ce7 Ryan Taylor 2021-06-07 426 if (ret) { ba5317109d0ce7 Ryan Taylor 2021-06-07 427 DRM_ERROR("Failed to init encoder\n"); ba5317109d0ce7 Ryan Taylor 2021-06-07 428 goto err_encoder; ba5317109d0ce7 Ryan Taylor 2021-06-07 429 } ba5317109d0ce7 Ryan Taylor 2021-06-07 430 encoder->possible_crtcs = 1 << index; ba5317109d0ce7 Ryan Taylor 2021-06-07 431 ba5317109d0ce7 Ryan Taylor 2021-06-07 432 ret = drm_connector_attach_encoder(connector, encoder); ba5317109d0ce7 Ryan Taylor 2021-06-07 433 if (ret) { ba5317109d0ce7 Ryan Taylor 2021-06-07 434 DRM_ERROR("Failed to attach connector to encoder\n"); ba5317109d0ce7 Ryan Taylor 2021-06-07 435 goto err_attach; ba5317109d0ce7 Ryan Taylor 2021-06-07 436 } ba5317109d0ce7 Ryan Taylor 2021-06-07 437 ba5317109d0ce7 Ryan Taylor 2021-06-07 438 drm_mode_config_reset(dev); ba5317109d0ce7 Ryan Taylor 2021-06-07 439 ba5317109d0ce7 Ryan Taylor 2021-06-07 440 return 0; ba5317109d0ce7 Ryan Taylor 2021-06-07 441 ba5317109d0ce7 Ryan Taylor 2021-06-07 442 err_attach: ba5317109d0ce7 Ryan Taylor 2021-06-07 443 drm_encoder_cleanup(encoder); ba5317109d0ce7 Ryan Taylor 2021-06-07 444 ba5317109d0ce7 Ryan Taylor 2021-06-07 445 err_encoder: ba5317109d0ce7 Ryan Taylor 2021-06-07 446 drm_connector_cleanup(connector); ba5317109d0ce7 Ryan Taylor 2021-06-07 447 ba5317109d0ce7 Ryan Taylor 2021-06-07 448 err_connector: ba5317109d0ce7 Ryan Taylor 2021-06-07 449 drm_crtc_cleanup(crtc); ba5317109d0ce7 Ryan Taylor 2021-06-07 450 ba5317109d0ce7 Ryan Taylor 2021-06-07 451 err_crtc: ba5317109d0ce7 Ryan Taylor 2021-06-07 452 drm_plane_cleanup(primary); ba5317109d0ce7 Ryan Taylor 2021-06-07 453 ba5317109d0ce7 Ryan Taylor 2021-06-07 454 return ret; ba5317109d0ce7 Ryan Taylor 2021-06-07 455 } 16dcf291698ca3 Ryan Taylor 2021-06-18 456
:::::: The code at line 399 was first introduced by commit :::::: ba5317109d0ce7809831abfcea9b8157464b263f drm/amdgpu: create amdgpu_vkms (v4)
:::::: TO: Ryan Taylor <Ryan.Taylor@amd.com> :::::: CC: Ryan Taylor <Ryan.Taylor@amd.com>
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |