Commit 9d4955b4 authored by Jacob Keller's avatar Jacob Keller Committed by Jeff Kirsher

fm10k: Correct typecast in fm10k_update_xc_addr_pf

Since the resultant data type of the mac_update.mac_upper field is u16,
it does not make sense to typecast u8 variables to u32 first. Since
we're modifying fm10k_pf.c, also update the copyright year.
Reported-by: default avatarMatthew Vick <matthew.vick@intel.com>
Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Reviewed-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 875328e4
/* Intel Ethernet Switch Host Interface Driver /* Intel Ethernet Switch Host Interface Driver
* Copyright(c) 2013 - 2014 Intel Corporation. * Copyright(c) 2013 - 2015 Intel Corporation.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License, * under the terms and conditions of the GNU General Public License,
...@@ -334,8 +334,8 @@ static s32 fm10k_update_xc_addr_pf(struct fm10k_hw *hw, u16 glort, ...@@ -334,8 +334,8 @@ static s32 fm10k_update_xc_addr_pf(struct fm10k_hw *hw, u16 glort,
((u32)mac[3] << 16) | ((u32)mac[3] << 16) |
((u32)mac[4] << 8) | ((u32)mac[4] << 8) |
((u32)mac[5])); ((u32)mac[5]));
mac_update.mac_upper = cpu_to_le16(((u32)mac[0] << 8) | mac_update.mac_upper = cpu_to_le16(((u16)mac[0] << 8) |
((u32)mac[1])); ((u16)mac[1]));
mac_update.vlan = cpu_to_le16(vid); mac_update.vlan = cpu_to_le16(vid);
mac_update.glort = cpu_to_le16(glort); mac_update.glort = cpu_to_le16(glort);
mac_update.action = add ? 0 : 1; mac_update.action = add ? 0 : 1;
......
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