All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] astyle: Formatting rules for QEMU
Date: Sat, 18 Feb 2012 12:13:26 +0100	[thread overview]
Message-ID: <4F3F87D6.4050900@weilnetz.de> (raw)
In-Reply-To: <CAAu8pHsMm0PUbFnhw5LWKJuu_fSa1a5px3Wykd0X4ennwtKYWA@mail.gmail.com>

Am 18.02.2012 11:10, schrieb Blue Swirl:
> There are still indentation problems when expressions continue to next
> line, also this does not look OK:
> --- a/target-sparc/translate.c
> +++ b/target-sparc/translate.c
> @@ -36,7 +36,7 @@
>
> #define DYNAMIC_PC 1 /* dynamic pc value */
> #define JUMP_PC 2 /* dynamic pc value which takes only two values
> - according to jump_pc[T2] */
> +according to jump_pc[T2] */

Writing comments like this looks nice, but needs more work when
the comments are written. Maintenance of the code is also more
difficult: any time a new line with a longer name is added, you
have to reformat all other lines to preserve the good look.

Just add this line to the code given above to see what I mean:
     #define ANY_LONG_PC 3 /* just an example */

This is why I usually write comments in an extra line before the
code statement.

Regards,
Stefan

  reply	other threads:[~2012-02-18 11:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-09 14:59 [Qemu-devel] [PATCH] checkpatch: Don't WARN about missing spaces in audio files Andreas Färber
2012-02-09 15:03 ` Andreas Färber
2012-02-09 16:43 ` malc
2012-02-10  3:50 ` Evgeny Voevodin
2012-02-10  4:02   ` malc
2012-02-10 17:47     ` Anthony Liguori
2012-02-11  9:44       ` Blue Swirl
2012-02-17 14:31         ` Anthony Liguori
2012-02-17 14:55           ` Markus Armbruster
2012-02-17 15:26             ` Anthony Liguori
2012-02-18  9:13               ` Blue Swirl
2012-02-18 10:56                 ` Stefan Weil
2012-02-18 14:18                   ` Anthony Liguori
2012-02-18 14:34                     ` Blue Swirl
2012-02-18 15:53                 ` Andreas Färber
2012-02-18 16:47                   ` Eric Blake
2012-02-18  8:56           ` Blue Swirl
2012-02-18  9:07             ` [Qemu-devel] [PATCH] astyle: Formatting rules for QEMU Stefan Weil
2012-02-18 10:10               ` Blue Swirl
2012-02-18 11:13                 ` Stefan Weil [this message]
2012-02-11  9:37 ` [Qemu-devel] [PATCH] checkpatch: Don't WARN about missing spaces in audio files Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F3F87D6.4050900@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.