Skip to contentSkip to conversation

: staging: media: css2400: fix checkpatch error

PATCH In review Haim Daniel 2 participants 6 messages Mar 29, 2017 – Apr 18, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : staging: media: css2400: fix checkpatch error

Quoted 1 line

From 41d35b455f8eb139912909639e914469ef5e06fb Mon Sep 17 00:00:00 2001

From: Haim Daniel <[email protected]>
Date: Tue, 28 Mar 2017 19:27:57 +0300
Subject: [PATCH] [media] staging: css2400: fix checkpatch error

isp_capture_defs.h:

enclose macro with complex values in parentheses.

---
 .../pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h +1 -1
index aa413df..78cbbf6 100644
@@ -19,7 +19,7 @@
 #define _ISP_CAPTURE_BITS_PER_ELEM                32  /* only for data, not SOP */						           
 #define _ISP_CAPTURE_BYTES_PER_ELEM               (_ISP_CAPTURE_BITS_PER_ELEM/8	)				           
 #define _ISP_CAPTURE_BYTES_PER_WORD               32		/* 256/8 */	
-#define _ISP_CAPTURE_ELEM_PER_WORD                _ISP_CAPTURE_BYTES_PER_WORD / _ISP_CAPTURE_BYTES_PER_ELEM		           
+#define _ISP_CAPTURE_ELEM_PER_WORD                (_ISP_CAPTURE_BYTES_PER_WORD / _ISP_CAPTURE_BYTES_PER_ELEM)         
 
 //#define CAPT_RCV_ACK                              1
 //#define CAPT_WRT_ACK                              2               
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/1 staging: css2400: fix checkpatch error

isp_capture_defs.h:

fix checkpatch ERROR:
Macros with complex values should be enclosed in parentheses

---
 .../pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h +1 -1
index aa413df..78cbbf6 100644
@@ -19,7 +19,7 @@
 #define _ISP_CAPTURE_BITS_PER_ELEM                32  /* only for data, not SOP */						           
 #define _ISP_CAPTURE_BYTES_PER_ELEM               (_ISP_CAPTURE_BITS_PER_ELEM/8	)				           
 #define _ISP_CAPTURE_BYTES_PER_WORD               32		/* 256/8 */	
-#define _ISP_CAPTURE_ELEM_PER_WORD                _ISP_CAPTURE_BYTES_PER_WORD / _ISP_CAPTURE_BYTES_PER_ELEM		           
+#define _ISP_CAPTURE_ELEM_PER_WORD                (_ISP_CAPTURE_BYTES_PER_WORD / _ISP_CAPTURE_BYTES_PER_ELEM)         
 
 //#define CAPT_RCV_ACK                              1
 //#define CAPT_WRT_ACK                              2               
Signature · 1 line
1.9.1
maintainer
#2 lore raw

Re: [PATCH v2] [media] staging: css2400: fix checkpatch error

Quoted 1 line · Haim Daniel

isp_capture_defs.h:

What is this line for?

Quoted 1 line

fix checkpatch ERROR:

Trailing whitespace?

Quoted 12 lines

Macros with complex values should be enclosed in parentheses

---
 .../pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h +0 -0
index aa413df..78cbbf6 100644

drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h line 22

Quoted 5 lines
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h +1 -1
@@ -19,7 +19,7 @@
 #define _ISP_CAPTURE_BITS_PER_ELEM                32  /* only for data, not SOP */						           
 #define _ISP_CAPTURE_BYTES_PER_ELEM               (_ISP_CAPTURE_BITS_PER_ELEM/8	)				           
 #define _ISP_CAPTURE_BYTES_PER_WORD               32		/* 256/8 */	
-#define _ISP_CAPTURE_ELEM_PER_WORD                _ISP_CAPTURE_BYTES_PER_WORD / _ISP_CAPTURE_BYTES_PER_ELEM		           
+#define _ISP_CAPTURE_ELEM_PER_WORD                (_ISP_CAPTURE_BYTES_PER_WORD / _ISP_CAPTURE_BYTES_PER_ELEM)         

Does this change really make sense? Why keep the trailing whitespace if you touch the line?

thanks,

greg k-h

#3 lore raw

PATCH v3 1/1 staging: css2400: fix checkpatch error

isp_capture_defs.h: clean up ERROR: Macros with complex values should be enclosed in parentheses

---
 .../pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h +1 -1
index aa413df..117c7a2 100644
@@ -19,7 +19,7 @@
 #define _ISP_CAPTURE_BITS_PER_ELEM                32  /* only for data, not SOP */						           
 #define _ISP_CAPTURE_BYTES_PER_ELEM               (_ISP_CAPTURE_BITS_PER_ELEM/8	)				           
 #define _ISP_CAPTURE_BYTES_PER_WORD               32		/* 256/8 */	
-#define _ISP_CAPTURE_ELEM_PER_WORD                _ISP_CAPTURE_BYTES_PER_WORD / _ISP_CAPTURE_BYTES_PER_ELEM		           
+#define _ISP_CAPTURE_ELEM_PER_WORD                (_ISP_CAPTURE_BYTES_PER_WORD / _ISP_CAPTURE_BYTES_PER_ELEM)
 
 //#define CAPT_RCV_ACK                              1
 //#define CAPT_WRT_ACK                              2               
Signature · 1 line
1.9.1
maintainer
#4 lore raw

Re: [PATCH v3] [media] staging: css2400: fix checkpatch error

Quoted 12 lines · Haim Daniel

isp_capture_defs.h: clean up ERROR: Macros with complex values should be enclosed in parentheses

---
 .../pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h +0 -0
index aa413df..117c7a2 100644

drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h line 22

Quoted 5 lines
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h +1 -1
@@ -19,7 +19,7 @@
 #define _ISP_CAPTURE_BITS_PER_ELEM                32  /* only for data, not SOP */						           
 #define _ISP_CAPTURE_BYTES_PER_ELEM               (_ISP_CAPTURE_BITS_PER_ELEM/8	)				           
 #define _ISP_CAPTURE_BYTES_PER_WORD               32		/* 256/8 */	
-#define _ISP_CAPTURE_ELEM_PER_WORD                _ISP_CAPTURE_BYTES_PER_WORD / _ISP_CAPTURE_BYTES_PER_ELEM		           
+#define _ISP_CAPTURE_ELEM_PER_WORD                (_ISP_CAPTURE_BYTES_PER_WORD / _ISP_CAPTURE_BYTES_PER_ELEM)

Why only fix one of these instances?

And why is this define even needed? No one touches it, right?

Also, please cc: Alan on patches to this driver when you resend. You are using scripts/get_maintainer.pl, right?

thanks,

greg k-h

maintainer
#5 lore raw
In reply to Haim Daniel
Quoted 6 lines · Haim Daniel
Quoted 1 line

From 41d35b455f8eb139912909639e914469ef5e06fb Mon Sep 17 00:00:00 2001

From: Haim Daniel <[email protected]>
Date: Tue, 28 Mar 2017 19:27:57 +0300
Subject: [PATCH] [media] staging: css2400: fix checkpatch error

isp_capture_defs.h:

What is this line for?

Quoted 7 lines

enclose macro with complex values in parentheses.

---
 .../pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Please don't attach your patch, use 'git send-email' to send it properly.

thanks,

greg k-h