From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 7A64DA00C4;
	Thu, 29 Sep 2022 00:21:25 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 1FFFD40E5A;
	Thu, 29 Sep 2022 00:21:25 +0200 (CEST)
Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com
 [209.85.215.170])
 by mails.dpdk.org (Postfix) with ESMTP id 2FEE140DDC
 for <dev@dpdk.org>; Thu, 29 Sep 2022 00:21:24 +0200 (CEST)
Received: by mail-pg1-f170.google.com with SMTP id s26so13438289pgv.7
 for <dev@dpdk.org>; Wed, 28 Sep 2022 15:21:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20210112.gappssmtp.com; s=20210112;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:from:to:cc:subject:date;
 bh=R4xSpGPaRbxTxmrx/mofgoHnzeCpL0t5L/X+2DotBU4=;
 b=R6pqirz+dbZvWu7yB875pl4kzf+Rj2JXQgxppQxOhJp8eXyolLx4VImcBzmDcGuATo
 lgQpYPb15UQIERiswnBibL+i2ju+BzQUrv+/oGXO9i0MveghvwGRZ+HOH/lMyZRPq14e
 663+26RAkvDiUgx1yzQGa3EiBRlQEHlGNR/07iIRgal6nosqGZ26X7c/fHMhrj+yUVHb
 VMxYhFEbA08pCxFdkdXycGRZz7dgfT41bwfEChoXOLS0LF4ctXCtGNeSha3hNH9V1zMM
 rqAPG5I4Uh+OBkJuVopEZL0UHfoMUsklax2eIvymbPpxQHvWGuZkHHbwp5b47FTuU7s8
 cq7w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc
 :subject:date;
 bh=R4xSpGPaRbxTxmrx/mofgoHnzeCpL0t5L/X+2DotBU4=;
 b=CxEkk44tusS9Oa2g6oCE/OoJS3n6oPJY13B0dSTJK0D1rkdTrvN1WoGaJpTczN4dQY
 6DErTw+/x+wKzo4OL+NGHikOocb3EzJdt8owHJiixvn8n5BKwIjVBmgvWd+mcI6skl0w
 yG6BCbmbsqiIPn1hM8BUKleb/TNEYIVFa3VK+4ORQZgQLJKz5W7tdVX2iZoHCKC2+mb+
 bWq516599/j5Ut+CNAsXBRiVTFDvM/yKKRGAxYuF3bJJPG13NrB6/aF4WI58SrEaXIzc
 8DjIBdG/SU7LtvRi6jIfpCnDO4XSN80x6XUmPHkJ5LNvBxhmn837MZQgzrbuxtShVmS0
 6qlw==
X-Gm-Message-State: ACrzQf1Oorfpv7sPRDn+6evY6uFpznvATmTbyQ6jOHqkHh/2855c+dJU
 oprExAe0ajJKfzsq8DQK5rGLcg==
X-Google-Smtp-Source: AMsMyM6HZVE52lsB66k/A4rJVaHvu1EGW3/hIBDipTEfuzkTmWbDxFpnp5/YYC3dR+ZnYV1OlqLLUg==
X-Received: by 2002:a05:6a00:1a44:b0:52a:ecd5:bbef with SMTP id
 h4-20020a056a001a4400b0052aecd5bbefmr103104pfv.28.1664403683214; 
 Wed, 28 Sep 2022 15:21:23 -0700 (PDT)
Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218])
 by smtp.gmail.com with ESMTPSA id
 w16-20020a63d750000000b00439dfe09770sm4027969pgi.12.2022.09.28.15.21.22
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 28 Sep 2022 15:21:23 -0700 (PDT)
Date: Wed, 28 Sep 2022 15:21:21 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: Anoob Joseph <anoobj@marvell.com>
Cc: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>, Jerin Jacob
 <jerinj@marvell.com>, <dev@dpdk.org>, <sean.morrissey@intel.com>
Subject: Re: [PATCH] rcu: fix build failure with debug dp log level
Message-ID: <20220928152121.064f6023@hermes.local>
In-Reply-To: <20220829165151.472-1-anoobj@marvell.com>
References: <20220829165151.472-1-anoobj@marvell.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Mon, 29 Aug 2022 22:21:51 +0530
Anoob Joseph <anoobj@marvell.com> wrote:

> Build fails if RTE_LOG_DP_LEVEL is set to RTE_LOG_DEBUG. Fix the
> same by including the required header when RTE_LOG_DP_LEVEL is
> set to RTE_LOG_DEBUG.
>=20
> ../lib/rcu/rte_rcu_qsbr.h:678:40: error: expected =E2=80=98)=E2=80=99 bef=
ore =E2=80=98PRIu64=E2=80=99
>   678 |    "%s: status: least acked token =3D %" PRIu64,
>       |                                        ^~~~~~
>=20
> Fixes: 30a1de105a5f ("lib: remove unneeded header includes")
> Cc: sean.morrissey@intel.com
>=20
> Signed-off-by: Anoob Joseph <anoobj@marvell.com>
> ---
>  lib/rcu/rte_rcu_qsbr.h | 4 ++++
>  1 file changed, 4 insertions(+)
>=20
> diff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h
> index d81bf5e8db..b0f1720ca1 100644
> --- a/lib/rcu/rte_rcu_qsbr.h
> +++ b/lib/rcu/rte_rcu_qsbr.h
> @@ -37,6 +37,10 @@ extern "C" {
>  #include <rte_atomic.h>
>  #include <rte_ring.h>
>=20
> +#if RTE_LOG_DP_LEVEL >=3D RTE_LOG_DEBUG
> +#include <inttypes.h>
> +#endif
> +
>  extern int rt

This is not the best way to fix this.
Just always include the header file.
Having it conditional can lead to more problems