From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas@monjalon.net>
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com
 [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id E8AF52C52
 for <dev@dpdk.org>; Sun, 27 May 2018 21:34:16 +0200 (CEST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id 5073321B69;
 Sun, 27 May 2018 15:34:16 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute1.internal (MEProxy); Sun, 27 May 2018 15:34:16 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:content-transfer-encoding:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-sender
 :x-me-sender:x-sasl-enc; s=mesmtp; bh=Y76/hOIUyD8pjxDDqHldHzP8oX
 6pErn3iXCV+dRGvyk=; b=iBKlzWoKRADlty8ObqOIfXOxhNFnrBRvKfo0YUlPci
 ulaJTHZqQ0MInV3O2y6I13gLuqHriHkj5kp26c/0WaEvX1EH54LBhJQxX3USE3TL
 zUuX9UUqFGB4HwESqbMZORjfSylnoEn6UM9WOFaSy82aiT0BYipskq0mkmhp4GFU
 k=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=Y76/hO
 IUyD8pjxDDqHldHzP8oX6pErn3iXCV+dRGvyk=; b=GsT8vyBT4oDF+COhf5nwQO
 4bNeCfPNqPwT7QV5libSGluC7INm7a6yf8ckNagDn55UuF3wUuIakor66Tt588Ri
 qepRp6hmrwsq52F1/vk16SyhcoMK9Q1BglYYuda5Tnfz5Asds+/+n+JNJxQKW5sZ
 8zy7S1zz6buXQeE6QCZ/ViQruiiwGLyfJ8h5WvoqLInZ1KsLpia/PJrwZwOdst1m
 6cSd/hhg+nXsgLcq/gIKY9MPwtTJ0A5bN7Xa+kXXtJB/KnZBZTLw1UV3BUzZQfoQ
 bwnbjaG4Npje9Gah/VxSOQDiZzymz1eG5calOZGaBwycTrUcIms9BnLOkQyL2Z0A
 ==
X-ME-Proxy: <xmx:OAgLW-M6jldJW2ilCMWyEUu8vXPvbeTUrBSZz-8l3524we6DwuPv-w>
X-ME-Proxy: <xmx:OAgLWzZAPHmQ8yGur0b6PqwnpoOl7gWlnR2kfS3HvXAONF5pgvZ6hQ>
X-ME-Proxy: <xmx:OAgLW-HtubA9rGhU3n_FtA6lN816PjojUUkX7HijeCC1rexjUF3c8g>
X-ME-Proxy: <xmx:OAgLWxlUurgZegCgLmGZWheT6fapBp9vN8X8jbfTWfj-oB_n1jftRA>
X-ME-Proxy: <xmx:OAgLW1yjVDMrFmz3znXG0zUoRJbZOFz71TVqmsc4IK2RNmb4RvGKew>
X-ME-Proxy: <xmx:OAgLWxxSGJB5mAki5_6QdbmpOzsPlMYwTNivUFPprvRM-_4JnyEHww>
X-ME-Sender: <xms:OAgLW6ZjfzmClheN_XdtBog8bKWRgZ7irnfRLwaFBQtvXXQlkJYdqw>
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 520F8E4117;
 Sun, 27 May 2018 15:34:15 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: dev@dpdk.org, john.mcnamara@intel.com, bruce.richardson@intel.com,
 Ferruh Yigit <ferruh.yigit@intel.com>,
 Stephen Hemminger <stephen@networkplumber.org>
Date: Sun, 27 May 2018 21:34:13 +0200
Message-ID: <1725451.L7JxISGBU9@xps>
In-Reply-To: <20180214191916.7226-1-nhorman@tuxdriver.com>
References: <20180115190545.25687-1-nhorman@tuxdriver.com>
 <20180214191916.7226-1-nhorman@tuxdriver.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: Re: [dpdk-dev] [PATCH v6] checkpatches.sh: Add checks for ABI
	symbol addition
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Sun, 27 May 2018 19:34:17 -0000

Hi Neil,

Sorry, this patch has been forgotten during the whole release cycle.

I see an issue about the dependency on filterdiff.
Is there a way to avoid it?

I have some minor comments below.

14/02/2018 20:19, Neil Horman:
> @@ -61,6 +65,7 @@ print_usage () {
>  	END_OF_HELP
>  }
>  
> +

This new blank line is probably a leftover.

>  number=0
>  quiet=false
>  verbose=false
> @@ -86,19 +91,50 @@ total=0
>  status=0
>  
>  check () { # <patch> <commit> <title>
> +	local ret=0
> +	TMPINPUT=`mktemp checkpatches.XXXXXX`

It is preferred to use $() construct to be consistent in the file.

> +
>  	total=$(($total + 1))
>  	! $verbose || printf '\n### %s\n\n' "$3"
>  	if [ -n "$1" ] ; then
>  		report=$($DPDK_CHECKPATCH_PATH $options "$1" 2>/dev/null)
>  	elif [ -n "$2" ] ; then
> -		report=$(git format-patch --find-renames --no-stat --stdout -1 $commit |
> +		git format-patch --find-renames --no-stat --stdout -1 $commit > ./$TMPINPUT
> +		report=$(cat ./$TMPINPUT |
>  			$DPDK_CHECKPATCH_PATH $options - 2>/dev/null)

No need to use cat here.

>  	else
> -		report=$($DPDK_CHECKPATCH_PATH $options - 2>/dev/null)
> +		cat > ./$TMPINPUT
> +		report=$(cat ./$TMPINPUT | $DPDK_CHECKPATCH_PATH $options - 2>/dev/null)
> +	fi

All calls to DPDK_CHECKPATCH_PATH can be moved to one call after the "fi".
Just need to set TPMINPUT=$1 in first case (and not remove TPMINPUT
in this case).

> +	if [ $? -ne 0 ]
> +	then

For consistency, the style in this file is:
	if [ $? -ne 0 ] ; then

> +		$verbose || printf '\n### %s\n\n' "$3"
> +		printf '%s\n' "$report" | sed -n '1,/^total:.*lines checked$/p'
> +		ret=1
> +	fi
> +
> +	! $verbose || printf '\nChecking API additions/removals:\n'
> +
> +	if [ -n "$1" ] ; then
> +		report=$($VALIDATE_NEW_API "$1")
> +	elif [ -n "$2" ] ; then
> +		report=$( cat ./$TMPINPUT | 
> +			$VALIDATE_NEW_API -)
> +	else
> +		report=$(cat ./$TMPINPUT | $VALIDATE_NEW_API -)
> +	fi

Same as above, it can be simplified by only one line for all cases.