All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: saa7164: remove variable cnt
@ 2022-10-24 15:13 Colin Ian King
  2022-10-28 15:11 ` Tommaso Merciai
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-10-24 15:13 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Hans Verkuil, Slark Xiao, linux-media
  Cc: kernel-janitors, linux-kernel

Variable cnt is just being incremented and it's never used
anywhere else. The variable and the increment are redundant so
remove it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/media/pci/saa7164/saa7164-core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c
index d5f32e3ff544..01d75ef2342d 100644
--- a/drivers/media/pci/saa7164/saa7164-core.c
+++ b/drivers/media/pci/saa7164/saa7164-core.c
@@ -352,7 +352,7 @@ static void saa7164_work_enchandler(struct work_struct *w)
 		container_of(w, struct saa7164_port, workenc);
 	struct saa7164_dev *dev = port->dev;
 
-	u32 wp, mcb, rp, cnt = 0;
+	u32 wp, mcb, rp;
 
 	port->last_svc_msecs_diff = port->last_svc_msecs;
 	port->last_svc_msecs = jiffies_to_msecs(jiffies);
@@ -405,7 +405,6 @@ static void saa7164_work_enchandler(struct work_struct *w)
 
 		saa7164_work_enchandler_helper(port, rp);
 		port->last_svc_rp = rp;
-		cnt++;
 
 		if (rp == mcb)
 			break;
@@ -429,7 +428,7 @@ static void saa7164_work_vbihandler(struct work_struct *w)
 		container_of(w, struct saa7164_port, workenc);
 	struct saa7164_dev *dev = port->dev;
 
-	u32 wp, mcb, rp, cnt = 0;
+	u32 wp, mcb, rp;
 
 	port->last_svc_msecs_diff = port->last_svc_msecs;
 	port->last_svc_msecs = jiffies_to_msecs(jiffies);
@@ -481,7 +480,6 @@ static void saa7164_work_vbihandler(struct work_struct *w)
 
 		saa7164_work_enchandler_helper(port, rp);
 		port->last_svc_rp = rp;
-		cnt++;
 
 		if (rp == mcb)
 			break;
-- 
2.37.3


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

* Re: [PATCH] media: saa7164: remove variable cnt
  2022-10-24 15:13 [PATCH] media: saa7164: remove variable cnt Colin Ian King
@ 2022-10-28 15:11 ` Tommaso Merciai
  0 siblings, 0 replies; 2+ messages in thread
From: Tommaso Merciai @ 2022-10-28 15:11 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Mauro Carvalho Chehab, Hans Verkuil, Slark Xiao, linux-media,
	kernel-janitors, linux-kernel

Hi Colin,

On Mon, Oct 24, 2022 at 04:13:54PM +0100, Colin Ian King wrote:
> Variable cnt is just being incremented and it's never used
> anywhere else. The variable and the increment are redundant so
> remove it.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  drivers/media/pci/saa7164/saa7164-core.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c
> index d5f32e3ff544..01d75ef2342d 100644
> --- a/drivers/media/pci/saa7164/saa7164-core.c
> +++ b/drivers/media/pci/saa7164/saa7164-core.c
> @@ -352,7 +352,7 @@ static void saa7164_work_enchandler(struct work_struct *w)
>  		container_of(w, struct saa7164_port, workenc);
>  	struct saa7164_dev *dev = port->dev;
>  
> -	u32 wp, mcb, rp, cnt = 0;
> +	u32 wp, mcb, rp;
>  
>  	port->last_svc_msecs_diff = port->last_svc_msecs;
>  	port->last_svc_msecs = jiffies_to_msecs(jiffies);
> @@ -405,7 +405,6 @@ static void saa7164_work_enchandler(struct work_struct *w)
>  
>  		saa7164_work_enchandler_helper(port, rp);
>  		port->last_svc_rp = rp;
> -		cnt++;
>  
>  		if (rp == mcb)
>  			break;
> @@ -429,7 +428,7 @@ static void saa7164_work_vbihandler(struct work_struct *w)
>  		container_of(w, struct saa7164_port, workenc);
>  	struct saa7164_dev *dev = port->dev;
>  
> -	u32 wp, mcb, rp, cnt = 0;
> +	u32 wp, mcb, rp;
>  
>  	port->last_svc_msecs_diff = port->last_svc_msecs;
>  	port->last_svc_msecs = jiffies_to_msecs(jiffies);
> @@ -481,7 +480,6 @@ static void saa7164_work_vbihandler(struct work_struct *w)
>  
>  		saa7164_work_enchandler_helper(port, rp);
>  		port->last_svc_rp = rp;
> -		cnt++;
>  
>  		if (rp == mcb)
>  			break;
> -- 
> 2.37.3
> 

Looks good to me.

Reviewed-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>

-- 
Tommaso Merciai
Embedded Linux Engineer
tommaso.merciai@amarulasolutions.com
__________________________________

Amarula Solutions SRL
Via Le Canevare 30, 31100 Treviso, Veneto, IT
T. +39 042 243 5310
info@amarulasolutions.com
www.amarulasolutions.com

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

end of thread, other threads:[~2022-10-28 15:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-24 15:13 [PATCH] media: saa7164: remove variable cnt Colin Ian King
2022-10-28 15:11 ` Tommaso Merciai

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.