From: Jeff Garzik <jgarzik@pobox.com>
To: Grant Grundler <grundler@google.com>
Cc: Mark Lord <liml@rtr.ca>, Tejun Heo <htejun@gmail.com>,
IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: Re: [PATCH 1/8] sata_mv more cosmetics
Date: Fri, 25 Apr 2008 12:57:38 -0400 [thread overview]
Message-ID: <48120D82.7060009@pobox.com> (raw)
In-Reply-To: <da824cf30804250940o4f0e0396k1696348f8d86cb77@mail.gmail.com>
Grant Grundler wrote:
> I think you can associate any names you want with whatever the
> non-public documentation is calling the registers by adding a comment
> in the header files where the bit masks and register offsets are defined.
> Or vice versa. Which ever way works for you.
>
> I prefer to use the non-public register names in the code only because it
> will be easier for Marvell engineers to participate in _maintaining_
> this driver. I think getting involved with open source developement
> is a good career developement experience. And the device drivers for
> "obsolete" HW allows them to take more risks/make mistakes
> without getting into serious trouble with the company.
The trouble, though, comes with following that logic in every driver,
making the collective body less accessible to anyone not _intimately_
tied into the hardware _and_ possessing NDA'd docs.
Further, it is obvious with _most_ drivers in Linux that engineers at
the hardware vendor do _not_ participate in maintaining drivers for
their older hardware, so I also wish to be careful and avoid punishing
the majority to help a minority.
I put a significant value in having more-readable code like
status = mr32(IRQ_STAT); /* read IRQ status from PPB */
rather than
status = READ_REG(ICR5PPB); /* read IRQ status from PPB */
because the casual reader is more likely to understand the first
example, even though it deviates from the string of line noise some
engineer writing Verilog at 4:00am decided was a good register name.
Jeff
next prev parent reply other threads:[~2008-04-25 16:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-19 18:42 [PATCH 0/8] sata_mv interrupt/eh fixes etc Mark Lord
2008-04-19 18:43 ` [PATCH 1/8] sata_mv more cosmetics Mark Lord
2008-04-25 5:15 ` Jeff Garzik
2008-04-25 13:46 ` Mark Lord
2008-04-25 16:40 ` Grant Grundler
2008-04-25 16:57 ` Jeff Garzik [this message]
2008-04-25 17:35 ` Mark Lord
2008-04-25 17:39 ` Grant Grundler
2008-04-25 17:31 ` Mark Lord
2008-04-19 18:44 ` [PATCH 2/8] sata_mv mask all interrupt coalescing bits Mark Lord
2008-04-19 18:45 ` [PATCH 3/8] sata_mv simplify freeze/thaw bit-shift calculations Mark Lord
2008-04-19 19:05 ` REPOST: " Mark Lord
2008-04-19 18:46 ` [PATCH 4/8] sata_mv simplify request/response queue handling Mark Lord
2008-04-19 19:06 ` REPOST: " Mark Lord
2008-04-19 18:52 ` [PATCH 5/8] sata_mv tidy host controller interrupt handling Mark Lord
2008-04-19 19:07 ` REPOST: " Mark Lord
2008-04-19 18:53 ` [PATCH 6/8] sata_mv more interrupt handling rework Mark Lord
2008-04-19 18:53 ` [PATCH 7/8] sata_mv leave SError bits untouched in mv_err_intr Mark Lord
2008-04-19 19:07 ` REPOST: " Mark Lord
2008-04-19 18:54 ` [PATCH 8/8] sata_mv re-enable hotplug, update TODO list Mark Lord
2008-04-19 19:09 ` Mark Lord
2008-04-23 13:32 ` [PATCH 0/8] sata_mv interrupt/eh fixes etc Mark Lord
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=48120D82.7060009@pobox.com \
--to=jgarzik@pobox.com \
--cc=grundler@google.com \
--cc=htejun@gmail.com \
--cc=liml@rtr.ca \
--cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).