]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
alpha: squash lines for immediate return
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 11 Sep 2016 06:26:51 +0000 (15:26 +0900)
committerMatt Turner <mattst88@gmail.com>
Mon, 4 Sep 2017 19:04:32 +0000 (12:04 -0700)
Remove unneeded variables and assignments.

While we are here, fix the coding style of SMC37c669_read_config():
  - replace whitespaces at the start of lines with tabs
  - remove unneeded whitespaces around parentheses

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
arch/alpha/kernel/pci-noop.c
arch/alpha/kernel/pci.c
arch/alpha/kernel/smc37c669.c

index ffbdb3fb672f6b6d6e4f23a5d47fc519fb07203e..676bab6e31235db014dc1d09d741b18bd8bb8dc4 100644 (file)
@@ -42,11 +42,7 @@ alloc_pci_controller(void)
 struct resource * __init
 alloc_resource(void)
 {
-       struct resource *res;
-
-       res = alloc_bootmem(sizeof(*res));
-
-       return res;
+       return alloc_bootmem(sizeof(struct resource));
 }
 
 asmlinkage long
index 5f387ee5b5c5e0a69fb4817e9437cef5cf0c7cdd..8322df174bbfb84a4619123b6774d0cce8935dbf 100644 (file)
@@ -379,11 +379,7 @@ alloc_pci_controller(void)
 struct resource * __init
 alloc_resource(void)
 {
-       struct resource *res;
-
-       res = alloc_bootmem(sizeof(*res));
-
-       return res;
+       return alloc_bootmem(sizeof(struct resource));
 }
 
 
index c803fc76ae4f40a04665e5624ee8eaf823334d7b..4dbd4e41504159322ff13dbc335a7e1daea6efec 100644 (file)
@@ -2007,11 +2007,8 @@ static void __init SMC37c669_config_mode(
 static unsigned char __init SMC37c669_read_config( 
     unsigned char index )
 {
-    unsigned char data;
-
-    wb( &SMC37c669->index_port, index );
-    data = rb( &SMC37c669->data_port );
-    return data;
+       wb(&SMC37c669->index_port, index);
+       return rb(&SMC37c669->data_port);
 }
 \f
 /*