* [PATCH] staging: speakup: remove redundant initialization of pointer p_key
@ 2020-02-23 15:39 Colin King
2020-02-23 15:58 ` Samuel Thibault
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2020-02-23 15:39 UTC (permalink / raw)
To: William Hubbs, Chris Brannon, Kirk Reiser, Samuel Thibault,
Greg Kroah-Hartman, speakup, devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Pointer p_key is being initialized with a value that is never read,
it is assigned a new value later on. The initialization is redundant
and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/staging/speakup/keyhelp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/speakup/keyhelp.c b/drivers/staging/speakup/keyhelp.c
index 5f1bda37f86d..822ceac83068 100644
--- a/drivers/staging/speakup/keyhelp.c
+++ b/drivers/staging/speakup/keyhelp.c
@@ -49,7 +49,7 @@ static int cur_item, nstates;
static void build_key_data(void)
{
u_char *kp, counters[MAXFUNCS], ch, ch1;
- u_short *p_key = key_data, key;
+ u_short *p_key, key;
int i, offset = 1;
nstates = (int)(state_tbl[-1]);
--
2.25.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: speakup: remove redundant initialization of pointer p_key
2020-02-23 15:39 [PATCH] staging: speakup: remove redundant initialization of pointer p_key Colin King
@ 2020-02-23 15:58 ` Samuel Thibault
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Thibault @ 2020-02-23 15:58 UTC (permalink / raw)
To: Colin King
Cc: William Hubbs, Chris Brannon, Kirk Reiser, Greg Kroah-Hartman,
speakup, devel, kernel-janitors, linux-kernel
Colin King, le dim. 23 févr. 2020 15:39:54 +0000, a ecrit:
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointer p_key is being initialized with a value that is never read,
> it is assigned a new value later on. The initialization is redundant
> and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Indeed, thanks!
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> ---
> drivers/staging/speakup/keyhelp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/speakup/keyhelp.c b/drivers/staging/speakup/keyhelp.c
> index 5f1bda37f86d..822ceac83068 100644
> --- a/drivers/staging/speakup/keyhelp.c
> +++ b/drivers/staging/speakup/keyhelp.c
> @@ -49,7 +49,7 @@ static int cur_item, nstates;
> static void build_key_data(void)
> {
> u_char *kp, counters[MAXFUNCS], ch, ch1;
> - u_short *p_key = key_data, key;
> + u_short *p_key, key;
> int i, offset = 1;
>
> nstates = (int)(state_tbl[-1]);
> --
> 2.25.0
>
--
Samuel
j'etais en train de nettoyer ma souris et le coup est parti...
-+- s sur #ens-mim - et en plus c vrai... -+-
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-23 16:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-23 15:39 [PATCH] staging: speakup: remove redundant initialization of pointer p_key Colin King
2020-02-23 15:58 ` Samuel Thibault
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).