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]
Message-ID: <af09a19d-3261-a1bb-4d38-e7f543648154@ti.com>
Date:   Tue, 8 Sep 2020 15:53:23 -0500
From:   Dan Murphy <dmurphy@...com>
To:     Krzysztof Kozlowski <krzk@...nel.org>,
        Sebastian Reichel <sre@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Pali Rohár <pali@...nel.org>,
        <linux-pm@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/7] power: supply: bq27xxx: use BIT() for bit flags

Krzysztof

On 9/8/20 3:13 PM, Krzysztof Kozlowski wrote:
> BIT() is a preferred way to toggle bit-like flags: no problems with 32/64
> bit systems, less chances for mistakes.
>
> Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>
> ---
>   drivers/power/supply/bq27xxx_battery.c | 15 ++++++++-------
>   1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
> index 2deac3fbb036..e971af43dd45 100644
> --- a/drivers/power/supply/bq27xxx_battery.c
> +++ b/drivers/power/supply/bq27xxx_battery.c
> @@ -847,13 +847,14 @@ static struct bq27xxx_dm_reg bq27621_dm_regs[] = {
>   
>   #define bq27z561_dm_regs 0
>   #define bq28z610_dm_regs 0
> -
> -#define BQ27XXX_O_ZERO	0x00000001
> -#define BQ27XXX_O_OTDC	0x00000002 /* has OTC/OTD overtemperature flags */
> -#define BQ27XXX_O_UTOT  0x00000004 /* has OT overtemperature flag */
> -#define BQ27XXX_O_CFGUP	0x00000008
> -#define BQ27XXX_O_RAM	0x00000010
> -#define BQ27Z561_O_BITS	0x00000020
> +#define bq34z100_dm_regs 0
> +
> +#define BQ27XXX_O_ZERO		BIT(0)
> +#define BQ27XXX_O_OTDC		BIT(1) /* has OTC/OTD overtemperature flags */
> +#define BQ27XXX_O_UTOT		BIT(2) /* has OT overtemperature flag */
> +#define BQ27XXX_O_CFGUP		BIT(3)
> +#define BQ27XXX_O_RAM		BIT(4)
> +#define BQ27Z561_O_BITS		BIT(5)
>   

It seems you have added whitespaces that you submitted a patch to fix in 
3/7.

Also squash 3 and 4.

Dan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ