diff options
author | Colin Ian King <colin.i.king@gmail.com> | 2024-02-16 01:43:01 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2024-02-16 13:51:46 +0300 |
commit | b40034994f60082898586f906a31a9eab7fcd814 (patch) | |
tree | 512465b9abf8ac229c272a00e27aff75777ea801 /drivers/gpu/host1x | |
parent | 1a5e81de180e51d3c6fa9ba118abda9b88473c00 (diff) | |
download | linux-b40034994f60082898586f906a31a9eab7fcd814.tar.xz |
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
Diffstat (limited to 'drivers/gpu/host1x')
-rw-r--r-- | drivers/gpu/host1x/cdma.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/host1x/cdma.c b/drivers/gpu/host1x/cdma.c index d1336e438f4f..407ed9b9cf64 100644 --- a/drivers/gpu/host1x/cdma.c +++ b/drivers/gpu/host1x/cdma.c @@ -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, |