Re: [PATCH] memregion: fix cache invalidation warning message

From: Karl Mehltretter

Date: Sat Sep 12 2026 - 05:24:46 EST


On Sat, Aug 08, 2026 at 02:19:43PM +0100, Karl Mehltretter wrote:
> WARN_ON_ONCE() takes a condition, not a message. The string literal is
> always true, so the warning still triggers but the message is never
> printed.
>
> Use WARN_ONCE(1, ...) instead to print the message and keep the
> once-only behavior.
>
> Found with a Coccinelle script. Clang's -Wstring-conversion also flags
> such calls but is not enabled in kernel builds.
>
> Fixes: 1156b4418db0 ("memregion: Add cpu_cache_invalidate_memregion() interface")
> Assisted-by: Claude:claude-fable-5 coccinelle
> Signed-off-by: Karl Mehltretter <kmehltretter@xxxxxxxxx>

Friendly ping on this patch.

Updating Jonathan's Cc address to jic23@xxxxxxxxxx, as the original
submission bounced at his old Huawei address.

Thanks,
Karl