From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/9] net: e1000: Fix build warnings for 32-bit
Date: Tue, 25 Aug 2015 12:57:55 -0500 [thread overview]
Message-ID: <1440525475.16577.12.camel@freescale.com> (raw)
In-Reply-To: <1440487347-10517-2-git-send-email-bmeng.cn@gmail.com>
On Tue, 2015-08-25 at 00:22 -0700, Bin Meng wrote:
> commit 6497e37 "net: e1000: Support 64-bit physical address" causes
> compiler warnings on 32-bit U-Boot build below.
>
> drivers/net/e1000.c: In function 'e1000_configure_tx':
> drivers/net/e1000.c:4982:2: warning: right shift count >= width of type
> [enabled by default]
> drivers/net/e1000.c: In function 'e1000_configure_rx':
> drivers/net/e1000.c:5126:2: warning: right shift count >= width of type
> [enabled by default]
>
> This commit fixes the build warnings.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
> drivers/net/e1000.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
> index 6f74d30..a467280 100644
> --- a/drivers/net/e1000.c
> +++ b/drivers/net/e1000.c
> @@ -4977,9 +4977,10 @@ e1000_configure_tx(struct e1000_hw *hw)
> unsigned long tctl;
> unsigned long tipg, tarc;
> uint32_t ipgr1, ipgr2;
> + uint64_t tdba = (unsigned long)tx_base;
>
> - E1000_WRITE_REG(hw, TDBAL, (unsigned long)tx_base & 0xffffffff);
> - E1000_WRITE_REG(hw, TDBAH, (unsigned long)tx_base >> 32);
> + E1000_WRITE_REG(hw, TDBAL, (uint32_t)(tdba & 0xffffffff));
> + E1000_WRITE_REG(hw, TDBAH, (uint32_t)(tdba >> 32));
You could use upper_32_bits()/lower_32_bits().
-Scott
next prev parent reply other threads:[~2015-08-25 17:57 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-25 7:22 [U-Boot] [PATCH 1/9] net: Revert "tftp: adjust settings to be suitable for 100Mbit ethernet" Bin Meng
2015-08-25 7:22 ` [U-Boot] [PATCH 2/9] net: e1000: Fix build warnings for 32-bit Bin Meng
2015-08-25 17:57 ` Scott Wood [this message]
2015-08-25 7:22 ` [U-Boot] [PATCH 3/9] dm: eth: Do not call board_eth_init() or cpu_eth_init() Bin Meng
2015-08-25 18:43 ` Joe Hershberger
2015-08-26 1:29 ` Bin Meng
2015-08-26 2:04 ` Bin Meng
2015-08-26 2:24 ` Joe Hershberger
2015-08-26 2:36 ` Bin Meng
2015-08-26 2:41 ` Joe Hershberger
2015-08-26 3:06 ` Simon Glass
2015-08-25 7:22 ` [U-Boot] [PATCH 4/9] dm: eth: Correctly detect alias in eth_get_dev_by_name() Bin Meng
2015-08-25 18:55 ` Joe Hershberger
2015-08-25 7:22 ` [U-Boot] [PATCH 5/9] x86: crownbay: Convert to use CONFIG_DM_USB Bin Meng
2015-08-25 18:57 ` Joe Hershberger
2015-08-25 20:31 ` Simon Glass
2015-08-25 7:22 ` [U-Boot] [PATCH 6/9] x86: crownbay: Convert to use CONFIG_DM_ETH for E1000 Bin Meng
2015-08-25 18:59 ` Joe Hershberger
2015-08-26 2:20 ` Bin Meng
2015-08-26 2:28 ` Simon Glass
2015-08-26 2:30 ` Joe Hershberger
2015-08-25 7:22 ` [U-Boot] [PATCH 7/9] net: pch_gbe: Convert to driver model Bin Meng
2015-08-25 19:04 ` Joe Hershberger
2015-08-25 20:32 ` Simon Glass
2015-08-25 7:22 ` [U-Boot] [PATCH 8/9] net: pch_gbe: Add Kconfig option Bin Meng
2015-08-25 19:10 ` Joe Hershberger
2015-08-26 1:25 ` Bin Meng
2015-08-26 2:19 ` Joe Hershberger
2015-08-25 7:22 ` [U-Boot] [PATCH 9/9] x86: crownbay: Enable CONFIG_PCH_GBE Bin Meng
2015-08-25 19:07 ` Joe Hershberger
2015-08-25 20:32 ` Simon Glass
2015-08-25 9:26 ` [U-Boot] [PATCH 1/9] net: Revert "tftp: adjust settings to be suitable for 100Mbit ethernet" Bin Meng
2015-08-25 16:05 ` Joe Hershberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1440525475.16577.12.camel@freescale.com \
--to=scottwood@freescale.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox