All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alessandro Rubini <rubini-list@gnudd.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] mips: tolerate the MIPS 'CFG_HZ' values in the MHZ range for NAND delays
Date: Mon, 19 May 2008 22:44:36 +0200	[thread overview]
Message-ID: <20080519204436.GA3521@mail.gnudd.com> (raw)
In-Reply-To: <20080519201124.6F09D10376@mcmullan-linux.hq.netapp.com>


> +#if CFG_HZ > 100000

Shouldn't this be

	if (CFG_HZ > 100000)

instead?

It's a constant expression, and the compiler optimizes the conditional
out. Using if() instead of #if ensures that all the code is always parsed,
so the compiler can review it all and signal any problem. Not to mention
aesthetics.

/alessandro

  parent reply	other threads:[~2008-05-19 20:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-16 18:24 [U-Boot-Users] [PATCH] mips: tolerate the MIPS 'CFG_HZ' values in the MHZ range for NAND delays Jason McMullan
2008-05-19 20:26 ` Scott Wood
2008-05-19 20:31   ` [U-Boot-Users] [PATCH] mips: tolerate the MIPS 'CFG_HZ' valuesin " McMullan, Jason
2008-05-19 20:36     ` Scott Wood
2008-05-19 20:39   ` [U-Boot-Users] [PATCH] mips: tolerate the MIPS 'CFG_HZ' values in " Wolfgang Denk
2008-05-19 20:43     ` Scott Wood
2008-05-19 20:51       ` Wolfgang Denk
2008-05-19 21:15         ` Scott Wood
2008-06-11 23:02           ` Wolfgang Denk
2008-05-19 20:38 ` Wolfgang Denk
2008-05-20  8:27   ` Haavard Skinnemoen
2008-05-20  8:34     ` Wolfgang Denk
2008-05-20  9:22       ` Haavard Skinnemoen
2008-05-20  9:31         ` Wolfgang Denk
2008-05-19 20:44 ` Alessandro Rubini [this message]
2008-05-19 20:53   ` Wolfgang Denk
2008-05-19 21:04     ` Alessandro Rubini
2008-05-19 21:14       ` Wolfgang Denk

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=20080519204436.GA3521@mail.gnudd.com \
    --to=rubini-list@gnudd.com \
    --cc=u-boot@lists.denx.de \
    /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.