From: "Mark Chambers" <markc@mail.com>
To: "Robert P. J. Day" <rpjday@mindspring.com>, "Wolfgang Denk" <wd@denx.de>
Cc: Embedded PPC Linux list <linuxppc-embedded@ozlabs.org>
Subject: Re: [PATCH] first in a series to enhance microcode patches
Date: Wed, 6 Oct 2004 10:05:19 -0400 [thread overview]
Message-ID: <003001c4abad$8752a9d0$0301a8c0@chuck2> (raw)
In-Reply-To: Pine.LNX.4.60.0410060926320.8416@dell.enoriver.com
rday:
> >>
> >> that's definitely understandable. it's just potentially confusing to
> >> have a structure's reserved chunks declared as some combination of
> >> uchar, ushort, uint and/or ulong, when it's obviously more
> >> comprehensible to make each reserved chunk a standard array of char
> >> whose size is obvious at a glance.
> >
wd:
> > Actually this might not be confusing, but making the code easier to
> > read, to understand, and maybe one day to extend - remember that
> > these struct definitions are direct translations of Motorola provided
> > documentation - and I tend to believe that the chip manufacturer
> > knows more about the internals of his chips than you or me. One day,
> > a "uint reserved_xxx;" may turn into a new, shiny 32 bit register.
>
rday:
> it seems that, if that's good advice for patches, it should be good
> advice for the code proper. i do appreciate your point, but if at
> some point, a shiny new register suddenly appears, that strikes me as
> a significant enough change that mods to the header file shouldn't be
> considered a big deal.
>
> anyway, just my $0.02.
>
Rob,
What about, "if it ain't broke, don't fix it". If it were my code I
wouldn't
touch that stuff - at best you get pretty code, at worst you break
something.
Remember, these aren't 'real' structures, they're just templates to make
I/O addressing come out right. Wolfgang is likely right, that Motorola
created the structures based on what they know about the internal
decoding logic. So if in the future one needs to add new registers you
again minimize the chance of breaking something by not rearranging
the arrays correctly. Then again, if Motorola adds registers (or they
may already be there, but not documentented) they will probably
release a new header file, which you'll have to clean up all over
again.
That's my two cents.
Mark C.
next prev parent reply other threads:[~2004-10-06 14:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-05 16:32 [PATCH] first in a series to enhance microcode patches Robert P. J. Day
2004-10-05 19:20 ` Dan Malek
2004-10-05 19:29 ` Tom Rini
2004-10-05 20:00 ` Robert P. J. Day
2004-10-05 20:53 ` Tom Rini
2004-10-05 19:52 ` Robert P. J. Day
2004-10-05 20:20 ` Wolfgang Denk
2004-10-06 13:30 ` Robert P. J. Day
2004-10-06 14:05 ` Mark Chambers [this message]
2004-10-06 14:01 ` Robert P. J. Day
-- strict thread matches above, loose matches on Subject: below --
2004-10-05 17:32 Robert P. J. Day
2004-10-07 15:38 ` Tom Rini
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='003001c4abad$8752a9d0$0301a8c0@chuck2' \
--to=markc@mail.com \
--cc=linuxppc-embedded@ozlabs.org \
--cc=rpjday@mindspring.com \
--cc=wd@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 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).