diff mbox series

[v3] ASoC: sirf-audio: Remove redundant of_match_node call

Message ID 20190322220031.13773-1-pakki001@umn.edu (mailing list archive)
State New, archived
Headers show
Series [v3] ASoC: sirf-audio: Remove redundant of_match_node call | expand

Commit Message

Aditya Pakki March 22, 2019, 10 p.m. UTC
Unlike other drivers probe method, of_match_node return value
is not used or checked. This patch removes the redundant code.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>

---
v2: Move the signed by above the version change log
v1: A check is unnecessary as match is never used.
---
 sound/soc/codecs/sirf-audio-codec.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Steven Price March 25, 2019, 11:10 a.m. UTC | #1
On 22/03/2019 22:00, Aditya Pakki wrote:
> Unlike other drivers probe method, of_match_node return value
> is not used or checked. This patch removes the redundant code.
> 
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>

Reviewed-by: Steven Price <steven.price@arm.com>

> 
> ---
> v2: Move the signed by above the version change log
> v1: A check is unnecessary as match is never used.
> ---
>  sound/soc/codecs/sirf-audio-codec.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/sound/soc/codecs/sirf-audio-codec.c b/sound/soc/codecs/sirf-audio-codec.c
> index e424499a8450..e0af21050078 100644
> --- a/sound/soc/codecs/sirf-audio-codec.c
> +++ b/sound/soc/codecs/sirf-audio-codec.c
> @@ -461,9 +461,6 @@ static int sirf_audio_codec_driver_probe(struct platform_device *pdev)
>  	struct sirf_audio_codec *sirf_audio_codec;
>  	void __iomem *base;
>  	struct resource *mem_res;
> -	const struct of_device_id *match;
> -
> -	match = of_match_node(sirf_audio_codec_of_match, pdev->dev.of_node);
>  
>  	sirf_audio_codec = devm_kzalloc(&pdev->dev,
>  		sizeof(struct sirf_audio_codec), GFP_KERNEL);
>
Mukesh Ojha March 25, 2019, 1:51 p.m. UTC | #2
On 3/23/2019 3:30 AM, Aditya Pakki wrote:
> Unlike other drivers probe method, of_match_node return value

Instead could be written like "Use of `of_match_node` is redundant in 
sirf-audio-codec driver probe. Remove it."

> is not used or checked. This patch removes the redundant code.
>
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>

Reviewed-by: Mukesh Ojha <mojha@codeaurora.org 
<mailto:mojha@codeaurora.org>>

Thanks.
Mukesh


> ---
> v2: Move the signed by above the version change log
> v1: A check is unnecessary as match is never used.
> ---
>   sound/soc/codecs/sirf-audio-codec.c | 3 ---
>   1 file changed, 3 deletions(-)
>
> diff --git a/sound/soc/codecs/sirf-audio-codec.c b/sound/soc/codecs/sirf-audio-codec.c
> index e424499a8450..e0af21050078 100644
> --- a/sound/soc/codecs/sirf-audio-codec.c
> +++ b/sound/soc/codecs/sirf-audio-codec.c
> @@ -461,9 +461,6 @@ static int sirf_audio_codec_driver_probe(struct platform_device *pdev)
>   	struct sirf_audio_codec *sirf_audio_codec;
>   	void __iomem *base;
>   	struct resource *mem_res;
> -	const struct of_device_id *match;
> -
> -	match = of_match_node(sirf_audio_codec_of_match, pdev->dev.of_node);
>   
>   	sirf_audio_codec = devm_kzalloc(&pdev->dev,
>   		sizeof(struct sirf_audio_codec), GFP_KERNEL);
Mukesh Ojha March 27, 2019, 2:33 p.m. UTC | #3
On 3/23/2019 3:30 AM, Aditya Pakki wrote:
> Unlike other drivers probe method, of_match_node return value
> is not used or checked. This patch removes the redundant code.

Instead could be written like "Use of `of_match_node` is redundant in 
sirf-audio-codec driver probe. Remove it."

>
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>

Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

-Mukesh


>
> ---
> v2: Move the signed by above the version change log
> v1: A check is unnecessary as match is never used.
> ---
>   sound/soc/codecs/sirf-audio-codec.c | 3 ---
>   1 file changed, 3 deletions(-)
>
> diff --git a/sound/soc/codecs/sirf-audio-codec.c b/sound/soc/codecs/sirf-audio-codec.c
> index e424499a8450..e0af21050078 100644
> --- a/sound/soc/codecs/sirf-audio-codec.c
> +++ b/sound/soc/codecs/sirf-audio-codec.c
> @@ -461,9 +461,6 @@ static int sirf_audio_codec_driver_probe(struct platform_device *pdev)
>   	struct sirf_audio_codec *sirf_audio_codec;
>   	void __iomem *base;
>   	struct resource *mem_res;
> -	const struct of_device_id *match;
> -
> -	match = of_match_node(sirf_audio_codec_of_match, pdev->dev.of_node);
>   
>   	sirf_audio_codec = devm_kzalloc(&pdev->dev,
>   		sizeof(struct sirf_audio_codec), GFP_KERNEL);
diff mbox series

Patch

diff --git a/sound/soc/codecs/sirf-audio-codec.c b/sound/soc/codecs/sirf-audio-codec.c
index e424499a8450..e0af21050078 100644
--- a/sound/soc/codecs/sirf-audio-codec.c
+++ b/sound/soc/codecs/sirf-audio-codec.c
@@ -461,9 +461,6 @@  static int sirf_audio_codec_driver_probe(struct platform_device *pdev)
 	struct sirf_audio_codec *sirf_audio_codec;
 	void __iomem *base;
 	struct resource *mem_res;
-	const struct of_device_id *match;
-
-	match = of_match_node(sirf_audio_codec_of_match, pdev->dev.of_node);
 
 	sirf_audio_codec = devm_kzalloc(&pdev->dev,
 		sizeof(struct sirf_audio_codec), GFP_KERNEL);