summaryrefslogtreecommitdiff
path: root/drivers/parport/parport_gsc.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2020-04-03 16:43:22 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-23 18:05:39 +0300
commita6abfdff4fe5dd19d1f1b37d72ba34cd4492fd4d (patch)
treee33847923df0d984f949e5c464a7014b78ea4920 /drivers/parport/parport_gsc.c
parent7b3992572f4cf66ac80dbbdf4f43b8e7fd443747 (diff)
downloadlinux-a6abfdff4fe5dd19d1f1b37d72ba34cd4492fd4d.tar.xz
parport: Standardize use of printmode
Standardize the define and the uses of printmode. Miscellanea: o Add missing statement termination ; where necessary 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-8-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/parport/parport_gsc.c')
-rw-r--r--drivers/parport/parport_gsc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/parport/parport_gsc.c b/drivers/parport/parport_gsc.c
index cb6a08bee3c7..9228e8f90309 100644
--- a/drivers/parport/parport_gsc.c
+++ b/drivers/parport/parport_gsc.c
@@ -299,12 +299,16 @@ struct parport *parport_gsc_probe_port(unsigned long base,
p->dma = PARPORT_DMA_NONE;
pr_cont(" [");
-#define printmode(x) {if(p->modes&PARPORT_MODE_##x){pr_cont("%s%s",f?",":"",#x);f++;}}
+#define printmode(x) \
+do { \
+ if (p->modes & PARPORT_MODE_##x) \
+ pr_cont("%s%s", f++ ? "," : "", #x); \
+} while (0)
{
int f = 0;
printmode(PCSPP);
printmode(TRISTATE);
- printmode(COMPAT)
+ printmode(COMPAT);
printmode(EPP);
// printmode(ECP);
// printmode(DMA);