Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

accel/qaic: remove redundant pointer pexec

Pointer pexec is being assigned a value however it is never read. The
assignment is redundant and can be removed. Replace sizeof(*pexec)
with sizeof the type and remove the declaration of pointer pexec.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230726140626.264952-1-colin.i.king@gmail.com

authored by

Colin Ian King and committed by
Jeffrey Hugo
cc69c93b 3a63ef6e

+1 -3
+1 -3
drivers/accel/qaic/qaic_data.c
··· 1292 1292 static int __qaic_execute_bo_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv, 1293 1293 bool is_partial) 1294 1294 { 1295 - struct qaic_partial_execute_entry *pexec; 1296 1295 struct qaic_execute *args = data; 1297 1296 struct qaic_execute_entry *exec; 1298 1297 struct dma_bridge_chan *dbc; ··· 1311 1312 1312 1313 received_ts = ktime_get_ns(); 1313 1314 1314 - size = is_partial ? sizeof(*pexec) : sizeof(*exec); 1315 + size = is_partial ? sizeof(struct qaic_partial_execute_entry) : sizeof(*exec); 1315 1316 n = (unsigned long)size * args->hdr.count; 1316 1317 if (args->hdr.count == 0 || n / args->hdr.count != size) 1317 1318 return -EINVAL; ··· 1319 1320 user_data = u64_to_user_ptr(args->data); 1320 1321 1321 1322 exec = kcalloc(args->hdr.count, size, GFP_KERNEL); 1322 - pexec = (struct qaic_partial_execute_entry *)exec; 1323 1323 if (!exec) 1324 1324 return -ENOMEM; 1325 1325