diff mbox

IB/mlx5: Delete locally redefined variable

Message ID 1453194684-1549-1-git-send-email-leon@leon.nu (mailing list archive)
State Accepted
Headers show

Commit Message

Leon Romanovsky Jan. 19, 2016, 9:11 a.m. UTC
From: Leon Romanovsky <leonro@mellanox.com>

Fix the following sparse warning:
drivers/infiniband/hw/mlx5/main.c:1061:29: warning: symbol 'pfn' shadows
an earlier one
drivers/infiniband/hw/mlx5/main.c:1030:21: originally declared here

Fixes: d69e3bcf7976 ('IB/mlx5: Mmap the HCA's core clock register to user-space')
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 drivers/infiniband/hw/mlx5/main.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Doug Ledford Jan. 19, 2016, 8:43 p.m. UTC | #1
On 01/19/2016 04:11 AM, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@mellanox.com>
> 
> Fix the following sparse warning:
> drivers/infiniband/hw/mlx5/main.c:1061:29: warning: symbol 'pfn' shadows
> an earlier one
> drivers/infiniband/hw/mlx5/main.c:1030:21: originally declared here
> 
> Fixes: d69e3bcf7976 ('IB/mlx5: Mmap the HCA's core clock register to user-space')
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> ---
>  drivers/infiniband/hw/mlx5/main.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
> index 5e3d3aea35bc..5e997c0793d1 100644
> --- a/drivers/infiniband/hw/mlx5/main.c
> +++ b/drivers/infiniband/hw/mlx5/main.c
> @@ -1057,9 +1057,6 @@ static int mlx5_ib_mmap(struct ib_ucontext *ibcontext, struct vm_area_struct *vm
>  		return -ENOSYS;
>  
>  	case MLX5_IB_MMAP_CORE_CLOCK:
> -	{
> -		phys_addr_t pfn;
> -
>  		if (vma->vm_end - vma->vm_start != PAGE_SIZE)
>  			return -EINVAL;
>  
> @@ -1082,7 +1079,6 @@ static int mlx5_ib_mmap(struct ib_ucontext *ibcontext, struct vm_area_struct *vm
>  			    vma->vm_start,
>  			    (unsigned long long)pfn << PAGE_SHIFT);
>  		break;
> -	}
>  
>  	default:
>  		return -EINVAL;
> 

Thanks, applied.
diff mbox

Patch

diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 5e3d3aea35bc..5e997c0793d1 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -1057,9 +1057,6 @@  static int mlx5_ib_mmap(struct ib_ucontext *ibcontext, struct vm_area_struct *vm
 		return -ENOSYS;
 
 	case MLX5_IB_MMAP_CORE_CLOCK:
-	{
-		phys_addr_t pfn;
-
 		if (vma->vm_end - vma->vm_start != PAGE_SIZE)
 			return -EINVAL;
 
@@ -1082,7 +1079,6 @@  static int mlx5_ib_mmap(struct ib_ucontext *ibcontext, struct vm_area_struct *vm
 			    vma->vm_start,
 			    (unsigned long long)pfn << PAGE_SHIFT);
 		break;
-	}
 
 	default:
 		return -EINVAL;