[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] checkpatch.pl: add common glib defines to typel
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH] checkpatch.pl: add common glib defines to typelist |
Date: |
Wed, 25 Apr 2018 08:08:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Peter Xu <address@hidden> writes:
> Otherwise it can warn this:
>
> ERROR: space prohibited between function name and open parenthesis '('
>
> When with things like this:
>
> typedef gboolean (*it_tree_iterator)(ITValue start, ITValue end);
>
> CC: Paolo Bonzini <address@hidden>
> CC: Stefan Hajnoczi <address@hidden>
> CC: "Daniel P. Berrangé" <address@hidden>
> CC: Markus Armbruster <address@hidden>
> CC: Vladimir Sementsov-Ogievskiy <address@hidden>
> CC: Fam Zheng <address@hidden>
> Signed-off-by: Peter Xu <address@hidden>
> ---
> scripts/checkpatch.pl | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index d52207a3cc..6c25449cd3 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -266,6 +266,20 @@ our @typeList = (
> qr{target_(?:u)?long},
> qr{hwaddr},
> qr{xml${Ident}},
> + # Glib definitions
> + qr{gchar},
> + qr{gshort},
> + qr{glong},
> + qr{gint},
> + qr{gboolean},
> + qr{guchar},
> + qr{gushort},
> + qr{gulong},
> + qr{guint},
> + qr{gfloat},
> + qr{gdouble},
> + qr{gpointer},
> + qr{gconstpointer},
> );
>
> # This can be modified by sub possible. Since it can be empty, be careful
Personally, I'd kill these with fire, then salt the fields that bore
them.
But as long as we have them in our code, checkpatch needs to cope.
Let's list all types documented in
<https://developer.gnome.org/glib/stable/glib-Basic-Types.html>.
Missing:
gint8
guint8
gint16
guint16
gint32
guint32
gint64
guint64
gsize
gssize
goffset
gintptr
guintptr