David Hildenbrand b6c88d3b9d drivers/base/memory.c: don't store end_section_nr in memory blocks
Each memory block spans the same amount of sections/pages/bytes.  The size
is determined before the first memory block is created.  No need to store
what we can easily calculate - and the calculations even look simpler now.

Michal brought up the idea of variable-sized memory blocks.  However, if
we ever implement something like this, we will need an API compatibility
switch and reworks at various places (most code assumes a fixed memory
block size).  So let's cleanup what we have right now.

While at it, fix the variable naming in register_mem_sect_under_node() -
we no longer talk about a single section.

Link: http://lkml.kernel.org/r/20190809110200.2746-1-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Oscar Salvador <osalvador@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-09-24 15:54:09 -07:00
..
2019-09-21 10:55:29 -07:00
2019-09-22 09:39:09 -07:00
2019-09-17 16:54:40 -07:00
2019-09-17 16:57:47 -07:00
2019-09-20 15:53:02 -07:00
2019-09-22 09:30:30 -07:00
2019-09-22 09:30:30 -07:00
2019-09-24 15:54:08 -07:00
2019-09-22 09:30:30 -07:00
2019-09-22 09:39:09 -07:00
2019-09-19 14:14:28 -07:00
2019-09-18 11:14:31 -07:00
2019-09-19 14:14:28 -07:00
2019-09-22 12:02:21 -07:00
2019-09-22 09:30:30 -07:00
2019-09-19 14:14:28 -07:00
2019-09-19 14:14:28 -07:00
2019-09-19 14:14:28 -07:00
2019-09-19 13:48:37 -07:00
2019-09-22 09:30:30 -07:00
2019-09-19 14:14:28 -07:00
2019-09-22 09:30:30 -07:00
2019-09-21 10:07:42 -07:00
2019-09-19 13:27:23 -07:00
2019-09-22 09:30:30 -07:00
2019-09-21 10:26:24 -07:00
2019-09-21 10:55:29 -07:00
2019-09-17 16:57:47 -07:00
2019-09-19 13:48:37 -07:00
2019-09-19 13:27:23 -07:00
2019-09-20 11:48:06 -07:00
2019-09-19 14:14:28 -07:00
2019-09-13 15:57:02 +02:00
2019-09-19 14:14:28 -07:00
2019-09-17 18:40:42 -07:00
2019-09-22 10:55:08 -07:00
2019-09-22 11:05:43 -07:00
2019-09-21 10:50:15 -07:00
2019-09-16 15:52:38 -07:00
2019-09-22 10:52:23 -07:00
2019-09-17 18:40:42 -07:00
2019-09-24 15:54:08 -07:00
2019-09-24 15:54:08 -07:00
2019-09-17 09:44:29 +02:00
2019-09-18 10:50:47 -07:00
2019-09-18 11:14:31 -07:00
2019-09-22 10:34:46 -07:00
2019-09-24 15:54:08 -07:00
2019-09-22 09:30:30 -07:00
2019-09-19 13:27:23 -07:00
2019-09-18 11:05:34 -07:00