From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bQLwaagv; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 17C395A0269 for ; Thu, 05 Mar 2026 01:38:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772671122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pkYxX2YYnXgRbhWH/TpORcQJ6AkR8aCqImfmmus5Cig=; b=bQLwaagvUQYf4DjXsL3FKkfrKbPNz5PZgDz4Znewzs+JdAtCkwnTDK13gj3OrxvTZVp4nY wvkTAVbhxkANbJmb/A6eK3HlMjgk+SppkbASeKEuGMI88Qd4SnPZAhFvzQJIL2ICWU2xaI xGIaAJZSz2z5gE+NoFyBoniRX/cm0Vc= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-332-fxOIZpfJN6ajyfGWMF5X6A-1; Wed, 04 Mar 2026 19:38:41 -0500 X-MC-Unique: fxOIZpfJN6ajyfGWMF5X6A-1 X-Mimecast-MFC-AGG-ID: fxOIZpfJN6ajyfGWMF5X6A_1772671120 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-439b50320a0so3394429f8f.1 for ; Wed, 04 Mar 2026 16:38:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772671120; x=1773275920; h=date:content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pkYxX2YYnXgRbhWH/TpORcQJ6AkR8aCqImfmmus5Cig=; b=ZkeSW1qs3MN4yLh5lXZcYmy/nXmoPm2J9klzFgfRoELVfoJk496ZPTCeUp2m/eIphw mKtkFGO/wB0dJ+cx6+LUH/umJwUcyzjs0ieqaVDJHkXAkqPc3htJFpVMnTrGBuxf/j7G p7dSiRJZF3e5UMz3G6wg6YAt3ldlFzZVCtXrdcy5anplwOMsAyAftE51Q8proNKSxqsI PPKfX8Qg2i/2Vo0EErgvkldjygySgLvvxJ+FLHD1OoKCyID9jhLubKct+XyWmekcZuKI 3HqVv31ws5KnFLA31FTrdePiORDU7YB0H2l37d0Yll5KmnaT2KkmRNMW0m6nvDZVdMTd jCgA== X-Gm-Message-State: AOJu0YzfOw03MUtIzxI9AC41QTsqg9trm/n58hHvoWIMyx0+3YMlg/Ur Ze2h0HqfOyZBUyg+YZ6W5gEdjOKgAHgnQBE5v7+fSnznLWZntV/kBpXK20o4sD44NSvWyKdid4g shUFmlYXOAtDI74q6+mtY3oKnqTuq9Mlvp16TTmmHGossdapErVmqkQ== X-Gm-Gg: ATEYQzwcWxBGKnhSd4kNo/eiS+Es5nPGPru00gUMBZNeS5af4cEy7yWAnUT0j8JErqy K8xyQgcaV6NYeQzHYH7YbvgAXI2g88o1jUKZhqBUCt2D1ctVaxucorAWsRlCu4FbJa48J4FGInk fye3USt/444bjzEgjYNf72MtA6gf9dUHBd4eJSoWbg2UUh8Tt72aWjdziQvQN34WeUtaiDaamnE xuINsOVtIjgbpEASXO+1xYIiiWa7HqgVHXBMCcYt6dhJpSgrBt8jODuqsbbPcqcAN+3bCk56axR bQdNtxwdLZPJdF9eqiBKcnN8GL/Pr9snSSwgee6xG1u7jsKKzN9HSnMp8nfl6px2YHtHjikgrvg n4dSbumEXEq50tdP4I1U0P3i8Xyi+3kQUf/CGqo4tqwdhQt9LHQ== X-Received: by 2002:a5d:5847:0:b0:439:c153:ae3d with SMTP id ffacd0b85a97d-439cfa30f77mr866319f8f.6.1772671120347; Wed, 04 Mar 2026 16:38:40 -0800 (PST) X-Received: by 2002:a5d:5847:0:b0:439:c153:ae3d with SMTP id ffacd0b85a97d-439cfa30f77mr866298f8f.6.1772671119931; Wed, 04 Mar 2026 16:38:39 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439b503425asm29252912f8f.25.2026.03.04.16.38.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2026 16:38:39 -0800 (PST) From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 3/3] clang-tidy: Don't insist on #ifdef over #if defined() Message-ID: <20260305013838.2314da66@elisabeth> In-Reply-To: <20260302043135.800803-4-david@gibson.dropbear.id.au> References: <20260302043135.800803-1-david@gibson.dropbear.id.au> <20260302043135.800803-4-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Thu, 05 Mar 2026 01:38:39 +0100 (CET) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: QNyES2ZdWk13JpV2H5A9R25He01v4fKapF-qSS2Oo-s_1772671120 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: X6MFKAQJSKRXYBCTPWMENBGDJ6EN7C62 X-Message-ID-Hash: X6MFKAQJSKRXYBCTPWMENBGDJ6EN7C62 X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, jfiusdq@proton.me, Laurent Vivier X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon, 2 Mar 2026 15:31:35 +1100 David Gibson wrote: > Commit 036fb8770 ("checksum: add VSX fast path for POWER8/POWER9") changed > an #ifdef to #if defined, in order to match a newly introduced #if which > needs to check two different symbols. This causes clang-tidy to complain > that the directive could be written more concisely. > > In this case consistency with the other #if branch seems more important, > and in general insisting on #ifdef over #if seems unhelpfully pedantic. > Suppress that warning globally. > > Signed-off-by: David Gibson Applied with: Fixes: 036fb8770cc2 ("checksum: add VSX fast path for POWER8/POWER9") Reported-by: Laurent Vivier > --- > .clang-tidy | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/.clang-tidy b/.clang-tidy > index 9d346ec2..773121f5 100644 > --- a/.clang-tidy > +++ b/.clang-tidy > @@ -81,6 +81,11 @@ Checks: > # precedence over addition in modern mathematical notation. Adding > # parentheses to reinforce that certainly won't improve readability. > - "-readability-math-missing-parentheses" > + > + # #if defined(FOO) is fine, and can be more consistent with other > + # #if directives. Don't insist on #ifdef instead. > + - "-readability-use-concise-preprocessor-directives" > + > WarningsAsErrors: "*" > HeaderFileExtensions: > - h -- Stefano