All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: codec: Omit superfluous error message in jz4760_codec_probe()
@ 2021-03-02 12:11 Tang Bin
  2021-03-02 12:23   ` Paul Cercueil
  0 siblings, 1 reply; 7+ messages in thread
From: Tang Bin @ 2021-03-02 12:11 UTC (permalink / raw)
  To: broonie, paul, lgirdwood, perex, tiwai; +Cc: alsa-devel, linux-kernel, Tang Bin

The function devm_platform_ioremap_resource has already contained error
message, so remove the redundant dev_err here.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 sound/soc/codecs/jz4760.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/codecs/jz4760.c b/sound/soc/codecs/jz4760.c
index e8f28ccc145a..c2d8a107f159 100644
--- a/sound/soc/codecs/jz4760.c
+++ b/sound/soc/codecs/jz4760.c
@@ -843,7 +843,6 @@ static int jz4760_codec_probe(struct platform_device *pdev)
 	codec->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(codec->base)) {
 		ret = PTR_ERR(codec->base);
-		dev_err(dev, "Failed to ioremap mmio memory: %d\n", ret);
 		return ret;
 	}
 
-- 
2.18.2




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

* Re: [PATCH] ASoC: codec: Omit superfluous error message in jz4760_codec_probe()
  2021-03-02 12:11 [PATCH] ASoC: codec: Omit superfluous error message in jz4760_codec_probe() Tang Bin
@ 2021-03-02 12:23   ` Paul Cercueil
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Cercueil @ 2021-03-02 12:23 UTC (permalink / raw)
  To: Tang Bin; +Cc: broonie, lgirdwood, perex, tiwai, alsa-devel, linux-kernel

Hi Tang,

Le mar. 2 mars 2021 à 20:11, Tang Bin <tangbin@cmss.chinamobile.com> a 
écrit :
> The function devm_platform_ioremap_resource has already contained 
> error
> message, so remove the redundant dev_err here.
> 
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> ---
>  sound/soc/codecs/jz4760.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/sound/soc/codecs/jz4760.c b/sound/soc/codecs/jz4760.c
> index e8f28ccc145a..c2d8a107f159 100644
> --- a/sound/soc/codecs/jz4760.c
> +++ b/sound/soc/codecs/jz4760.c
> @@ -843,7 +843,6 @@ static int jz4760_codec_probe(struct 
> platform_device *pdev)
>  	codec->base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(codec->base)) {
>  		ret = PTR_ERR(codec->base);
> -		dev_err(dev, "Failed to ioremap mmio memory: %d\n", ret);
>  		return ret;
>  	}

Indeed, you are right.

I guess you do this instead:

if (IS_ERR(codec->base))
    return PTR_ERR(codec->base);

Cheers,
-Paul




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

* Re: [PATCH] ASoC: codec: Omit superfluous error message in jz4760_codec_probe()
@ 2021-03-02 12:23   ` Paul Cercueil
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Cercueil @ 2021-03-02 12:23 UTC (permalink / raw)
  To: Tang Bin; +Cc: alsa-devel, lgirdwood, linux-kernel, tiwai, broonie

Hi Tang,

Le mar. 2 mars 2021 à 20:11, Tang Bin <tangbin@cmss.chinamobile.com> a 
écrit :
> The function devm_platform_ioremap_resource has already contained 
> error
> message, so remove the redundant dev_err here.
> 
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> ---
>  sound/soc/codecs/jz4760.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/sound/soc/codecs/jz4760.c b/sound/soc/codecs/jz4760.c
> index e8f28ccc145a..c2d8a107f159 100644
> --- a/sound/soc/codecs/jz4760.c
> +++ b/sound/soc/codecs/jz4760.c
> @@ -843,7 +843,6 @@ static int jz4760_codec_probe(struct 
> platform_device *pdev)
>  	codec->base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(codec->base)) {
>  		ret = PTR_ERR(codec->base);
> -		dev_err(dev, "Failed to ioremap mmio memory: %d\n", ret);
>  		return ret;
>  	}

Indeed, you are right.

I guess you do this instead:

if (IS_ERR(codec->base))
    return PTR_ERR(codec->base);

Cheers,
-Paul




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

* Re: [PATCH] ASoC: codec: Omit superfluous error message injz4760_codec_probe()
  2021-03-02 12:23   ` Paul Cercueil
@ 2021-03-02 12:55     ` tangbin
  -1 siblings, 0 replies; 7+ messages in thread
From: tangbin @ 2021-03-02 12:55 UTC (permalink / raw)
  To: Paul Cercueil; +Cc: broonie, lgirdwood, perex, tiwai, alsa-devel, linux-kernel

Hi Paul:

On 2021/3/2 20:23, Paul Cercueil wrote:
> Hi Tang,
>
> Le mar. 2 mars 2021 à 20:11, Tang Bin <tangbin@cmss.chinamobile.com> a 
> écrit :
>> The function devm_platform_ioremap_resource has already contained error
>> message, so remove the redundant dev_err here.
>>
>> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
>> ---
>>  sound/soc/codecs/jz4760.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/sound/soc/codecs/jz4760.c b/sound/soc/codecs/jz4760.c
>> index e8f28ccc145a..c2d8a107f159 100644
>> --- a/sound/soc/codecs/jz4760.c
>> +++ b/sound/soc/codecs/jz4760.c
>> @@ -843,7 +843,6 @@ static int jz4760_codec_probe(struct 
>> platform_device *pdev)
>>      codec->base = devm_platform_ioremap_resource(pdev, 0);
>>      if (IS_ERR(codec->base)) {
>>          ret = PTR_ERR(codec->base);
>> -        dev_err(dev, "Failed to ioremap mmio memory: %d\n", ret);
>>          return ret;
>>      }
>
> Indeed, you are right.
>
> I guess you do this instead:
>
> if (IS_ERR(codec->base))
>    return PTR_ERR(codec->base);

Yes, I would have written it in your ways, but considered the variable 
"ret", I gave up, and just deleted dev_err().


Thanks

Tang Bin






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

* Re: [PATCH] ASoC: codec: Omit superfluous error message injz4760_codec_probe()
@ 2021-03-02 12:55     ` tangbin
  0 siblings, 0 replies; 7+ messages in thread
From: tangbin @ 2021-03-02 12:55 UTC (permalink / raw)
  To: Paul Cercueil; +Cc: alsa-devel, lgirdwood, linux-kernel, tiwai, broonie

Hi Paul:

On 2021/3/2 20:23, Paul Cercueil wrote:
> Hi Tang,
>
> Le mar. 2 mars 2021 à 20:11, Tang Bin <tangbin@cmss.chinamobile.com> a 
> écrit :
>> The function devm_platform_ioremap_resource has already contained error
>> message, so remove the redundant dev_err here.
>>
>> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
>> ---
>>  sound/soc/codecs/jz4760.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/sound/soc/codecs/jz4760.c b/sound/soc/codecs/jz4760.c
>> index e8f28ccc145a..c2d8a107f159 100644
>> --- a/sound/soc/codecs/jz4760.c
>> +++ b/sound/soc/codecs/jz4760.c
>> @@ -843,7 +843,6 @@ static int jz4760_codec_probe(struct 
>> platform_device *pdev)
>>      codec->base = devm_platform_ioremap_resource(pdev, 0);
>>      if (IS_ERR(codec->base)) {
>>          ret = PTR_ERR(codec->base);
>> -        dev_err(dev, "Failed to ioremap mmio memory: %d\n", ret);
>>          return ret;
>>      }
>
> Indeed, you are right.
>
> I guess you do this instead:
>
> if (IS_ERR(codec->base))
>    return PTR_ERR(codec->base);

Yes, I would have written it in your ways, but considered the variable 
"ret", I gave up, and just deleted dev_err().


Thanks

Tang Bin






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

* Re: [PATCH] ASoC: codec: Omit superfluous error message injz4760_codec_probe()
  2021-03-02 12:55     ` tangbin
@ 2021-03-02 13:20       ` Mark Brown
  -1 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2021-03-02 13:20 UTC (permalink / raw)
  To: tangbin; +Cc: Paul Cercueil, lgirdwood, perex, tiwai, alsa-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

On Tue, Mar 02, 2021 at 08:55:25PM +0800, tangbin wrote:

> Yes, I would have written it in your ways, but considered the variable
> "ret", I gave up, and just deleted dev_err().

If it's not used any more it can just be removed.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] ASoC: codec: Omit superfluous error message injz4760_codec_probe()
@ 2021-03-02 13:20       ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2021-03-02 13:20 UTC (permalink / raw)
  To: tangbin; +Cc: alsa-devel, lgirdwood, linux-kernel, tiwai, Paul Cercueil

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

On Tue, Mar 02, 2021 at 08:55:25PM +0800, tangbin wrote:

> Yes, I would have written it in your ways, but considered the variable
> "ret", I gave up, and just deleted dev_err().

If it's not used any more it can just be removed.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2021-03-02 16:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-02 12:11 [PATCH] ASoC: codec: Omit superfluous error message in jz4760_codec_probe() Tang Bin
2021-03-02 12:23 ` Paul Cercueil
2021-03-02 12:23   ` Paul Cercueil
2021-03-02 12:55   ` [PATCH] ASoC: codec: Omit superfluous error message injz4760_codec_probe() tangbin
2021-03-02 12:55     ` tangbin
2021-03-02 13:20     ` Mark Brown
2021-03-02 13:20       ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.