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

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

parport: Convert printk(KERN_<LEVEL> to pr_<level>(



[ Upstream commit decf26f6ec25dac868782dc1751623a87d147831 ]

Use the more common kernel style.

Miscellanea:

o Coalesce formats
o Realign arguments

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Reviewed-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
Link: https://lore.kernel.org/r/20200403134325.11523-2-sudipm.mukherjee@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: ab11dac93d2d ("dev/parport: fix the array out-of-bounds risk")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent bbfcb2a4
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -109,8 +109,7 @@ int parport_daisy_init(struct parport *port)
	    ((num_ports = num_mux_ports(port)) == 2 || num_ports == 4)) {
	    ((num_ports = num_mux_ports(port)) == 2 || num_ports == 4)) {
		/* Leave original as port zero. */
		/* Leave original as port zero. */
		port->muxport = 0;
		port->muxport = 0;
		printk(KERN_INFO
		pr_info("%s: 1st (default) port of %d-way multiplexor\n",
			"%s: 1st (default) port of %d-way multiplexor\n",
			port->name, num_ports);
			port->name, num_ports);
		for (i = 1; i < num_ports; i++) {
		for (i = 1; i < num_ports; i++) {
			/* Clone the port. */
			/* Clone the port. */
@@ -123,8 +122,7 @@ int parport_daisy_init(struct parport *port)
				continue;
				continue;
			}
			}


			printk(KERN_INFO
			pr_info("%s: %d%s port of %d-way multiplexor on %s\n",
				"%s: %d%s port of %d-way multiplexor on %s\n",
				extra->name, i + 1, th[i + 1], num_ports,
				extra->name, i + 1, th[i + 1], num_ports,
				port->name);
				port->name);


+2 −2
Original line number Original line Diff line number Diff line
@@ -329,7 +329,7 @@ int parport_negotiate (struct parport *port, int mode)
#ifndef CONFIG_PARPORT_1284
#ifndef CONFIG_PARPORT_1284
	if (mode == IEEE1284_MODE_COMPAT)
	if (mode == IEEE1284_MODE_COMPAT)
		return 0;
		return 0;
	printk (KERN_ERR "parport: IEEE1284 not supported in this kernel\n");
	pr_err("parport: IEEE1284 not supported in this kernel\n");
	return -1;
	return -1;
#else
#else
	int m = mode & ~IEEE1284_ADDR;
	int m = mode & ~IEEE1284_ADDR;
@@ -694,7 +694,7 @@ ssize_t parport_write (struct parport *port, const void *buffer, size_t len)
ssize_t parport_read (struct parport *port, void *buffer, size_t len)
ssize_t parport_read (struct parport *port, void *buffer, size_t len)
{
{
#ifndef CONFIG_PARPORT_1284
#ifndef CONFIG_PARPORT_1284
	printk (KERN_ERR "parport: IEEE1284 not supported in this kernel\n");
	pr_err("parport: IEEE1284 not supported in this kernel\n");
	return -ENODEV;
	return -ENODEV;
#else
#else
	int mode = port->physport->ieee1284.mode;
	int mode = port->physport->ieee1284.mode;
+1 −2
Original line number Original line Diff line number Diff line
@@ -599,8 +599,7 @@ size_t parport_ieee1284_ecp_read_data (struct parport *port,
			DPRINTK (KERN_DEBUG "ECP read timed out at 45\n");
			DPRINTK (KERN_DEBUG "ECP read timed out at 45\n");


			if (command)
			if (command)
				printk (KERN_WARNING
				pr_warn("%s: command ignored (%02x)\n",
					"%s: command ignored (%02x)\n",
					port->name, byte);
					port->name, byte);


			break;
			break;
+1 −1
Original line number Original line Diff line number Diff line
@@ -212,7 +212,7 @@ static int __init amiga_parallel_probe(struct platform_device *pdev)
	if (err)
	if (err)
		goto out_irq;
		goto out_irq;


	printk(KERN_INFO "%s: Amiga built-in port using irq\n", p->name);
	pr_info("%s: Amiga built-in port using irq\n", p->name);
	/* XXX: set operating mode */
	/* XXX: set operating mode */
	parport_announce_port(p);
	parport_announce_port(p);


+1 −1
Original line number Original line Diff line number Diff line
@@ -200,7 +200,7 @@ static int __init parport_atari_init(void)
		}
		}


		this_port = p;
		this_port = p;
		printk(KERN_INFO "%s: Atari built-in port using irq\n", p->name);
		pr_info("%s: Atari built-in port using irq\n", p->name);
		parport_announce_port (p);
		parport_announce_port (p);


		return 0;
		return 0;
Loading