igbvf: use BIT() macro instead of shifts
To prevent signed bitshift issues, and improve code readability, use the BIT() macro. Also make use of GENMASK or the unsigned postfix where this is more appropriate than BIT() Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:

committed by
Jeff Kirsher

parent
12b28b4108
commit
0ed2dbf4f4
@@ -154,7 +154,8 @@ static void igbvf_get_regs(struct net_device *netdev,
|
||||
|
||||
memset(p, 0, IGBVF_REGS_LEN * sizeof(u32));
|
||||
|
||||
regs->version = (1 << 24) | (adapter->pdev->revision << 16) |
|
||||
regs->version = (1u << 24) |
|
||||
(adapter->pdev->revision << 16) |
|
||||
adapter->pdev->device;
|
||||
|
||||
regs_buff[0] = er32(CTRL);
|
||||
|
Reference in New Issue
Block a user