lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202006180152.gHGU9Nyr%lkp@intel.com>
Date:   Thu, 18 Jun 2020 01:56:55 +0800
From:   kernel test robot <lkp@...el.com>
To:     Leo Liu <leo.liu@....com>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        linux-kernel@...r.kernel.org,
        Alex Deucher <alexander.deucher@....com>
Subject: drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:451:5: warning: no previous
 prototype for function 'jpeg_v1_0_early_init'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   69119673bd50b176ded34032fadd41530fb5af21
commit: bb0db70f3f75e0d994a627f22c3ff2d8ec6191c4 drm/amdgpu: separate JPEG1.0 code out from VCN1.0
date:   7 months ago
config: s390-randconfig-r004-20200617 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
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-s390-linux-gnu
        git checkout bb0db70f3f75e0d994a627f22c3ff2d8ec6191c4
        # 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@...el.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mode.h:33:
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:76:
include/asm-generic/io.h:492:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__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:118:21: note: expanded from macro '__swab32'
___constant_swab32(x) :                                               ^
include/uapi/linux/swab.h:19:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) <<  8) |                                 ^
In file included from drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:24:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:57:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mode.h:33:
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:76:
include/asm-generic/io.h:492:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__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:118:21: note: expanded from macro '__swab32'
___constant_swab32(x) :                                               ^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >>  8) |                                 ^
In file included from drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:24:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:57:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mode.h:33:
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:76:
include/asm-generic/io.h:492:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__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:118:21: note: expanded from macro '__swab32'
___constant_swab32(x) :                                               ^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:24:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:57:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mode.h:33:
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:76:
include/asm-generic/io.h:492:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__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:119:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:24:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:57:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mode.h:33:
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:76:
include/asm-generic/io.h:503: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:513:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew(cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:523:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel(cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:585: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:593: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:601: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:610: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:619: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:628: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/jpeg_v1_0.c:451:5: warning: no previous prototype for function 'jpeg_v1_0_early_init' [-Wmissing-prototypes]
int jpeg_v1_0_early_init(void *handle)
^
drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:451:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int jpeg_v1_0_early_init(void *handle)
^
static
>> drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:469:5: warning: no previous prototype for function 'jpeg_v1_0_sw_init' [-Wmissing-prototypes]
int jpeg_v1_0_sw_init(void *handle)
^
drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:469:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int jpeg_v1_0_sw_init(void *handle)
^
static
>> drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:499:6: warning: no previous prototype for function 'jpeg_v1_0_sw_fini' [-Wmissing-prototypes]
void jpeg_v1_0_sw_fini(void *handle)
^
drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:499:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void jpeg_v1_0_sw_fini(void *handle)
^
static
>> drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:513:6: warning: no previous prototype for function 'jpeg_v1_0_start' [-Wmissing-prototypes]
void jpeg_v1_0_start(struct amdgpu_device *adev, int mode)
^
drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c:513:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void jpeg_v1_0_start(struct amdgpu_device *adev, int mode)
^
static
24 warnings generated.

vim +/jpeg_v1_0_early_init +451 drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c

   443	
   444	/**
   445	 * jpeg_v1_0_early_init - set function pointers
   446	 *
   447	 * @handle: amdgpu_device pointer
   448	 *
   449	 * Set ring and irq function pointers
   450	 */
 > 451	int jpeg_v1_0_early_init(void *handle)
   452	{
   453		struct amdgpu_device *adev = (struct amdgpu_device *)handle;
   454	
   455		adev->jpeg.num_jpeg_inst = 1;
   456	
   457		jpeg_v1_0_set_dec_ring_funcs(adev);
   458		jpeg_v1_0_set_irq_funcs(adev);
   459	
   460		return 0;
   461	}
   462	
   463	/**
   464	 * jpeg_v1_0_sw_init - sw init for JPEG block
   465	 *
   466	 * @handle: amdgpu_device pointer
   467	 *
   468	 */
 > 469	int jpeg_v1_0_sw_init(void *handle)
   470	{
   471		struct amdgpu_device *adev = (struct amdgpu_device *)handle;
   472		struct amdgpu_ring *ring;
   473		int r;
   474	
   475		/* JPEG TRAP */
   476		r = amdgpu_irq_add_id(adev, SOC15_IH_CLIENTID_VCN, 126, &adev->jpeg.inst->irq);
   477		if (r)
   478			return r;
   479	
   480		ring = &adev->jpeg.inst->ring_dec;
   481		sprintf(ring->name, "jpeg_dec");
   482		r = amdgpu_ring_init(adev, ring, 512, &adev->jpeg.inst->irq, 0);
   483		if (r)
   484			return r;
   485	
   486		adev->jpeg.internal.jpeg_pitch = adev->jpeg.inst->external.jpeg_pitch =
   487			SOC15_REG_OFFSET(JPEG, 0, mmUVD_JPEG_PITCH);
   488	
   489		return 0;
   490	}
   491	
   492	/**
   493	 * jpeg_v1_0_sw_fini - sw fini for JPEG block
   494	 *
   495	 * @handle: amdgpu_device pointer
   496	 *
   497	 * JPEG free up sw allocation
   498	 */
 > 499	void jpeg_v1_0_sw_fini(void *handle)
   500	{
   501		struct amdgpu_device *adev = (struct amdgpu_device *)handle;
   502	
   503		amdgpu_ring_fini(&adev->jpeg.inst[0].ring_dec);
   504	}
   505	
   506	/**
   507	 * jpeg_v1_0_start - start JPEG block
   508	 *
   509	 * @adev: amdgpu_device pointer
   510	 *
   511	 * Setup and start the JPEG block
   512	 */
 > 513	void jpeg_v1_0_start(struct amdgpu_device *adev, int mode)
   514	{
   515		struct amdgpu_ring *ring = &adev->jpeg.inst->ring_dec;
   516	
   517		if (mode == 0) {
   518			WREG32_SOC15(JPEG, 0, mmUVD_LMI_JRBC_RB_VMID, 0);
   519			WREG32_SOC15(JPEG, 0, mmUVD_JRBC_RB_CNTL, UVD_JRBC_RB_CNTL__RB_NO_FETCH_MASK |
   520					UVD_JRBC_RB_CNTL__RB_RPTR_WR_EN_MASK);
   521			WREG32_SOC15(JPEG, 0, mmUVD_LMI_JRBC_RB_64BIT_BAR_LOW, lower_32_bits(ring->gpu_addr));
   522			WREG32_SOC15(JPEG, 0, mmUVD_LMI_JRBC_RB_64BIT_BAR_HIGH, upper_32_bits(ring->gpu_addr));
   523			WREG32_SOC15(JPEG, 0, mmUVD_JRBC_RB_RPTR, 0);
   524			WREG32_SOC15(JPEG, 0, mmUVD_JRBC_RB_WPTR, 0);
   525		}	WREG32_SOC15(JPEG, 0, mmUVD_JRBC_RB_CNTL, UVD_JRBC_RB_CNTL__RB_RPTR_WR_EN_MASK);
   526	
   527		/* initialize wptr */
   528		ring->wptr = RREG32_SOC15(JPEG, 0, mmUVD_JRBC_RB_WPTR);
   529	
   530		/* copy patch commands to the jpeg ring */
   531		jpeg_v1_0_decode_ring_set_patch_ring(ring,
   532			(ring->wptr + ring->max_dw * amdgpu_sched_hw_submission));
   533	}
   534	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (25591 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ