Commit 3e6dc7b6 authored by Wong Vee Khee's avatar Wong Vee Khee Committed by David S. Miller

net: stmmac: Fix unused values warnings

The commit 8532f613 ("net: stmmac: introduce MSI Interrupt routines
for mac, safety, RX & TX") introduced the converity warnings:-

  1. Unused value (UNUSED_VALUE)
     assigned_value: Assigning value REQ_IRQ_ERR_MAC to irq_err here,
     but that stored value is not used.

  2. Unused value (UNUSED_VALUE)
     assigned_value: Assigning value REQ_IRQ_ERR_NO to irq_err here,
     but that stored value is overwritten before it can used.

  3. Unused value (UNUSED_VALUE)
     assigned_value: Assigning value REQ_IRQ_ERR_WOL to irq_err here,
     but that stored value is not used.

Fixed these by removing the unnecessary value assignments.

Fixes: 8532f613 ("net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX")
Signed-off-by: default avatarWong Vee Khee <vee.khee.wong@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4a2c7217
...@@ -3406,8 +3406,8 @@ static void stmmac_free_irq(struct net_device *dev, ...@@ -3406,8 +3406,8 @@ static void stmmac_free_irq(struct net_device *dev,
static int stmmac_request_irq_multi_msi(struct net_device *dev) static int stmmac_request_irq_multi_msi(struct net_device *dev)
{ {
enum request_irq_err irq_err = REQ_IRQ_ERR_NO;
struct stmmac_priv *priv = netdev_priv(dev); struct stmmac_priv *priv = netdev_priv(dev);
enum request_irq_err irq_err;
cpumask_t cpu_mask; cpumask_t cpu_mask;
int irq_idx = 0; int irq_idx = 0;
char *int_name; char *int_name;
...@@ -3554,8 +3554,8 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev) ...@@ -3554,8 +3554,8 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev)
static int stmmac_request_irq_single(struct net_device *dev) static int stmmac_request_irq_single(struct net_device *dev)
{ {
enum request_irq_err irq_err = REQ_IRQ_ERR_NO;
struct stmmac_priv *priv = netdev_priv(dev); struct stmmac_priv *priv = netdev_priv(dev);
enum request_irq_err irq_err;
int ret; int ret;
ret = request_irq(dev->irq, stmmac_interrupt, ret = request_irq(dev->irq, stmmac_interrupt,
...@@ -3565,7 +3565,7 @@ static int stmmac_request_irq_single(struct net_device *dev) ...@@ -3565,7 +3565,7 @@ static int stmmac_request_irq_single(struct net_device *dev)
"%s: ERROR: allocating the IRQ %d (error: %d)\n", "%s: ERROR: allocating the IRQ %d (error: %d)\n",
__func__, dev->irq, ret); __func__, dev->irq, ret);
irq_err = REQ_IRQ_ERR_MAC; irq_err = REQ_IRQ_ERR_MAC;
return ret; goto irq_error;
} }
/* Request the Wake IRQ in case of another line /* Request the Wake IRQ in case of another line
...@@ -3579,7 +3579,7 @@ static int stmmac_request_irq_single(struct net_device *dev) ...@@ -3579,7 +3579,7 @@ static int stmmac_request_irq_single(struct net_device *dev)
"%s: ERROR: allocating the WoL IRQ %d (%d)\n", "%s: ERROR: allocating the WoL IRQ %d (%d)\n",
__func__, priv->wol_irq, ret); __func__, priv->wol_irq, ret);
irq_err = REQ_IRQ_ERR_WOL; irq_err = REQ_IRQ_ERR_WOL;
return ret; goto irq_error;
} }
} }
......
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