Re: [Qemu-devel] [Qemu-ppc] [PULL 000/107] ppc-for-2.9 queue 20170202

2017-02-03 Thread Thomas Huth
On 03.02.2017 10:46, Peter Maydell wrote:
> On 3 February 2017 at 08:36, Thomas Huth  wrote:
>> We've got lot's of C++ comments in the QEMU sources already, and the
>> CODING_STYLE document even does not mention this ... maybe this is just
>> a left-over from the Linux kernel's checkpatch.pl script? So IMHO:
>> Ignore this error. (and if we really agree that C++ comments are a
>> no-go, then somebody should send a patch to update the CODING_STYLE).
> 
> I've always assumed //-comments are not part of QEMU's coding
> style, and we really don't have all that many in the codebase,
> so I would vote for keeping this rule. (The exceptions are
> mostly in 3rd-party code in disas/ and also in ui/cocoa.m
> which was written to ObjC conventions.)
> 
> (I find it useful locally that checkpatch complains because
> then I can write my todo comments as // TODO and they get
> picked up in checkpatch.)

OK, fine for me, too ... but could you then maybe send a patch for
CODING_STYLE that states that //-comments should be avoided?

 Thanks,
  Thomas




Re: [Qemu-devel] [Qemu-ppc] [PULL 000/107] ppc-for-2.9 queue 20170202

2017-02-03 Thread Peter Maydell
On 3 February 2017 at 08:36, Thomas Huth  wrote:
> We've got lot's of C++ comments in the QEMU sources already, and the
> CODING_STYLE document even does not mention this ... maybe this is just
> a left-over from the Linux kernel's checkpatch.pl script? So IMHO:
> Ignore this error. (and if we really agree that C++ comments are a
> no-go, then somebody should send a patch to update the CODING_STYLE).

I've always assumed //-comments are not part of QEMU's coding
style, and we really don't have all that many in the codebase,
so I would vote for keeping this rule. (The exceptions are
mostly in 3rd-party code in disas/ and also in ui/cocoa.m
which was written to ObjC conventions.)

(I find it useful locally that checkpatch complains because
then I can write my todo comments as // TODO and they get
picked up in checkpatch.)

thanks
-- PMM



Re: [Qemu-devel] [Qemu-ppc] [PULL 000/107] ppc-for-2.9 queue 20170202

2017-02-03 Thread Thomas Huth
On 02.02.2017 23:44, David Gibson wrote:
> On Wed, Feb 01, 2017 at 11:41:40PM -0800, no-re...@patchew.org wrote:
>> Hi,
>>
>> Your series seems to have some coding style problems. See output below for
>> more information:
[...]
>> Checking PATCH 103/107: tcg/POWER9: NOOP the cp_abort instruction...
>> ERROR: do not use C99 // comments
>> #28: FILE: target/ppc/translate.c:6025:
>> +// Do Nothing
>>
>> total: 1 errors, 0 warnings, 17 lines checked
>>
>> Your patch has style problems, please review.  If any of these errors
>> are false positives report them to the maintainer, see
>> CHECKPATCH in MAINTAINERS.
> 
> But this one was me being sloppy.  Do we care enough to re-do the
> pullreq?

We've got lot's of C++ comments in the QEMU sources already, and the
CODING_STYLE document even does not mention this ... maybe this is just
a left-over from the Linux kernel's checkpatch.pl script? So IMHO:
Ignore this error. (and if we really agree that C++ comments are a
no-go, then somebody should send a patch to update the CODING_STYLE).

 Thomas




signature.asc
Description: OpenPGP digital signature