lkml.org 
[lkml]   [2013]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: + mm-sparse-introduce-alloc_usemap_and_memmap-fix-2.patch added to -mm tree
From
On Thu, Aug 29, 2013 at 4:35 PM, Wanpeng Li <liwanp@linux.vnet.ibm.com> wrote:

> On Thu, Aug 29, 2013 at 01:44:18PM -0700, Yinghai Lu wrote:
>>> mm/sparse.c | 41 +++++++++++++++--------------------------
>>> 1 file changed, 15 insertions(+), 26 deletions(-)
>>>
>>> diff -puN mm/sparse.c~mm-sparse-introduce-alloc_usemap_and_memmap-fix-2 mm/sparse.c
>>> --- a/mm/sparse.c~mm-sparse-introduce-alloc_usemap_and_memmap-fix-2
>>> +++ a/mm/sparse.c
>>> @@ -339,13 +339,14 @@ static void __init check_usemap_section_
>>> }
>>> #endif /* CONFIG_MEMORY_HOTREMOVE */
>>>
>>> -static void __init sparse_early_usemaps_alloc_node(unsigned long**usemap_map,
>>> +static void __init sparse_early_usemaps_alloc_node(void **data,
>>> unsigned long pnum_begin,
>>> unsigned long pnum_end,
>>> unsigned long usemap_count, int nodeid)
>>> {
>>> void *usemap;
>>> unsigned long pnum;
>>> + unsigned long **usemap_map = (unsigned long **)data;
>>
>>Can you check if (void *data) will work?
>>
>>void ** looks strange.
>
> The original patch you give me has (void *data), however, there is compile warning.
>
> mm/sparse.c: In function $B!F (Bsparse_init $B!G (B: mm/sparse.c:552:8: warning: passing argument 1 of $B!F (Balloc_usemap_and_memmap $B!G (B
> from incompatible pointer type [enabled by default]
> mm/sparse.c:469:20: note: expected $B!F (Bvoid (*)(void **, long unsigned int, long unsigned int, long unsigned int, int) $B!G (B
> but argument is of type $B!F (Bvoid (*)(void *, long unsigned int, long unsigned int, long unsigned int, int) $B!G (B
>
> The void ** fix it. ;-)

should change both to void *

Yinghai


\
 
 \ /
  Last update: 2013-08-30 06:01    [W:0.035 / U:1.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site