be2net: remove a line of code that has no effect
authorSathya Perla <sathya.perla@avagotech.com>
Wed, 30 Dec 2015 06:29:01 +0000 (01:29 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Dec 2015 21:33:35 +0000 (16:33 -0500)
This patch removes a line of code that changes adapter->recommended_prio
value followed by yet another assignment.
Also, the variable is used to store the vlan priority value that is already
shifted to the PCP bits position in the vlan tag format. Hence, the name of
this variable is changed to recommended_prio_bits.

Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be.h
drivers/net/ethernet/emulex/benet/be_cmds.c
drivers/net/ethernet/emulex/benet/be_main.c

index d463563e1f7039ee5176ca36abfdc6bae3f2ed46..93e5eab20e028150eb8c70689a3df2518016afc6 100644 (file)
@@ -521,7 +521,7 @@ struct be_adapter {
        struct be_drv_stats drv_stats;
        struct be_aic_obj aic_obj[MAX_EVT_QS];
        u8 vlan_prio_bmap;      /* Available Priority BitMap */
-       u16 recommended_prio;   /* Recommended Priority */
+       u16 recommended_prio_bits;/* Recommended Priority bits in vlan tag */
        struct be_dma_mem rx_filter; /* Cmd DMA mem for rx-filter */
 
        struct be_dma_mem stats_cmd;
index 451f9eaa27a24941d47b3bea9b1e5b410c976d7d..7c0e7ff4679f371bd4dbd4a9b87255d7f064a270 100644 (file)
@@ -308,8 +308,7 @@ static void be_async_grp5_cos_priority_process(struct be_adapter *adapter,
 
        if (evt->valid) {
                adapter->vlan_prio_bmap = evt->available_priority_bmap;
-               adapter->recommended_prio &= ~VLAN_PRIO_MASK;
-               adapter->recommended_prio =
+               adapter->recommended_prio_bits =
                        evt->reco_default_priority << VLAN_PRIO_SHIFT;
        }
 }
index 646b02136b0e750b986d1912b08d9d156a201446..c9f9d4b7e6af41d9a27087ff6a21e275fbe835cc 100644 (file)
@@ -729,7 +729,7 @@ static inline u16 be_get_tx_vlan_tag(struct be_adapter *adapter,
        /* If vlan priority provided by OS is NOT in available bmap */
        if (!(adapter->vlan_prio_bmap & (1 << vlan_prio)))
                vlan_tag = (vlan_tag & ~VLAN_PRIO_MASK) |
-                               adapter->recommended_prio;
+                               adapter->recommended_prio_bits;
 
        return vlan_tag;
 }