netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] stmmac: dwmac-socfpga: remove redundant dev_err call in socfpga_dwmac_parse_data()
@ 2016-07-13 12:46 weiyj_lk
  2016-07-14  1:08 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: weiyj_lk @ 2016-07-13 12:46 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue; +Cc: Wei Yongjun, netdev

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
index 3bc1fa2..edd20c3 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -165,12 +165,8 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *
 			dwmac->splitter_base =
 			    devm_ioremap_resource(dev, &res_splitter);
 
-			if (IS_ERR(dwmac->splitter_base)) {
-				dev_err(dev,
-					"%s: ERROR: failed mapping emac splitter\n",
-					__func__);
+			if (IS_ERR(dwmac->splitter_base))
 				return PTR_ERR(dwmac->splitter_base);
-			}
 		}
 
 		index = of_property_match_string(np_sgmii_adapter, "reg-names",
@@ -188,11 +184,8 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *
 			dwmac->pcs.sgmii_adapter_base =
 			    devm_ioremap_resource(dev, &res_sgmii_adapter);
 
-			if (IS_ERR(dwmac->pcs.sgmii_adapter_base)) {
-				dev_err(dev, "%s: failed to mapping adapter\n",
-					__func__);
+			if (IS_ERR(dwmac->pcs.sgmii_adapter_base))
 				return PTR_ERR(dwmac->pcs.sgmii_adapter_base);
-			}
 		}
 
 		index = of_property_match_string(np_sgmii_adapter, "reg-names",
@@ -210,12 +203,8 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *
 			dwmac->pcs.tse_pcs_base =
 			    devm_ioremap_resource(dev, &res_tse_pcs);
 
-			if (IS_ERR(dwmac->pcs.tse_pcs_base)) {
-				dev_err(dev,
-					"%s: ERROR: failed mapping tse control port\n",
-					__func__);
+			if (IS_ERR(dwmac->pcs.tse_pcs_base))
 				return PTR_ERR(dwmac->pcs.tse_pcs_base);
-			}
 		}
 	}
 	dwmac->reg_offset = reg_offset;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] stmmac: dwmac-socfpga: remove redundant dev_err call in socfpga_dwmac_parse_data()
  2016-07-13 12:46 [PATCH -next] stmmac: dwmac-socfpga: remove redundant dev_err call in socfpga_dwmac_parse_data() weiyj_lk
@ 2016-07-14  1:08 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-07-14  1:08 UTC (permalink / raw)
  To: weiyj_lk; +Cc: peppe.cavallaro, alexandre.torgue, yongjun_wei, netdev

From: weiyj_lk@163.com
Date: Wed, 13 Jul 2016 12:46:40 +0000

> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> There is a error message within devm_ioremap_resource
> already, so remove the dev_err call to avoid redundant
> error message.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-14  1:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-13 12:46 [PATCH -next] stmmac: dwmac-socfpga: remove redundant dev_err call in socfpga_dwmac_parse_data() weiyj_lk
2016-07-14  1:08 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).