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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y8gL0XNYw5qbK82B@kadam>
Date:   Wed, 18 Jan 2023 18:10:09 +0300
From:   Dan Carpenter <error27@...il.com>
To:     Brent Pappas <bpappas@...pasbrent.com>
Cc:     lars@...afoo.de, Michael.Hennerich@...log.com, jic23@...nel.org,
        gregkh@...uxfoundation.org, linux-iio@...r.kernel.org,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: iio: frequency: ad9832: Replace macro
 AD9832_PHASE() with function

On Wed, Jan 18, 2023 at 10:03:06AM -0500, Brent Pappas wrote:
> Replace the macro AD9832_PHASE() with a static function to comply with
> Linux coding style standards.
> 
> Signed-off-by: Brent Pappas <bpappas@...pasbrent.com>
> ---
>  drivers/staging/iio/frequency/ad9832.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c
> index 6f9eebd6c7ee..537825534a28 100644
> --- a/drivers/staging/iio/frequency/ad9832.c
> +++ b/drivers/staging/iio/frequency/ad9832.c
> @@ -59,7 +59,9 @@
>  #define AD9832_CMD_SLEEPRESCLR	0xC
>  
>  #define AD9832_FREQ		BIT(11)
> -#define AD9832_PHASE(x)		(((x) & 3) << 9)
> +
> +static unsigned short ad9832_phase(int x) { return (x & 3) << 9; }

The original is fine here.  Just leave it as-is.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ