diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-09-11 02:26:51 -0400 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2017-09-04 15:04:32 -0400 |
commit | 203308a5d1e96df245a2817ae7f39fa1b8544da4 (patch) | |
tree | a5e24e079c19ed3a83e5bba889e3a61a55e4a334 | |
parent | 236d62b03a95d70ffe04fbc4cd55a64136f2ee44 (diff) |
alpha: squash lines for immediate return
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>
-rw-r--r-- | arch/alpha/kernel/pci-noop.c | 6 | ||||
-rw-r--r-- | arch/alpha/kernel/pci.c | 6 | ||||
-rw-r--r-- | arch/alpha/kernel/smc37c669.c | 7 |
3 files changed, 4 insertions, 15 deletions
diff --git a/arch/alpha/kernel/pci-noop.c b/arch/alpha/kernel/pci-noop.c index ffbdb3fb672f..676bab6e3123 100644 --- a/arch/alpha/kernel/pci-noop.c +++ b/arch/alpha/kernel/pci-noop.c | |||
@@ -42,11 +42,7 @@ alloc_pci_controller(void) | |||
42 | struct resource * __init | 42 | struct resource * __init |
43 | alloc_resource(void) | 43 | alloc_resource(void) |
44 | { | 44 | { |
45 | struct resource *res; | 45 | return alloc_bootmem(sizeof(struct resource)); |
46 | |||
47 | res = alloc_bootmem(sizeof(*res)); | ||
48 | |||
49 | return res; | ||
50 | } | 46 | } |
51 | 47 | ||
52 | asmlinkage long | 48 | asmlinkage long |
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c index 5f387ee5b5c5..8322df174bbf 100644 --- a/arch/alpha/kernel/pci.c +++ b/arch/alpha/kernel/pci.c | |||
@@ -379,11 +379,7 @@ alloc_pci_controller(void) | |||
379 | struct resource * __init | 379 | struct resource * __init |
380 | alloc_resource(void) | 380 | alloc_resource(void) |
381 | { | 381 | { |
382 | struct resource *res; | 382 | return alloc_bootmem(sizeof(struct resource)); |
383 | |||
384 | res = alloc_bootmem(sizeof(*res)); | ||
385 | |||
386 | return res; | ||
387 | } | 383 | } |
388 | 384 | ||
389 | 385 | ||
diff --git a/arch/alpha/kernel/smc37c669.c b/arch/alpha/kernel/smc37c669.c index c803fc76ae4f..4dbd4e415041 100644 --- a/arch/alpha/kernel/smc37c669.c +++ b/arch/alpha/kernel/smc37c669.c | |||
@@ -2007,11 +2007,8 @@ static void __init SMC37c669_config_mode( | |||
2007 | static unsigned char __init SMC37c669_read_config( | 2007 | static unsigned char __init SMC37c669_read_config( |
2008 | unsigned char index ) | 2008 | unsigned char index ) |
2009 | { | 2009 | { |
2010 | unsigned char data; | 2010 | wb(&SMC37c669->index_port, index); |
2011 | 2011 | return rb(&SMC37c669->data_port); | |
2012 | wb( &SMC37c669->index_port, index ); | ||
2013 | data = rb( &SMC37c669->data_port ); | ||
2014 | return data; | ||
2015 | } | 2012 | } |
2016 | 2013 | ||
2017 | /* | 2014 | /* |