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>
 
                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);
 
 
        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);
 
                return -EACCES;
 
        {
-#define printmode(x) {if(port->modes&PARPORT_MODE_##x){len+=sprintf(buffer+len,"%s%s",f?",":"",#x);f++;}}
+#define printmode(x)                                                   \
+do {                                                                   \
+       if (port->modes & PARPORT_MODE_##x)                             \
+               len += sprintf(buffer + len, "%s%s", f++ ? "," : "", #x); \
+} while (0)
                int f = 0;
                printmode(PCSPP);
                printmode(TRISTATE);