From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QatMx-00081X-7Y for qemu-devel@nongnu.org; Sun, 26 Jun 2011 13:43:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QatMw-0005lx-3u for qemu-devel@nongnu.org; Sun, 26 Jun 2011 13:43:39 -0400 Received: from mail-qy0-f180.google.com ([209.85.216.180]:45019) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QatMw-0005lr-1h for qemu-devel@nongnu.org; Sun, 26 Jun 2011 13:43:38 -0400 Received: by qyk30 with SMTP id 30so2752530qyk.4 for ; Sun, 26 Jun 2011 10:43:37 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20110622045330.GB5789@amit-x200.redhat.com> References: <20110616133849.02fb4bea@doriath> <20110617064736.GA18513@amit-x200.redhat.com> <20110617101644.5e275e53@doriath> <20110617160926.GA25648@amit-x200.redhat.com> <20110617150811.156acbae@doriath> <20110618034245.GA26613@amit-x200.redhat.com> <20110622045330.GB5789@amit-x200.redhat.com> From: Blue Swirl Date: Sun, 26 Jun 2011 20:43:16 +0300 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] virtio-serial: Fix segfault on guest boot List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: mdroth@linux.vnet.ibm.com, Markus Armbruster , qemu-devel , Luiz Capitulino On Wed, Jun 22, 2011 at 7:53 AM, Amit Shah wrote: > On (Sun) 19 Jun 2011 [00:43:20], Blue Swirl wrote: >> On Sat, Jun 18, 2011 at 6:42 AM, Amit Shah wrote: >> > On (Fri) 17 Jun 2011 [15:08:11], Luiz Capitulino wrote: >> > >> >> > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!cpkt.value) { >> >> > > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error_report("virtio-s= erial-bus: Guest failure in adding device %s\n", >> >> > > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 vser->bus.qbus.name); >> >> > > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break; >> >> > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error_report("virtio-s= erial-bus: Guest failure in adding device %s\n", vser->bus.qbus.name); >> >> > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return; >> >> > >> >> > The line split should remain -- else it goes beyond 80 chars. >> >> >> >> It's already beyond 80 chars to me. >> > >> > I prefer to not break strings that get printed out -- makes it easier >> > for greppers to find out the source of the string. >> >> Please read CODING_STYLE and use scripts/checkpatch.pl before >> submitting patches. > > Good sense should dictate what goes in CODING_STYLE, not the other way > around. Unfortunately there is huge amount of bike shedding in this area, there is no One Good Sense but several which conflict with each other. Discussions about changing CODING_STYLE haven't been very fruitful. > From dec93d9eccd639f7bfd1343dca65fa112eb19e3e Mon Sep 17 00:00:00 2001 > Message-Id: > From: Amit Shah > Date: Wed, 22 Jun 2011 10:20:48 +0530 > Subject: [PATCH 1/1] CODING_STYLE: Add exception for log output 80-char l= imit > > Output that's logged can be beyond 80 chars to preserve sane grepping. Nack. Grepping (why just logs?) is just one use case. There are other cases where shorter line length is preferred, like editors, terminals, patch generation, mail systems munging long lines etc. > > Signed-off-by: Amit Shah > --- > =C2=A0CODING_STYLE | =C2=A0 =C2=A05 ++++- > =C2=A01 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/CODING_STYLE b/CODING_STYLE > index 5ecfa22..886221c 100644 > --- a/CODING_STYLE > +++ b/CODING_STYLE > @@ -31,7 +31,10 @@ Do not leave whitespace dangling off the ends of lines= . > > =C2=A02. Line width > > -Lines are 80 characters; not longer. > +Lines are 80 characters; not longer. =C2=A0An exception is for output th= at > +is logged, for example via fprintf() / error_report() functions, > +making it straightforward for people to grep the code for the source > +of the output. > > =C2=A0Rationale: > =C2=A0- Some people like to tile their 24" screens with a 6x4 matrix of 8= 0x24 > -- > 1.7.5.4 > > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Amit >