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 <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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,