Skip to contentSkip to conversation

drivers/base/memory.c: Fixup documentation of removable/phys_index/block_size_bytes

PATCH New David Hildenbrand 1 participant 1 message Aug 6, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/base/memory.c: Fixup documentation of removable/phys_index/block_size_bytes

Let's rephrase to memory block terminology and add some further clarifications.

Cc Greg Kroah-Hartman <[email protected]>
Cc "Rafael J. Wysocki" <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Oscar Salvador <[email protected]>
---
 drivers/base/memory.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/base/memory.c +6 -5
index cb80f2bdd7de..790b3bcd63a6 100644
@@ -116,10 +116,8 @@ static unsigned long get_memory_block_size(void)
 }
 
 /*
- * use this as the physical section index that this memsection
- * uses.
+ * Show the first physical section index (number) of this memory block.
  */
-
 static ssize_t phys_index_show(struct device *dev,
 			       struct device_attribute *attr, char *buf)
 {
@@ -131,7 +129,10 @@ static ssize_t phys_index_show(struct device *dev,
 }
 
 /*
- * Show whether the section of memory is likely to be hot-removable
+ * Show whether the memory block is likely to be offlineable (or is already
+ * offline). Once offline, the memory block could be removed. The return
+ * value does, however, not indicate that there is a way to remove the
+ * memory block.
  */
 static ssize_t removable_show(struct device *dev, struct device_attribute *attr,
 			      char *buf)
@@ -455,7 +456,7 @@ static DEVICE_ATTR_RO(phys_device);
 static DEVICE_ATTR_RO(removable);
 
 /*
- * Block size attribute stuff
+ * Show the memory block size (shared by all memory blocks).
  */
 static ssize_t block_size_bytes_show(struct device *dev,
 				     struct device_attribute *attr, char *buf)
Signature · 1 line
2.21.0