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 8030A42811; Wed, 22 Mar 2023 22:00:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5B65740A84; Wed, 22 Mar 2023 22:00:16 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id CAE3240395 for ; Wed, 22 Mar 2023 22:00:15 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 1584020FB6C4; Wed, 22 Mar 2023 14:00:15 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1584020FB6C4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1679518815; bh=DhvNzMzeGEgfXOsE2gN005TgWgcEaiJUxgwsIOZA8Oo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ln2SyHN5qoE0sQrs485PUC+Vtd6sWaEj7AolgZj4Tagg4bEPSOJG0B0W7RBi2cEqn maUyKhNy0lGi35pLU7Hf3z4LUk/YFeNjfRjxADvsR+AzSVsCDAQqM7Ymvkq+YgNrzi ghGiBB0li6NviwtVuW/4mI5BObHnb4G9B4uVYezU= Date: Wed, 22 Mar 2023 14:00:15 -0700 From: Tyler Retzlaff To: Morten =?iso-8859-1?Q?Br=F8rup?= Cc: dev@dpdk.org, thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, david.marchand@redhat.com Subject: Re: [PATCH] devtools: stop compiler atomics with no C11 equivalent Message-ID: <20230322210015.GA4644@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1679329321-26073-1-git-send-email-roretzla@linux.microsoft.com> <20230322180819.GB28785@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <98CBD80474FA8B44BF855DF32C47DC35D877EA@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D877EA@smartserver.smartshare.dk> User-Agent: Mutt/1.5.21 (2010-09-15) 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 Wed, Mar 22, 2023 at 07:25:09PM +0100, Morten Brørup wrote: > > From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com] > > Sent: Wednesday, 22 March 2023 19.08 > > > > adding a few more people to cc for attention > > > > On Mon, Mar 20, 2023 at 09:22:01AM -0700, 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 1dee094..1ed6d51 100755 > > > --- a/devtools/checkpatches.sh > > > +++ b/devtools/checkpatches.sh > > > @@ -119,6 +119,14 @@ check_forbidden_additions() { # > > > -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk > > \ > > > "$1" || res=1 > > > > > > + # refrain from using compiler > > __atomic_{add,and,nand,or,sub,xor}_fetch() > > > + awk -v FOLDERS="lib drivers app examples" \ > > > + -v > > EXPRESSIONS="__atomic_(add|and|nand|or|sub|xor)_fetch\\\(" \ > > > + -v RET_ON_FAIL=1 \ > > > + -v MESSAGE='Using __atomic_{add,and,nand,or,sub,xor}_fetch' > > \ > > Suggest that you expand the error message with a solution for the developer: "... use __atomic_fetch_op() instead of __atomic_op_fetch()" if awk could expand captures i would do that but it can't. or do you mean literally use 'op' instead of {add,and,nand,or,sub,xor} in the message? > > > > + -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk > > \ > > > + "$1" || res=1 > > > + > > > # forbid use of __reserved which is a reserved keyword in Windows > > system headers > > > awk -v FOLDERS="lib drivers app examples" \ > > > -v EXPRESSIONS='\\<__reserved\\>' \ > > > -- > > > 1.8.3.1