All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vme: ca91cx42: remove redundant variable i
@ 2018-07-14 16:33 ` Colin King
  0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2018-07-14 16:33 UTC (permalink / raw)
  To: Martyn Welch, Manohar Vanga, Greg Kroah-Hartman, Markus Elfring, devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Variable i is being assigned but is never used hence it is redundant
and can be removed.

Cleans up clang warning:
warning: variable 'i' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/vme/bridges/vme_ca91cx42.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_ca91cx42.c
index 5dd284008630..53bdc256805f 100644
--- a/drivers/vme/bridges/vme_ca91cx42.c
+++ b/drivers/vme/bridges/vme_ca91cx42.c
@@ -970,7 +970,6 @@ static unsigned int ca91cx42_master_rmw(struct vme_master_resource *image,
 {
 	u32 result;
 	uintptr_t pci_addr;
-	int i;
 	struct ca91cx42_driver *bridge;
 	struct device *dev;
 
@@ -978,7 +977,6 @@ static unsigned int ca91cx42_master_rmw(struct vme_master_resource *image,
 	dev = image->parent->parent;
 
 	/* Find the PCI address that maps to the desired VME address */
-	i = image->number;
 
 	/* Locking as we can only do one of these at a time */
 	mutex_lock(&bridge->vme_rmw);
-- 
2.17.1


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

* [PATCH] vme: ca91cx42: remove redundant variable i
@ 2018-07-14 16:33 ` Colin King
  0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2018-07-14 16:33 UTC (permalink / raw)
  To: Martyn Welch, Manohar Vanga, Greg Kroah-Hartman, Markus Elfring, devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Variable i is being assigned but is never used hence it is redundant
and can be removed.

Cleans up clang warning:
warning: variable 'i' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/vme/bridges/vme_ca91cx42.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_ca91cx42.c
index 5dd284008630..53bdc256805f 100644
--- a/drivers/vme/bridges/vme_ca91cx42.c
+++ b/drivers/vme/bridges/vme_ca91cx42.c
@@ -970,7 +970,6 @@ static unsigned int ca91cx42_master_rmw(struct vme_master_resource *image,
 {
 	u32 result;
 	uintptr_t pci_addr;
-	int i;
 	struct ca91cx42_driver *bridge;
 	struct device *dev;
 
@@ -978,7 +977,6 @@ static unsigned int ca91cx42_master_rmw(struct vme_master_resource *image,
 	dev = image->parent->parent;
 
 	/* Find the PCI address that maps to the desired VME address */
-	i = image->number;
 
 	/* Locking as we can only do one of these at a time */
 	mutex_lock(&bridge->vme_rmw);
-- 
2.17.1


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

* Re: [PATCH] vme: ca91cx42: remove redundant variable i
  2018-07-14 16:33 ` Colin King
@ 2018-07-14 21:22   ` Martyn Welch
  -1 siblings, 0 replies; 4+ messages in thread
From: Martyn Welch @ 2018-07-14 21:22 UTC (permalink / raw)
  To: Colin King
  Cc: Manohar Vanga, Greg Kroah-Hartman, Markus Elfring, devel,
	kernel-janitors, linux-kernel

On Sat, Jul 14, 2018 at 05:33:32PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Variable i is being assigned but is never used hence it is redundant
> and can be removed.
> 
> Cleans up clang warning:
> warning: variable 'i' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Martyn Welch <martyn@welchs.me.uk>

> ---
>  drivers/vme/bridges/vme_ca91cx42.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_ca91cx42.c
> index 5dd284008630..53bdc256805f 100644
> --- a/drivers/vme/bridges/vme_ca91cx42.c
> +++ b/drivers/vme/bridges/vme_ca91cx42.c
> @@ -970,7 +970,6 @@ static unsigned int ca91cx42_master_rmw(struct vme_master_resource *image,
>  {
>  	u32 result;
>  	uintptr_t pci_addr;
> -	int i;
>  	struct ca91cx42_driver *bridge;
>  	struct device *dev;
>  
> @@ -978,7 +977,6 @@ static unsigned int ca91cx42_master_rmw(struct vme_master_resource *image,
>  	dev = image->parent->parent;
>  
>  	/* Find the PCI address that maps to the desired VME address */
> -	i = image->number;
>  
>  	/* Locking as we can only do one of these at a time */
>  	mutex_lock(&bridge->vme_rmw);
> -- 
> 2.17.1
> 

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

* Re: [PATCH] vme: ca91cx42: remove redundant variable i
@ 2018-07-14 21:22   ` Martyn Welch
  0 siblings, 0 replies; 4+ messages in thread
From: Martyn Welch @ 2018-07-14 21:22 UTC (permalink / raw)
  To: Colin King
  Cc: Manohar Vanga, Greg Kroah-Hartman, Markus Elfring, devel,
	kernel-janitors, linux-kernel

On Sat, Jul 14, 2018 at 05:33:32PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Variable i is being assigned but is never used hence it is redundant
> and can be removed.
> 
> Cleans up clang warning:
> warning: variable 'i' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Martyn Welch <martyn@welchs.me.uk>

> ---
>  drivers/vme/bridges/vme_ca91cx42.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_ca91cx42.c
> index 5dd284008630..53bdc256805f 100644
> --- a/drivers/vme/bridges/vme_ca91cx42.c
> +++ b/drivers/vme/bridges/vme_ca91cx42.c
> @@ -970,7 +970,6 @@ static unsigned int ca91cx42_master_rmw(struct vme_master_resource *image,
>  {
>  	u32 result;
>  	uintptr_t pci_addr;
> -	int i;
>  	struct ca91cx42_driver *bridge;
>  	struct device *dev;
>  
> @@ -978,7 +977,6 @@ static unsigned int ca91cx42_master_rmw(struct vme_master_resource *image,
>  	dev = image->parent->parent;
>  
>  	/* Find the PCI address that maps to the desired VME address */
> -	i = image->number;
>  
>  	/* Locking as we can only do one of these at a time */
>  	mutex_lock(&bridge->vme_rmw);
> -- 
> 2.17.1
> 

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

end of thread, other threads:[~2018-07-14 21:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-14 16:33 [PATCH] vme: ca91cx42: remove redundant variable i Colin King
2018-07-14 16:33 ` Colin King
2018-07-14 21:22 ` Martyn Welch
2018-07-14 21:22   ` Martyn Welch

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.