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: <20190623.105935.2293591576103857913.davem@davemloft.net>
Date:   Sun, 23 Jun 2019 10:59:35 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     bpoirier@...e.com
Cc:     manishc@...vell.com, GR-Linux-NIC-Dev@...vell.com,
        netdev@...r.kernel.org
Subject: Re: [PATCH net-next 10/16] qlge: Factor out duplicated expression

From: Benjamin Poirier <bpoirier@...e.com>
Date: Mon, 17 Jun 2019 16:48:52 +0900

> Signed-off-by: Benjamin Poirier <bpoirier@...e.com>
> ---
>  drivers/net/ethernet/qlogic/qlge/qlge.h      |  6 ++++++
>  drivers/net/ethernet/qlogic/qlge/qlge_main.c | 18 ++++++------------
>  2 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/net/ethernet/qlogic/qlge/qlge.h b/drivers/net/ethernet/qlogic/qlge/qlge.h
> index 5a4b2520cd2a..0bb7ccdca6a7 100644
> --- a/drivers/net/ethernet/qlogic/qlge/qlge.h
> +++ b/drivers/net/ethernet/qlogic/qlge/qlge.h
> @@ -77,6 +77,12 @@
>  #define LSD(x)  ((u32)((u64)(x)))
>  #define MSD(x)  ((u32)((((u64)(x)) >> 32)))
>  
> +#define QLGE_FIT16(value) \
> +({ \
> +	typeof(value) _value = value; \
> +	(_value) == 65536 ? 0 : (u16)(_value); \
> +})
> +

"(u16) 65536" is zero and the range of these values is 0 -- 65536.

This whole expression is way overdone.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ