intel: legacy: field get conversion
[sfrench/cifs-2.6.git] / drivers / net / ethernet / intel / igb / igb_main.c
index 897eb36bb609bcfd1bf7c6d4a984ceca91493d53..4df8d4153aa5f5ce7ac9dd566180d552be9f5b4f 100644 (file)
@@ -7295,7 +7295,7 @@ static int igb_set_vf_promisc(struct igb_adapter *adapter, u32 *msgbuf, u32 vf)
 static int igb_set_vf_multicasts(struct igb_adapter *adapter,
                                  u32 *msgbuf, u32 vf)
 {
-       int n = (msgbuf[0] & E1000_VT_MSGINFO_MASK) >> E1000_VT_MSGINFO_SHIFT;
+       int n = FIELD_GET(E1000_VT_MSGINFO_MASK, msgbuf[0]);
        u16 *hash_list = (u16 *)&msgbuf[1];
        struct vf_data_storage *vf_data = &adapter->vf_data[vf];
        int i;
@@ -7555,7 +7555,7 @@ static int igb_ndo_set_vf_vlan(struct net_device *netdev, int vf,
 
 static int igb_set_vf_vlan_msg(struct igb_adapter *adapter, u32 *msgbuf, u32 vf)
 {
-       int add = (msgbuf[0] & E1000_VT_MSGINFO_MASK) >> E1000_VT_MSGINFO_SHIFT;
+       int add = FIELD_GET(E1000_VT_MSGINFO_MASK, msgbuf[0]);
        int vid = (msgbuf[1] & E1000_VLVF_VLANID_MASK);
        int ret;