mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Whitcroft <apw@canonical.com>,
	Hartley Sweeten <HartleyS@visionengravers.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] checkpatch: Add short int to c variable types
Date: Thu, 17 Jul 2014 08:52:01 -0700	[thread overview]
Message-ID: <5a4775d9d7ce9fc3d5df18308f26cb2afc86303e.1405609481.git.joe@perches.com> (raw)
In-Reply-To: <cover.1405609481.git.joe@perches.com>

short int is one of the 6.7.2 c90 types.
Find it appropriately.

This fixes a defect in checkpatch where it suggests that a
line break after declaration is required using an input like:

	int foo;
	short int bar;

Without this change, it warns on the short int line.

Reported-by: Hartley Sweeten <HartleyS@visionengravers.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
 scripts/checkpatch.pl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index f3d9a88..d81e4ab 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -356,6 +356,7 @@ our $signature_tags = qr{(?xi:
 our @typeList = (
 	qr{void},
 	qr{(?:unsigned\s+)?char},
+	qr{(?:unsigned\s+)?short\s+int},
 	qr{(?:unsigned\s+)?short},
 	qr{(?:unsigned\s+)?int},
 	qr{(?:unsigned\s+)?long},
-- 
1.8.1.2.459.gbcd45b4.dirty


  reply	other threads:[~2014-07-17 15:52 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 ` Joe Perches [this message]
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 ` [PATCH 0/3] checkpatch: Add missing c90 types Andy Whitcroft

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=5a4775d9d7ce9fc3d5df18308f26cb2afc86303e.1405609481.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=HartleyS@visionengravers.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®