Skip to contentSkip to conversation

m68knommu: Clean up printing of sections

PATCH In review Geert Uytterhoeven 2 participants 2 messages May 31, 2012 – Jun 1, 2012

Subsystems (2)
lore
Share & tools
lore

Geert Uytterhoeven

author maintainer
#0 lore raw

PATCH 1/1 m68knommu: Clean up printing of sections

- Remove casts and unneeded address-of ('&') operators,
- Use %p to format pointers, %lx to format unsigned longs.

---
Not even compile tested

 arch/m68k/kernel/setup_no.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
arch/m68k/kernel/setup_no.c +4 -7
index 7dc186b..8a624ec 100644
@@ -218,13 +218,10 @@ void __init setup_arch(char **cmdline_p)
 	printk(KERN_INFO "Motorola M5235EVB support (C)2005 Syn-tech Systems, Inc. (Jate Sujjavanich)\n");
 #endif
 
-	pr_debug("KERNEL -> TEXT=0x%06x-0x%06x DATA=0x%06x-0x%06x "
-		 "BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext,
-		 (int) &_sdata, (int) &_edata,
-		 (int) &_sbss, (int) &_ebss);
-	pr_debug("MEMORY -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x\n ",
-		 (int) &_ebss, (int) memory_start,
-		 (int) memory_start, (int) memory_end);
+	pr_debug("KERNEL -> TEXT=0x%p-0x%p DATA=0x%p-0x%p BSS=0x%p-0x%p\n",
+		 _stext, _etext, _sdata, _edata, _sbss, _ebss);
+	pr_debug("MEMORY -> ROMFS=0x%p-0x%06lx MEM=0x%06lx-0x%06lx\n ",
+		 _ebss, memory_start, memory_start, memory_end);
 
 	/* Keep a copy of command line */
 	*cmdline_p = &command_line[0];
Signature · 1 line
1.7.0.4
Acked-by on v1 1/1
#1 lore raw

Hi Geert,

Quoted 4 lines · Geert Uytterhoeven

- Remove casts and unneeded address-of ('&') operators,
- Use %p to format pointers, %lx to format unsigned longs.

Looks good. Compile and run tested, all ok.

Regards
Greg

Quoted 28 lines

---
Not even compile tested

  arch/m68k/kernel/setup_no.c |   11 ++++-------
  1 files changed, 4 insertions(+), 7 deletions(-)
arch/m68k/kernel/setup_no.c +4 -7
index 7dc186b..8a624ec 100644
@@ -218,13 +218,10 @@ void __init setup_arch(char **cmdline_p)
  	printk(KERN_INFO "Motorola M5235EVB support (C)2005 Syn-tech Systems, Inc. (Jate Sujjavanich)\n");
  #endif
 
-	pr_debug("KERNEL ->  TEXT=0x%06x-0x%06x DATA=0x%06x-0x%06x "
-		 "BSS=0x%06x-0x%06x\n", (int)&_stext, (int)&_etext,
-		 (int)&_sdata, (int)&_edata,
-		 (int)&_sbss, (int)&_ebss);
-	pr_debug("MEMORY ->  ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x\n ",
-		 (int)&_ebss, (int) memory_start,
-		 (int) memory_start, (int) memory_end);
+	pr_debug("KERNEL ->  TEXT=0x%p-0x%p DATA=0x%p-0x%p BSS=0x%p-0x%p\n",
+		 _stext, _etext, _sdata, _edata, _sbss, _ebss);
+	pr_debug("MEMORY ->  ROMFS=0x%p-0x%06lx MEM=0x%06lx-0x%06lx\n ",
+		 _ebss, memory_start, memory_start, memory_end);
 
  	/* Keep a copy of command line */
  	*cmdline_p =&command_line[0];
Signature · 5 lines
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     [email protected]
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com