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:   Wed, 9 Jan 2019 13:14:08 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Lubomir Rintel <lkundrak@...sk>
Cc:     Andy Shevchenko <andy@...radead.org>,
        Darren Hart <dvhart@...radead.org>,
        Platform Driver <platform-driver-x86@...r.kernel.org>,
        Russell King <linux@...linux.org.uk>,
        James Cameron <quozl@...top.org>,
        Mark Rutland <mark.rutland@....com>,
        Pavel Machek <pavel@....cz>, Rob Herring <robh+dt@...nel.org>,
        Sebastian Reichel <sre@...nel.org>,
        "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
        linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>,
        devicetree <devicetree@...r.kernel.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 07/15] Platform: OLPC: Use BIT() and GENMASK() for
 event masks

On Tue, Jan 8, 2019 at 7:58 PM Lubomir Rintel <lkundrak@...sk> wrote:
>
> Just a cosmetic tidy-up.
>

Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>

> Signed-off-by: Lubomir Rintel <lkundrak@...sk>
>
> ---
> Changes since v1:
> - This patch was added to the set.
>
>  include/linux/olpc-ec.h | 23 ++++++++++++-----------
>  1 file changed, 12 insertions(+), 11 deletions(-)
>
> diff --git a/include/linux/olpc-ec.h b/include/linux/olpc-ec.h
> index e28f72416a57..c4602364e909 100644
> --- a/include/linux/olpc-ec.h
> +++ b/include/linux/olpc-ec.h
> @@ -2,6 +2,8 @@
>  #ifndef _LINUX_OLPC_EC_H
>  #define _LINUX_OLPC_EC_H
>
> +#include <linux/bits.h>
> +
>  /* XO-1 EC commands */
>  #define EC_FIRMWARE_REV                        0x08
>  #define EC_WRITE_SCI_MASK              0x1b
> @@ -17,17 +19,16 @@
>  #define EC_EXT_SCI_QUERY               0x85
>
>  /* SCI source values */
> -#define EC_SCI_SRC_EMPTY        0x00
> -#define EC_SCI_SRC_GAME         0x01
> -#define EC_SCI_SRC_BATTERY      0x02
> -#define EC_SCI_SRC_BATSOC       0x04
> -#define EC_SCI_SRC_BATERR       0x08
> -#define EC_SCI_SRC_EBOOK        0x10    /* XO-1 only */
> -#define EC_SCI_SRC_WLAN         0x20    /* XO-1 only */
> -#define EC_SCI_SRC_ACPWR        0x40
> -#define EC_SCI_SRC_BATCRIT      0x80
> -#define EC_SCI_SRC_GPWAKE       0x100   /* XO-1.5 only */
> -#define EC_SCI_SRC_ALL          0x1FF
> +#define EC_SCI_SRC_GAME         BIT(0)
> +#define EC_SCI_SRC_BATTERY      BIT(1)
> +#define EC_SCI_SRC_BATSOC       BIT(2)
> +#define EC_SCI_SRC_BATERR       BIT(3)
> +#define EC_SCI_SRC_EBOOK        BIT(4)    /* XO-1 only */
> +#define EC_SCI_SRC_WLAN         BIT(5)    /* XO-1 only */
> +#define EC_SCI_SRC_ACPWR        BIT(6)
> +#define EC_SCI_SRC_BATCRIT      BIT(7)
> +#define EC_SCI_SRC_GPWAKE       BIT(8)   /* XO-1.5 only */
> +#define EC_SCI_SRC_ALL          GENMASK(8, 0)
>
>  struct platform_device;
>
> --
> 2.20.1
>


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ