Skip to contentSkip to conversation

mm/show_mem: update printk/pr_info messages and replace legacy printk(KERN_CONT ...) with pr_cont()

PATCH In review Manish Kumar 2 participants 4 messages Sep 18, 2025 – Sep 19, 2025

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

PATCH 1/1 mm/show_mem: update printk/pr_info messages and replace legacy printk(KERN_CONT ...) with pr_cont()

---
 mm/show_mem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/show_mem.c +2 -2
index 0cf8bf5d832d..798949d10ce1 100644
@@ -26,7 +26,7 @@ unsigned long totalcma_pages __read_mostly;
 static inline void show_node(struct zone *zone)
 {
 	if (IS_ENABLED(CONFIG_NUMA))
-		printk("Node %d ", zone_to_nid(zone));
+		pr_info("Node %d ", zone_to_nid(zone));
 }
 
 long si_mem_available(void)
@@ -156,7 +156,7 @@ static void show_migration_types(unsigned char type)
 	}
 
 	*p = '\0';
-	printk(KERN_CONT "(%s) ", tmp);
+	pr_cont("(%s) ", tmp);
 }
 
 static bool node_has_managed_zones(pg_data_t *pgdat, int max_zone_idx)
Signature · 1 line
2.43.0
#1 lore raw

Changelog should not be empty even for trivial patches.

Quoted 1 line · Manish Kumar

This changes 2 of X in the file. Why only these 2? And no, I'm not encouraging to resend with a full file changes. We do these modernizations to new APIs only while changing the code for other reasons, not separately, if there's nothing wrong otherwise with the legacy api. The churn isn't worth it.

Quoted 26 lines
---
 mm/show_mem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/show_mem.c +2 -2
index 0cf8bf5d832d..798949d10ce1 100644
@@ -26,7 +26,7 @@ unsigned long totalcma_pages __read_mostly;
 static inline void show_node(struct zone *zone)
 {
 	if (IS_ENABLED(CONFIG_NUMA))
-		printk("Node %d ", zone_to_nid(zone));
+		pr_info("Node %d ", zone_to_nid(zone));
 }
 
 long si_mem_available(void)
@@ -156,7 +156,7 @@ static void show_migration_types(unsigned char type)
 	}
 
 	*p = '\0';
-	printk(KERN_CONT "(%s) ", tmp);
+	pr_cont("(%s) ", tmp);
 }
 
 static bool node_has_managed_zones(pg_data_t *pgdat, int max_zone_idx)
#2 lore raw

Hi,

Thanks for the feedback. I understand now that printk→pr_* cleanups are not accepted as standalone cosmetic patches. I will drop this patch and focus on patches with real fixes.

Best regards,
Manish Kumar

Quoted 39 lines · Vlastimil Babka

Changelog should not be empty even for trivial patches.

Quoted 1 line · Manish Kumar

This changes 2 of X in the file. Why only these 2? And no, I'm not encouraging to resend with a full file changes. We do these modernizations to new APIs only while changing the code for other reasons, not separately, if there's nothing wrong otherwise with the legacy api. The churn isn't worth it.

Quoted 26 lines
---
 mm/show_mem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/show_mem.c +2 -2
index 0cf8bf5d832d..798949d10ce1 100644
@@ -26,7 +26,7 @@ unsigned long totalcma_pages __read_mostly;
 static inline void show_node(struct zone *zone)
 {
      if (IS_ENABLED(CONFIG_NUMA))
-             printk("Node %d ", zone_to_nid(zone));
+             pr_info("Node %d ", zone_to_nid(zone));
 }
 
 long si_mem_available(void)
@@ -156,7 +156,7 @@ static void show_migration_types(unsigned char type)
      }
 
      *p = '\0';
-     printk(KERN_CONT "(%s) ", tmp);
+     pr_cont("(%s) ", tmp);
 }
 
 static bool node_has_managed_zones(pg_data_t *pgdat, int max_zone_idx)
#3 lore raw
In reply to Vlastimil Babka

Thanks for the feedback. I understand now that printk→pr_* cleanups are not accepted as standalone cosmetic patches. I will drop this patch and focus on patches with real fixes.

Best regards,
Manish Kumar