From: Anton Blanchard <anton@samba.org>
To: linuxppc-dev@ozlabs.org
Cc: paulus@samba.org
Subject: [PATCH] micro optimise pSeries_probe
Date: Fri, 8 Dec 2006 18:08:37 +1100 [thread overview]
Message-ID: <20061208070837.GC29167@krispykreme> (raw)
We find the OF root the line before, we may as well use it.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: kernel/arch/powerpc/platforms/pseries/setup.c
===================================================================
--- kernel.orig/arch/powerpc/platforms/pseries/setup.c 2006-10-24 10:23:28.234782030 -0500
+++ kernel/arch/powerpc/platforms/pseries/setup.c 2006-10-24 10:26:19.068732015 -0500
@@ -503,8 +503,8 @@ static int __init pSeries_probe_hypertas
static int __init pSeries_probe(void)
{
unsigned long root = of_get_flat_dt_root();
- char *dtype = of_get_flat_dt_prop(of_get_flat_dt_root(),
- "device_type", NULL);
+ char *dtype = of_get_flat_dt_prop(root, "device_type", NULL);
+
if (dtype == NULL)
return 0;
if (strcmp(dtype, "chrp"))
next reply other threads:[~2006-12-08 7:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-08 7:08 Anton Blanchard [this message]
2006-12-08 7:22 ` [PATCH] dont allow pSeries_probe to succeed without initialising MMU Anton Blanchard
2006-12-09 5:47 ` Stephen Rothwell
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=20061208070837.GC29167@krispykreme \
--to=anton@samba.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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).