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: <20170619050009.GK17846@mtr-leonro.local>
Date:   Mon, 19 Jun 2017 08:00:09 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     netanel@...zon.com
Cc:     davem@...emloft.net, netdev@...r.kernel.org, dwmw@...zon.com,
        zorik@...zon.com, matua@...zon.com, saeedb@...zon.com,
        msw@...zon.com, aliguori@...zon.com, nafea@...zon.com,
        evgenys@...zon.com
Subject: Re: [PATCH net-next 09/13] net: ena: adding missing cast in
 ena_com_mem_addr_set()

On Sun, Jun 18, 2017 at 02:28:14PM +0300, netanel@...zon.com wrote:
> From: Netanel Belgazal <netanel@...zon.com>
>
> Signed-off-by: Netanel Belgazal <netanel@...zon.com>
> ---
>  drivers/net/ethernet/amazon/ena/ena_com.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/amazon/ena/ena_com.c b/drivers/net/ethernet/amazon/ena/ena_com.c
> index f6e1d30523a6..8efb85e25a42 100644
> --- a/drivers/net/ethernet/amazon/ena/ena_com.c
> +++ b/drivers/net/ethernet/amazon/ena/ena_com.c
> @@ -100,7 +100,7 @@ static inline int ena_com_mem_addr_set(struct ena_com_dev *ena_dev,
>  	}
>
>  	ena_addr->mem_addr_low = (u32)addr;
> -	ena_addr->mem_addr_high = (u64)addr >> 32;
> +	ena_addr->mem_addr_high = (u16)((u64)addr >> 32);

We have macro for getting upper 32 bits - upper_32_bits(addr), the same
goes for lower 32 bits.

>
>  	return 0;
>  }
> --
> 2.7.4
>

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ