On Tue, Mar 03, 2026 at 08:11:32PM +0100, Stefano Brivio wrote:
On Thu, 26 Feb 2026 17:24:51 +0100 Laurent Vivier
wrote: Fix the following error reported by clang-tidy
$ make clang-tidy ... checksum.c:284:2: error: preprocessor condition can be written more concisely using '#ifdef' [readability-use-concise-preprocessor-directives,-warnings-as-errors] 284 | #if defined(__AVX2__) | ^~ ~~~~~~~~~~~~~~~~~ | ifdef __AVX2__
Fixes: 036fb8770cc2 ("checksum: add VSX fast path for POWER8/POWER9") Cc: jfiusdq@proton.me Signed-off-by: Laurent Vivier
--- checksum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checksum.c b/checksum.c index 828f9ecc9c02..bfba6f78b293 100644 --- a/checksum.c +++ b/checksum.c @@ -281,7 +281,7 @@ void csum_icmp6(struct icmp6hdr *icmp6hr, icmp6hr->icmp6_cksum = csum(payload, dlen, psum); }
-#if defined(__AVX2__) +#ifdef __AVX2__ #include
/**
This (conceptually) conflicts with a newer patch:
[PATCH 3/3] clang-tidy: Don't insist on #ifdef over #if defined() https://archives.passt.top/passt-dev/20260302043135.800803-4-david@gibson.dr...
which, Laurent mentioned offline, is preferable to this in his view.
So I'm going to drop this (while carrying the Fixes: tag and adding a Reported-by:) in favour of that one.
Somehow I entirely missed Laurent's mail. Thanks for fixing this up. -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson