Skip to content

Commit 47ece7f

Browse files
heicarstMartin Schwidefsky
authored andcommitted
s390/dumpstack: use pr_cont within show_stack and die
Use pr_cont instead of printk calls also within show_stack and die in order to avoid extra line breaks. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent dcddba9 commit 47ece7f

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

arch/s390/kernel/dumpstack.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,14 @@ void show_stack(struct task_struct *task, unsigned long *sp)
119119
else
120120
stack = (unsigned long *)task->thread.ksp;
121121
}
122+
printk(KERN_DEFAULT "Stack:\n");
122123
for (i = 0; i < 20; i++) {
123124
if (((addr_t) stack & (THREAD_SIZE-1)) == 0)
124125
break;
125-
if ((i * sizeof(long) % 32) == 0)
126-
printk("%s ", i == 0 ? "" : "\n");
127-
printk("%016lx ", *stack++);
126+
if (i % 4 == 0)
127+
printk(KERN_DEFAULT " ");
128+
pr_cont("%016lx%c", *stack++, i % 4 == 3 ? '\n' : ' ');
128129
}
129-
printk("\n");
130130
show_trace(task, (unsigned long)sp);
131131
}
132132

@@ -186,14 +186,14 @@ void die(struct pt_regs *regs, const char *str)
186186
printk("%s: %04x ilc:%d [#%d] ", str, regs->int_code & 0xffff,
187187
regs->int_code >> 17, ++die_counter);
188188
#ifdef CONFIG_PREEMPT
189-
printk("PREEMPT ");
189+
pr_cont("PREEMPT ");
190190
#endif
191191
#ifdef CONFIG_SMP
192-
printk("SMP ");
192+
pr_cont("SMP ");
193193
#endif
194194
if (debug_pagealloc_enabled())
195-
printk("DEBUG_PAGEALLOC");
196-
printk("\n");
195+
pr_cont("DEBUG_PAGEALLOC");
196+
pr_cont("\n");
197197
notify_die(DIE_OOPS, str, regs, 0, regs->int_code & 0xffff, SIGSEGV);
198198
print_modules();
199199
show_regs(regs);

0 commit comments

Comments
 (0)