* [chrome-os:chromeos-5.15 22/24] drivers/gpu/drm/img-rogue/1.17/devicemem_server.c:783:26: warning: variable 'sLastReserveAddr' set but not used
@ 2023-10-14 23:39 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-10-14 23:39 UTC (permalink / raw)
To: cros-kernel-buildreports, Guenter Roeck; +Cc: oe-kbuild-all
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.15
head: e495935040e9178d313071a88dc9e7116aa0761a
commit: 0fc1ca18e2bf3022db1e16cebcccfafd84750c70 [22/24] CHROMIUM: img-rogue/1.17: improve validation in VA mapping calls
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20231015/202310150734.Aw5tYBPo-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231015/202310150734.Aw5tYBPo-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310150734.Aw5tYBPo-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/gpu/drm/img-rogue/1.17/devicemem_server.c: In function 'ReserveRangeParamValidation':
>> drivers/gpu/drm/img-rogue/1.17/devicemem_server.c:783:26: warning: variable 'sLastReserveAddr' set but not used [-Wunused-but-set-variable]
783 | IMG_DEV_VIRTADDR sLastReserveAddr;
| ^~~~~~~~~~~~~~~~
vim +/sLastReserveAddr +783 drivers/gpu/drm/img-rogue/1.17/devicemem_server.c
778
779 static INLINE PVRSRV_ERROR ReserveRangeParamValidation(DEVMEMINT_HEAP *psDevmemHeap,
780 IMG_DEV_VIRTADDR sAllocationDevVAddr,
781 IMG_DEVMEM_SIZE_T uiAllocationSize)
782 {
> 783 IMG_DEV_VIRTADDR sLastReserveAddr;
784 IMG_UINT64 ui64InvalidSizeMask = (1 << psDevmemHeap->uiLog2PageSize) - 1;
785
786 PVR_LOG_RETURN_IF_INVALID_PARAM(psDevmemHeap != NULL, "psDevmemHeap");
787
788 sLastReserveAddr.uiAddr = sAllocationDevVAddr.uiAddr + uiAllocationSize - 1;
789
790 /* Check that the requested address is not less than the base address of the heap. */
791 if (sAllocationDevVAddr.uiAddr < psDevmemHeap->sBaseAddr.uiAddr)
792 {
793 PVR_LOG_VA(PVR_DBG_ERROR,
794 "sAllocationDevVAddr ("IMG_DEV_VIRTADDR_FMTSPEC") is invalid! "
795 "Must be greater or equal to "IMG_DEV_VIRTADDR_FMTSPEC,
796 sAllocationDevVAddr.uiAddr,
797 psDevmemHeap->sBaseAddr.uiAddr);
798 return PVRSRV_ERROR_INVALID_PARAMS;
799 }
800
801 /* Check the allocation size is valid (must be page granular). */
802 if ((uiAllocationSize & ui64InvalidSizeMask) != 0 || uiAllocationSize == 0)
803 {
804 PVR_LOG_VA(PVR_DBG_ERROR,
805 "uiAllocationSize ("IMG_DEVMEM_SIZE_FMTSPEC") is invalid! Must a multiple of %u and greater than 0",
806 uiAllocationSize,
807 1 << psDevmemHeap->uiLog2PageSize);
808 return PVRSRV_ERROR_INVALID_PARAMS;
809 }
810
811 return PVRSRV_OK;
812 }
813
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-14 23:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-14 23:39 [chrome-os:chromeos-5.15 22/24] drivers/gpu/drm/img-rogue/1.17/devicemem_server.c:783:26: warning: variable 'sLastReserveAddr' set but not used kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.