From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E8882429E9; Tue, 25 Apr 2023 11:11:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DB777410F2; Tue, 25 Apr 2023 11:11:09 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id E5CE740395 for ; Tue, 25 Apr 2023 11:11:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682413867; 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=LPGkKfG2JVKpP30iFzDteJXgbooevcFiP4lPUAih1JI=; b=HBPakqXPIlrMzeSA2r4rlFSLVqLC/YQB7kbS+/ZPFk/M7RNIcueveQYjVKAANKIco2g0rI MTnv3rGZBuQuHoCxVx7L2D8GvsImX9z3mmqg5uBRtxCrFEa3JoLZ4iD59CDKR/if63DU3m jvyHmgc1zGmBskgsysPykQpPaAn8/EM= Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-641-z05iOM-7OpiIfMh4BSMOvg-1; Tue, 25 Apr 2023 05:11:06 -0400 X-MC-Unique: z05iOM-7OpiIfMh4BSMOvg-1 Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-1a697b64beaso36371975ad.1 for ; Tue, 25 Apr 2023 02:11:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682413865; x=1685005865; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LPGkKfG2JVKpP30iFzDteJXgbooevcFiP4lPUAih1JI=; b=TwoZToFkSRvY2iq0cvDU8MluoMm+QQAiCwKzIEBzxBwwgD4p8SluEypFEyQFIUAb51 YibybWcEkPra+KiiQlDxMW3FbxngO5q7K3LKSZAhhMi8PPVITdod8PwcbI42u/JItJgf M9IzWIvkk+Q/PIFzlKVLwYtV0SIlilkRX1OKZ5xjRf5+lOYA4v4nxP/QkggS13431Xrm RFNReKL3KEk9tR7TOMVc31l4UEdV/GTCtrBTy9yaYvffTrHpGaqYybS6l3kdXZb/hJso l0nkICZXn03RRE/rx3ISkipUq53z9sWftSUuqOwGbRykVSwmmN0kHMFDh5cZyphDjnu5 YTHg== X-Gm-Message-State: AAQBX9fGqCDWuF64qGkDKT36+LPsqrK48pfrQKFYZ1USsBhvB0y6JyfU Y+xuTAvyfwiL3SZ6MXb3iY4MfTgCANNnJ1S+oXAplCNevclL68Nlo4omJNp1Flf16+qhsa5JRG2 gi4DzSEOCViifTlQhHQo= X-Received: by 2002:a17:902:e548:b0:19c:a9b8:4349 with SMTP id n8-20020a170902e54800b0019ca9b84349mr21153048plf.32.1682413865273; Tue, 25 Apr 2023 02:11:05 -0700 (PDT) X-Google-Smtp-Source: AKy350Y+t5eSotI3TBZHq+Vupwg7BjelwlX4NUuSsdfCR/jiHn3t5AW8S/apo5WVQ27Uuyb9pCWs3Exkb2UAG92wlR8= X-Received: by 2002:a17:902:e548:b0:19c:a9b8:4349 with SMTP id n8-20020a170902e54800b0019ca9b84349mr21153034plf.32.1682413865092; Tue, 25 Apr 2023 02:11:05 -0700 (PDT) MIME-Version: 1.0 References: <1679329321-26073-1-git-send-email-roretzla@linux.microsoft.com> <1680567698-7874-1-git-send-email-roretzla@linux.microsoft.com> In-Reply-To: <1680567698-7874-1-git-send-email-roretzla@linux.microsoft.com> From: David Marchand Date: Tue, 25 Apr 2023 11:10:53 +0200 Message-ID: Subject: Re: [PATCH v2] devtools: stop compiler atomics with no C11 equivalent To: Tyler Retzlaff Cc: dev@dpdk.org, thomas@monjalon.net, mb@smartsharesystems.com, Honnappa.Nagarahalli@arm.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Apr 4, 2023 at 2:21=E2=80=AFAM Tyler Retzlaff wrote: > > Refrain from using compiler __atomic_{add,and,nand,or,sub,xor}_fetch() > to ease future adoption of C11 standard atomics. > > Signed-off-by: Tyler Retzlaff > --- > devtools/checkpatches.sh | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh > index a07bbc8..1b6841b 100755 > --- a/devtools/checkpatches.sh > +++ b/devtools/checkpatches.sh > @@ -119,6 +119,14 @@ check_forbidden_additions() { # > -f $(dirname $(readlink -f $0))/check-forbidden-tokens.aw= k \ > "$1" || res=3D1 > > + # refrain from using compiler __atomic_{add,and,nand,or,sub,xor}_= fetch() > + awk -v FOLDERS=3D"lib drivers app examples" \ > + -v EXPRESSIONS=3D"__atomic_(add|and|nand|or|sub|xor)_fetc= h\\\(" \ > + -v RET_ON_FAIL=3D1 \ > + -v MESSAGE=3D'Using __atomic_op_fetch use __atomic_fetch_= op instead' \ > + -f $(dirname $(readlink -f $0))/check-forbidden-tokens.aw= k \ > + "$1" || res=3D1 > + > # forbid use of __reserved which is a reserved keyword in Windows= system headers > awk -v FOLDERS=3D"lib drivers app examples" \ > -v EXPRESSIONS=3D'\\<__reserved\\>' \ > -- > 1.8.3.1 I tweaked the warning message a bit, and applied. Thanks. --=20 David Marchand