Skip to contentSkip to conversation

x86/mm/numa: Clean up numa_clear_kernel_node_hotplug ()

tip:x86/mm PaX Team 2 participants 2 messages Feb 8, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

PaX Team

author
#1 lore raw

Review

Quoted 7 lines · tip-bot for Ingo Molnar
  for (i = 0; i < numa_meminfo.nr_blks; i++) {
(quoted diff) +2 -3
-		struct numa_memblk *mb = &numa_meminfo.blk[i];
+		struct numa_memblk *mb = numa_meminfo.blk + i;
 
-		memblock_set_node(mb->start, mb->end - mb->start,
-				  &memblock.reserved, mb->nid);
+		memblock_set_node(mb->start, mb->end-mb->start, &memblock.reserved, mb->nid);

if you're not keeping to the 80-char length (no complaints from me on that), could you also use some whitespace around the '-' operator for more readability?

#2 lore raw
Quoted 6 lines · PaX Team
Quoted 4 lines · tip-bot for Ingo Molnar
  for (i = 0; i < numa_meminfo.nr_blks; i++) {
(quoted diff) +1 -1
-		struct numa_memblk *mb = &numa_meminfo.blk[i];
+		struct numa_memblk *mb = numa_meminfo.blk + i;
Quoted 6 lines

Review

Quoted 3 lines
(quoted diff) +1 -2
-		memblock_set_node(mb->start, mb->end - mb->start,
-				  &memblock.reserved, mb->nid);
+		memblock_set_node(mb->start, mb->end-mb->start, &memblock.reserved, mb->nid);

if you're not keeping to the 80-char length (no complaints from me on that), could you also use some whitespace around the '-' operator for more readability?

Yeah, like I did it later in the function:

+ memblock_clear_hotplug(mb->start, mb->end - mb->start);

Fixed.

Thanks,

Ingo