lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGoCfizfW1qqDFTbrCM4HaRQBP3esLiiSxNGBongRxamSvpMZA@mail.gmail.com>
Date:   Tue, 22 May 2018 13:18:15 -0400
From:   Devin Heitmueller <dheitmueller@...nellabs.com>
To:     "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Cc:     Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
        Linux Media Mailing List <linux-media@...r.kernel.org>,
        Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] au8522: remove duplicate code

Reviewed-by: Devin Heitmueller <dheitmueller@...nellabs.com>

Devin

On Tue, May 22, 2018 at 1:09 PM, Gustavo A. R. Silva
<gustavo@...eddedor.com> wrote:
> This code has been there for nine years now, and it has been
> working "good enough" since then [1].
>
> Remove duplicate code by getting rid of the if-else statement.
>
> [1] https://marc.info/?l=linux-kernel&m=152693550225081&w=2
>
> Cc: Devin Heitmueller <dheitmueller@...nellabs.com>
> Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
> ---
>  drivers/media/dvb-frontends/au8522_decoder.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/media/dvb-frontends/au8522_decoder.c b/drivers/media/dvb-frontends/au8522_decoder.c
> index 343dc92..f285096 100644
> --- a/drivers/media/dvb-frontends/au8522_decoder.c
> +++ b/drivers/media/dvb-frontends/au8522_decoder.c
> @@ -280,14 +280,12 @@ static void setup_decoder_defaults(struct au8522_state *state, bool is_svideo)
>                         AU8522_TOREGAAGC_REG0E5H_CVBS);
>         au8522_writereg(state, AU8522_REG016H, AU8522_REG016H_CVBS);
>
> -       if (is_svideo) {
> -               /* Despite what the table says, for the HVR-950q we still need
> -                  to be in CVBS mode for the S-Video input (reason unknown). */
> -               /* filter_coef_type = 3; */
> -               filter_coef_type = 5;
> -       } else {
> -               filter_coef_type = 5;
> -       }
> +       /*
> +        * Despite what the table says, for the HVR-950q we still need
> +        * to be in CVBS mode for the S-Video input (reason unknown).
> +        */
> +       /* filter_coef_type = 3; */
> +       filter_coef_type = 5;
>
>         /* Load the Video Decoder Filter Coefficients */
>         for (i = 0; i < NUM_FILTER_COEF; i++) {
> --
> 2.7.4
>



-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ