浏览代码

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>
Masahiro Yamada 9 年之前
父节点
当前提交
203308a5d1
共有 3 个文件被更改,包括 4 次插入15 次删除
  1. 1 5
      arch/alpha/kernel/pci-noop.c
  2. 1 5
      arch/alpha/kernel/pci.c
  3. 2 5
      arch/alpha/kernel/smc37c669.c

+ 1 - 5
arch/alpha/kernel/pci-noop.c

@@ -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

+ 1 - 5
arch/alpha/kernel/pci.c

@@ -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));
 }
 
 

+ 2 - 5
arch/alpha/kernel/smc37c669.c

@@ -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);
 }
 
 /*