Commit decf26f6 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman

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

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.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d98ce9fe
......@@ -145,8 +145,7 @@ int parport_daisy_init(struct parport *port)
((num_ports = num_mux_ports(port)) == 2 || num_ports == 4)) {
/* Leave original as port zero. */
port->muxport = 0;
printk(KERN_INFO
"%s: 1st (default) port of %d-way multiplexor\n",
pr_info("%s: 1st (default) port of %d-way multiplexor\n",
port->name, num_ports);
for (i = 1; i < num_ports; i++) {
/* Clone the port. */
......@@ -159,8 +158,7 @@ int parport_daisy_init(struct parport *port)
continue;
}
printk(KERN_INFO
"%s: %d%s port of %d-way multiplexor on %s\n",
pr_info("%s: %d%s port of %d-way multiplexor on %s\n",
extra->name, i + 1, th[i + 1], num_ports,
port->name);
......
......@@ -319,7 +319,7 @@ int parport_negotiate (struct parport *port, int mode)
#ifndef CONFIG_PARPORT_1284
if (mode == IEEE1284_MODE_COMPAT)
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;
#else
int m = mode & ~IEEE1284_ADDR;
......@@ -674,7 +674,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)
{
#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;
#else
int mode = port->physport->ieee1284.mode;
......
......@@ -579,8 +579,7 @@ size_t parport_ieee1284_ecp_read_data (struct parport *port,
pr_debug("ECP read timed out at 45\n");
if (command)
printk (KERN_WARNING
"%s: command ignored (%02x)\n",
pr_warn("%s: command ignored (%02x)\n",
port->name, byte);
break;
......
......@@ -212,7 +212,7 @@ static int __init amiga_parallel_probe(struct platform_device *pdev)
if (err)
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 */
parport_announce_port(p);
......
......@@ -200,7 +200,7 @@ static int __init parport_atari_init(void)
}
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);
return 0;
......
......@@ -142,10 +142,8 @@ static int parport_config(struct pcmcia_device *link)
link->irq, PARPORT_DMA_NONE,
&link->dev, IRQF_SHARED);
if (p == NULL) {
printk(KERN_NOTICE "parport_cs: parport_pc_probe_port() at "
"0x%3x, irq %u failed\n",
(unsigned int) link->resource[0]->start,
link->irq);
pr_notice("parport_cs: parport_pc_probe_port() at 0x%3x, irq %u failed\n",
(unsigned int)link->resource[0]->start, link->irq);
goto failed;
}
......
......@@ -282,7 +282,7 @@ struct parport *parport_gsc_probe_port(unsigned long base,
p->size = (p->modes & PARPORT_MODE_EPP)?8:3;
p->private_data = priv;
printk(KERN_INFO "%s: PC-style at 0x%lx", p->name, p->base);
pr_info("%s: PC-style at 0x%lx", p->name, p->base);
p->irq = irq;
if (p->irq == PARPORT_IRQ_AUTO) {
p->irq = PARPORT_IRQ_NONE;
......@@ -315,8 +315,7 @@ struct parport *parport_gsc_probe_port(unsigned long base,
if (p->irq != PARPORT_IRQ_NONE) {
if (request_irq (p->irq, parport_irq_handler,
0, p->name, p)) {
printk (KERN_WARNING "%s: irq %d in use, "
"resorting to polled operation\n",
pr_warn("%s: irq %d in use, resorting to polled operation\n",
p->name, p->irq);
p->irq = PARPORT_IRQ_NONE;
p->dma = PARPORT_DMA_NONE;
......@@ -347,7 +346,7 @@ static int __init parport_init_chip(struct parisc_device *dev)
unsigned long port;
if (!dev->irq) {
printk(KERN_WARNING "IRQ not found for parallel device at 0x%llx\n",
pr_warn("IRQ not found for parallel device at 0x%llx\n",
(unsigned long long)dev->hpa.start);
return -ENODEV;
}
......
......@@ -1337,9 +1337,8 @@ static unsigned int parport_ip32_fwp_wait_interrupt(struct parport *p)
ecr = parport_ip32_read_econtrol(p);
if ((ecr & ECR_F_EMPTY) && !(ecr & ECR_SERVINTR)
&& !lost_interrupt) {
printk(KERN_WARNING PPIP32
"%s: lost interrupt in %s\n",
p->name, __func__);
pr_warn(PPIP32 "%s: lost interrupt in %s\n",
p->name, __func__);
lost_interrupt = 1;
}
}
......@@ -1643,8 +1642,8 @@ static size_t parport_ip32_compat_write_data(struct parport *p,
DSR_nBUSY | DSR_nFAULT)) {
/* Avoid to flood the logs */
if (ready_before)
printk(KERN_INFO PPIP32 "%s: not ready in %s\n",
p->name, __func__);
pr_info(PPIP32 "%s: not ready in %s\n",
p->name, __func__);
ready_before = 0;
goto stop;
}
......@@ -1724,8 +1723,8 @@ static size_t parport_ip32_ecp_write_data(struct parport *p,
DSR_nBUSY | DSR_nFAULT)) {
/* Avoid to flood the logs */
if (ready_before)
printk(KERN_INFO PPIP32 "%s: not ready in %s\n",
p->name, __func__);
pr_info(PPIP32 "%s: not ready in %s\n",
p->name, __func__);
ready_before = 0;
goto stop;
}
......@@ -2064,8 +2063,7 @@ static __init struct parport *parport_ip32_probe_port(void)
p->modes |= PARPORT_MODE_TRISTATE;
if (!parport_ip32_fifo_supported(p)) {
printk(KERN_WARNING PPIP32
"%s: error: FIFO disabled\n", p->name);
pr_warn(PPIP32 "%s: error: FIFO disabled\n", p->name);
/* Disable hardware modes depending on a working FIFO. */
features &= ~PARPORT_IP32_ENABLE_SPP;
features &= ~PARPORT_IP32_ENABLE_ECP;
......@@ -2077,8 +2075,7 @@ static __init struct parport *parport_ip32_probe_port(void)
if (features & PARPORT_IP32_ENABLE_IRQ) {
int irq = MACEISA_PARALLEL_IRQ;
if (request_irq(irq, parport_ip32_interrupt, 0, p->name, p)) {
printk(KERN_WARNING PPIP32
"%s: error: IRQ disabled\n", p->name);
pr_warn(PPIP32 "%s: error: IRQ disabled\n", p->name);
/* DMA cannot work without interrupts. */
features &= ~PARPORT_IP32_ENABLE_DMA;
} else {
......@@ -2091,8 +2088,7 @@ static __init struct parport *parport_ip32_probe_port(void)
/* Allocate DMA resources */
if (features & PARPORT_IP32_ENABLE_DMA) {
if (parport_ip32_dma_register())
printk(KERN_WARNING PPIP32
"%s: error: DMA disabled\n", p->name);
pr_warn(PPIP32 "%s: error: DMA disabled\n", p->name);
else {
pr_probe(p, "DMA support enabled\n");
p->dma = 0; /* arbitrary value != PARPORT_DMA_NONE */
......@@ -2134,8 +2130,7 @@ static __init struct parport *parport_ip32_probe_port(void)
parport_ip32_dump_state(p, "end init", 0);
/* Print out what we found */
printk(KERN_INFO "%s: SGI IP32 at 0x%lx (0x%lx)",
p->name, p->base, p->base_hi);
pr_info("%s: SGI IP32 at 0x%lx (0x%lx)", p->name, p->base, p->base_hi);
if (p->irq != PARPORT_IRQ_NONE)
printk(", irq %d", p->irq);
printk(" [");
......
......@@ -325,7 +325,7 @@ static int __init parport_mfc3_init(void)
p->dev = &z->dev;
this_port[pias++] = p;
printk(KERN_INFO "%s: Multiface III port using irq\n", p->name);
pr_info("%s: Multiface III port using irq\n", p->name);
/* XXX: set operating mode */
p->private_data = (void *)piabase;
......
This diff is collapsed.
......@@ -314,7 +314,7 @@ static int bpp_probe(struct platform_device *op)
value_tcr &= ~P_TCR_DIR;
sbus_writeb(value_tcr, &regs->p_tcr);
printk(KERN_INFO "%s: sunbpp at 0x%lx\n", p->name, p->base);
pr_info("%s: sunbpp at 0x%lx\n", p->name, p->base);
dev_set_drvdata(&op->dev, p);
......
......@@ -38,7 +38,7 @@ static void pretty_print(struct parport *port, int device)
{
struct parport_device_info *info = &port->probe_info[device + 1];
printk(KERN_INFO "%s", port->name);
pr_info("%s", port->name);
if (device >= 0)
printk (" (addr %d)", device);
......@@ -58,7 +58,7 @@ static void parse_data(struct parport *port, int device, char *str)
struct parport_device_info *info = &port->probe_info[device + 1];
if (!txt) {
printk(KERN_WARNING "%s probe: memory squeeze\n", port->name);
pr_warn("%s probe: memory squeeze\n", port->name);
return;
}
strcpy(txt, str);
......@@ -98,7 +98,8 @@ static void parse_data(struct parport *port, int device, char *str)
goto rock_on;
}
}
printk(KERN_WARNING "%s probe: warning, class '%s' not understood.\n", port->name, sep);
pr_warn("%s probe: warning, class '%s' not understood\n",
port->name, sep);
info->class = PARPORT_CLASS_OTHER;
} else if (!strcmp(p, "CMD") ||
!strcmp(p, "COMMAND SET")) {
......
......@@ -554,8 +554,8 @@ void parport_announce_port(struct parport *port)
#endif
if (!port->dev)
printk(KERN_WARNING "%s: fix this legacy no-device port driver!\n",
port->name);
pr_warn("%s: fix this legacy no-device port driver!\n",
port->name);
parport_proc_register(port);
mutex_lock(&registration_lock);
......@@ -727,7 +727,8 @@ parport_register_device(struct parport *port, const char *name,
if (flags & PARPORT_DEV_LURK) {
if (!pf || !kf) {
printk(KERN_INFO "%s: refused to register lurking device (%s) without callbacks\n", port->name, name);
pr_info("%s: refused to register lurking device (%s) without callbacks\n",
port->name, name);
return NULL;
}
}
......@@ -996,7 +997,7 @@ void parport_unregister_device(struct pardevice *dev)
#ifdef PARPORT_PARANOID
if (!dev) {
printk(KERN_ERR "parport_unregister_device: passed NULL\n");
pr_err("%s: passed NULL\n", __func__);
return;
}
#endif
......@@ -1137,8 +1138,7 @@ int parport_claim(struct pardevice *dev)
unsigned long flags;
if (port->cad == dev) {
printk(KERN_INFO "%s: %s already owner\n",
dev->port->name,dev->name);
pr_info("%s: %s already owner\n", dev->port->name, dev->name);
return 0;
}
......@@ -1158,9 +1158,8 @@ int parport_claim(struct pardevice *dev)
* I think we'll actually deadlock rather than
* get here, but just in case..
*/
printk(KERN_WARNING
"%s: %s released port when preempted!\n",
port->name, oldcad->name);
pr_warn("%s: %s released port when preempted!\n",
port->name, oldcad->name);
if (port->cad)
goto blocked;
}
......@@ -1320,8 +1319,8 @@ void parport_release(struct pardevice *dev)
write_lock_irqsave(&port->cad_lock, flags);
if (port->cad != dev) {
write_unlock_irqrestore(&port->cad_lock, flags);
printk(KERN_WARNING "%s: %s tried to release parport when not owner\n",
port->name, dev->name);
pr_warn("%s: %s tried to release parport when not owner\n",
port->name, dev->name);
return;
}
......@@ -1361,7 +1360,8 @@ void parport_release(struct pardevice *dev)
if (dev->port->cad) /* racy but no matter */
return;
} else {
printk(KERN_ERR "%s: don't know how to wake %s\n", port->name, pd->name);
pr_err("%s: don't know how to wake %s\n",
port->name, pd->name);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment