Skip to content

Commit cc69c93

Browse files
ColinIanKingquic-jhugo
authored andcommitted
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 <[email protected]> Reviewed-by: Pranjal Ramajor Asha Kanojiya <[email protected]> Reviewed-by: Jeffrey Hugo <[email protected]> Signed-off-by: Jeffrey Hugo <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 3a63ef6 commit cc69c93

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/accel/qaic/qaic_data.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,6 @@ static void update_profiling_data(struct drm_file *file_priv,
12921292
static int __qaic_execute_bo_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv,
12931293
bool is_partial)
12941294
{
1295-
struct qaic_partial_execute_entry *pexec;
12961295
struct qaic_execute *args = data;
12971296
struct qaic_execute_entry *exec;
12981297
struct dma_bridge_chan *dbc;
@@ -1312,15 +1311,14 @@ static int __qaic_execute_bo_ioctl(struct drm_device *dev, void *data, struct dr
13121311

13131312
received_ts = ktime_get_ns();
13141313

1315-
size = is_partial ? sizeof(*pexec) : sizeof(*exec);
1314+
size = is_partial ? sizeof(struct qaic_partial_execute_entry) : sizeof(*exec);
13161315
n = (unsigned long)size * args->hdr.count;
13171316
if (args->hdr.count == 0 || n / args->hdr.count != size)
13181317
return -EINVAL;
13191318

13201319
user_data = u64_to_user_ptr(args->data);
13211320

13221321
exec = kcalloc(args->hdr.count, size, GFP_KERNEL);
1323-
pexec = (struct qaic_partial_execute_entry *)exec;
13241322
if (!exec)
13251323
return -ENOMEM;
13261324

0 commit comments

Comments
 (0)