gpu: host1x: remove redundant assignment to variable space
PATCH 1/1 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]
--- drivers/gpu/host1x/cdma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/host1x/cdma.c +1 -2
@@ -625,8 +625,7 @@ void host1x_cdma_push_wide(struct host1x_cdma *cdma, u32 op1, u32 op2,struct host1x_channel *channel =cdma_to_channel (cdma);struct host1x *host1x =cdma_to_host1x (cdma);struct push_buffer *pb = &cdma->push_buffer; -unsigned int space = cdma->slots_free; -unsigned int needed =2 , extra =0 ; +unsigned int space, needed =2 , extra =0 ;if (host1x_debug_trace_cmdbuf) trace_host1x_cdma_push_wide(dev_name(channel->dev), op1, op2,
Signature · 1 line
2.39.2
Thierry Reding
AppliedQuoted 4 lines · Colin Ian King
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.
Quoted 8 lines
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 <[email protected]>--- drivers/gpu/host1x/cdma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Applied to drm-misc-next, thanks.
Thierry