Subject: Re: [PATCH net-next 09/13] net: ena: adding missing cast in ena_com_mem_addr_set()

From: "Belgazal, Netanel" <[email-masked]>
Date: Mon, 19 Jun 2017 12:45:08 +0000

Ack,

Will use the proposed functions.
________________________________________
From: Leon Romanovsky <[email-masked]>
Sent: Monday, June 19, 2017 8:00 AM
To: Belgazal, Netanel
Cc: [email-masked]; [email-masked]; Woodhouse, David; Machulsky, Zorik; Matushevsky, Alexander; BSHARA, Said; Wilson, Matt; Liguori, Anthony; Bshara, Nafea; Schmeilin, Evgeny
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, [email-masked] wrote:
> From: Netanel Belgazal <[email-masked]>
>
> Signed-off-by: Netanel Belgazal <[email-masked]>
> ---
>  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