From: Stephen Warren <swarren@wwwdotorg.org>
To: Danny Huang <dahuang@nvidia.com>
Cc: linux@arm.linux.org.uk, ldewangan@nvidia.com,
pgaikwad@nvidia.com, linux-arm-kernel@lists.infradead.org,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm: tegra: fuse: export chip id and revision
Date: Mon, 11 Mar 2013 11:10:14 -0600 [thread overview]
Message-ID: <513E0FF6.1050909@wwwdotorg.org> (raw)
In-Reply-To: <1363005441-26329-1-git-send-email-dahuang@nvidia.com>
On 03/11/2013 06:37 AM, Danny Huang wrote:
> Expose tegra chip id and revision in /proc/cpu/chipinfo for user mode
> usage.
I agree with Shawn's comments, but I have a few other comments here too
for the record.
Nit: "Tegra" and "ID" above should be capitalized as I've done so in
this sentence.
> diff --git a/arch/arm/mach-tegra/fuse.c b/arch/arm/mach-tegra/fuse.c
> +static int __init tegra_chip_info(void)
> +{
> + proc_entry = create_proc_entry("cpu/chipinfo", S_IRUGO, NULL);
> + if (proc_entry)
> + proc_entry->read_proc = show_chip_info;
> + return 0;
> +}
> +
> +late_initcall(tegra_chip_info);
Please don't introduce any more initcalls. Especially initcalls that are
not conditional on the run-time (rather than compile-time) SoC. This
code may be compiled into a kernel that supports SoCs other than Tegra.
However, tegra_chip_info() shouldn't run on those SoCs.
It'd probably be simplest to just perform this initialization as part of
the already-existing tegra_init_fuse(). If not, please call this
initialization function from one of the initialization functions in
arch/arm/mach-tegra/common.c. Both those cases only execute on Tegra.
next prev parent reply other threads:[~2013-03-11 17:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 12:37 [PATCH] arm: tegra: fuse: export chip id and revision Danny Huang
2013-03-11 13:51 ` Shawn Guo
2013-03-11 17:10 ` Stephen Warren [this message]
2013-03-11 17:10 ` Russell King - ARM Linux
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=513E0FF6.1050909@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=dahuang@nvidia.com \
--cc=ldewangan@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=pgaikwad@nvidia.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