* [PATCH] media: drivers: cx24113: remove redundant variable r
@ 2021-10-14 15:12 Colin King
2021-10-15 11:01 ` Kieran Bingham
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-10-14 15:12 UTC (permalink / raw)
To: Mauro Carvalho Chehab, linux-media; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable r is being assigned values but it is never being
used. The variable is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/media/dvb-frontends/cx24113.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/dvb-frontends/cx24113.c b/drivers/media/dvb-frontends/cx24113.c
index 60a9f70275f7..dd55d314bf9a 100644
--- a/drivers/media/dvb-frontends/cx24113.c
+++ b/drivers/media/dvb-frontends/cx24113.c
@@ -378,7 +378,7 @@ static void cx24113_set_nfr(struct cx24113_state *state, u16 n, s32 f, u8 r)
static int cx24113_set_frequency(struct cx24113_state *state, u32 frequency)
{
- u8 r = 1; /* or 2 */
+ u8 r;
u16 n = 6;
s32 f = 0;
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: drivers: cx24113: remove redundant variable r
2021-10-14 15:12 [PATCH] media: drivers: cx24113: remove redundant variable r Colin King
@ 2021-10-15 11:01 ` Kieran Bingham
0 siblings, 0 replies; 2+ messages in thread
From: Kieran Bingham @ 2021-10-15 11:01 UTC (permalink / raw)
To: Colin King, Mauro Carvalho Chehab, linux-media
Cc: kernel-janitors, linux-kernel
Quoting Colin King (2021-10-14 16:12:35)
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable r is being assigned values but it is never being
> used. The variable is redundant and can be removed.
>
Indeed, it gets re-assigned at line 385 as the first cx24113_readreg.
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/media/dvb-frontends/cx24113.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/dvb-frontends/cx24113.c b/drivers/media/dvb-frontends/cx24113.c
> index 60a9f70275f7..dd55d314bf9a 100644
> --- a/drivers/media/dvb-frontends/cx24113.c
> +++ b/drivers/media/dvb-frontends/cx24113.c
> @@ -378,7 +378,7 @@ static void cx24113_set_nfr(struct cx24113_state *state, u16 n, s32 f, u8 r)
>
> static int cx24113_set_frequency(struct cx24113_state *state, u32 frequency)
> {
> - u8 r = 1; /* or 2 */
> + u8 r;
> u16 n = 6;
> s32 f = 0;
>
> --
> 2.32.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-15 11:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14 15:12 [PATCH] media: drivers: cx24113: remove redundant variable r Colin King
2021-10-15 11:01 ` Kieran Bingham
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).