From: Tom Rini <trini@kernel.crashing.org>
To: Dan Malek <dan@embeddededge.com>
Cc: Embedded PPC Linux list <linuxppc-embedded@ozlabs.org>
Subject: Re: next pass of cleaning up micropatch.c
Date: Fri, 8 Oct 2004 08:46:31 -0700 [thread overview]
Message-ID: <20041008154631.GA14773@smtp.west.cox.net> (raw)
In-Reply-To: <7D7D70F5-193F-11D9-9299-003065F9B7DC@embeddededge.com>
On Fri, Oct 08, 2004 at 11:34:06AM -0400, Dan Malek wrote:
> On Oct 8, 2004, at 8:44 AM, Robert P. J. Day wrote:
> >+ * Shortcut macros for patching code.
> > */
> >+
> >+#define PATCH2000 \
> >+ dp = (uint *)(commproc->cp_dpmem); \
> >+ for (i=0; i<(sizeof(patch_2000)/4); i++) \
> >+ *dp++ = patch_2000[i];
> >+
> >+#define PATCH2E00 \
> >+ dp = (uint *)&(commproc->cp_dpmem[0x0e00]); \
> >+ for (i=0; i<(sizeof(patch_2e00)/4); i++) \
> >+ *dp++ = patch_2e00[i];
> >+
> >+#define PATCH2F00 \
> >+ dp = (uint *)&(commproc->cp_dpmem[0x0f00]); \
> >+ for (i=0; i<(sizeof(patch_2f00)/4); i++) \
> >+ *dp++ = patch_2f00[i];
>
> Please get rid of these macros and place the code where it
> belongs. They add no value and just make it harder to
> read the code and understand what it does.
I agree. If there were more patches it might make sense to write a
do_microcode_patch2(N) macro, but PATCH2NNN isn't "readable" and it's
only 3 patches.
--
Tom Rini
http://gate.crashing.org/~trini/
next prev parent reply other threads:[~2004-10-08 15:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-08 12:44 next pass of cleaning up micropatch.c Robert P. J. Day
2004-10-08 15:34 ` Dan Malek
2004-10-08 15:46 ` Tom Rini [this message]
2004-10-08 15:45 ` Robert P. J. Day
2004-10-08 16:02 ` Tom Rini
2004-10-08 16:14 ` Robert P. J. Day
2004-10-08 16:35 ` Dan Malek
2004-10-08 20:46 ` Robert P. J. Day
2004-10-08 22:32 ` Wolfgang Denk
2004-10-08 23:10 ` Robert P. J. Day
2004-10-08 23:29 ` Wolfgang Denk
2004-10-08 23:33 ` Robert P. J. Day
2004-10-08 23:56 ` Wolfgang Denk
2004-10-08 23:53 ` Robert P. J. Day
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=20041008154631.GA14773@smtp.west.cox.net \
--to=trini@kernel.crashing.org \
--cc=dan@embeddededge.com \
--cc=linuxppc-embedded@ozlabs.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).