From: Gabor Juhos <juhosg@openwrt.org>
To: John Crispin <blogic@openwrt.org>
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: [PATCH] MIPS: move mips_{set,get}_machine_name() to a more generic place
Date: Fri, 12 Apr 2013 19:34:35 +0200 [thread overview]
Message-ID: <516845AB.8080109@openwrt.org> (raw)
In-Reply-To: <1365662099-3981-1-git-send-email-blogic@openwrt.org>
2013.04.11. 8:34 keltezéssel, John Crispin írta:
> Previously this functionality was only available to users of the mips_machine
> api. Moving the code to prom.c allows us to also add a OF wrapper.
>
> Signed-off-by: John Crispin <blogic@openwrt.org>
> ---
> arch/mips/include/asm/mips_machine.h | 4 ----
> arch/mips/include/asm/prom.h | 3 +++
> arch/mips/kernel/mips_machine.c | 20 --------------------
> arch/mips/kernel/proc.c | 1 +
> arch/mips/kernel/prom.c | 33 +++++++++++++++++++++++++++++++++
> 5 files changed, 37 insertions(+), 24 deletions(-)
>
<...>
> diff --git a/arch/mips/kernel/prom.c b/arch/mips/kernel/prom.c
> index 028f6f8..9d653e1 100644
> --- a/arch/mips/kernel/prom.c
> +++ b/arch/mips/kernel/prom.c
> @@ -23,6 +23,21 @@
> #include <asm/page.h>
> #include <asm/prom.h>
>
> +static char mips_machine_name[64] = "Unknown";
> +
> +__init void mips_set_machine_name(const char *name)
> +{
> + if (name == NULL)
> + return;
> +
> + snprintf(mips_machine_name, sizeof(mips_machine_name), name);
Any specific reason why you are using snprintf? If someone would call this with
format characters in the 'name' that would cause weird things.
-Gabor
next prev parent reply other threads:[~2013-04-12 17:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-11 6:34 [PATCH] MIPS: move mips_{set,get}_machine_name() to a more generic place John Crispin
2013-04-11 7:10 ` John Crispin
2013-04-12 17:34 ` Gabor Juhos [this message]
2013-04-12 17:46 ` John Crispin
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=516845AB.8080109@openwrt.org \
--to=juhosg@openwrt.org \
--cc=blogic@openwrt.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.