diff options
author | Joe Perches <joe@perches.com> | 2020-04-03 15:43:17 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-23 17:05:37 +0200 |
commit | aa3d6e7c49e3b480aa9db0e9924736726a6f75aa (patch) | |
tree | a524d4c15c0df94f1cb17a764aec43cec3f621f6 /drivers/parport/parport_gsc.h | |
parent | parport: Convert printk(KERN_<LEVEL> to pr_<level>( (diff) | |
download | linux-aa3d6e7c49e3b480aa9db0e9924736726a6f75aa.tar.xz linux-aa3d6e7c49e3b480aa9db0e9924736726a6f75aa.zip |
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_<level> 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 <joe@perches.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Link: https://lore.kernel.org/r/20200403134325.11523-3-sudipm.mukherjee@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/parport/parport_gsc.h')
-rw-r--r-- | drivers/parport/parport_gsc.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/parport/parport_gsc.h b/drivers/parport/parport_gsc.h index 4c4d3c6cd77e..9301217edf12 100644 --- a/drivers/parport/parport_gsc.h +++ b/drivers/parport/parport_gsc.h @@ -71,7 +71,7 @@ struct parport_gsc_private { static inline void parport_gsc_write_data(struct parport *p, unsigned char d) { #ifdef DEBUG_PARPORT - printk (KERN_DEBUG "parport_gsc_write_data(%p,0x%02x)\n", p, d); + printk(KERN_DEBUG "%s(%p,0x%02x)\n", __func__, p, d); #endif parport_writeb(d, DATA(p)); } @@ -80,8 +80,7 @@ static inline unsigned char parport_gsc_read_data(struct parport *p) { unsigned char val = parport_readb (DATA (p)); #ifdef DEBUG_PARPORT - printk (KERN_DEBUG "parport_gsc_read_data(%p) = 0x%02x\n", - p, val); + printk(KERN_DEBUG "%s(%p) = 0x%02x\n", __func__, p, val); #endif return val; } @@ -95,9 +94,9 @@ static inline unsigned char __parport_gsc_frob_control(struct parport *p, struct parport_gsc_private *priv = p->physport->private_data; unsigned char ctr = priv->ctr; #ifdef DEBUG_PARPORT - printk (KERN_DEBUG - "__parport_gsc_frob_control(%02x,%02x): %02x -> %02x\n", - mask, val, ctr, ((ctr & ~mask) ^ val) & priv->ctr_writable); + printk(KERN_DEBUG "%s(%02x,%02x): %02x -> %02x\n", + __func__, mask, val, + ctr, ((ctr & ~mask) ^ val) & priv->ctr_writable); #endif ctr = (ctr & ~mask) ^ val; ctr &= priv->ctr_writable; /* only write writable bits. */ @@ -126,8 +125,8 @@ static inline void parport_gsc_write_control(struct parport *p, /* Take this out when drivers have adapted to newer interface. */ if (d & 0x20) { - printk (KERN_DEBUG "%s (%s): use data_reverse for this!\n", - p->name, p->cad->name); + printk(KERN_DEBUG "%s (%s): use data_reverse for this!\n", + p->name, p->cad->name); parport_gsc_data_reverse (p); } @@ -155,9 +154,9 @@ static inline unsigned char parport_gsc_frob_control(struct parport *p, /* Take this out when drivers have adapted to newer interface. */ if (mask & 0x20) { - printk (KERN_DEBUG "%s (%s): use data_%s for this!\n", - p->name, p->cad->name, - (val & 0x20) ? "reverse" : "forward"); + printk(KERN_DEBUG "%s (%s): use data_%s for this!\n", + p->name, p->cad->name, + (val & 0x20) ? "reverse" : "forward"); if (val & 0x20) parport_gsc_data_reverse (p); else |