public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>
Cc: passt-dev@passt.top, jfiusdq@proton.me
Subject: Re: [PATCH trivial] checksum: fix clang-tidy error
Date: Tue, 03 Mar 2026 20:11:32 +0100 (CET)	[thread overview]
Message-ID: <20260303201131.2cf8b06c@elisabeth> (raw)
In-Reply-To: <20260226162451.1717333-1-lvivier@redhat.com>

On Thu, 26 Feb 2026 17:24:51 +0100
Laurent Vivier <lvivier@redhat.com> 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 <lvivier@redhat.com>
> ---
>  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 <immintrin.h>
>  
>  /**

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.dropbear.id.au/

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.

-- 
Stefano


  reply	other threads:[~2026-03-03 19:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-26 16:24 Laurent Vivier
2026-03-03 19:11 ` Stefano Brivio [this message]
2026-03-03 22:51   ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260303201131.2cf8b06c@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=jfiusdq@proton.me \
    --cc=lvivier@redhat.com \
    --cc=passt-dev@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).