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

gpu: host1x: remove redundant assignment to variable space

The variable space is being initialized with a value that is never read,
it is being re-assigned later on. The initialization is redundant and
can be removed. Also merge two declaration lines together.

Cleans up clang scan build warning:
drivers/gpu/host1x/cdma.c:628:15: warning: Value stored to 'space'
during its initialization is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240215224301.2073845-1-colin.i.king@gmail.com

authored by

Colin Ian King and committed by
Thierry Reding
b4003499 1a5e81de

+1 -2
+1 -2
drivers/gpu/host1x/cdma.c
··· 625 625 struct host1x_channel *channel = cdma_to_channel(cdma); 626 626 struct host1x *host1x = cdma_to_host1x(cdma); 627 627 struct push_buffer *pb = &cdma->push_buffer; 628 - unsigned int space = cdma->slots_free; 629 - unsigned int needed = 2, extra = 0; 628 + unsigned int space, needed = 2, extra = 0; 630 629 631 630 if (host1x_debug_trace_cmdbuf) 632 631 trace_host1x_cdma_push_wide(dev_name(channel->dev), op1, op2,