Skip to contentSkip to conversation

doc: power: Add missing parameter description for memory_bm_create

PATCH In review Prabhav Kumar Vaish 2 participants 3 messages Dec 12, 2024 – Dec 21, 2024

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

PATCH 1/1 doc: power: Add missing parameter description for memory_bm_create

Added the parameter description for bm, gfp_mask and safe_needed for the function memory_bm_create

---
 kernel/power/snapshot.c | 3 +++
 1 file changed, 3 insertions(+)
kernel/power/snapshot.c +3 -0
index 30894d8f0a78..690dd1f467b9 100644
@@ -680,6 +680,9 @@ static int create_mem_extents(struct list_head *list, gfp_t gfp_mask)
 
 /**
  * memory_bm_create - Allocate memory for a memory bitmap.
+ * @bm: Memory bitmap.
+ * @gfp_mask: GFP mask for the allocation.
+ * @safe_needed: Get pages not used before hibernation (restore only)
  */
 static int memory_bm_create(struct memory_bitmap *bm, gfp_t gfp_mask,
 			    int safe_needed)
Signature · 1 line
2.34.1
#1 lore raw
Quoted 14 lines · Prabhav Kumar Vaish

Added the parameter description for bm, gfp_mask and safe_needed for the function memory_bm_create

---
 kernel/power/snapshot.c | 3 +++
 1 file changed, 3 insertions(+)
kernel/power/snapshot.c +0 -0
index 30894d8f0a78..690dd1f467b9 100644

kernel/power/snapshot.c static int create_mem_extents(struct list_head *list, gfp_t gfp_mask) · line 685

Quoted 6 lines
kernel/power/snapshot.c +3 -0
@@ -680,6 +680,9 @@ static int create_mem_extents(struct list_head *list, gfp_t gfp_mask)
 
 /**
  * memory_bm_create - Allocate memory for a memory bitmap.
+ * @bm: Memory bitmap.
+ * @gfp_mask: GFP mask for the allocation.
+ * @safe_needed: Get pages not used before hibernation (restore only)

This isn't exactly accurate and I'd rather drop the comment entirely.

Quoted 6 lines
kernel/power/snapshot.c +0 -1
  */
 static int memory_bm_create(struct memory_bitmap *bm, gfp_t gfp_mask,
                            int safe_needed)
--

2.34.1

#2 lore raw
Quoted 18 lines · Rafael J. Wysocki
Quoted 15 lines · Prabhav Kumar Vaish

Added the parameter description for bm, gfp_mask and safe_needed for the function memory_bm_create

---
 kernel/power/snapshot.c | 3 +++
 1 file changed, 3 insertions(+)
kernel/power/snapshot.c +0 -0
index 30894d8f0a78..690dd1f467b9 100644
@@ -680,6 +680,9 @@ static int create_mem_extents(struct list_head *list, gfp_t gfp_mask)
 
Quoted 8 lines

kernel/power/snapshot.c static int create_mem_extents(struct list_head *list, gfp_t gfp_mask) · line 685

Quoted 5 lines
kernel/power/snapshot.c +3 -0
 /**
  * memory_bm_create - Allocate memory for a memory bitmap.
+ * @bm: Memory bitmap.
+ * @gfp_mask: GFP mask for the allocation.
+ * @safe_needed: Get pages not used before hibernation (restore only)

This isn't exactly accurate and I'd rather drop the comment entirely.

Is it like the comment is inaccurate or the comment is not needed at the place entirely ?

Quoted 6 lines
Quoted 6 lines
kernel/power/snapshot.c +0 -1
  */
 static int memory_bm_create(struct memory_bitmap *bm, gfp_t gfp_mask,
                            int safe_needed)
--

2.34.1