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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 9 Oct 2017 13:21:17 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Christos Gkekas <chris.gekas@...il.com>
Cc:     Darren Hart <dvhart@...radead.org>,
        Andy Shevchenko <andy@...radead.org>,
        Platform Driver <platform-driver-x86@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] intel-oaktrail: Clean up dead code

On Mon, Oct 9, 2017 at 1:57 AM, Christos Gkekas <chris.gekas@...il.com> wrote:
> A couple of macros are unused and need to be removed.
> Also variable percent is unsigned so checking whether it is less than
> zero is redundant.

> -#define OT_EC_CAMERA_MASK      (1 << 0)
>  #define OT_EC_BT_MASK          (1 << 1)
>  #define OT_EC_GPS_MASK         (1 << 2)
>  #define OT_EC_WIFI_MASK                (1 << 3)
>  #define OT_EC_WWAN_MASK                (1 << 4)
> -#define OT_EC_TS_MASK          (1 << 5)

While they are unused they won't bring any additional code to the binary.
The rationale to leave them is to have a bit descriptions in the code,
so, anyone who is in possession of that old and rare hardware can do
some tests or amendments without searching looking to documentation.


> -       if (percent < 0 || percent > OT_EC_BL_BRIGHTNESS_MAX)
> +       if (percent > OT_EC_BL_BRIGHTNESS_MAX)
>                 return -EINVAL;

While it's true, doesn't compiler take care about that?

https://lkml.org/lkml/2006/11/28/206

So, unfortunately I have no reason to take it.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ