All of lore.kernel.org
 help / color / mirror / Atom feed
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>
Subject: Re: [PATCH v6] checkpatches.sh: Add checks for ABI symbol addition
Date: Sun, 27 May 2018 21:34:13 +0200	[thread overview]
Message-ID: <1725451.L7JxISGBU9@xps> (raw)
In-Reply-To: <20180214191916.7226-1-nhorman@tuxdriver.com>

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.

  reply	other threads:[~2018-05-27 19:34 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15 19:05 [PATCH] checkpatches.sh: Add checks for ABI symbol addition Neil Horman
2018-01-15 21:52 ` Thomas Monjalon
2018-01-16  0:37   ` Neil Horman
2018-01-15 22:20 ` Stephen Hemminger
2018-01-16  0:36   ` Neil Horman
2018-01-16 18:22 ` [PATCH v2] " Neil Horman
2018-01-21 20:29   ` Thomas Monjalon
2018-01-22  1:54     ` Neil Horman
2018-01-22  2:05       ` Thomas Monjalon
2018-01-31 17:27 ` [PATCH v3] " Neil Horman
2018-02-04 14:44   ` Thomas Monjalon
2018-02-05 17:29 ` [PATCH v4] " Neil Horman
2018-02-05 17:57   ` Thomas Monjalon
2018-02-09 15:21 ` [PATCH v5] " Neil Horman
2018-02-13 22:57   ` Thomas Monjalon
2018-02-14 19:19 ` [PATCH v6] " Neil Horman
2018-05-27 19:34   ` Thomas Monjalon [this message]
2018-05-27 21:00     ` Neil Horman
2018-05-27 22:01       ` Thomas Monjalon
2018-05-28 17:08         ` Neil Horman
2018-06-05 12:21 ` [PATCH v7] " Neil Horman
2018-06-14 13:30 ` [PATCH v8] " Neil Horman
2018-06-25 23:04   ` Thomas Monjalon
2018-06-27 17:58     ` Neil Horman
2018-06-27 18:01 ` [PATCH v9] " Neil Horman
2018-07-15 23:12   ` Thomas Monjalon
2018-08-14  3:53   ` Rao, Nikhil
2018-08-14 11:04     ` Neil Horman
2018-08-15  6:10       ` Nikhil Rao
2018-08-15 10:48         ` Neil Horman
2018-08-16  6:19           ` Rao, Nikhil
2018-08-16 10:42             ` Neil Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1725451.L7JxISGBU9@xps \
    --to=thomas@monjalon.net \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=john.mcnamara@intel.com \
    --cc=nhorman@tuxdriver.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.