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:   Thu, 4 Apr 2019 09:41:24 +0300
From:   Alexandru Ardelean <ardeleanalex@...il.com>
To:     Lucas Oshiro <lucasseikioshiro@...il.com>
Cc:     lars@...afoo.de,
        "Hennerich, Michael" <Michael.Hennerich@...log.com>,
        stefan.popa@...log.com, Jonathan Cameron <jic23@...nel.org>,
        knaack.h@....de, Peter Meerwald-Stadler <pmeerw@...erw.net>,
        gregkh@...uxfoundation.org, linux-iio@...r.kernel.org,
        devel@...verdev.osuosl.org, LKML <linux-kernel@...r.kernel.org>,
        kernel-usp@...glegroups.com
Subject: Re: [PATCH] staging: iio: cdc: ad7746: Replace bitshift by BIT

On Wed, Apr 3, 2019 at 11:46 PM Lucas Oshiro <lucasseikioshiro@...il.com> wrote:
>
> Replace bitshifts on lines 54, 56 and 78 of ad7746.c.
>

Hey,
This is only partially done.
If doing conversions to BIT(x) macro, I would say to do them for all cases.

Thanks
Alex

> Signed-off-by: Lucas Oshiro <lucasseikioshiro@...il.com>
> ---
>  drivers/staging/iio/cdc/ad7746.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
> index 0eb28fea876e..ea48b14cee72 100644
> --- a/drivers/staging/iio/cdc/ad7746.c
> +++ b/drivers/staging/iio/cdc/ad7746.c
> @@ -51,9 +51,9 @@
>  #define AD7746_CAPSETUP_CACHOP         BIT(0)
>
>  /* Voltage/Temperature Setup Register Bit Designations (AD7746_REG_VT_SETUP) */
> -#define AD7746_VTSETUP_VTEN            (1 << 7)
> +#define AD7746_VTSETUP_VTEN            BIT(7)
>  #define AD7746_VTSETUP_VTMD_INT_TEMP   (0 << 5)
> -#define AD7746_VTSETUP_VTMD_EXT_TEMP   (1 << 5)
> +#define AD7746_VTSETUP_VTMD_EXT_TEMP   BIT(5)
>  #define AD7746_VTSETUP_VTMD_VDD_MON    (2 << 5)
>  #define AD7746_VTSETUP_VTMD_EXT_VIN    (3 << 5)
>  #define AD7746_VTSETUP_EXTREF          BIT(4)
> @@ -75,7 +75,7 @@
>  #define AD7746_CONF_VTFS_MASK          GENMASK(7, 6)
>  #define AD7746_CONF_CAPFS_MASK         GENMASK(5, 3)
>  #define AD7746_CONF_MODE_IDLE          (0 << 0)
> -#define AD7746_CONF_MODE_CONT_CONV     (1 << 0)
> +#define AD7746_CONF_MODE_CONT_CONV     BIT(0)
>  #define AD7746_CONF_MODE_SINGLE_CONV   (2 << 0)
>  #define AD7746_CONF_MODE_PWRDN         (3 << 0)
>  #define AD7746_CONF_MODE_OFFS_CAL      (5 << 0)
> --
> 2.21.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ