All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@canonical.com>
To: Joe Perches <joe@perches.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Hartley Sweeten <HartleyS@visionengravers.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] checkpatch: Add missing c90 types
Date: Fri, 18 Jul 2014 12:06:44 +0100	[thread overview]
Message-ID: <20140718110644.GC3114@bark> (raw)
In-Reply-To: <cover.1405609481.git.joe@perches.com>

On Thu, Jul 17, 2014 at 08:52:00AM -0700, Joe Perches wrote:
> c90 section "6.7.2 Type Specifiers" says:
>     "type specifiers may occur in any order"
> 
> That means that:
>     short int is the same as int short
>     unsigned short int is the same as int unsigned short
>     etc...
> 
> checkpatch currently parses only a subset of these allowed types.
> 
> For instance: "unsigned short" is a found by checkpatch as a
> specific type, but none of the "signed int" or "int short" variants
> are found.
> 
> Change all the existing types to allow signed and unsigned variants.
> Reorder the existing types array to match longest type first.
> 
> Add another table for the "kernel style misordered" variants.
> 
> Add this misordered table to the findable types.
> 
> Warn when the misordered style is used.
> 
> This improves the "Missing a blank line after declarations" test as
> it depends on the correct parsing of the $Declare variable which
> looks for "$Type $Ident;" (ie: declarations like "int foo;").
> 
> Joe Perches (3):
>   checkpatch: Add short int to c variable types
>   checkpatch: Add signed generic types
>   checkpatch: Add test for native c90 types in unusual order
> 
>  scripts/checkpatch.pl | 61 ++++++++++++++++++++++++++++++++++++++++++++-------
>  1 file changed, 53 insertions(+), 8 deletions(-)

Looks like a sane plan to me.

Acked-by: Andy Whitcroft <apw@canonical.com>

-apw

      parent reply	other threads:[~2014-07-18 11:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-17 15:52 [PATCH 0/3] checkpatch: Add missing c90 types Joe Perches
2014-07-17 15:52 ` [PATCH 1/3] checkpatch: Add short int to c variable types Joe Perches
2014-07-17 15:52 ` [PATCH 2/3] checkpatch: Add signed generic types Joe Perches
2014-07-17 15:52 ` [PATCH 3/3] checkpatch: Add test for native c90 types in unusual order Joe Perches
2014-07-18 11:06 ` Andy Whitcroft [this message]

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=20140718110644.GC3114@bark \
    --to=apw@canonical.com \
    --cc=HartleyS@visionengravers.com \
    --cc=akpm@linux-foundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.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.