All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: tc358743: Remove unnecessary self assignment
@ 2018-10-08 22:11 Nathan Chancellor
  2018-10-09 21:09 ` Kieran Bingham
  0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2018-10-08 22:11 UTC (permalink / raw)
  To: Mats Randgaard, Mauro Carvalho Chehab
  Cc: linux-media, linux-kernel, Nathan Chancellor

Clang warns when a variable is assigned to itself.

drivers/media/i2c/tc358743.c:1921:7: warning: explicitly assigning value
of variable of type 'int' to itself [-Wself-assign]
                ret = ret;
                ~~~ ^ ~~~
1 warning generated.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 drivers/media/i2c/tc358743.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c
index ca5d92942820..41d470d9ca94 100644
--- a/drivers/media/i2c/tc358743.c
+++ b/drivers/media/i2c/tc358743.c
@@ -1918,7 +1918,6 @@ static int tc358743_probe_of(struct tc358743_state *state)
 	ret = v4l2_fwnode_endpoint_alloc_parse(of_fwnode_handle(ep), &endpoint);
 	if (ret) {
 		dev_err(dev, "failed to parse endpoint\n");
-		ret = ret;
 		goto put_node;
 	}
 
-- 
2.19.0


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

* Re: [PATCH] media: tc358743: Remove unnecessary self assignment
  2018-10-08 22:11 [PATCH] media: tc358743: Remove unnecessary self assignment Nathan Chancellor
@ 2018-10-09 21:09 ` Kieran Bingham
  0 siblings, 0 replies; 2+ messages in thread
From: Kieran Bingham @ 2018-10-09 21:09 UTC (permalink / raw)
  To: Nathan Chancellor, Mats Randgaard, Mauro Carvalho Chehab
  Cc: linux-media, linux-kernel

Hi Nathan,

Thank you for the patch,

On 08/10/18 23:11, Nathan Chancellor wrote:
> Clang warns when a variable is assigned to itself.
> 
> drivers/media/i2c/tc358743.c:1921:7: warning: explicitly assigning value
> of variable of type 'int' to itself [-Wself-assign]
>                 ret = ret;
>                 ~~~ ^ ~~~
> 1 warning generated.
> 
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Certainly somewhat redundant.

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

> ---
>  drivers/media/i2c/tc358743.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c
> index ca5d92942820..41d470d9ca94 100644
> --- a/drivers/media/i2c/tc358743.c
> +++ b/drivers/media/i2c/tc358743.c
> @@ -1918,7 +1918,6 @@ static int tc358743_probe_of(struct tc358743_state *state)
>  	ret = v4l2_fwnode_endpoint_alloc_parse(of_fwnode_handle(ep), &endpoint);
>  	if (ret) {
>  		dev_err(dev, "failed to parse endpoint\n");
> -		ret = ret;
>  		goto put_node;
>  	}
>  
> 


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

end of thread, other threads:[~2018-10-09 21:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-08 22:11 [PATCH] media: tc358743: Remove unnecessary self assignment Nathan Chancellor
2018-10-09 21:09 ` Kieran Bingham

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.