Commit 10291171 authored by Niklas Cassel's avatar Niklas Cassel Committed by David S. Miller

net: stmmac: remove redundant enable of PMT irq

For dwmac4, GMAC_INT_DEFAULT_ENABLE already includes
GMAC_INT_PMT_EN, so it is redundant to check if hw->pmt
is set, and if so, setting the bit again.

For dwmac1000, GMAC_INT_DEFAULT_MASK does not include
GMAC_INT_DISABLE_PMT, so it is redundant to check if
hw->pmt is set, and if so, clearing an already cleared bit.

Improve code readability by removing this redundant code.
Signed-off-by: default avatarNiklas Cassel <niklas.cassel@axis.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e879b7ab
...@@ -74,8 +74,6 @@ static void dwmac1000_core_init(struct mac_device_info *hw, ...@@ -74,8 +74,6 @@ static void dwmac1000_core_init(struct mac_device_info *hw,
/* Mask GMAC interrupts */ /* Mask GMAC interrupts */
value = GMAC_INT_DEFAULT_MASK; value = GMAC_INT_DEFAULT_MASK;
if (hw->pmt)
value &= ~GMAC_INT_DISABLE_PMT;
if (hw->pcs) if (hw->pcs)
value &= ~GMAC_INT_DISABLE_PCS; value &= ~GMAC_INT_DISABLE_PCS;
......
...@@ -63,8 +63,7 @@ static void dwmac4_core_init(struct mac_device_info *hw, ...@@ -63,8 +63,7 @@ static void dwmac4_core_init(struct mac_device_info *hw,
/* Enable GMAC interrupts */ /* Enable GMAC interrupts */
value = GMAC_INT_DEFAULT_ENABLE; value = GMAC_INT_DEFAULT_ENABLE;
if (hw->pmt)
value |= GMAC_INT_PMT_EN;
if (hw->pcs) if (hw->pcs)
value |= GMAC_PCS_IRQ_DEFAULT; value |= GMAC_PCS_IRQ_DEFAULT;
......
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