Skip to content

Commit 353f6dd

Browse files
Anirban Sinhatorvalds
authored andcommitted
cleanup console_print()
console_print() is an old legacy interface mostly unused in the entire kernel tree. It's best to clean up its existing use and let developers use their own implementation of it as they feel fit. Signed-off-by: Anirban Sinha <asinha@zeugmasystems.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent bb193c9 commit 353f6dd

7 files changed

Lines changed: 11 additions & 32 deletions

File tree

‎arch/ia64/kernel/head.S‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <asm/mca_asm.h>
3535
#include <linux/init.h>
3636
#include <linux/linkage.h>
37+
#include "head.h"
3738

3839
#ifdef CONFIG_HOTPLUG_CPU
3940
#define SAL_PSR_BITS_TO_SET \

‎arch/ia64/kernel/head.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extern void console_print(const char *s);

‎arch/ia64/kernel/process.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ show_regs (struct pt_regs *regs)
161161
show_stack(NULL, NULL);
162162
}
163163

164+
/* local support for deprecated console_print */
165+
void
166+
console_print(const char *s)
167+
{
168+
printk(KERN_EMERG "%s", s);
169+
}
170+
164171
void
165172
do_notify_resume_user(sigset_t *unused, struct sigscratch *scr, long in_syscall)
166173
{

‎drivers/char/serial167.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ static int startup(struct cyclades_port *);
171171
static void cy_throttle(struct tty_struct *);
172172
static void cy_unthrottle(struct tty_struct *);
173173
static void config_setup(struct cyclades_port *);
174-
extern void console_print(const char *);
175174
#ifdef CYCLOM_SHOW_STATUS
176175
static void show_status(int);
177176
#endif
@@ -245,7 +244,7 @@ void SP(char *data)
245244
{
246245
unsigned long flags;
247246
local_irq_save(flags);
248-
console_print(data);
247+
printk(KERN_EMERG "%s", data);
249248
local_irq_restore(flags);
250249
}
251250

@@ -255,7 +254,7 @@ void CP(char data)
255254
unsigned long flags;
256255
local_irq_save(flags);
257256
scrn[0] = data;
258-
console_print(scrn);
257+
printk(KERN_EMERG "%c", scrn);
259258
local_irq_restore(flags);
260259
} /* CP */
261260

‎include/linux/dtlk.h‎

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
#if 0
2-
3-
#define TRACE_TXT(text) \
4-
{ \
5-
if(dtlk_trace) \
6-
{ \
7-
console_print(text); \
8-
console_print("\n"); \
9-
} \
10-
}
11-
12-
#define TRACE_CHR(chr) \
13-
{ \
14-
if(dtlk_trace) \
15-
console_print(chr); \
16-
} \
17-
18-
#endif
19-
201
#define DTLK_MINOR 0
212
#define DTLK_IO_EXTENT 0x02
223

‎include/linux/tty.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -519,10 +519,6 @@ extern void serial_console_init(void);
519519

520520
extern int pcxe_open(struct tty_struct *tty, struct file *filp);
521521

522-
/* printk.c */
523-
524-
extern void console_print(const char *);
525-
526522
/* vt.c */
527523

528524
extern int vt_ioctl(struct tty_struct *tty, struct file *file,

‎kernel/printk.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,12 +1075,6 @@ void __sched console_conditional_schedule(void)
10751075
}
10761076
EXPORT_SYMBOL(console_conditional_schedule);
10771077

1078-
void console_print(const char *s)
1079-
{
1080-
printk(KERN_EMERG "%s", s);
1081-
}
1082-
EXPORT_SYMBOL(console_print);
1083-
10841078
void console_unblank(void)
10851079
{
10861080
struct console *c;

0 commit comments

Comments
 (0)