From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>,
netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 03/14] i40e/i40evf: Force a shifted '1' to be unsigned
Date: Wed, 2 Jul 2014 19:40:22 -0700 [thread overview]
Message-ID: <1404355233-30123-4-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1404355233-30123-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Force a shifted '1' to be unsiged to avoid shifting a signed int
Change-ID: I688cbd082af0f2e1df548fda25847a5ca04babcf
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_hmc.h | 4 ++--
drivers/net/ethernet/intel/i40evf/i40e_hmc.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_hmc.h b/drivers/net/ethernet/intel/i40e/i40e_hmc.h
index b45d8fe..732a026 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_hmc.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_hmc.h
@@ -127,7 +127,7 @@ struct i40e_hmc_info {
((((type) == I40E_SD_TYPE_PAGED) ? 0 : 1) << \
I40E_PFHMC_SDDATALOW_PMSDTYPE_SHIFT) | \
(1 << I40E_PFHMC_SDDATALOW_PMSDVALID_SHIFT); \
- val3 = (sd_index) | (1 << I40E_PFHMC_SDCMD_PMSDWR_SHIFT); \
+ val3 = (sd_index) | (1u << I40E_PFHMC_SDCMD_PMSDWR_SHIFT); \
wr32((hw), I40E_PFHMC_SDDATAHIGH, val1); \
wr32((hw), I40E_PFHMC_SDDATALOW, val2); \
wr32((hw), I40E_PFHMC_SDCMD, val3); \
@@ -146,7 +146,7 @@ struct i40e_hmc_info {
I40E_PFHMC_SDDATALOW_PMSDBPCOUNT_SHIFT) | \
((((type) == I40E_SD_TYPE_PAGED) ? 0 : 1) << \
I40E_PFHMC_SDDATALOW_PMSDTYPE_SHIFT); \
- val3 = (sd_index) | (1 << I40E_PFHMC_SDCMD_PMSDWR_SHIFT); \
+ val3 = (sd_index) | (1u << I40E_PFHMC_SDCMD_PMSDWR_SHIFT); \
wr32((hw), I40E_PFHMC_SDDATAHIGH, 0); \
wr32((hw), I40E_PFHMC_SDDATALOW, val2); \
wr32((hw), I40E_PFHMC_SDCMD, val3); \
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_hmc.h b/drivers/net/ethernet/intel/i40evf/i40e_hmc.h
index a2ad9a4..931c880 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_hmc.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_hmc.h
@@ -127,7 +127,7 @@ struct i40e_hmc_info {
((((type) == I40E_SD_TYPE_PAGED) ? 0 : 1) << \
I40E_PFHMC_SDDATALOW_PMSDTYPE_SHIFT) | \
(1 << I40E_PFHMC_SDDATALOW_PMSDVALID_SHIFT); \
- val3 = (sd_index) | (1 << I40E_PFHMC_SDCMD_PMSDWR_SHIFT); \
+ val3 = (sd_index) | (1u << I40E_PFHMC_SDCMD_PMSDWR_SHIFT); \
wr32((hw), I40E_PFHMC_SDDATAHIGH, val1); \
wr32((hw), I40E_PFHMC_SDDATALOW, val2); \
wr32((hw), I40E_PFHMC_SDCMD, val3); \
@@ -146,7 +146,7 @@ struct i40e_hmc_info {
I40E_PFHMC_SDDATALOW_PMSDBPCOUNT_SHIFT) | \
((((type) == I40E_SD_TYPE_PAGED) ? 0 : 1) << \
I40E_PFHMC_SDDATALOW_PMSDTYPE_SHIFT); \
- val3 = (sd_index) | (1 << I40E_PFHMC_SDCMD_PMSDWR_SHIFT); \
+ val3 = (sd_index) | (1u << I40E_PFHMC_SDCMD_PMSDWR_SHIFT); \
wr32((hw), I40E_PFHMC_SDDATAHIGH, 0); \
wr32((hw), I40E_PFHMC_SDDATALOW, val2); \
wr32((hw), I40E_PFHMC_SDCMD, val3); \
--
1.9.3
next prev parent reply other threads:[~2014-07-03 2:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 2:40 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2014-07-02 Jeff Kirsher
2014-07-03 2:40 ` [net-next 01/14] i40e/i40evf: Do not free the dummy packet buffer synchronously Jeff Kirsher
2014-07-03 2:40 ` [net-next 02/14] i40evf: don't violate scope Jeff Kirsher
2014-07-03 2:40 ` Jeff Kirsher [this message]
2014-07-03 3:34 ` [net-next 03/14] i40e/i40evf: Force a shifted '1' to be unsigned Joe Perches
2014-07-03 2:40 ` [net-next 04/14] i40e: tolerate lost interrupts Jeff Kirsher
2014-07-03 12:15 ` Sergei Shtylyov
2014-07-03 18:45 ` Williams, Mitch A
2014-07-03 2:40 ` [net-next 05/14] i40evf: invite vector 0 to the interrupt party Jeff Kirsher
2014-07-03 2:40 ` [net-next 06/14] i40e: Fix a boundary condition and turning off of ntuple Jeff Kirsher
2014-07-03 2:40 ` [net-next 07/14] i40e: disable TPH Jeff Kirsher
2014-07-03 2:40 ` [net-next 08/14] i40e: Finish implementation of ethtool get settings Jeff Kirsher
2014-07-03 2:40 ` [net-next 09/14] i40e/i40evf: Add new HW link info variable an_enabled and function update_link_info Jeff Kirsher
2014-07-03 2:40 ` [net-next 10/14] i40e: move nway reset Jeff Kirsher
2014-07-03 2:40 ` [net-next 11/14] i40e/i40evf: Add set_fc and init of FC settings Jeff Kirsher
2014-07-03 2:40 ` [net-next 12/14] i40e: Add set_pauseparam to ethtool Jeff Kirsher
2014-07-03 2:40 ` [net-next 13/14] i40e: Implement set_settings for ethtool Jeff Kirsher
2014-07-03 2:40 ` [net-next 14/14] i40e/i40evf: Bump i40e to 0.4.21 and i40evf to 0.9.40 Jeff Kirsher
2014-07-08 4:26 ` [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2014-07-02 David Miller
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=1404355233-30123-4-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
--cc=paul.m.stillwell.jr@intel.com \
--cc=sassmann@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).