powerpc: powernv: Remove unneeded variable: "rc"
diff mbox series

Message ID 20210326115356.12444-1-dingsenjie@163.com
State Accepted
Commit 69931cc387cca289e0415c79ce5389119670066d
Headers show
Series
  • powerpc: powernv: Remove unneeded variable: "rc"
Related show

Commit Message

dingsenjie@163.com March 26, 2021, 11:53 a.m. UTC
From: dingsenjie <dingsenjie@yulong.com>

Remove unneeded variable: "rc".

Signed-off-by: dingsenjie <dingsenjie@yulong.com>
---
 arch/powerpc/platforms/powernv/opal-prd.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Andrew Donnellan March 26, 2021, 2:59 p.m. UTC | #1
On 26/3/21 10:53 pm, dingsenjie@163.com wrote:
> From: dingsenjie <dingsenjie@yulong.com>
> 
> Remove unneeded variable: "rc".
> 
> Signed-off-by: dingsenjie <dingsenjie@yulong.com>

This looks obviously correct and doesn't raise any checkpatch warnings.

Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com>
Michael Ellerman March 31, 2021, 1:09 a.m. UTC | #2
On Fri, 26 Mar 2021 19:53:56 +0800, dingsenjie@163.com wrote:
> Remove unneeded variable: "rc".

Applied to powerpc/next.

[1/1] powerpc: powernv: Remove unneeded variable: "rc"
      https://git.kernel.org/powerpc/c/69931cc387cca289e0415c79ce5389119670066d

cheers

Patch
diff mbox series

diff --git a/arch/powerpc/platforms/powernv/opal-prd.c b/arch/powerpc/platforms/powernv/opal-prd.c
index deddaeb..a191f4c 100644
--- a/arch/powerpc/platforms/powernv/opal-prd.c
+++ b/arch/powerpc/platforms/powernv/opal-prd.c
@@ -105,7 +105,6 @@  static int opal_prd_mmap(struct file *file, struct vm_area_struct *vma)
 {
 	size_t addr, size;
 	pgprot_t page_prot;
-	int rc;
 
 	pr_devel("opal_prd_mmap(0x%016lx, 0x%016lx, 0x%lx, 0x%lx)\n",
 			vma->vm_start, vma->vm_end, vma->vm_pgoff,
@@ -121,10 +120,8 @@  static int opal_prd_mmap(struct file *file, struct vm_area_struct *vma)
 	page_prot = phys_mem_access_prot(file, vma->vm_pgoff,
 					 size, vma->vm_page_prot);
 
-	rc = remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, size,
+	return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, size,
 				page_prot);
-
-	return rc;
 }
 
 static bool opal_msg_queue_empty(void)