* [PATCH] fbdev: remove redundant initialization to variable identical
@ 2022-09-07 13:50 Colin Ian King
2022-09-25 11:12 ` Helge Deller
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-09-07 13:50 UTC (permalink / raw)
To: Bernie Thompson, Helge Deller, linux-fbdev, dri-devel
Cc: kernel-janitors, linux-kernel
The variable identical is being initialized with a value that is never
read. The variable is being re-assigned later on. The initialization is
redundant and can be removed.
Cleans up clang scan-build warning:
drivers/video/fbdev/udlfb.c:373:6: warning: Value stored to 'identical'
during its initialization is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/video/fbdev/udlfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c
index c863244ef12c..216d49c9d47e 100644
--- a/drivers/video/fbdev/udlfb.c
+++ b/drivers/video/fbdev/udlfb.c
@@ -370,7 +370,7 @@ static int dlfb_trim_hline(const u8 *bback, const u8 **bfront, int *width_bytes)
const unsigned long *back = (const unsigned long *) bback;
const unsigned long *front = (const unsigned long *) *bfront;
const int width = *width_bytes / sizeof(unsigned long);
- int identical = width;
+ int identical;
int start = width;
int end = width;
--
2.37.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fbdev: remove redundant initialization to variable identical
2022-09-07 13:50 [PATCH] fbdev: remove redundant initialization to variable identical Colin Ian King
@ 2022-09-25 11:12 ` Helge Deller
0 siblings, 0 replies; 2+ messages in thread
From: Helge Deller @ 2022-09-25 11:12 UTC (permalink / raw)
To: Colin Ian King, Bernie Thompson, linux-fbdev, dri-devel
Cc: kernel-janitors, linux-kernel
On 9/7/22 15:50, Colin Ian King wrote:
> The variable identical is being initialized with a value that is never
> read. The variable is being re-assigned later on. The initialization is
> redundant and can be removed.
>
> Cleans up clang scan-build warning:
> drivers/video/fbdev/udlfb.c:373:6: warning: Value stored to 'identical'
> during its initialization is never read [deadcode.DeadStores]
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
applied.
Thanks!
Helge
> ---
> drivers/video/fbdev/udlfb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c
> index c863244ef12c..216d49c9d47e 100644
> --- a/drivers/video/fbdev/udlfb.c
> +++ b/drivers/video/fbdev/udlfb.c
> @@ -370,7 +370,7 @@ static int dlfb_trim_hline(const u8 *bback, const u8 **bfront, int *width_bytes)
> const unsigned long *back = (const unsigned long *) bback;
> const unsigned long *front = (const unsigned long *) *bfront;
> const int width = *width_bytes / sizeof(unsigned long);
> - int identical = width;
> + int identical;
> int start = width;
> int end = width;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-25 11:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-07 13:50 [PATCH] fbdev: remove redundant initialization to variable identical Colin Ian King
2022-09-25 11:12 ` Helge Deller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).