qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] virtio-serial: Fix segfault on guest boot


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH] virtio-serial: Fix segfault on guest boot
Date: Sun, 26 Jun 2011 20:43:16 +0300

On Wed, Jun 22, 2011 at 7:53 AM, Amit Shah <address@hidden> wrote:
> On (Sun) 19 Jun 2011 [00:43:20], Blue Swirl wrote:
>> On Sat, Jun 18, 2011 at 6:42 AM, Amit Shah <address@hidden> 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.

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: <address@hidden>
> From: Amit Shah <address@hidden>
> 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.

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 <address@hidden>
> ---
>  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
> --
> 1.7.5.4
>
>
>
>                Amit
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]