* [PATCH][next] gpu: host1x: remove redundant assignment to variable space
@ 2024-02-15 22:43 Colin Ian King
2024-02-16 10:52 ` Thierry Reding
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2024-02-15 22:43 UTC (permalink / raw)
To: Thierry Reding, Mikko Perttunen, David Airlie, Daniel Vetter,
dri-devel, linux-tegra
Cc: kernel-janitors, linux-kernel
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>
---
drivers/gpu/host1x/cdma.c | 3 +--
1 file changed, 1 insertion(+), 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,
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][next] gpu: host1x: remove redundant assignment to variable space
2024-02-15 22:43 [PATCH][next] gpu: host1x: remove redundant assignment to variable space Colin Ian King
@ 2024-02-16 10:52 ` Thierry Reding
0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2024-02-16 10:52 UTC (permalink / raw)
To: Colin Ian King, Mikko Perttunen, David Airlie, Daniel Vetter,
dri-devel, linux-tegra
Cc: kernel-janitors, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 653 bytes --]
On Thu Feb 15, 2024 at 11:43 PM CET, Colin Ian King wrote:
> 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>
> ---
> drivers/gpu/host1x/cdma.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Applied to drm-misc-next, thanks.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-16 10:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-15 22:43 [PATCH][next] gpu: host1x: remove redundant assignment to variable space Colin Ian King
2024-02-16 10:52 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®