Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9dd7a49

Browse files
akpm00hnaz
authored andcommitted
mm-sparse-optimize-memmap-allocation-during-sparse_init-checkpatch-fixes
WARNING: 'numner' may be misspelled - perhaps 'number'? torvalds#159: FILE: mm/sparse.c:591: + /* The numner of present sections stored in nr_present_sections WARNING: Block comments use a trailing */ on a separate line torvalds#167: FILE: mm/sparse.c:599: + * correctly. */ WARNING: line over 80 characters torvalds#219: FILE: mm/sparse-vmemmap.c:299: + map_map[nr_consumed_maps] = sparse_mem_map_populate(pnum, nodeid, NULL); total: 0 errors, 3 warnings, 149 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. ./patches/mm-sparse-optimize-memmap-allocation-during-sparse_init.patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Baoquan He <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 2bcabc8 commit 9dd7a49

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

mm/sparse-vmemmap.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,8 @@ void __init sparse_mem_maps_populate_node(struct page **map_map,
296296
if (!present_section_nr(pnum))
297297
continue;
298298

299-
map_map[nr_consumed_maps] = sparse_mem_map_populate(pnum, nodeid, NULL);
299+
map_map[nr_consumed_maps] =
300+
sparse_mem_map_populate(pnum, nodeid, NULL);
300301
if (map_map[nr_consumed_maps++])
301302
continue;
302303
pr_err("%s: sparsemem memory map backing failed some memory will not be available\n",

mm/sparse.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,15 +588,17 @@ void __init sparse_init(void)
588588
sizeof(map_map[0]));
589589
#endif
590590

591-
/* The numner of present sections stored in nr_present_sections
591+
/*
592+
* The number of present sections stored in nr_present_sections
592593
* are kept the same since mem sections are marked as present in
593594
* memory_present(). In this for loop, we need check which sections
594595
* failed to allocate memmap or usemap, then clear its
595596
* ->section_mem_map accordingly. During this process, we need
596597
* increase 'nr_consumed_maps' whether its allocation of memmap
597598
* or usemap failed or not, so that after we handle the i-th
598599
* memory section, can get memmap and usemap of (i+1)-th section
599-
* correctly. */
600+
* correctly.
601+
*/
600602
for_each_present_section_nr(0, pnum) {
601603
struct mem_section *ms;
602604

0 commit comments

Comments
 (0)