All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: accel/qaic: Centralize execution info
Date: Mon, 5 Oct 2026 20:25:28 +0200	[thread overview]
Message-ID: <202610052021.MNXYUj0M-lkp@intel.com> (raw)
In-Reply-To: <202610052021.MNXYUj0M-lkp@intel.com>

Hi Carl,

kernel test robot noticed the following build warnings:



url:    https://github.com/intel-lab-lkp/linux/commits/Carl-Vanderlip/accel-qaic-Centralize-execution-info/20261002-193813
base:   
patch link:    https://lore.kernel.org/r/202610052021.MNXYUj0M-lkp%40intel.com
config: parisc-randconfig-r2300-20261005 (https://download.01.org/0day-ci/archive/20261005/202610052021.MNXYUj0M-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 8.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261005/202610052021.MNXYUj0M-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/202610052021.MNXYUj0M-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/accel/qaic/qaic_data.c: In function 'send_bo_list_to_device':
>> drivers/accel/qaic/qaic_data.c:1274:6: warning: variable 'handle' set but not used [-Wunused-but-set-variable]
     u32 handle;
         ^~~~~~


vim +/handle +1274 drivers/accel/qaic/qaic_data.c

  1264	
  1265	static int send_bo_list_to_device(struct qaic_device *qdev, struct drm_file *file_priv,
  1266					  struct execute_info *exec, struct dma_bridge_chan *dbc,
  1267					  u32 head, u32 *tail)
  1268	{
  1269		struct ww_acquire_ctx acquire_ctx;
  1270		struct bo_slice *slice;
  1271		unsigned long flags;
  1272		struct qaic_bo *bo;
  1273		u64 resize;
> 1274		u32 handle;
  1275		int i, j;
  1276		int ret;
  1277	
  1278		ret = drm_gem_lock_reservations((struct drm_gem_object **)exec->bo_arr,
  1279						exec->count, &acquire_ctx);
  1280		if (ret)
  1281			return ret;
  1282	
  1283		for (i = 0; i < exec->count; i++) {
  1284			resize = exec->is_partial ? exec->resize_arr[i] : 0;
  1285			bo = exec->bo_arr[i];
  1286			handle = exec->handle_arr[i];
  1287			ret = mutex_lock_interruptible(&bo->lock);
  1288			if (ret)
  1289				goto failed_to_send_bo;
  1290	
  1291			/*
  1292			 * Take reference to object before sending to device,
  1293			 * released when transfer is complete (in dbc_irq_threaded_fn()).
  1294			 */
  1295			drm_gem_object_get(&bo->base);
  1296	
  1297			if (!bo->sliced) {
  1298				ret = -EINVAL;
  1299				goto unlock_bo;
  1300			}
  1301	
  1302			if (exec->is_partial && resize > bo->base.size) {
  1303				ret = -EINVAL;
  1304				goto unlock_bo;
  1305			}
  1306	
  1307			spin_lock_irqsave(&dbc->xfer_lock, flags);
  1308			if (bo_queued(bo)) {
  1309				spin_unlock_irqrestore(&dbc->xfer_lock, flags);
  1310				ret = -EINVAL;
  1311				goto unlock_bo;
  1312			}
  1313	
  1314			bo->req_id = dbc->next_req_id++;
  1315	
  1316			list_for_each_entry(slice, &bo->slices, slice) {
  1317				for (j = 0; j < slice->nents; j++)
  1318					slice->reqs[j].req_id = cpu_to_le16(bo->req_id);
  1319	
  1320				if (exec->is_partial && (!resize || resize <= slice->offset))
  1321					/* Configure the slice for no DMA transfer */
  1322					ret = copy_partial_exec_reqs(qdev, slice, 0, dbc, head, tail);
  1323				else if (exec->is_partial && resize < slice->offset + slice->size)
  1324					/* Configure the slice to be partially DMA transferred */
  1325					ret = copy_partial_exec_reqs(qdev, slice,
  1326								     resize - slice->offset, dbc,
  1327								     head, tail);
  1328				else
  1329					ret = copy_exec_reqs(qdev, slice, dbc->id, head, tail);
  1330				if (ret) {
  1331					spin_unlock_irqrestore(&dbc->xfer_lock, flags);
  1332					goto unlock_bo;
  1333				}
  1334			}
  1335			reinit_completion(&bo->xfer_done);
  1336			list_add_tail(&bo->xfer_list, &dbc->xfer_list);
  1337			spin_unlock_irqrestore(&dbc->xfer_lock, flags);
  1338			dma_sync_sgtable_for_device(&qdev->pdev->dev, bo->sgt, bo->dir);
  1339			mutex_unlock(&bo->lock);
  1340		}
  1341	
  1342		goto unlock_resv;
  1343	
  1344	unlock_bo:
  1345		drm_gem_object_put(&bo->base);
  1346		mutex_unlock(&bo->lock);
  1347	failed_to_send_bo:
  1348		for (j = 0; j < i; j++) {
  1349			drm_gem_object_put(&exec->bo_arr[j]->base);
  1350			spin_lock_irqsave(&dbc->xfer_lock, flags);
  1351			bo = list_last_entry(&dbc->xfer_list, struct qaic_bo, xfer_list);
  1352			list_del_init(&bo->xfer_list);
  1353			spin_unlock_irqrestore(&dbc->xfer_lock, flags);
  1354			dma_sync_sgtable_for_cpu(&qdev->pdev->dev, bo->sgt, bo->dir);
  1355		}
  1356	unlock_resv:
  1357		drm_gem_unlock_reservations((struct drm_gem_object **)exec->bo_arr,
  1358					    exec->count, &acquire_ctx);
  1359		return ret;
  1360	}
  1361	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

           reply	other threads:[~2026-10-05 18:25 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <202610052021.MNXYUj0M-lkp@intel.com>]

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=202610052021.MNXYUj0M-lkp@intel.com \
    --to=lkp@intel.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.