From: "Thiago Galesi" <thiagogalesi@gmail.com>
To: "David Brownell" <david-b@pacbell.net>
Cc: "Andrew Morton" <akpm@osdl.org>,
"Andrea Paterniani" <a.paterniani@swapp-eng.it>,
"Linux Kernel list" <linux-kernel@vger.kernel.org>
Subject: Re: [patch 2.6.18-git] SPI -- Freescale iMX SPI controller driver
Date: Mon, 2 Oct 2006 14:37:39 -0400 [thread overview]
Message-ID: <82ecf08e0610021137r446031a8pa303053479e9cb27@mail.gmail.com> (raw)
In-Reply-To: <200610020816.58985.david-b@pacbell.net>
<nitpickery on>
+
> +/*-------------------------------------------------------------------------*/
> +/* SPI Control Register Bit Fields & Masks */
> +#define SPI_CONTROL_BITCOUNT (0xF) /* Bit Count Mask */
> +#define SPI_CONTROL_BITCOUNT_1 (0x0) /* Bit Count = 1 */
> +#define SPI_CONTROL_BITCOUNT_2 (0x1) /* Bit Count = 2 */
> +#define SPI_CONTROL_BITCOUNT_3 (0x2) /* Bit Count = 3 */
I thinking these comments are awfully confusing (bitcount_1 == 0
?!?!?) and maybe redundant.
It would be much more useful to explain the logic behind why
(bitcount_1 == 0) and remove the /* Bit Count = X */ comments
> +/* SPI Soft Reset Register Bit Fields & Masks */
> +#define SPI_RESET_START (0x1 << 0) /* Start */
Wouldn't only (0x1) be better?
> +
> +/* Message state */
> +#define START_STATE ((void*)0)
> +#define RUNNING_STATE ((void*)1)
> +#define DONE_STATE ((void*)2)
> +#define ERROR_STATE ((void*)-1)
!?!??!?!
All in all, except for what Andrew has pointed out, it looks good,
maybe a little bit overengineered...
--
-
Thiago Galesi
next prev parent reply other threads:[~2006-10-02 18:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-02 15:16 David Brownell
2006-10-02 17:59 ` Andrew Morton
2006-10-02 20:16 ` David Brownell
2006-10-03 16:08 ` Andrea Paterniani
2006-10-06 23:35 ` David Brownell
2006-10-07 11:01 ` Andrea Paterniani
2006-10-07 23:50 ` David Brownell
2006-10-02 18:37 ` Thiago Galesi [this message]
2006-10-02 20:10 ` David Brownell
2006-10-02 20:38 ` Andrew Morton
2006-10-02 21:09 ` David Brownell
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=82ecf08e0610021137r446031a8pa303053479e9cb27@mail.gmail.com \
--to=thiagogalesi@gmail.com \
--cc=a.paterniani@swapp-eng.it \
--cc=akpm@osdl.org \
--cc=david-b@pacbell.net \
--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®