aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memblock.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-12-08 13:22:06 -0500
committerTejun Heo <tj@kernel.org>2011-12-08 13:22:06 -0500
commit581adcbe121872429de76ff9884762de71a76200 (patch)
tree6c7f0faf7ee8812630197e7c23fc32bb4cc978c2 /mm/memblock.c
parent1c16d242aa441c11ccaeaa63b49712555b8bfaeb (diff)
memblock: Make memblock_{add|remove|free|reserve}() return int and update prototypes
memblock_{add|remove|free|reserve}() return either 0 or -errno but had long as return type. Chage it to int. Also, drop 'extern' from all prototypes in memblock.h - they are unnecessary and used inconsistently (especially if mm.h is included in the picture). Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Yinghai Lu <yinghai@kernel.org>
Diffstat (limited to 'mm/memblock.c')
-rw-r--r--mm/memblock.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/mm/memblock.c b/mm/memblock.c
index a57092f63a86..948036718245 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -176,7 +176,7 @@ static void __init_memblock memblock_remove_region(struct memblock_type *type, u
176} 176}
177 177
178/* Defined below but needed now */ 178/* Defined below but needed now */
179static long memblock_add_region(struct memblock_type *type, phys_addr_t base, phys_addr_t size); 179static int memblock_add_region(struct memblock_type *type, phys_addr_t base, phys_addr_t size);
180 180
181static int __init_memblock memblock_double_array(struct memblock_type *type) 181static int __init_memblock memblock_double_array(struct memblock_type *type)
182{ 182{
@@ -316,8 +316,8 @@ static void __init_memblock memblock_insert_region(struct memblock_type *type,
316 * RETURNS: 316 * RETURNS:
317 * 0 on success, -errno on failure. 317 * 0 on success, -errno on failure.
318 */ 318 */
319static long __init_memblock memblock_add_region(struct memblock_type *type, 319static int __init_memblock memblock_add_region(struct memblock_type *type,
320 phys_addr_t base, phys_addr_t size) 320 phys_addr_t base, phys_addr_t size)
321{ 321{
322 bool insert = false; 322 bool insert = false;
323 phys_addr_t obase = base, end = base + size; 323 phys_addr_t obase = base, end = base + size;
@@ -387,13 +387,13 @@ repeat:
387 } 387 }
388} 388}
389 389
390long __init_memblock memblock_add(phys_addr_t base, phys_addr_t size) 390int __init_memblock memblock_add(phys_addr_t base, phys_addr_t size)
391{ 391{
392 return memblock_add_region(&memblock.memory, base, size); 392 return memblock_add_region(&memblock.memory, base, size);
393} 393}
394 394
395static long __init_memblock __memblock_remove(struct memblock_type *type, 395static int __init_memblock __memblock_remove(struct memblock_type *type,
396 phys_addr_t base, phys_addr_t size) 396 phys_addr_t base, phys_addr_t size)
397{ 397{
398 phys_addr_t end = base + size; 398 phys_addr_t end = base + size;
399 int i; 399 int i;
@@ -443,12 +443,12 @@ static long __init_memblock __memblock_remove(struct memblock_type *type,
443 return 0; 443 return 0;
444} 444}
445 445
446long __init_memblock memblock_remove(phys_addr_t base, phys_addr_t size) 446int __init_memblock memblock_remove(phys_addr_t base, phys_addr_t size)
447{ 447{
448 return __memblock_remove(&memblock.memory, base, size); 448 return __memblock_remove(&memblock.memory, base, size);
449} 449}
450 450
451long __init_memblock memblock_free(phys_addr_t base, phys_addr_t size) 451int __init_memblock memblock_free(phys_addr_t base, phys_addr_t size)
452{ 452{
453 memblock_dbg(" memblock_free: [%#016llx-%#016llx] %pF\n", 453 memblock_dbg(" memblock_free: [%#016llx-%#016llx] %pF\n",
454 (unsigned long long)base, 454 (unsigned long long)base,
@@ -458,7 +458,7 @@ long __init_memblock memblock_free(phys_addr_t base, phys_addr_t size)
458 return __memblock_remove(&memblock.reserved, base, size); 458 return __memblock_remove(&memblock.reserved, base, size);
459} 459}
460 460
461long __init_memblock memblock_reserve(phys_addr_t base, phys_addr_t size) 461int __init_memblock memblock_reserve(phys_addr_t base, phys_addr_t size)
462{ 462{
463 struct memblock_type *_rgn = &memblock.reserved; 463 struct memblock_type *_rgn = &memblock.reserved;
464 464