* [PATCH -next] iio: adc: mt2701: Remove redundant dev_err call in mt6577_auxadc_probe()
@ 2016-08-26 14:26 Wei Yongjun
[not found] ` <1472221581-28836-1-git-send-email-weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2016-08-26 14:26 UTC (permalink / raw)
To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Matthias Brugger, Zhiyong Tao
Cc: Wei Yongjun, linux-iio-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
From: Wei Yongjun <weiyongjun1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
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 <weiyongjun1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
drivers/iio/adc/mt6577_auxadc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/iio/adc/mt6577_auxadc.c b/drivers/iio/adc/mt6577_auxadc.c
index 2d104c8..a268954 100644
--- a/drivers/iio/adc/mt6577_auxadc.c
+++ b/drivers/iio/adc/mt6577_auxadc.c
@@ -206,10 +206,8 @@ static int mt6577_auxadc_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
adc_dev->reg_base = devm_ioremap_resource(&pdev->dev, res);
- if (IS_ERR(adc_dev->reg_base)) {
- dev_err(&pdev->dev, "failed to get auxadc base address\n");
+ if (IS_ERR(adc_dev->reg_base))
return PTR_ERR(adc_dev->reg_base);
- }
adc_dev->adc_clk = devm_clk_get(&pdev->dev, "main");
if (IS_ERR(adc_dev->adc_clk)) {
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1472221581-28836-1-git-send-email-weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH -next] iio: adc: mt2701: Remove redundant dev_err call in mt6577_auxadc_probe() [not found] ` <1472221581-28836-1-git-send-email-weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2016-08-29 18:47 ` Jonathan Cameron [not found] ` <88307772-dd0f-a2f2-efd8-6c64a0cb14e4-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Jonathan Cameron @ 2016-08-29 18:47 UTC (permalink / raw) To: Wei Yongjun, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler, Matthias Brugger, Zhiyong Tao Cc: Wei Yongjun, linux-iio-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On 26/08/16 15:26, Wei Yongjun wrote: > From: Wei Yongjun <weiyongjun1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> > > 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 <weiyongjun1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> Hi Wei, I'm not so sure these are actually redundant. Overly verbose perhaps, but they do provide additional information in the log as the devm_ioremap_resource doesn't know 'what' has failed, merely how it has failed. I'm happy to take these, if the driver author / maintainers agree, but I'm not keen enough to take them without that. Zhiyong Tao, what do you think on this one? Jonathan > --- > drivers/iio/adc/mt6577_auxadc.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/iio/adc/mt6577_auxadc.c b/drivers/iio/adc/mt6577_auxadc.c > index 2d104c8..a268954 100644 > --- a/drivers/iio/adc/mt6577_auxadc.c > +++ b/drivers/iio/adc/mt6577_auxadc.c > @@ -206,10 +206,8 @@ static int mt6577_auxadc_probe(struct platform_device *pdev) > > res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > adc_dev->reg_base = devm_ioremap_resource(&pdev->dev, res); > - if (IS_ERR(adc_dev->reg_base)) { > - dev_err(&pdev->dev, "failed to get auxadc base address\n"); > + if (IS_ERR(adc_dev->reg_base)) > return PTR_ERR(adc_dev->reg_base); > - } > > adc_dev->adc_clk = devm_clk_get(&pdev->dev, "main"); > if (IS_ERR(adc_dev->adc_clk)) { > > > ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <88307772-dd0f-a2f2-efd8-6c64a0cb14e4-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>]
* Re: [PATCH -next] iio: adc: mt2701: Remove redundant dev_err call in mt6577_auxadc_probe() [not found] ` <88307772-dd0f-a2f2-efd8-6c64a0cb14e4-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> @ 2016-08-30 1:29 ` zhiyong tao 0 siblings, 0 replies; 3+ messages in thread From: zhiyong tao @ 2016-08-30 1:29 UTC (permalink / raw) To: Jonathan Cameron Cc: Lars-Peter Clausen, Wei Yongjun, linux-iio-u79uwXL29TY76Z2rM5mHXA, zhiyong.tao-NuS5LvNUpcJWk0Htik3J/w, erin.lo-NuS5LvNUpcJWk0Htik3J/w, liguo.zhang-NuS5LvNUpcJWk0Htik3J/w, yingjoe.chen-NuS5LvNUpcJWk0Htik3J/w, Wei Yongjun, Peter Meerwald-Stadler, Hartmut Knaack, Matthias Brugger, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, eddie.huang-NuS5LvNUpcJWk0Htik3J/w, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On Mon, 2016-08-29 at 19:47 +0100, Jonathan Cameron wrote: > On 26/08/16 15:26, Wei Yongjun wrote: > > From: Wei Yongjun <weiyongjun1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> > > > > 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 <weiyongjun1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> > Hi Wei, > > I'm not so sure these are actually redundant. Overly verbose perhaps, > but they do provide additional information in the log as the > devm_ioremap_resource doesn't know 'what' has failed, merely how > it has failed. > > I'm happy to take these, if the driver author / maintainers > agree, but I'm not keen enough to take them without that. > > Zhiyong Tao, what do you think on this one? > > Jonathan Dear Jonathan, Thank you for your suggestion. I think that we can know 'what' has failed in the driver, if we retain the error message log. It maybe advantageous to debug issues. Zhiyong > > --- > > drivers/iio/adc/mt6577_auxadc.c | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/drivers/iio/adc/mt6577_auxadc.c b/drivers/iio/adc/mt6577_auxadc.c > > index 2d104c8..a268954 100644 > > --- a/drivers/iio/adc/mt6577_auxadc.c > > +++ b/drivers/iio/adc/mt6577_auxadc.c > > @@ -206,10 +206,8 @@ static int mt6577_auxadc_probe(struct platform_device *pdev) > > > > res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > adc_dev->reg_base = devm_ioremap_resource(&pdev->dev, res); > > - if (IS_ERR(adc_dev->reg_base)) { > > - dev_err(&pdev->dev, "failed to get auxadc base address\n"); > > + if (IS_ERR(adc_dev->reg_base)) > > return PTR_ERR(adc_dev->reg_base); > > - } > > > > adc_dev->adc_clk = devm_clk_get(&pdev->dev, "main"); > > if (IS_ERR(adc_dev->adc_clk)) { > > > > > > > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-30 1:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-26 14:26 [PATCH -next] iio: adc: mt2701: Remove redundant dev_err call in mt6577_auxadc_probe() Wei Yongjun
[not found] ` <1472221581-28836-1-git-send-email-weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-29 18:47 ` Jonathan Cameron
[not found] ` <88307772-dd0f-a2f2-efd8-6c64a0cb14e4-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-08-30 1:29 ` zhiyong tao
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).