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: <40b5679c-5316-9c5c-7e4-5c8c74ba1acf@linux.intel.com>
Date:   Tue, 15 Nov 2022 17:33:47 +0200 (EET)
From:   Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To:     Gabriel Somlo <gsomlo@...il.com>
cc:     LKML <linux-kernel@...r.kernel.org>,
        linux-serial <linux-serial@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>, kgugala@...micro.com,
        mholenko@...micro.com, joel@....id.au,
        david.abdurachmanov@...il.com, florent@...oy-digital.fr,
        geert@...ux-m68k.org
Subject: Re: [PATCH v3 02/14] serial: liteuart: use bit number macros

On Sat, 12 Nov 2022, Gabriel Somlo wrote:

> Replace magic bit constants (e.g., 1, 2, 4) with BIT(x) expressions.
> 
> Signed-off-by: Gabriel Somlo <gsomlo@...il.com>
> ---
>  drivers/tty/serial/liteuart.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/liteuart.c b/drivers/tty/serial/liteuart.c
> index 32b81bd03d0c..1497d4cdc221 100644
> --- a/drivers/tty/serial/liteuart.c
> +++ b/drivers/tty/serial/liteuart.c
> @@ -38,8 +38,8 @@
>  #define OFF_EV_ENABLE	0x14
>  
>  /* events */
> -#define EV_TX		0x1
> -#define EV_RX		0x2
> +#define EV_TX		BIT(0)
> +#define EV_RX		BIT(1)
>  
>  struct liteuart_port {
>  	struct uart_port port;
> 

This seems to assume some random header provides BIT() for you?

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ