From: Bhaktipriya Shridhar Date: Mon, 22 Feb 2016 17:03:34 +0000 (+0530) Subject: staging: rdma: hfi1: Compress return logic X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7e43d4d255588360d5cf7a2113babd9d9d34465e;p=linux-beck.git staging: rdma: hfi1: Compress return logic Simplified function return by merging assignment and return into one line. Found with Coccinelle. @@ expression e; local idexpression ret; @@ - ret = + return e; - return ret; @@ type T; identifier x; @@ - T x; ... when != x Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rdma/hfi1/user_pages.c b/drivers/staging/rdma/hfi1/user_pages.c index 692de658f0dc..8ebfe9ee0d76 100644 --- a/drivers/staging/rdma/hfi1/user_pages.c +++ b/drivers/staging/rdma/hfi1/user_pages.c @@ -61,11 +61,7 @@ dma_addr_t hfi1_map_page(struct pci_dev *hwdev, struct page *page, unsigned long offset, size_t size, int direction) { - dma_addr_t phys; - - phys = pci_map_page(hwdev, page, offset, size, direction); - - return phys; + return pci_map_page(hwdev, page, offset, size, direction); } int hfi1_acquire_user_pages(unsigned long vaddr, size_t npages, bool writable,