mirror of https://gitee.com/openkylin/linux.git
MIPS: Alchemy: Change strict_strtol to strict_strtoul
Since memsize is unsigned, it would seem better to use strict_strtoul that strict_strtol. A simplified version of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @s2@ long e; position p; @@ strict_strtol@p(...,&e) @@ position p != s2.p; type T; T e; @@ - strict_strtol@p + strict_strtoul (...,&e) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
797c3f3224
commit
2bd2dd059c
|
@ -57,6 +57,6 @@ void __init prom_init(void)
|
|||
if (!memsize_str)
|
||||
memsize = 0x04000000;
|
||||
else
|
||||
strict_strtol(memsize_str, 0, &memsize);
|
||||
strict_strtoul(memsize_str, 0, &memsize);
|
||||
add_memory_region(0, memsize, BOOT_MEM_RAM);
|
||||
}
|
||||
|
|
|
@ -55,6 +55,6 @@ void __init prom_init(void)
|
|||
if (!memsize_str)
|
||||
memsize = 0x04000000;
|
||||
else
|
||||
strict_strtol(memsize_str, 0, &memsize);
|
||||
strict_strtoul(memsize_str, 0, &memsize);
|
||||
add_memory_region(0, memsize, BOOT_MEM_RAM);
|
||||
}
|
||||
|
|
|
@ -52,6 +52,6 @@ void __init prom_init(void)
|
|||
if (!memsize_str)
|
||||
memsize = 0x04000000;
|
||||
else
|
||||
strict_strtol(memsize_str, 0, &memsize);
|
||||
strict_strtoul(memsize_str, 0, &memsize);
|
||||
add_memory_region(0, memsize, BOOT_MEM_RAM);
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ void __init prom_init(void)
|
|||
if (!memsize_str)
|
||||
memsize = 0x04000000;
|
||||
else
|
||||
strict_strtol(memsize_str, 0, &memsize);
|
||||
strict_strtoul(memsize_str, 0, &memsize);
|
||||
|
||||
add_memory_region(0, memsize, BOOT_MEM_RAM);
|
||||
}
|
||||
|
|
|
@ -53,6 +53,6 @@ void __init prom_init(void)
|
|||
if (!memsize_str)
|
||||
memsize = 0x08000000;
|
||||
else
|
||||
strict_strtol(memsize_str, 0, &memsize);
|
||||
strict_strtoul(memsize_str, 0, &memsize);
|
||||
add_memory_region(0, memsize, BOOT_MEM_RAM);
|
||||
}
|
||||
|
|
|
@ -53,6 +53,6 @@ void __init prom_init(void)
|
|||
if (!memsize_str)
|
||||
memsize = 0x04000000;
|
||||
else
|
||||
strict_strtol(memsize_str, 0, &memsize);
|
||||
strict_strtoul(memsize_str, 0, &memsize);
|
||||
add_memory_region(0, memsize, BOOT_MEM_RAM);
|
||||
}
|
||||
|
|
|
@ -53,6 +53,6 @@ void __init prom_init(void)
|
|||
if (!memsize_str)
|
||||
memsize = 0x08000000;
|
||||
else
|
||||
strict_strtol(memsize_str, 0, &memsize);
|
||||
strict_strtoul(memsize_str, 0, &memsize);
|
||||
add_memory_region(0, memsize, BOOT_MEM_RAM);
|
||||
}
|
||||
|
|
|
@ -53,6 +53,6 @@ void __init prom_init(void)
|
|||
if (!memsize_str)
|
||||
memsize = 0x04000000;
|
||||
else
|
||||
strict_strtol(memsize_str, 0, &memsize);
|
||||
strict_strtoul(memsize_str, 0, &memsize);
|
||||
add_memory_region(0, memsize, BOOT_MEM_RAM);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue