From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvVWu-0007U9-9j for qemu-devel@nongnu.org; Thu, 09 Feb 2012 10:03:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvVWi-000319-0t for qemu-devel@nongnu.org; Thu, 09 Feb 2012 10:03:24 -0500 Received: from cantor2.suse.de ([195.135.220.15]:59777 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvVWh-00030q-Mw for qemu-devel@nongnu.org; Thu, 09 Feb 2012 10:03:11 -0500 Message-ID: <4F33E02E.5090705@suse.de> Date: Thu, 09 Feb 2012 16:03:10 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1328799563-18932-1-git-send-email-afaerber@suse.de> In-Reply-To: <1328799563-18932-1-git-send-email-afaerber@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] checkpatch: Don't WARN about missing spaces in audio files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl , Paolo Bonzini , Anthony Liguori , Stefan Hajnoczi , Alexander Graf Am 09.02.2012 15:59, schrieb Andreas F=C3=A4rber: > Disable warnings for spaces before opening parenthesis in > hw/{ac97,adlib,cs4231a,es1370,gus,sb16}.c. >=20 > Signed-off-by: Andreas F=C3=A4rber > Cc: Blue Swirl > Cc: malc > --- For testing I used the following pseudo-patch: --8<-- --- a/hw/sb16.c +++ b/hw/sb16.c @@ -1,1 +1,1 @@ -device_init (foobar) +type_init (foobar) --- a/hw/foo.c +++ b/hw/foo.c @@ -1,1 +1,1 @@ -device_init (foobar) +type_init (foobar) --8<-- Adding a rule to warn about missing space before parenthesis is left as an exercise for malc. Andreas > scripts/checkpatch.pl | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) >=20 > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 8850a5f..5433736 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -246,6 +246,8 @@ our $allowed_asm_includes =3D qr{(?x: > )}; > # memory.h: ARM has a custom one > =20 > +our $audio_files =3D qr{hw/ac97.c|hw/adlib.c|hw/cs4231a.c|hw/es1370.c|= hw/gus.c|hw/sb16.c}; > + > sub build_types { > my $mods =3D "(?x: \n" . join("|\n ", @modifierList) . "\n)"; > my $all =3D "(?x: \n" . join("|\n ", @typeList) . "\n)"; > @@ -1966,6 +1968,9 @@ sub process { > asm|__asm__)$/x) > { > =20 > + # malc wants to keep spacing consistent in the audio files. > + } elsif ($realfile =3D~ /($audio_files)/) { > + > # cpp #define statements have non-optional spaces, ie > # if there is a space between the name and the open > # parenthesis it is simply not a parameter group. --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg