MIPS: Squash lines for simple wrapper functions
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 14 Sep 2016 15:31:01 +0000 (00:31 +0900)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 4 Oct 2016 14:13:57 +0000 (16:13 +0200)
Remove unneeded variables and assignments.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14260/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/mach-generic/floppy.h
arch/mips/include/asm/pgalloc.h
arch/mips/mti-malta/malta-platform.c
arch/mips/pnx833x/common/platform.c

index e2561d99a3feaf12d9d54d948cf2403fc18a8d5c..9ec2f6a5200b6f7ce5bff8d2708b1e7849972d3a 100644 (file)
@@ -115,11 +115,7 @@ static inline unsigned long fd_getfdaddr1(void)
 
 static inline unsigned long fd_dma_mem_alloc(unsigned long size)
 {
-       unsigned long mem;
-
-       mem = __get_dma_pages(GFP_KERNEL, get_order(size));
-
-       return mem;
+       return __get_dma_pages(GFP_KERNEL, get_order(size));
 }
 
 static inline void fd_dma_mem_free(unsigned long addr, unsigned long size)
index 93c079a1cfc8e1f13366590e939c47eade8db789..a03e86969f78a86a9989897ad95cfad1b7798d73 100644 (file)
@@ -67,11 +67,7 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
 static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
        unsigned long address)
 {
-       pte_t *pte;
-
-       pte = (pte_t *) __get_free_pages(GFP_KERNEL|__GFP_ZERO, PTE_ORDER);
-
-       return pte;
+       return (pte_t *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, PTE_ORDER);
 }
 
 static inline struct page *pte_alloc_one(struct mm_struct *mm,
index e1dd1c1d3fdeed9f5214dc18ec4cb7f2c5593279..20a53e73b28ec3ce6de6ac3bfd02817df8b94c98 100644 (file)
@@ -135,13 +135,7 @@ static struct platform_device *malta_devices[] __initdata = {
 
 static int __init malta_add_devices(void)
 {
-       int err;
-
-       err = platform_add_devices(malta_devices, ARRAY_SIZE(malta_devices));
-       if (err)
-               return err;
-
-       return 0;
+       return platform_add_devices(malta_devices, ARRAY_SIZE(malta_devices));
 }
 
 device_initcall(malta_add_devices);
index 3cd357737a267c38dc20b85724b723f37f26bd01..7cf4eb50fc7211f93219dbe23cb47581cac32f3a 100644 (file)
@@ -232,12 +232,8 @@ static struct platform_device *pnx833x_platform_devices[] __initdata = {
 
 static int __init pnx833x_platform_init(void)
 {
-       int res;
-
-       res = platform_add_devices(pnx833x_platform_devices,
-                                  ARRAY_SIZE(pnx833x_platform_devices));
-
-       return res;
+       return platform_add_devices(pnx833x_platform_devices,
+                                   ARRAY_SIZE(pnx833x_platform_devices));
 }
 
 arch_initcall(pnx833x_platform_init);