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: <lbyvuozxjywyt46w2imk2jvwfas3p43wooj2ioyhufwkyg72da@d6stk7xk4rx4>
Date: Tue, 10 Sep 2024 14:48:48 +0200
From: Andi Shyti <andi.shyti@...nel.org>
To: Nick Chan <towinchenmi@...il.com>
Cc: Krzysztof Kozlowski <krzk@...nel.org>, 
	Alim Akhtar <alim.akhtar@...sung.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
	Jiri Slaby <jirislaby@...nel.org>, linux-arm-kernel@...ts.infradead.org, 
	linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org, 
	asahi@...ts.linux.dev
Subject: Re: [PATCH v4 1/3] tty: serial: samsung: Use BIT() macro for
 APPLE_S5L_*

Hi Nick,

On Mon, Sep 09, 2024 at 04:37:25PM GMT, Nick Chan wrote:
> New entries using BIT() will be added soon, so change the existing ones
> for consistency.
> 
> Signed-off-by: Nick Chan <towinchenmi@...il.com>

I think this is:

Suggested-by: Krzysztof Kozlowski <krzk@...nel.org>

> ---
>  include/linux/serial_s3c.h | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/include/linux/serial_s3c.h b/include/linux/serial_s3c.h
> index 1672cf0810ef..1e8686695487 100644
> --- a/include/linux/serial_s3c.h
> +++ b/include/linux/serial_s3c.h
> @@ -249,9 +249,9 @@
>  #define APPLE_S5L_UCON_RXTO_ENA		9
>  #define APPLE_S5L_UCON_RXTHRESH_ENA	12
>  #define APPLE_S5L_UCON_TXTHRESH_ENA	13
> -#define APPLE_S5L_UCON_RXTO_ENA_MSK	(1 << APPLE_S5L_UCON_RXTO_ENA)
> -#define APPLE_S5L_UCON_RXTHRESH_ENA_MSK	(1 << APPLE_S5L_UCON_RXTHRESH_ENA)
> -#define APPLE_S5L_UCON_TXTHRESH_ENA_MSK	(1 << APPLE_S5L_UCON_TXTHRESH_ENA)
> +#define APPLE_S5L_UCON_RXTO_ENA_MSK	BIT(APPLE_S5L_UCON_RXTO_ENA)
> +#define APPLE_S5L_UCON_RXTHRESH_ENA_MSK	BIT(APPLE_S5L_UCON_RXTHRESH_ENA)
> +#define APPLE_S5L_UCON_TXTHRESH_ENA_MSK	BIT(APPLE_S5L_UCON_TXTHRESH_ENA)
>  
>  #define APPLE_S5L_UCON_DEFAULT		(S3C2410_UCON_TXIRQMODE | \
>  					 S3C2410_UCON_RXIRQMODE | \
> @@ -260,9 +260,9 @@
>  					 APPLE_S5L_UCON_RXTHRESH_ENA_MSK | \
>  					 APPLE_S5L_UCON_TXTHRESH_ENA_MSK)
>  
> -#define APPLE_S5L_UTRSTAT_RXTHRESH	(1<<4)
> -#define APPLE_S5L_UTRSTAT_TXTHRESH	(1<<5)
> -#define APPLE_S5L_UTRSTAT_RXTO		(1<<9)
> +#define APPLE_S5L_UTRSTAT_RXTHRESH	BIT(4)
> +#define APPLE_S5L_UTRSTAT_TXTHRESH	BIT(5)
> +#define APPLE_S5L_UTRSTAT_RXTO		BIT(9)
>  #define APPLE_S5L_UTRSTAT_ALL_FLAGS	(0x3f0)

You could make this GENMASK(0x3f, 4)

Andi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ