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: <94d698d-f0a4-fe43-fbe4-4d4d62a8ee2c@linux.intel.com>
Date:   Thu, 16 Nov 2023 13:55:20 +0200 (EET)
From:   Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To:     Théo Lebrun <theo.lebrun@...tlin.com>
cc:     Russell King <linux@...linux.org.uk>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-serial <linux-serial@...r.kernel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Grégory Clement <gregory.clement@...tlin.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>,
        Tawfik Bayouk <tawfik.bayouk@...ileye.com>
Subject: Re: [PATCH v2 2/5] tty: serial: amba: Use BIT() macro for constant
 declarations

On Thu, 16 Nov 2023, Théo Lebrun wrote:

> The driver uses bit shifts and hexadecimal expressions to declare
> constants. Replace that with the BIT() macro that clarifies intent.
> 
> Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
> Signed-off-by: Théo Lebrun <theo.lebrun@...tlin.com>

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>

> ---
>  include/linux/amba/serial.h | 183 ++++++++++++++++++++++----------------------
>  1 file changed, 92 insertions(+), 91 deletions(-)
> 
> diff --git a/include/linux/amba/serial.h b/include/linux/amba/serial.h
> index 27003ec52114..a1f966fcb9c5 100644
> --- a/include/linux/amba/serial.h
> +++ b/include/linux/amba/serial.h
> @@ -10,6 +10,7 @@

>  #define ST_UART011_DMAWM_RX_1	(0 << 3)
>  #define ST_UART011_DMAWM_RX_2	(1 << 3)

Just noting a potential futurework item, these (and alike) could be 
changed to:

#define ST_UART011_DMAWM_RX	GENMASK(5, 3)
#define ST_UART011_DMAWM_TX	GENMASK(2, 0)

#define ST_UART011_DMAWM_RX_1	FIELD_PREP(ST_UART011_DMAWM_RX, 0)
#define ST_UART011_DMAWM_RX_2	FIELD_PREP(ST_UART011_DMAWM_RX, 1)
...


-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ