qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: blauwirbel@gmail.com, anthony@codemonkey.ws
Subject: [Qemu-devel] [PATCH 3/3] checkpatch: Keep out the GLib silliness we just purged
Date: Fri, 18 Jan 2013 17:04:09 +0100	[thread overview]
Message-ID: <1358525049-31163-4-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1358525049-31163-1-git-send-email-armbru@redhat.com>


Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 scripts/checkpatch.pl | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index ec0aa4c..3490946 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2876,6 +2876,35 @@ sub process {
 		if ($rawline =~ /\b(?:Qemu|QEmu)\b/) {
 			WARN("use QEMU instead of Qemu or QEmu\n" . $herecurr);
 		}
+
+                if ($line =~ /\b(gboolean|gpointer|gconstpointer|gchar|guchar
+                                |gint|G_MININT|G_MAXINT|guint|G_MAXUINT|gshort
+                                |G_MINSHORT|G_MAXSHORT|gushort|G_MAXUSHORT
+                                |glong|G_MINLONG|G_MAXLONG|gulong|G_MAXULONG
+                                |gint8|G_MININT8|G_MAXINT8|guint8|G_MAXUINT8
+                                |gint16|G_MININT16|G_MAXINT16|G_GINT16_MODIFIER
+                                |G_GINT16_FORMAT|guint16|G_MAXUINT16
+                                |G_GUINT16_FORMAT|gint32|G_MININT32|G_MAXINT32
+                                |G_GINT32_MODIFIER|G_GINT32_FORMAT|guint32
+                                |G_MAXUINT32|G_GUINT32_FORMAT|gint64|G_MININT64
+                                |G_MAXINT64|G_GINT64_MODIFIER|G_GINT64_FORMAT
+                                |G_GINT64_CONSTANT|guint64|G_MAXUINT64
+                                |G_GUINT64_FORMAT|G_GUINT64_CONSTANT|gfloat
+                                |G_MINFLOAT|G_MAXFLOAT|gdouble|G_MINDOUBLE
+                                |G_MAXDOUBLE|gsize|G_MAXSIZE|G_GSIZE_MODIFIER
+                                |G_GSIZE_FORMAT|gssize|G_MINSSIZE|G_MAXSSIZE
+                                |G_GSSIZE_FORMAT|goffset|G_MINOFFSET
+                                |G_MAXOFFSET|G_GOFFSET_MODIFIER
+                                |G_GOFFSET_FORMAT|G_GOFFSET_CONSTANT|gintptr
+                                |G_GINTPTR_MODIFIER|G_GINTPTR_FORMAT|guintptr
+                                |G_GUINTPTR_FORMAT|G_STRUCT_MEMBER
+                                |G_STRUCT_MEMBER_P|G_STRUCT_OFFSET
+                                |G_CONST_RETURN|G_N_ELEMENTS|GINT_TO_POINTER
+                                |GPOINTER_TO_INT|GUINT_TO_POINTER
+                                |GPOINTER_TO_UINT|GSIZE_TO_POINTER
+                                |GPOINTER_TO_SIZE)\b/x) {
+			WARN("Please use standard C names instead of glib aliases like $1\n" . $herecurr);
+                }
 	}
 
 	# If we have no input at all, then there is nothing to report on
-- 
1.7.11.7

  parent reply	other threads:[~2013-01-18 16:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-18 16:04 [Qemu-devel] [PATCH 0/3] Purge the silly GLib Basic Types Markus Armbruster
2013-01-18 16:04 ` [Qemu-devel] [PATCH 1/3] Purge the silly GLib "Basic Types", except for gboolean Markus Armbruster
2013-01-18 16:04 ` [Qemu-devel] [PATCH 2/3] Purge GLib's gboolean, it's a trap for the unwary Markus Armbruster
2013-01-18 16:04 ` Markus Armbruster [this message]
2013-01-18 16:17 ` [Qemu-devel] [PATCH 0/3] Purge the silly GLib Basic Types Anthony Liguori
2013-01-19  9:33   ` Blue Swirl
2013-01-19 10:35     ` Michael Tokarev
2013-01-19 11:20       ` Blue Swirl
2013-01-19 16:47       ` Anthony Liguori

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=1358525049-31163-4-git-send-email-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).