linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, <x86@kernel.org>
Subject: Re: [PATCH v2 15/15] x86: convert to setup_initial_init_mm()
Date: Tue, 8 Jun 2021 09:39:54 +0800	[thread overview]
Message-ID: <6dca29c0-bcb0-9af3-4d49-68b2b1c924e5@huawei.com> (raw)
In-Reply-To: <20210607172608.fda6ee76f9b195428ddb1d0d@linux-foundation.org>


On 2021/6/8 8:26, Andrew Morton wrote:
> On Fri, 4 Jun 2021 15:06:33 +0800 Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>
>> Use setup_initial_init_mm() helper to simplify code.
>>
>> ...
>>
>> --- a/arch/x86/kernel/setup.c
>> +++ b/arch/x86/kernel/setup.c
>> @@ -868,10 +868,7 @@ void __init setup_arch(char **cmdline_p)
>>   
>>   	if (!boot_params.hdr.root_flags)
>>   		root_mountflags &= ~MS_RDONLY;
>> -	init_mm.start_code = (unsigned long) _text;
>> -	init_mm.end_code = (unsigned long) _etext;
>> -	init_mm.end_data = (unsigned long) _edata;
>> -	init_mm.brk = _brk_end;
>> +	setup_initial_init_mm(_text, _etext, _edata, _brk_end);
>>   
>>   	code_resource.start = __pa_symbol(_text);
>>   	code_resource.end = __pa_symbol(_etext)-1;
> arch/x86/kernel/setup.c:873:47: warning: passing argument 4 of 'setup_initial_init_mm' makes pointer from integer without a cast [-Wint-conversion]
>    873 |  setup_initial_init_mm(_text, _etext, _edata, _brk_end);
>        |                                               ^~~~~~~~
>        |                                               |
>        |                                               long unsigned int
> In file included from ./include/linux/pid_namespace.h:7,
>                   from ./include/linux/ptrace.h:10,
>                   from ./include/linux/elfcore.h:11,
>                   from ./include/linux/crash_core.h:6,
>                   from ./include/linux/kexec.h:18,
>                   from ./include/linux/crash_dump.h:5,
>                   from arch/x86/kernel/setup.c:9:
> ./include/linux/mm.h:248:29: note: expected 'void *' but argument is of type 'long unsigned int'
>    248 |       void *end_data, void *brk);
>        |                       ~~~~~~^~~
>
>
> afaict the other architectures will warn this way, not sure.

I check all archs again, the x86/m68k/powerpc/h8300 has use some value 
which is not pointer ,

other are changed, but forget this one.  I do compile, but I don't know 
why I missed it, sorry about

this.


>
> Please check all that, refresh ,retest and resend?
> .
>

  reply	other threads:[~2021-06-08  1:40 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04  7:06 [PATCH v2 00/15] init_mm: cleanup ARCH's text/data/brk setup code Kefeng Wang
2021-06-04  7:06 ` [PATCH v2 01/15] mm: add setup_initial_init_mm() helper Kefeng Wang
2021-06-06 21:31   ` Mike Rapoport
2021-06-07  1:50     ` Kefeng Wang
2021-06-07  2:36     ` [PATCH v3] " Kefeng Wang
2021-06-04  7:06 ` [PATCH v2 02/15] arc: convert to setup_initial_init_mm() Kefeng Wang
2021-06-04 14:03   ` Vineet Gupta
2021-06-04  7:06 ` [PATCH v2 03/15] arm: " Kefeng Wang
2021-06-07  9:25   ` Russell King (Oracle)
2021-06-04  7:06 ` [PATCH v2 04/15] arm64: " Kefeng Wang
2021-06-04  9:19   ` Catalin Marinas
2021-06-04  7:06 ` [PATCH v2 05/15] csky: " Kefeng Wang
2021-06-04  7:06 ` [PATCH v2 06/15] h8300: " Kefeng Wang
2021-06-04  7:06 ` [PATCH v2 07/15] m68k: " Kefeng Wang
2021-06-04  7:06 ` [PATCH v2 08/15] nds32: " Kefeng Wang
2021-06-04  7:06 ` [PATCH v2 09/15] nios2: " Kefeng Wang
2021-06-04  7:06 ` [PATCH v2 10/15] openrisc: " Kefeng Wang
2021-06-04  7:06 ` [PATCH v2 11/15] powerpc: " Kefeng Wang
2021-06-04  7:06 ` [PATCH v2 12/15] riscv: " Kefeng Wang
2021-06-12  3:55   ` Palmer Dabbelt
2021-06-04  7:06 ` [PATCH v2 13/15] s390: " Kefeng Wang
2021-06-04  7:06 ` [PATCH v2 14/15] sh: " Kefeng Wang
2021-06-04  7:06 ` [PATCH v2 15/15] x86: " Kefeng Wang
2021-06-08  0:26   ` Andrew Morton
2021-06-08  1:39     ` Kefeng Wang [this message]
2021-06-06 21:29 ` [PATCH v2 00/15] init_mm: cleanup ARCH's text/data/brk setup code Mike Rapoport
2021-06-07  0:55   ` Kefeng Wang
2021-06-07  5:48     ` Christophe Leroy
2021-06-07  8:30       ` Kefeng Wang
2021-06-07  9:31       ` Russell King (Oracle)

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=6dca29c0-bcb0-9af3-4d49-68b2b1c924e5@huawei.com \
    --to=wangkefeng.wang@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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).