Thread (11 messages) 11 messages, 2 authors, 2026-02-18

Re: [PATCH v2 2/2] net: macb: fix format-truncation warning

From: Sean Chang <hidden>
Date: 2026-02-18 12:16:58
Also in: linux-nfs, lkml

On Wed, Feb 18, 2026 at 4:33 AM Andrew Lunn [off-list ref] wrote:
quoted
quoted
Given the other patches in there series, i have to wounder, is the
diagnostic analysis correct? Or is the RISC-V toolchain buggy?
I retry the different methods, I found that when I directly compile
the macb_main.c, it can trigger the same error, and I already prove
the different compiler will reach the same result, so it is not a bug
of the compiler.

I also found that the x86_64 defconfig does not enable CONFIG_MACB
because it requires CONFIG_COMMON_CLK (which is also disabled by
default on x86), whereas the RISC-V defconfig has both enabled.
arm and arm64 are much more similar to risc-v than x86. You should
test with those compilers. However, make allmodconfig will get you the
common clk code on x86. Most build testing is done with this
configuration, including the netdev CI.
Thanks for your suggestion to use the "allmodconfig" before the build.
I running the command: "make ARCH=arm64 CROSS_COMPILE=aarch64-
linux-gnu- KCFLAGS="-Wno-error" W=1 C=1 modules -j$(nproc) 2>&1
| tee build.log" and "make ARCH=arm CROSS_COMPILE=arm-linux-
gnueabihf- KCFLAGS="-Wno-error" W=1 C=1 modules -j$(nproc) 2>&1
| tee build.log", it throws the same warning -> [-Wformat-truncation=], so
It proves that even if I switch to a different platform, like arm, arm32,
x86_64, riscv64, it still shows the same warning.

Best regards,
Sean
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help