* [PATCH] of: fdt: Rename reserve_elfcorehdr() to fdt_reserve_elfcorehdr()
@ 2021-08-25 9:40 Geert Uytterhoeven
2021-08-25 12:20 ` Rob Herring
2021-08-25 16:05 ` Rob Herring
0 siblings, 2 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2021-08-25 9:40 UTC (permalink / raw)
To: Rob Herring, Frank Rowand
Cc: devicetree, Geert Uytterhoeven, kernel test robot
On ia64/allmodconfig:
drivers/of/fdt.c:609:20: error: conflicting types for 'reserve_elfcorehdr'; have 'void(void)'
609 | static void __init reserve_elfcorehdr(void)
| ^~~~~~~~~~~~~~~~~~
arch/ia64/include/asm/meminit.h:43:12: note: previous declaration of 'reserve_elfcorehdr' with type 'int(u64 *, u64 *)' {aka 'int(long long unsigned int *, long long unsigned int *)'}
43 | extern int reserve_elfcorehdr(u64 *start, u64 *end);
| ^~~~~~~~~~~~~~~~~~
Fix this by prefixing the FDT function name with "fdt_".
Fixes: f7e7ce93aac13118 ("of: fdt: Add generic support for handling elf core headers property")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
This change was planned for v6.
Feel free to fold into the original.
---
drivers/of/fdt.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index a26199022d2fc54d..4546572af24bbf14 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -599,14 +599,14 @@ static int __init __fdt_scan_reserved_mem(unsigned long node, const char *uname,
}
/*
- * reserve_elfcorehdr() - reserves memory for elf core header
+ * fdt_reserve_elfcorehdr() - reserves memory for elf core header
*
* This function reserves the memory occupied by an elf core header
* described in the device tree. This region contains all the
* information about primary kernel's core image and is used by a dump
* capture kernel to access the system memory on primary kernel.
*/
-static void __init reserve_elfcorehdr(void)
+static void __init fdt_reserve_elfcorehdr(void)
{
if (!IS_ENABLED(CONFIG_CRASH_DUMP) || !elfcorehdr_size)
return;
@@ -647,7 +647,7 @@ void __init early_init_fdt_scan_reserved_mem(void)
of_scan_flat_dt(__fdt_scan_reserved_mem, NULL);
fdt_init_reserved_mem();
- reserve_elfcorehdr();
+ fdt_reserve_elfcorehdr();
}
/**
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] of: fdt: Rename reserve_elfcorehdr() to fdt_reserve_elfcorehdr()
2021-08-25 9:40 [PATCH] of: fdt: Rename reserve_elfcorehdr() to fdt_reserve_elfcorehdr() Geert Uytterhoeven
@ 2021-08-25 12:20 ` Rob Herring
2021-08-25 12:44 ` Geert Uytterhoeven
2021-08-25 16:05 ` Rob Herring
1 sibling, 1 reply; 5+ messages in thread
From: Rob Herring @ 2021-08-25 12:20 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Frank Rowand, devicetree, kernel test robot
On Wed, Aug 25, 2021 at 4:40 AM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> On ia64/allmodconfig:
>
> drivers/of/fdt.c:609:20: error: conflicting types for 'reserve_elfcorehdr'; have 'void(void)'
> 609 | static void __init reserve_elfcorehdr(void)
> | ^~~~~~~~~~~~~~~~~~
> arch/ia64/include/asm/meminit.h:43:12: note: previous declaration of 'reserve_elfcorehdr' with type 'int(u64 *, u64 *)' {aka 'int(long long unsigned int *, long long unsigned int *)'}
> 43 | extern int reserve_elfcorehdr(u64 *start, u64 *end);
> | ^~~~~~~~~~~~~~~~~~
There's no need for the ia64 version to be non-static. Just needs a
forward declaration.
arch/ia64/include/asm/meminit.h:extern int reserve_elfcorehdr(u64
*start, u64 *end);
arch/ia64/kernel/setup.c: if (reserve_elfcorehdr(&rsvd_region[n].start,
arch/ia64/kernel/setup.c:int __init reserve_elfcorehdr(u64 *start, u64 *end)
Rob
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] of: fdt: Rename reserve_elfcorehdr() to fdt_reserve_elfcorehdr()
2021-08-25 12:20 ` Rob Herring
@ 2021-08-25 12:44 ` Geert Uytterhoeven
2021-08-25 12:49 ` Rob Herring
0 siblings, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2021-08-25 12:44 UTC (permalink / raw)
To: Rob Herring
Cc: Geert Uytterhoeven, Frank Rowand,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
kernel test robot
Hi Rob,
On Wed, Aug 25, 2021 at 2:21 PM Rob Herring <robh+dt@kernel.org> wrote:
> On Wed, Aug 25, 2021 at 4:40 AM Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
> >
> > On ia64/allmodconfig:
> >
> > drivers/of/fdt.c:609:20: error: conflicting types for 'reserve_elfcorehdr'; have 'void(void)'
> > 609 | static void __init reserve_elfcorehdr(void)
> > | ^~~~~~~~~~~~~~~~~~
> > arch/ia64/include/asm/meminit.h:43:12: note: previous declaration of 'reserve_elfcorehdr' with type 'int(u64 *, u64 *)' {aka 'int(long long unsigned int *, long long unsigned int *)'}
> > 43 | extern int reserve_elfcorehdr(u64 *start, u64 *end);
> > | ^~~~~~~~~~~~~~~~~~
>
> There's no need for the ia64 version to be non-static. Just needs a
> forward declaration.
>
> arch/ia64/include/asm/meminit.h:extern int reserve_elfcorehdr(u64
> *start, u64 *end);
> arch/ia64/kernel/setup.c: if (reserve_elfcorehdr(&rsvd_region[n].start,
> arch/ia64/kernel/setup.c:int __init reserve_elfcorehdr(u64 *start, u64 *end)
I know ;-)
https://lore.kernel.org/r/fe236cd73b64abc4abd03dd808cb015c907f4c8c.1629884459.git.geert+renesas@glider.be/
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] of: fdt: Rename reserve_elfcorehdr() to fdt_reserve_elfcorehdr()
2021-08-25 12:44 ` Geert Uytterhoeven
@ 2021-08-25 12:49 ` Rob Herring
0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2021-08-25 12:49 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Geert Uytterhoeven, Frank Rowand,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
kernel test robot
On Wed, Aug 25, 2021 at 7:44 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Rob,
>
> On Wed, Aug 25, 2021 at 2:21 PM Rob Herring <robh+dt@kernel.org> wrote:
> > On Wed, Aug 25, 2021 at 4:40 AM Geert Uytterhoeven
> > <geert+renesas@glider.be> wrote:
> > >
> > > On ia64/allmodconfig:
> > >
> > > drivers/of/fdt.c:609:20: error: conflicting types for 'reserve_elfcorehdr'; have 'void(void)'
> > > 609 | static void __init reserve_elfcorehdr(void)
> > > | ^~~~~~~~~~~~~~~~~~
> > > arch/ia64/include/asm/meminit.h:43:12: note: previous declaration of 'reserve_elfcorehdr' with type 'int(u64 *, u64 *)' {aka 'int(long long unsigned int *, long long unsigned int *)'}
> > > 43 | extern int reserve_elfcorehdr(u64 *start, u64 *end);
> > > | ^~~~~~~~~~~~~~~~~~
> >
> > There's no need for the ia64 version to be non-static. Just needs a
> > forward declaration.
> >
> > arch/ia64/include/asm/meminit.h:extern int reserve_elfcorehdr(u64
> > *start, u64 *end);
> > arch/ia64/kernel/setup.c: if (reserve_elfcorehdr(&rsvd_region[n].start,
> > arch/ia64/kernel/setup.c:int __init reserve_elfcorehdr(u64 *start, u64 *end)
>
> I know ;-)
>
> https://lore.kernel.org/r/fe236cd73b64abc4abd03dd808cb015c907f4c8c.1629884459.git.geert+renesas@glider.be/
Ah, too much mail sorting...
I guess applying this too doesn't hurt.
Rob
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] of: fdt: Rename reserve_elfcorehdr() to fdt_reserve_elfcorehdr()
2021-08-25 9:40 [PATCH] of: fdt: Rename reserve_elfcorehdr() to fdt_reserve_elfcorehdr() Geert Uytterhoeven
2021-08-25 12:20 ` Rob Herring
@ 2021-08-25 16:05 ` Rob Herring
1 sibling, 0 replies; 5+ messages in thread
From: Rob Herring @ 2021-08-25 16:05 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: devicetree, Rob Herring, kernel test robot, Frank Rowand
On Wed, 25 Aug 2021 11:40:40 +0200, Geert Uytterhoeven wrote:
> On ia64/allmodconfig:
>
> drivers/of/fdt.c:609:20: error: conflicting types for 'reserve_elfcorehdr'; have 'void(void)'
> 609 | static void __init reserve_elfcorehdr(void)
> | ^~~~~~~~~~~~~~~~~~
> arch/ia64/include/asm/meminit.h:43:12: note: previous declaration of 'reserve_elfcorehdr' with type 'int(u64 *, u64 *)' {aka 'int(long long unsigned int *, long long unsigned int *)'}
> 43 | extern int reserve_elfcorehdr(u64 *start, u64 *end);
> | ^~~~~~~~~~~~~~~~~~
>
> Fix this by prefixing the FDT function name with "fdt_".
>
> Fixes: f7e7ce93aac13118 ("of: fdt: Add generic support for handling elf core headers property")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> This change was planned for v6.
> Feel free to fold into the original.
> ---
> drivers/of/fdt.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
Applied, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-08-25 16:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25 9:40 [PATCH] of: fdt: Rename reserve_elfcorehdr() to fdt_reserve_elfcorehdr() Geert Uytterhoeven
2021-08-25 12:20 ` Rob Herring
2021-08-25 12:44 ` Geert Uytterhoeven
2021-08-25 12:49 ` Rob Herring
2021-08-25 16:05 ` Rob Herring
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.