IB/mlx5: Delete locally redefined variable
authorLeon Romanovsky <leonro@mellanox.com>
Tue, 19 Jan 2016 09:11:24 +0000 (11:11 +0200)
committerDoug Ledford <dledford@redhat.com>
Tue, 19 Jan 2016 20:24:54 +0000 (15:24 -0500)
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>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/main.c

index 155dbe3826f8163e746d313752d39c89f4819743..5dffb9e6abece6a3bb67134cdb954b39005859f1 100644 (file)
@@ -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;