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: <CAHp75VcHniqfcsSZmZY-qU=Cx8u64u-ixuhvRbV2wFXVeJW4rg@mail.gmail.com>
Date:   Fri, 13 Jul 2018 17:52:24 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Colin King <colin.king@...onical.com>
Cc:     Darren Hart <dvhart@...radead.org>,
        Andy Shevchenko <andy@...radead.org>,
        Platform Driver <platform-driver-x86@...r.kernel.org>,
        kernel-janitors@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] platform/x86: intel_ips: remove redundant variables slope
 and offset

On Wed, Jul 11, 2018 at 11:09 AM, Colin King <colin.king@...onical.com> wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> Variables slope and offset are being assigned but are never used hence
> they are redundant and can be removed.
>

Sounds like some half-baked calculus and perhaps would be fixed
better. Though, no one complained so far and git will keep previous
version in index anyway.

> Cleans up clang warnings:
> warning: variable 'slope' set but not used [-Wunused-but-set-variable]
> warning: variable 'offset' set but not used [-Wunused-but-set-variable]
>

Pushed to my review and testing queue, thanks!

> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  drivers/platform/x86/intel_ips.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c
> index 014fc1634a3d..c5ece7ef08c6 100644
> --- a/drivers/platform/x86/intel_ips.c
> +++ b/drivers/platform/x86/intel_ips.c
> @@ -858,10 +858,7 @@ static u16 read_mgtv(struct ips_driver *ips)
>
>  static u16 read_ptv(struct ips_driver *ips)
>  {
> -       u16 val, slope, offset;
> -
> -       slope = (ips->pta_val & PTA_SLOPE_MASK) >> PTA_SLOPE_SHIFT;
> -       offset = ips->pta_val & PTA_OFFSET_MASK;
> +       u16 val;
>
>         val = thm_readw(THM_PTV) & PTV_MASK;
>
> --
> 2.17.1
>



-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ