All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com,
	Guenter Roeck <groeck@google.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [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
Date: Sun, 15 Oct 2023 07:39:31 +0800	[thread overview]
Message-ID: <202310150734.Aw5tYBPo-lkp@intel.com> (raw)

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

                 reply	other threads:[~2023-10-14 23:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202310150734.Aw5tYBPo-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cros-kernel-buildreports@googlegroups.com \
    --cc=groeck@google.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.