mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Willy Tarreau <willy@w.ods.org>
To: Geoffrey Lee <glee@gnupilgrims.org>
Cc: linux-kernel@vger.kernel.org, davej@redhat.com
Subject: Re: [patch] reproducible athlon mce fix
Date: Sun, 2 Nov 2003 08:25:19 +0100	[thread overview]
Message-ID: <20031102072519.GD530@alpha.home.local> (raw)
In-Reply-To: <20031102055748.GA1218@anakin.wychk.org>

Hi,

I don't know if the patch is correct, but :

On Sun, Nov 02, 2003 at 01:57:48PM +0800, Geoffrey Lee wrote:
>  	preempt_disable(); 
> +#if CONFIG_MK7
> +	for (i=1; i<nr_mce_banks; i++) {
> +#else
>  	for (i=0; i<nr_mce_banks; i++) {
> +#endif

Including opening braces within #if often fools editors such as emacs
which count them and don't know about #if. Then, editing the rest of
the file can become annoying because it simply thinks that there are
two embedded for loops.

Other solutions to this problem often include one of these constructs
which are unfortunately not as beautiful :

1) a still readable one
#if CONFIG_MK7
	i=1;
#else
 	i=0;
#endif
 	for (; i<nr_mce_banks; i++) {

2) when there's absolutely no choice (eg changing part of an
   expression...) something unreadable like this.

	for (
#if CONFIG_MK7
	i=1;
#else
 	i=0;
#endif
 	i<nr_mce_banks; i++) {

I'm sure other people have other solution that don't come to mind.

Cheers,
Willy


  reply	other threads:[~2003-11-02  7:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-02  5:57 Geoffrey Lee
2003-11-02  7:25 ` Willy Tarreau [this message]
2003-11-02  7:28   ` Geoffrey Lee
2003-11-02  8:59   ` Zwane Mwaikambo
2003-11-10 23:55   ` bill davidsen
2003-11-02 12:52 ` Dave Jones
2003-11-02 13:52   ` Geoffrey Lee
2003-11-03  9:20   ` Geoffrey Lee
2003-11-03 13:24     ` Dave Jones
2003-11-02 18:25 ` Kronos
2003-11-02 23:44   ` Geoffrey Lee

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=20031102072519.GD530@alpha.home.local \
    --to=willy@w.ods.org \
    --cc=davej@redhat.com \
    --cc=glee@gnupilgrims.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®