Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e620e548 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman
Browse files

tty: pr_warning->pr_warn and logging neatening



Convert the pr_warning to the more common pr_warn.

Other miscellanea:

o Convert unusual PR_FMT define and uses to pr_fmt
o Remove unnecessary OOM message
o Fix grammar in an error message
o Convert a pr_warning with a KERN_ERR to pr_err

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 483e91a5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -309,7 +309,7 @@ static int __init ehv_bc_console_init(void)
	 * handle for udbg.
	 */
	if (stdout_bc != CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE)
		pr_warning("ehv-bc: udbg handle %u is not the stdout handle\n",
		pr_warn("ehv-bc: udbg handle %u is not the stdout handle\n",
			CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE);
#endif

+7 −7
Original line number Diff line number Diff line
@@ -249,7 +249,7 @@ static int lock_card(struct isi_board *card)
		spin_unlock_irqrestore(&card->card_lock, card->flags);
		msleep(10);
	}
	pr_warning("Failed to lock Card (0x%lx)\n", card->base);
	pr_warn("Failed to lock Card (0x%lx)\n", card->base);

	return 0;	/* Failed to acquire the card! */
}
@@ -378,12 +378,12 @@ static inline int __isicom_paranoia_check(struct isi_port const *port,
	char *name, const char *routine)
{
	if (!port) {
		pr_warning("Warning: bad isicom magic for dev %s in %s.\n",
		pr_warn("Warning: bad isicom magic for dev %s in %s\n",
			name, routine);
		return 1;
	}
	if (port->magic != ISICOM_MAGIC) {
		pr_warning("Warning: NULL isicom port for dev %s in %s.\n",
		pr_warn("Warning: NULL isicom port for dev %s in %s\n",
			name, routine);
		return 1;
	}
@@ -546,7 +546,7 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
	byte_count = header & 0xff;

	if (channel + 1 > card->port_count) {
		pr_warning("%s(0x%lx): %d(channel) > port_count.\n",
		pr_warn("%s(0x%lx): %d(channel) > port_count\n",
			__func__, base, channel + 1);
		outw(0x0000, base+0x04); /* enable interrupts */
		spin_unlock(&card->card_lock);
+3 −2
Original line number Diff line number Diff line
@@ -517,14 +517,15 @@ static void sport_set_termios(struct uart_port *port,
		up->csize = 5;
		break;
	default:
		pr_warning("requested word length not supported\n");
		pr_warn("requested word length not supported\n");
		break;
	}

	if (termios->c_cflag & CSTOPB) {
		up->stopb = 1;
	}
	if (termios->c_cflag & PARENB) {
		pr_warning("PAREN bits is not supported yet\n");
		pr_warn("PAREN bit is not supported yet\n");
		/* up->parib = 1; */
	}

+1 −1
Original line number Diff line number Diff line
@@ -1371,7 +1371,7 @@ static void hsu_global_init(void)
	hsu->iolen = 0x1000;

	if (!(request_mem_region(hsu->paddr, hsu->iolen, "HSU global")))
		pr_warning("HSU: error in request mem region\n");
		pr_warn("HSU: error in request mem region\n");

	hsu->reg = ioremap_nocache((unsigned long)hsu->paddr, hsu->iolen);
	if (!hsu->reg) {
+12 −15
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@
 *    interrupt for a low speed UART device
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#ifdef CONFIG_MAGIC_SYSRQ
#define SUPPORT_SYSRQ
#endif
@@ -47,8 +49,6 @@

#include "mrst_max3110.h"

#define PR_FMT	"mrst_max3110: "

#define UART_TX_NEEDED 1
#define CON_TX_NEEDED  2
#define BIT_IRQ_PENDING    3
@@ -127,7 +127,7 @@ static int max3110_out(struct uart_max3110 *max, const u16 out)
	*obuf = out;
	ret = max3110_write_then_read(max, obuf, ibuf, 2, 1);
	if (ret) {
		pr_warning(PR_FMT "%s(): get err msg %d when sending 0x%x\n",
		pr_warn("%s: get err msg %d when sending 0x%x\n",
			__func__, ret, out);
		goto exit;
	}
@@ -153,10 +153,8 @@ static int max3110_read_multi(struct uart_max3110 *max)

	blen = M3110_RX_FIFO_DEPTH * sizeof(u16);
	buf = kzalloc(blen * 2, GFP_KERNEL | GFP_DMA);
	if (!buf) {
		pr_warning(PR_FMT "%s(): fail to alloc dma buffer\n", __func__);
	if (!buf)
		return 0;
	}

	/* tx/rx always have the same length */
	obuf = buf;
@@ -212,13 +210,13 @@ serial_m3110_con_setup(struct console *co, char *options)
	int parity = 'n';
	int flow = 'n';

	pr_info(PR_FMT "setting up console\n");
	pr_info("setting up console\n");

	if (co->index == -1)
		co->index = 0;

	if (!max) {
		pr_err(PR_FMT "pmax is NULL, return");
		pr_err("pmax is NULL, return\n");
		return -ENODEV;
	}

@@ -296,8 +294,7 @@ static void send_circ_buf(struct uart_max3110 *max,

			ret = max3110_write_then_read(max, obuf, ibuf, blen, 0);
			if (ret)
				pr_warning(PR_FMT "%s(): get err msg %d\n",
						__func__, ret);
				pr_warn("%s: get err msg %d\n", __func__, ret);

			receive_chars(max, ibuf, len);

@@ -411,7 +408,7 @@ static int max3110_main_thread(void *_max)
	int ret = 0;
	struct circ_buf *xmit = &max->con_xmit;

	pr_info(PR_FMT "start main thread\n");
	pr_info("start main thread\n");

	do {
		wait_event_interruptible(*wq,
@@ -455,7 +452,7 @@ static int max3110_read_thread(void *_max)
{
	struct uart_max3110 *max = _max;

	pr_info(PR_FMT "start read thread\n");
	pr_info("start read thread\n");
	do {
		/*
		 * If can't acquire the mutex, it means the main thread
@@ -481,7 +478,7 @@ static int serial_m3110_startup(struct uart_port *port)
	int ret = 0;

	if (port->line != 0) {
		pr_err(PR_FMT "uart port startup failed\n");
		pr_err("uart port startup failed\n");
		return -1;
	}

@@ -504,7 +501,7 @@ static int serial_m3110_startup(struct uart_port *port)
		if (IS_ERR(max->read_thread)) {
			ret = PTR_ERR(max->read_thread);
			max->read_thread = NULL;
			pr_err(PR_FMT "Can't create read thread!\n");
			pr_err("Can't create read thread!\n");
			return ret;
		}
	}
Loading