Commit e8106ebe authored by Mitch Williams's avatar Mitch Williams Committed by David S. Miller

i40evf: change type of flags variable

As pointed out by Dan Carpenter (from Oracle), the flags variable is
declared as a 64-bit long but all of the flags are defined as u32,
which may lead to unintended consequences. Fix this by declaring flags
as u32 (since we don't need any more than about a dozen flags right
now), and remove the volatile qualifier, since it's unnecessary and
just makes checkpatch cry.

Change-ID: I137d3bb1842bf7e9456b5929ca54e3b0ed45dcab
Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
CC: Dan Carpenter <dan.carpenter@oracle.com>
Tested-by: default avatarSibai Li <sibai.li@intel.com>
Signed-off-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e1dfee8e
...@@ -205,7 +205,7 @@ struct i40evf_adapter { ...@@ -205,7 +205,7 @@ struct i40evf_adapter {
int num_msix_vectors; int num_msix_vectors;
struct msix_entry *msix_entries; struct msix_entry *msix_entries;
volatile unsigned long flags; u32 flags;
#define I40EVF_FLAG_RX_CSUM_ENABLED (u32)(1) #define I40EVF_FLAG_RX_CSUM_ENABLED (u32)(1)
#define I40EVF_FLAG_RX_1BUF_CAPABLE (u32)(1 << 1) #define I40EVF_FLAG_RX_1BUF_CAPABLE (u32)(1 << 1)
#define I40EVF_FLAG_RX_PS_CAPABLE (u32)(1 << 2) #define I40EVF_FLAG_RX_PS_CAPABLE (u32)(1 << 2)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment