diff options
author | Steven J. Hill <Steven.Hill@imgtec.com> | 2013-03-25 16:05:40 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-05-08 06:30:10 -0400 |
commit | 49bffbdc88fdd8f5eac40306a617252625a0fa35 (patch) | |
tree | cc08116bbf4f742f0f8f2d4381182c13586bc187 /arch/mips/mti-malta/malta-memory.c | |
parent | 270690e00cdb034cd945ab597c24e6aff0227f77 (diff) |
MIPS: FW: malta: Code formatting clean-ups.
Clean-up code according to the 'checkpatch.pl' script.
Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com>
Diffstat (limited to 'arch/mips/mti-malta/malta-memory.c')
-rw-r--r-- | arch/mips/mti-malta/malta-memory.c | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/arch/mips/mti-malta/malta-memory.c b/arch/mips/mti-malta/malta-memory.c index 902ba718a717..1f73d63e92a7 100644 --- a/arch/mips/mti-malta/malta-memory.c +++ b/arch/mips/mti-malta/malta-memory.c | |||
@@ -1,31 +1,21 @@ | |||
1 | /* | 1 | /* |
2 | * Carsten Langgaard, carstenl@mips.com | 2 | * This file is subject to the terms and conditions of the GNU General Public |
3 | * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * | 4 | * for more details. |
5 | * This program is free software; you can distribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License (Version 2) as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
12 | * for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
17 | * | 5 | * |
18 | * PROM library functions for acquiring/using memory descriptors given to | 6 | * PROM library functions for acquiring/using memory descriptors given to |
19 | * us from the YAMON. | 7 | * us from the YAMON. |
8 | * | ||
9 | * Copyright (C) 1999,2000,2012 MIPS Technologies, Inc. | ||
10 | * All rights reserved. | ||
11 | * Authors: Carsten Langgaard <carstenl@mips.com> | ||
12 | * Steven J. Hill <sjhill@mips.com> | ||
20 | */ | 13 | */ |
21 | #include <linux/init.h> | 14 | #include <linux/init.h> |
22 | #include <linux/mm.h> | ||
23 | #include <linux/bootmem.h> | 15 | #include <linux/bootmem.h> |
24 | #include <linux/pfn.h> | ||
25 | #include <linux/string.h> | 16 | #include <linux/string.h> |
26 | 17 | ||
27 | #include <asm/bootinfo.h> | 18 | #include <asm/bootinfo.h> |
28 | #include <asm/page.h> | ||
29 | #include <asm/sections.h> | 19 | #include <asm/sections.h> |
30 | #include <asm/fw/fw.h> | 20 | #include <asm/fw/fw.h> |
31 | 21 | ||
@@ -36,19 +26,20 @@ unsigned long physical_memsize = 0L; | |||
36 | 26 | ||
37 | fw_memblock_t * __init fw_getmdesc(void) | 27 | fw_memblock_t * __init fw_getmdesc(void) |
38 | { | 28 | { |
39 | char *memsize_str; | 29 | char *memsize_str, *ptr; |
40 | unsigned int memsize; | 30 | unsigned int memsize; |
41 | char *ptr; | ||
42 | static char cmdline[COMMAND_LINE_SIZE] __initdata; | 31 | static char cmdline[COMMAND_LINE_SIZE] __initdata; |
32 | long val; | ||
33 | int tmp; | ||
43 | 34 | ||
44 | /* otherwise look in the environment */ | 35 | /* otherwise look in the environment */ |
45 | memsize_str = fw_getenv("memsize"); | 36 | memsize_str = fw_getenv("memsize"); |
46 | if (!memsize_str) { | 37 | if (!memsize_str) { |
47 | printk(KERN_WARNING | 38 | pr_warn("memsize not set in YAMON, set to default (32Mb)\n"); |
48 | "memsize not set in boot prom, set to default (32Mb)\n"); | ||
49 | physical_memsize = 0x02000000; | 39 | physical_memsize = 0x02000000; |
50 | } else { | 40 | } else { |
51 | physical_memsize = simple_strtol(memsize_str, NULL, 0); | 41 | tmp = kstrtol(memsize_str, 0, &val); |
42 | physical_memsize = (unsigned long)val; | ||
52 | } | 43 | } |
53 | 44 | ||
54 | #ifdef CONFIG_CPU_BIG_ENDIAN | 45 | #ifdef CONFIG_CPU_BIG_ENDIAN |
@@ -92,7 +83,8 @@ fw_memblock_t * __init fw_getmdesc(void) | |||
92 | 83 | ||
93 | mdesc[3].type = fw_dontuse; | 84 | mdesc[3].type = fw_dontuse; |
94 | mdesc[3].base = 0x00100000; | 85 | mdesc[3].base = 0x00100000; |
95 | mdesc[3].size = CPHYSADDR(PFN_ALIGN((unsigned long)&_end)) - mdesc[3].base; | 86 | mdesc[3].size = CPHYSADDR(PFN_ALIGN((unsigned long)&_end)) - |
87 | mdesc[3].base; | ||
96 | 88 | ||
97 | mdesc[4].type = fw_free; | 89 | mdesc[4].type = fw_free; |
98 | mdesc[4].base = CPHYSADDR(PFN_ALIGN(&_end)); | 90 | mdesc[4].base = CPHYSADDR(PFN_ALIGN(&_end)); |
@@ -142,7 +134,7 @@ void __init prom_free_prom_memory(void) | |||
142 | continue; | 134 | continue; |
143 | 135 | ||
144 | addr = boot_mem_map.map[i].addr; | 136 | addr = boot_mem_map.map[i].addr; |
145 | free_init_pages("prom memory", | 137 | free_init_pages("YAMON memory", |
146 | addr, addr + boot_mem_map.map[i].size); | 138 | addr, addr + boot_mem_map.map[i].size); |
147 | } | 139 | } |
148 | } | 140 | } |