From: Jason Davis <jason@rightthere.net>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, natalie.protasevich@unisys.com,
jason.davis@unisys.com
Subject: Re: [PATCH] ES7000 Legacy Mappings Update
Date: Tue, 15 Mar 2005 10:27:56 -0500 [thread overview]
Message-ID: <20050315152756.GA28799@righTThere.net> (raw)
In-Reply-To: <20050314180554.10455185.akpm@osdl.org>
See below.
On Mon, 14 Mar 2005, Andrew Morton wrote:
>
>You triggered my trivia twitch.
>
>Jason Davis <jason@rightthere.net> wrote:
>>
>> - * ES7000 has no legacy identity mappings
>> + * Older generations of ES7000 have no legacy identity mappings
>> */
>> - if (es7000_plat)
>> + if (es7000_plat && es7000_plat < 2)
>> return;
>
>Why not
>
> if (es7000_plat == 1)
>
>?
>
Looks like I never learned to apply the concept of reducing fractions :). Thanks for catching this.
>> /*
>> diff -Naurp linux-2.6.11.3/arch/i386/mach-es7000/es7000plat.c linux-2.6.11.3-legacy/arch/i386/mach-es7000/es7000plat.c
>> --- linux-2.6.11.3/arch/i386/mach-es7000/es7000plat.c 2005-03-13 01:44:41.000000000 -0500
>> +++ linux-2.6.11.3-legacy/arch/i386/mach-es7000/es7000plat.c 2005-03-14 11:52:44.000000000 -0500
>> @@ -138,7 +138,14 @@ parse_unisys_oem (char *oemptr, int oem_
>> es7000_plat = 0;
>> } else {
>> printk("\nEnabling ES7000 specific features...\n");
>> - es7000_plat = 1;
>> + /*
>> + * Check to see if this is a x86_64 ES7000 machine.
>> + */
>> + if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2))
>> + es7000_plat = 2;
>> + else
>> + es7000_plat = 1;
>> +
>
>Perhaps some nice enumerated identifiers here, rather than magic numbers?
Initially, I was going to take this approach but that would require some specific platform defines to be thrown into a global header file (mpparse.c would need to see them as well). I didn't think it would be appropriate to mix code like that. I'll be glad to revise the patch to include enumerated identifiers but would it be more acceptable to comment on the semantics of the es7000_plat var in the platform specific "es7000plat.c" file?
next prev parent reply other threads:[~2005-03-15 15:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-14 18:35 Jason Davis
2005-03-15 2:05 ` Andrew Morton
2005-03-15 6:40 ` Andrey Panin
2005-03-15 15:27 ` Jason Davis [this message]
2005-03-15 19:37 ` Andrew Morton
2005-03-18 17:20 ` Jason Davis
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=20050315152756.GA28799@righTThere.net \
--to=jason@rightthere.net \
--cc=akpm@osdl.org \
--cc=jason.davis@unisys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=natalie.protasevich@unisys.com \
/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®