[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/14] scsi: add a qdev property for the disk's
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [PATCH 02/14] scsi: add a qdev property for the disk's WWN |
Date: |
Sat, 7 Jul 2012 07:48:07 +0000 |
On Fri, Jul 6, 2012 at 7:05 AM, Paolo Bonzini <address@hidden> wrote:
> Il 05/07/2012 20:03, Blue Swirl ha scritto:
>> > > > + if (s->wwn) {
>> > > > + outbuf[buflen++] = 0x1; // Binary
>> > > > + outbuf[buflen++] = 0x3; // NAA
>> > > > + outbuf[buflen++] = 0; // reserved
>> > >
>> > > C99 comments.
>> >
>> > Just following the style of this code. Feel free to send a patch to
>> > replace with #defines.
>>
>> That's not how we should work. New code should be compliant with our
>> goals. Pushing the responsibility for fixing issues to other people
>> does not scale.
>
> I believe the coding style are attacking the wrong problem. It's
> end-of-line comments that should be avoided in favor of #defines, packed
> structs, designated initializers, etc.
This applies to C89 comments too. Perhaps HACKING file should mention this.
> But for end-of-line comments,
> C++ comments are superior to /* */ comments.
Well, submit a change to CODING_STYLE then. I think the only places
where C99 is better are lines like
//#define DEBUG_XYZ
>
> I do plan to fix the clarity issue with SCSI data structures and
> constants. But for now, the best compromise is to keep C++ comments
> IMHO. I'm not pushing the responsibility to other people in general,
> but if they think C++ comments are a major issue they can send patches.
When you add them in new code, that is a problem. New code should
comply with CODING_STYLE, code with other styles should be converted
as it is touched.
It shouldn't be much effort from your part to change the comments in
this patch to C89 style.
>
> Paolo
[Qemu-devel] [PATCH 01/14] scsi: simplify handling of the VPD page length field, Paolo Bonzini, 2012/07/02
[Qemu-devel] [PATCH 05/14] ISCSI: Add SCSI passthrough via scsi-generic to libiscsi, Paolo Bonzini, 2012/07/02
[Qemu-devel] [PATCH 04/14] scsi-disk: implement READ DISC INFORMATION, Paolo Bonzini, 2012/07/02
[Qemu-devel] [PATCH 03/14] atapi: implement READ DISC INFORMATION, Paolo Bonzini, 2012/07/02
[Qemu-devel] [PATCH 07/14] megasas: Add header file, Paolo Bonzini, 2012/07/02
[Qemu-devel] [PATCH 06/14] ISCSI: force use of sg for SMC and SSC devices, Paolo Bonzini, 2012/07/02
[Qemu-devel] [PATCH 13/14] scsi: Add basic support for SCSI media changer commands., Paolo Bonzini, 2012/07/02
[Qemu-devel] [PATCH 10/14] scsi: Fix data length == SCSI_SENSE_BUF_SIZE, Paolo Bonzini, 2012/07/02
[Qemu-devel] [PATCH 11/14] scsi: Fix LOAD_UNLOAD, Paolo Bonzini, 2012/07/02