* [PATCH] media: dvb-frontends/stv0367: remove redundant variable ADCClk_Hz
@ 2021-10-14 15:32 Colin King
2021-10-15 11:07 ` Kieran Bingham
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-10-14 15:32 UTC (permalink / raw)
To: Mauro Carvalho Chehab, linux-media; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable ADCClk_Hz is being initialised with a variable that is never read
and then re-assigned immediately afterwards. Clean up the code by removing
it and just returning the return value from the call to stv0367cab_get_mclk
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/media/dvb-frontends/stv0367.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/media/dvb-frontends/stv0367.c b/drivers/media/dvb-frontends/stv0367.c
index 6c2b05fae1c5..95e376f23506 100644
--- a/drivers/media/dvb-frontends/stv0367.c
+++ b/drivers/media/dvb-frontends/stv0367.c
@@ -1797,11 +1797,7 @@ static u32 stv0367cab_get_mclk(struct dvb_frontend *fe, u32 ExtClk_Hz)
static u32 stv0367cab_get_adc_freq(struct dvb_frontend *fe, u32 ExtClk_Hz)
{
- u32 ADCClk_Hz = ExtClk_Hz;
-
- ADCClk_Hz = stv0367cab_get_mclk(fe, ExtClk_Hz);
-
- return ADCClk_Hz;
+ return stv0367cab_get_mclk(fe, ExtClk_Hz);
}
static enum stv0367cab_mod stv0367cab_SetQamSize(struct stv0367_state *state,
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: dvb-frontends/stv0367: remove redundant variable ADCClk_Hz
2021-10-14 15:32 [PATCH] media: dvb-frontends/stv0367: remove redundant variable ADCClk_Hz Colin King
@ 2021-10-15 11:07 ` Kieran Bingham
0 siblings, 0 replies; 2+ messages in thread
From: Kieran Bingham @ 2021-10-15 11:07 UTC (permalink / raw)
To: Colin King, Mauro Carvalho Chehab, linux-media
Cc: kernel-janitors, linux-kernel
Quoting Colin King (2021-10-14 16:32:53)
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable ADCClk_Hz is being initialised with a variable that is never read
> and then re-assigned immediately afterwards. Clean up the code by removing
> it and just returning the return value from the call to stv0367cab_get_mclk
>
Indeed LGTM.
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/stv0367.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/media/dvb-frontends/stv0367.c b/drivers/media/dvb-frontends/stv0367.c
> index 6c2b05fae1c5..95e376f23506 100644
> --- a/drivers/media/dvb-frontends/stv0367.c
> +++ b/drivers/media/dvb-frontends/stv0367.c
> @@ -1797,11 +1797,7 @@ static u32 stv0367cab_get_mclk(struct dvb_frontend *fe, u32 ExtClk_Hz)
>
> static u32 stv0367cab_get_adc_freq(struct dvb_frontend *fe, u32 ExtClk_Hz)
> {
> - u32 ADCClk_Hz = ExtClk_Hz;
> -
> - ADCClk_Hz = stv0367cab_get_mclk(fe, ExtClk_Hz);
> -
> - return ADCClk_Hz;
> + return stv0367cab_get_mclk(fe, ExtClk_Hz);
> }
>
> static enum stv0367cab_mod stv0367cab_SetQamSize(struct stv0367_state *state,
> --
> 2.32.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-15 11:07 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:32 [PATCH] media: dvb-frontends/stv0367: remove redundant variable ADCClk_Hz Colin King
2021-10-15 11:07 ` 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).