From: Mark Salter <msalter@redhat.com>
To: Chen Gang <xili_gchen_5257@hotmail.com>
Cc: a-jacquiot@ti.com, robh@kernel.org,
"linux-c6x-dev@linux-c6x.org" <linux-c6x-dev@linux-c6x.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] c6x: kernel: setup: Remove 'const' for local variables in machine_init
Date: Thu, 26 Mar 2015 10:13:58 -0400 [thread overview]
Message-ID: <1427379238.9430.43.camel@deneb.redhat.com> (raw)
In-Reply-To: <BLU436-SMTP57D97D1A4A34D044937502B9110@phx.gbl>
On Wed, 2015-03-04 at 04:55 +0800, Chen Gang wrote:
> early_init_dt_scan() accepts "void *", the related warning:
>
> CC arch/c6x/kernel/setup.o
> arch/c6x/kernel/setup.c: In function 'machine_init':
> arch/c6x/kernel/setup.c:290:21: warning: passing argument 1 of 'early_init_dt_scan' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> early_init_dt_scan(fdt);
> ^
> In file included from arch/c6x/kernel/setup.c:19:0:
> include/linux/of_fdt.h:75:13: note: expected 'void *' but argument is of type 'const void *'
> extern bool early_init_dt_scan(void *params);
> ^
>
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
Thanks! I added this to the c6x tree for next merge window.
> arch/c6x/kernel/setup.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/c6x/kernel/setup.c b/arch/c6x/kernel/setup.c
> index f016128..1d9f399 100644
> --- a/arch/c6x/kernel/setup.c
> +++ b/arch/c6x/kernel/setup.c
> @@ -265,8 +265,8 @@ int __init c6x_add_memory(phys_addr_t start, unsigned long size)
> */
> notrace void __init machine_init(unsigned long dt_ptr)
> {
> - const void *dtb = __va(dt_ptr);
> - const void *fdt = _fdt_start;
> + void *dtb = __va(dt_ptr);
> + void *fdt = _fdt_start;
>
> /* interrupts must be masked */
> set_creg(IER, 2);
prev parent reply other threads:[~2015-03-26 14:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 20:55 Chen Gang
2015-03-26 14:13 ` Mark Salter [this message]
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=1427379238.9430.43.camel@deneb.redhat.com \
--to=msalter@redhat.com \
--cc=a-jacquiot@ti.com \
--cc=linux-c6x-dev@linux-c6x.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=xili_gchen_5257@hotmail.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®