mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 01:56:57 +07:00
powerpc: Remove variable ‘path’ since not used
In commit eab00a208e
("powerpc: Move `path` variable inside
DEBUG_PROM") DEBUG_PROM sentinels were added to silence a warning
(treated as error with W=1):
arch/powerpc/kernel/prom_init.c:1388:8: error: variable ‘path’ set but not used [-Werror=unused-but-set-variable]
Rework the original patch and simplify the code, by removing the
variable ‘path’ completely. Fix line over 90 characters.
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
89d87bcba2
commit
c806a6fde1
@ -1566,9 +1566,6 @@ static void __init reserve_mem(u64 base, u64 size)
|
|||||||
static void __init prom_init_mem(void)
|
static void __init prom_init_mem(void)
|
||||||
{
|
{
|
||||||
phandle node;
|
phandle node;
|
||||||
#ifdef DEBUG_PROM
|
|
||||||
char *path;
|
|
||||||
#endif
|
|
||||||
char type[64];
|
char type[64];
|
||||||
unsigned int plen;
|
unsigned int plen;
|
||||||
cell_t *p, *endp;
|
cell_t *p, *endp;
|
||||||
@ -1590,9 +1587,6 @@ static void __init prom_init_mem(void)
|
|||||||
prom_debug("root_size_cells: %x\n", rsc);
|
prom_debug("root_size_cells: %x\n", rsc);
|
||||||
|
|
||||||
prom_debug("scanning memory:\n");
|
prom_debug("scanning memory:\n");
|
||||||
#ifdef DEBUG_PROM
|
|
||||||
path = prom_scratch;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (node = 0; prom_next_node(&node); ) {
|
for (node = 0; prom_next_node(&node); ) {
|
||||||
type[0] = 0;
|
type[0] = 0;
|
||||||
@ -1617,9 +1611,10 @@ static void __init prom_init_mem(void)
|
|||||||
endp = p + (plen / sizeof(cell_t));
|
endp = p + (plen / sizeof(cell_t));
|
||||||
|
|
||||||
#ifdef DEBUG_PROM
|
#ifdef DEBUG_PROM
|
||||||
memset(path, 0, sizeof(prom_scratch));
|
memset(prom_scratch, 0, sizeof(prom_scratch));
|
||||||
call_prom("package-to-path", 3, 1, node, path, sizeof(prom_scratch) - 1);
|
call_prom("package-to-path", 3, 1, node, prom_scratch,
|
||||||
prom_debug(" node %s :\n", path);
|
sizeof(prom_scratch) - 1);
|
||||||
|
prom_debug(" node %s :\n", prom_scratch);
|
||||||
#endif /* DEBUG_PROM */
|
#endif /* DEBUG_PROM */
|
||||||
|
|
||||||
while ((endp - p) >= (rac + rsc)) {
|
while ((endp - p) >= (rac + rsc)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user