* [PATCH 1/1] scripts/dtc: avoid discarded qualifiers in overlay_fixup_phandle
@ 2026-04-18 18:15 Heinrich Schuchardt
2026-04-18 19:09 ` Tom Rini
0 siblings, 1 reply; 6+ messages in thread
From: Heinrich Schuchardt @ 2026-04-18 18:15 UTC (permalink / raw)
To: Tom Rini; +Cc: Marek Vasut, u-boot, Heinrich Schuchardt
When building with GCC 15.2 the following warning show up:
scripts/dtc/libfdt/fdt_overlay.c:422:21: warning:
assignment discards ‘const’ qualifier from pointer target type
[-Wdiscarded-qualifiers]
422 | sep = memchr(fixup_str, ':', fixup_len);
| ^
scripts/dtc/libfdt/fdt_overlay.c:432:21: warning:
assignment discards ‘const’ qualifier from pointer target type
[-Wdiscarded-qualifiers]
432 | sep = memchr(name, ':', fixup_len);
| ^
Define sep as const char *.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
scripts/dtc/libfdt/fdt_overlay.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/dtc/libfdt/fdt_overlay.c b/scripts/dtc/libfdt/fdt_overlay.c
index ee64f0b8110..e40cfe8c3c7 100644
--- a/scripts/dtc/libfdt/fdt_overlay.c
+++ b/scripts/dtc/libfdt/fdt_overlay.c
@@ -407,7 +407,8 @@ static int overlay_fixup_phandle(void *fdt, void *fdto, int symbols_off,
const char *fixup_str = value;
uint32_t path_len, name_len;
uint32_t fixup_len;
- char *sep, *endptr;
+ const char *sep;
+ char *endptr;
int poffset, ret;
fixup_end = memchr(value, '\0', len);
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 1/1] scripts/dtc: avoid discarded qualifiers in overlay_fixup_phandle
2026-04-18 18:15 [PATCH 1/1] scripts/dtc: avoid discarded qualifiers in overlay_fixup_phandle Heinrich Schuchardt
@ 2026-04-18 19:09 ` Tom Rini
2026-04-18 19:46 ` Heinrich Schuchardt
0 siblings, 1 reply; 6+ messages in thread
From: Tom Rini @ 2026-04-18 19:09 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: Marek Vasut, u-boot
[-- Attachment #1: Type: text/plain, Size: 957 bytes --]
On Sat, Apr 18, 2026 at 08:15:10PM +0200, Heinrich Schuchardt wrote:
> When building with GCC 15.2 the following warning show up:
>
> scripts/dtc/libfdt/fdt_overlay.c:422:21: warning:
> assignment discards ‘const’ qualifier from pointer target type
> [-Wdiscarded-qualifiers]
> 422 | sep = memchr(fixup_str, ':', fixup_len);
> | ^
> scripts/dtc/libfdt/fdt_overlay.c:432:21: warning:
> assignment discards ‘const’ qualifier from pointer target type
> [-Wdiscarded-qualifiers]
> 432 | sep = memchr(name, ':', fixup_len);
> | ^
>
> Define sep as const char *.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> scripts/dtc/libfdt/fdt_overlay.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Is this something already fixed in upstream dtc?
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] scripts/dtc: avoid discarded qualifiers in overlay_fixup_phandle
2026-04-18 19:09 ` Tom Rini
@ 2026-04-18 19:46 ` Heinrich Schuchardt
2026-04-18 19:49 ` Tom Rini
0 siblings, 1 reply; 6+ messages in thread
From: Heinrich Schuchardt @ 2026-04-18 19:46 UTC (permalink / raw)
To: Tom Rini; +Cc: Marek Vasut, u-boot
On 4/18/26 21:09, Tom Rini wrote:
> On Sat, Apr 18, 2026 at 08:15:10PM +0200, Heinrich Schuchardt wrote:
>
>> When building with GCC 15.2 the following warning show up:
>>
>> scripts/dtc/libfdt/fdt_overlay.c:422:21: warning:
>> assignment discards ‘const’ qualifier from pointer target type
>> [-Wdiscarded-qualifiers]
>> 422 | sep = memchr(fixup_str, ':', fixup_len);
>> | ^
>> scripts/dtc/libfdt/fdt_overlay.c:432:21: warning:
>> assignment discards ‘const’ qualifier from pointer target type
>> [-Wdiscarded-qualifiers]
>> 432 | sep = memchr(name, ':', fixup_len);
>> | ^
>>
>> Define sep as const char *.
>>
>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
>> ---
>> scripts/dtc/libfdt/fdt_overlay.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Is this something already fixed in upstream dtc?
>
9a1c801a1a3c ("Fix discarded const qualifiers")
in git://git.kernel.org/pub/scm/utils/dtc/dtc.git
implements a similar change.
But the patch is not applicable:
error: scripts/dtc/fdtput.c: does not exist in index
error: scripts/dtc/meson.build: does not exist in index
The change in fdt_overlay.c is identical.
Best regards
Heinrich
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 1/1] scripts/dtc: avoid discarded qualifiers in overlay_fixup_phandle
2026-04-18 19:46 ` Heinrich Schuchardt
@ 2026-04-18 19:49 ` Tom Rini
2026-04-18 20:01 ` Heinrich Schuchardt
0 siblings, 1 reply; 6+ messages in thread
From: Tom Rini @ 2026-04-18 19:49 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: Marek Vasut, u-boot
[-- Attachment #1: Type: text/plain, Size: 1913 bytes --]
On Sat, Apr 18, 2026 at 09:46:47PM +0200, Heinrich Schuchardt wrote:
> On 4/18/26 21:09, Tom Rini wrote:
> > On Sat, Apr 18, 2026 at 08:15:10PM +0200, Heinrich Schuchardt wrote:
> >
> > > When building with GCC 15.2 the following warning show up:
> > >
> > > scripts/dtc/libfdt/fdt_overlay.c:422:21: warning:
> > > assignment discards ‘const’ qualifier from pointer target type
> > > [-Wdiscarded-qualifiers]
> > > 422 | sep = memchr(fixup_str, ':', fixup_len);
> > > | ^
> > > scripts/dtc/libfdt/fdt_overlay.c:432:21: warning:
> > > assignment discards ‘const’ qualifier from pointer target type
> > > [-Wdiscarded-qualifiers]
> > > 432 | sep = memchr(name, ':', fixup_len);
> > > | ^
> > >
> > > Define sep as const char *.
> > >
> > > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> > > ---
> > > scripts/dtc/libfdt/fdt_overlay.c | 3 ++-
> > > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > Is this something already fixed in upstream dtc?
> >
>
> 9a1c801a1a3c ("Fix discarded const qualifiers")
> in git://git.kernel.org/pub/scm/utils/dtc/dtc.git
> implements a similar change.
>
> But the patch is not applicable:
>
> error: scripts/dtc/fdtput.c: does not exist in index
> error: scripts/dtc/meson.build: does not exist in index
>
> The change in fdt_overlay.c is identical.
Yeah, we need to re-sync with the kernel again, and there's some other
issue to sort out. I don't recall what, just that someone else had
looked and it wasn't a "update, no changes required". So we should look
in to that I think. I don't know if gcc-15.2.x has released with a bug
fix for building all of our platforms or not yet:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121588
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 1/1] scripts/dtc: avoid discarded qualifiers in overlay_fixup_phandle
2026-04-18 19:49 ` Tom Rini
@ 2026-04-18 20:01 ` Heinrich Schuchardt
2026-04-18 22:52 ` Tom Rini
0 siblings, 1 reply; 6+ messages in thread
From: Heinrich Schuchardt @ 2026-04-18 20:01 UTC (permalink / raw)
To: Tom Rini; +Cc: Marek Vasut, u-boot
On 4/18/26 21:49, Tom Rini wrote:
> On Sat, Apr 18, 2026 at 09:46:47PM +0200, Heinrich Schuchardt wrote:
>> On 4/18/26 21:09, Tom Rini wrote:
>>> On Sat, Apr 18, 2026 at 08:15:10PM +0200, Heinrich Schuchardt wrote:
>>>
>>>> When building with GCC 15.2 the following warning show up:
>>>>
>>>> scripts/dtc/libfdt/fdt_overlay.c:422:21: warning:
>>>> assignment discards ‘const’ qualifier from pointer target type
>>>> [-Wdiscarded-qualifiers]
>>>> 422 | sep = memchr(fixup_str, ':', fixup_len);
>>>> | ^
>>>> scripts/dtc/libfdt/fdt_overlay.c:432:21: warning:
>>>> assignment discards ‘const’ qualifier from pointer target type
>>>> [-Wdiscarded-qualifiers]
>>>> 432 | sep = memchr(name, ':', fixup_len);
>>>> | ^
>>>>
>>>> Define sep as const char *.
>>>>
>>>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
>>>> ---
>>>> scripts/dtc/libfdt/fdt_overlay.c | 3 ++-
>>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> Is this something already fixed in upstream dtc?
>>>
>>
>> 9a1c801a1a3c ("Fix discarded const qualifiers")
>> in git://git.kernel.org/pub/scm/utils/dtc/dtc.git
>> implements a similar change.
>>
>> But the patch is not applicable:
>>
>> error: scripts/dtc/fdtput.c: does not exist in index
>> error: scripts/dtc/meson.build: does not exist in index
>>
>> The change in fdt_overlay.c is identical.
>
> Yeah, we need to re-sync with the kernel again, and there's some other
> issue to sort out. I don't recall what, just that someone else had
> looked and it wasn't a "update, no changes required". So we should look
> in to that I think. I don't know if gcc-15.2.x has released with a bug
> fix for building all of our platforms or not yet:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121588
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121588 is marked as closed
and backported.
releases/gcc-15.2.0-665-g4886dd899bb
4886dd899bbb ("lto: Fix SegFault in ICF caused by missing body")
This is in Debian and Ubuntu since release 15.2.0-15.
Ubuntu 26.04 is at 15.2.0-16ubuntu1.
Best regards
Heinrich
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 1/1] scripts/dtc: avoid discarded qualifiers in overlay_fixup_phandle
2026-04-18 20:01 ` Heinrich Schuchardt
@ 2026-04-18 22:52 ` Tom Rini
0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2026-04-18 22:52 UTC (permalink / raw)
To: Heinrich Schuchardt; +Cc: Marek Vasut, u-boot
[-- Attachment #1: Type: text/plain, Size: 2767 bytes --]
On Sat, Apr 18, 2026 at 10:01:29PM +0200, Heinrich Schuchardt wrote:
> On 4/18/26 21:49, Tom Rini wrote:
> > On Sat, Apr 18, 2026 at 09:46:47PM +0200, Heinrich Schuchardt wrote:
> > > On 4/18/26 21:09, Tom Rini wrote:
> > > > On Sat, Apr 18, 2026 at 08:15:10PM +0200, Heinrich Schuchardt wrote:
> > > >
> > > > > When building with GCC 15.2 the following warning show up:
> > > > >
> > > > > scripts/dtc/libfdt/fdt_overlay.c:422:21: warning:
> > > > > assignment discards ‘const’ qualifier from pointer target type
> > > > > [-Wdiscarded-qualifiers]
> > > > > 422 | sep = memchr(fixup_str, ':', fixup_len);
> > > > > | ^
> > > > > scripts/dtc/libfdt/fdt_overlay.c:432:21: warning:
> > > > > assignment discards ‘const’ qualifier from pointer target type
> > > > > [-Wdiscarded-qualifiers]
> > > > > 432 | sep = memchr(name, ':', fixup_len);
> > > > > | ^
> > > > >
> > > > > Define sep as const char *.
> > > > >
> > > > > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> > > > > ---
> > > > > scripts/dtc/libfdt/fdt_overlay.c | 3 ++-
> > > > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > > >
> > > > Is this something already fixed in upstream dtc?
> > > >
> > >
> > > 9a1c801a1a3c ("Fix discarded const qualifiers")
> > > in git://git.kernel.org/pub/scm/utils/dtc/dtc.git
> > > implements a similar change.
> > >
> > > But the patch is not applicable:
> > >
> > > error: scripts/dtc/fdtput.c: does not exist in index
> > > error: scripts/dtc/meson.build: does not exist in index
> > >
> > > The change in fdt_overlay.c is identical.
> >
> > Yeah, we need to re-sync with the kernel again, and there's some other
> > issue to sort out. I don't recall what, just that someone else had
> > looked and it wasn't a "update, no changes required". So we should look
> > in to that I think. I don't know if gcc-15.2.x has released with a bug
> > fix for building all of our platforms or not yet:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121588
> >
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121588 is marked as closed and
> backported.
>
> releases/gcc-15.2.0-665-g4886dd899bb
> 4886dd899bbb ("lto: Fix SegFault in ICF caused by missing body")
>
> This is in Debian and Ubuntu since release 15.2.0-15.
> Ubuntu 26.04 is at 15.2.0-16ubuntu1.
And not in
https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/15.2.0/ so
not available to CI yet. So I would like to see if we can move up our
dtc backport of the kernel backport, by the time there's new crosstools
available.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-04-18 22:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-18 18:15 [PATCH 1/1] scripts/dtc: avoid discarded qualifiers in overlay_fixup_phandle Heinrich Schuchardt
2026-04-18 19:09 ` Tom Rini
2026-04-18 19:46 ` Heinrich Schuchardt
2026-04-18 19:49 ` Tom Rini
2026-04-18 20:01 ` Heinrich Schuchardt
2026-04-18 22:52 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox