Re: [PATCH] Staging: dgnc: fix macro coding style issue in digi.h

2014-10-29 Thread Greg KH
On Wed, Oct 29, 2014 at 02:12:38AM +0800, Cheng-Yi He wrote:
 This is a patch to the digi.h file that fixes up the following error
 found by the checkpatch tool.
 ERROR: Macros with complex values should be enclosed in parentheses
 
 Signed-off-by: Cheng-Yi He chengyihetai...@gmail.com
 ---
  drivers/staging/dgnc/digi.h | 60 
 ++---
  1 file changed, 30 insertions(+), 30 deletions(-)

You didn't test build this patch :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: dgnc: fix macro coding style issue in digi.h

2014-10-28 Thread Cheng-Yi He
This is a patch to the digi.h file that fixes up the following error
found by the checkpatch tool.
ERROR: Macros with complex values should be enclosed in parentheses

Signed-off-by: Cheng-Yi He chengyihetai...@gmail.com
---
 drivers/staging/dgnc/digi.h | 60 ++---
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/dgnc/digi.h b/drivers/staging/dgnc/digi.h
index 3181a35..d6e0b9f 100644
--- a/drivers/staging/dgnc/digi.h
+++ b/drivers/staging/dgnc/digi.h
@@ -38,8 +38,8 @@
 
 #if !defined(TIOCMODG)
 
-#defineTIOCMODG('d'8) | 250  /* get modem ctrl state 
*/
-#defineTIOCMODS('d'8) | 251  /* set modem ctrl state 
*/
+#defineTIOCMODG(('d'8) | 250)/* get modem ctrl state 
*/
+#defineTIOCMODS(('d'8) | 251)/* set modem ctrl state 
*/
 
 #ifndef TIOCM_LE
 #defineTIOCM_LE0x01/* line enable  
*/
@@ -58,44 +58,44 @@
 #endif
 
 #if !defined(TIOCMSET)
-#defineTIOCMSET('d'8) | 252  /* set modem ctrl state 
*/
-#defineTIOCMGET('d'8) | 253  /* set modem ctrl state 
*/
+#defineTIOCMSET(('d'8) | 252)/* set modem ctrl state 
*/
+#defineTIOCMGET(('d'8) | 253)/* set modem ctrl state 
*/
 #endif
 
 #if !defined(TIOCMBIC)
-#defineTIOCMBIC('d'8) | 254  /* set modem ctrl state 
*/
-#defineTIOCMBIS('d'8) | 255  /* set modem ctrl state 
*/
+#defineTIOCMBIC(('d'8) | 254)/* set modem ctrl state 
*/
+#defineTIOCMBIS(('d'8) | 255)/* set modem ctrl state 
*/
 #endif
 
 
 #if !defined(TIOCSDTR)
-#defineTIOCSDTR('e'8) | 0/* set DTR  
*/
-#defineTIOCCDTR('e'8) | 1/* clear DTR
*/
+#defineTIOCSDTR(('e'8) | 0)  /* set DTR  
*/
+#defineTIOCCDTR(('e'8) | 1)  /* clear DTR
*/
 #endif
 
 /
  * Ioctl command arguments for DIGI parameters.
  /
-#define DIGI_GETA  ('e'8) | 94   /* Read params  */
+#define DIGI_GETA  (('e'8) | 94) /* Read params  */
 
-#define DIGI_SETA  ('e'8) | 95   /* Set params   */
-#define DIGI_SETAW ('e'8) | 96   /* Drain  set params   */
-#define DIGI_SETAF ('e'8) | 97   /* Drain, flush  set params */
+#define DIGI_SETA  (('e'8) | 95) /* Set params   */
+#define DIGI_SETAW (('e'8) | 96) /* Drain  set params   */
+#define DIGI_SETAF (('e'8) | 97) /* Drain, flush  set params */
 
-#define DIGI_KME   ('e'8) | 98   /* Read/Write Host  */
+#define DIGI_KME   (('e'8) | 98) /* Read/Write Host  */
/* Adapter Memory   */
 
-#defineDIGI_GETFLOW('e'8) | 99   /* Get startc/stopc 
flow */
+#defineDIGI_GETFLOW(('e'8) | 99) /* Get startc/stopc 
flow */
/* control characters*/
-#defineDIGI_SETFLOW('e'8) | 100  /* Set startc/stopc 
flow */
+#defineDIGI_SETFLOW(('e'8) | 100)/* Set startc/stopc 
flow */
/* control characters*/
-#defineDIGI_GETAFLOW   ('e'8) | 101  /* Get Aux. 
startc/stopc */
+#defineDIGI_GETAFLOW   (('e'8) | 101)/* Get Aux. 
startc/stopc */
/* flow control chars*/
-#defineDIGI_SETAFLOW   ('e'8) | 102  /* Set Aux. 
startc/stopc */
+#defineDIGI_SETAFLOW   (('e'8) | 102)/* Set Aux. 
startc/stopc */
/* flow control chars*/
 
-#define DIGI_GEDELAY   ('d'8) | 246  /* Get edelay */
-#define DIGI_SEDELAY   ('d'8) | 247  /* Set edelay */
+#define DIGI_GEDELAY   (('d'8) | 246)/* Get edelay */
+#define DIGI_SEDELAY   (('d'8) | 247)/* Set edelay */
 
 struct digiflow_t {
unsigned char   startc; /* flow cntl start char 
*/
@@ -104,8 +104,8 @@ struct  digiflow_t {
 
 
 #ifdef FLOW_2200
-#defineF2200_GETA  ('e'8) | 104  /* Get 2x36 flow cntl 
flags */
-#defineF2200_SETAW ('e'8) | 105  /* Set 2x36 flow cntl 
flags */
+#defineF2200_GETA  (('e'8) | 104)/* Get 2x36 flow cntl 
flags */
+#defineF2200_SETAW (('e'8) | 105)/* Set 2x36 flow cntl 
flags */
 #defineF2200_MASK  0x03/* 2200 flow cntl bit 
mask  */
 #define