net: hns: remove redundant dev_err call in hns_dsaf_get_cfg()
Subsystems (3)
PATCH 1/1 net: hns: remove redundant dev_err call in hns_dsaf_get_cfg()
From: Wei Yongjun <[email protected]>
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message.
--- drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c +4 -12
@@ -116,10 +116,8 @@ int hns_dsaf_get_cfg(struct dsaf_device *dsaf_dev) dsaf_dev->sc_base =devm_ioremap_resource (&pdev->dev, res); -if (IS_ERR (dsaf_dev->sc_base)) { -dev_err (dsaf_dev->dev,"subctrl can not map!\n" ); +if (IS_ERR (dsaf_dev->sc_base))return PTR_ERR (dsaf_dev->sc_base); - } res =platform_get_resource (pdev,IORESOURCE_MEM , res_idx++);
@@ -130,10 +128,8 @@ int hns_dsaf_get_cfg(struct dsaf_device *dsaf_dev) dsaf_dev->sds_base =devm_ioremap_resource (&pdev->dev, res); -if (IS_ERR (dsaf_dev->sds_base)) { -dev_err (dsaf_dev->dev,"serdes-ctrl can not map!\n" ); +if (IS_ERR (dsaf_dev->sds_base))return PTR_ERR (dsaf_dev->sds_base); - } }else { dsaf_dev->sub_ctrl = syscon; }
@@ -148,10 +144,8 @@ int hns_dsaf_get_cfg(struct dsaf_device *dsaf_dev) } } dsaf_dev->ppe_base =devm_ioremap_resource (&pdev->dev, res); -if (IS_ERR (dsaf_dev->ppe_base)) { -dev_err (dsaf_dev->dev,"ppe-base resource can not map!\n" ); +if (IS_ERR (dsaf_dev->ppe_base))return PTR_ERR (dsaf_dev->ppe_base); - } dsaf_dev->ppe_paddr = res->start;if (!HNS_DSAF_IS_DEBUG (dsaf_dev)) {
@@ -167,10 +161,8 @@ int hns_dsaf_get_cfg(struct dsaf_device *dsaf_dev) } } dsaf_dev->io_base =devm_ioremap_resource (&pdev->dev, res); -if (IS_ERR (dsaf_dev->io_base)) { -dev_err (dsaf_dev->dev,"dsaf-base resource can not map!\n" ); +if (IS_ERR (dsaf_dev->io_base))return PTR_ERR (dsaf_dev->io_base); - } } ret =device_property_read_u32 (dsaf_dev->dev,"desc-num" , &desc_num);
From: Wei Yongjun <[email protected]>
Date: Tue, 23 Aug 2016 15:11:03 +0000
Quoted 7 lines
From: Wei Yongjun <[email protected]>
There is a error message within
devm_ioremap_resourcealready, so remove thedev_errcall to avoid redundant error message.Signed-off-by Wei Yongjun <[email protected]>
Applied.
Quoted 14 lines
-----Original Message-----
From: David Miller [mailto:[email protected]]
Sent: Wednesday, August 24, 2016 1:19 AM
To: [email protected]
Cc: Zhuangyuzeng (Yisen); Salil Mehta; huangdaode; Yankejian (Hackim Yim); xieqianqian; weiyongjun (A); [email protected]
Subject: Re: [PATCH -next] net: hns: remove redundantdev_errcall inhns_dsaf_get_cfg()From: Wei Yongjun <[email protected]>
Date: Tue, 23 Aug 2016 15:11:03 +0000Quoted 2 lines
From: Wei Yongjun <[email protected]>
Quoted 7 lines
Quoted 5 lines
There is a error message within
devm_ioremap_resourcealready, so remove thedev_errcall to avoid redundant error message.Signed-off-by Wei Yongjun <[email protected]>Applied.
Hi David,
Forgive me for acting late on this but just realized that this patch will Conflict with Doug Ledford's hns-roce's HNS driver. This might lead to problems later during this merge window of 4.9. RoCE base driver has already suffered because of such problem during earlier merge window.
Can I request you to drop this patch for now? We shall submit this patch later again either through hns-roce or directly to net-next.
Thanks in anticipation
Salil