From patchwork Wed Jun 22 04:53:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 101391 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F131EB6F7B for ; Wed, 22 Jun 2011 14:55:39 +1000 (EST) Received: from localhost ([::1]:46288 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZFTR-0007Za-L4 for incoming@patchwork.ozlabs.org; Wed, 22 Jun 2011 00:55:33 -0400 Received: from eggs.gnu.org ([140.186.70.92]:45600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZFRa-0007ZP-S1 for qemu-devel@nongnu.org; Wed, 22 Jun 2011 00:53:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZFRZ-0001HG-UA for qemu-devel@nongnu.org; Wed, 22 Jun 2011 00:53:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZFRZ-0001HB-H9 for qemu-devel@nongnu.org; Wed, 22 Jun 2011 00:53:37 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5M4rYgb023008 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 22 Jun 2011 00:53:34 -0400 Received: from localhost ([10.3.113.2]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p5M4rVaD007011; Wed, 22 Jun 2011 00:53:32 -0400 Date: Wed, 22 Jun 2011 10:23:30 +0530 From: Amit Shah To: Blue Swirl Message-ID: <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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id p5M4rYgb023008 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: mdroth@linux.vnet.ibm.com, Markus Armbruster , qemu-devel , Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH] virtio-serial: Fix segfault on guest boot X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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: > > > >> > >          if (!cpkt.value) { > >> > > -            error_report("virtio-serial-bus: Guest failure in adding device %s\n", > >> > > -                         vser->bus.qbus.name); > >> > > -            break; > >> > > +            error_report("virtio-serial-bus: Guest failure in adding device %s\n", vser->bus.qbus.name); > >> > > +            return; > >> > > >> > 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. 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 limit Output that's logged can be beyond 80 chars to preserve sane grepping. Signed-off-by: Amit Shah --- CODING_STYLE | 5 ++++- 1 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. 2. Line width -Lines are 80 characters; not longer. +Lines are 80 characters; not longer. An exception is for output that +is logged, for example via fprintf() / error_report() functions, +making it straightforward for people to grep the code for the source +of the output. Rationale: - Some people like to tile their 24" screens with a 6x4 matrix of 80x24