From aa3d6e7c49e3b480aa9db0e9924736726a6f75aa Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Fri, 3 Apr 2020 14:43:17 +0100 Subject: parport: Use more comon logging styles Some of the logging can be poorly formatted because of unexpected line breaks given printks without KERN_CONT that should be pr_cont. Miscellanea: o Remove unnecessary spaces between function name and open parenthesis o Convert bare printks to pr_ where appropriate o Convert embedded function names to use %s, __func__ o Coalesce formats o Realign arguments o Use do {} while (0) in a macro and not a bare if Signed-off-by: Joe Perches Reviewed-by: Randy Dunlap Signed-off-by: Sudip Mukherjee Link: https://lore.kernel.org/r/20200403134325.11523-3-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/parport/share.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'drivers/parport/share.c') diff --git a/drivers/parport/share.c b/drivers/parport/share.c index b0f4513251ee..3169feebdc19 100644 --- a/drivers/parport/share.c +++ b/drivers/parport/share.c @@ -720,8 +720,7 @@ parport_register_device(struct parport *port, const char *name, if (port->physport->flags & PARPORT_FLAG_EXCL) { /* An exclusive device is registered. */ - printk(KERN_DEBUG "%s: no more devices allowed\n", - port->name); + printk(KERN_DEBUG "%s: no more devices allowed\n", port->name); return NULL; } @@ -789,9 +788,8 @@ parport_register_device(struct parport *port, const char *name, if (flags & PARPORT_DEV_EXCL) { if (port->physport->devices) { spin_unlock(&port->physport->pardevice_lock); - printk(KERN_DEBUG - "%s: cannot grant exclusive access for device %s\n", - port->name, name); + printk(KERN_DEBUG "%s: cannot grant exclusive access for device %s\n", + port->name, name); goto out_free_all; } port->flags |= PARPORT_FLAG_EXCL; @@ -1259,7 +1257,8 @@ int parport_claim_or_block(struct pardevice *dev) r = parport_claim(dev); if (r == -EAGAIN) { #ifdef PARPORT_DEBUG_SHARING - printk(KERN_DEBUG "%s: parport_claim() returned -EAGAIN\n", dev->name); + printk(KERN_DEBUG "%s: parport_claim() returned -EAGAIN\n", + dev->name); #endif /* * FIXME!!! Use the proper locking for dev->waiting, @@ -1292,7 +1291,7 @@ int parport_claim_or_block(struct pardevice *dev) if (dev->port->physport->cad != dev) printk(KERN_DEBUG "%s: exiting parport_claim_or_block but %s owns port!\n", dev->name, dev->port->physport->cad ? - dev->port->physport->cad->name:"nobody"); + dev->port->physport->cad->name : "nobody"); #endif } dev->waiting = 0; -- cgit v1.2.3