mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/7] staging/silicom/bypasslib: Reformat comments
@ 2013-05-23 20:51 Lisa Nguyen
  2013-05-23 20:52 ` [PATCH 2/7] staging/silicom/bypasslib: Fix code indentation errors Lisa Nguyen
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Lisa Nguyen @ 2013-05-23 20:51 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel

Resolved the C99 comment style issue by reformatting existing comments 
to meet kernel coding standards in bp_ioctl.h

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
---
 drivers/staging/silicom/bypasslib/bp_ioctl.h | 64 ++++++++++++++--------------
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/silicom/bypasslib/bp_ioctl.h b/drivers/staging/silicom/bypasslib/bp_ioctl.h
index 040c6fa..2d1ef53 100644
--- a/drivers/staging/silicom/bypasslib/bp_ioctl.h
+++ b/drivers/staging/silicom/bypasslib/bp_ioctl.h
@@ -14,41 +14,41 @@
 #ifndef BP_IOCTL_H
 #define BP_IOCTL_H
 
-#define BP_CAP                   0x01	//BIT_0
-#define BP_STATUS_CAP            0x02	//BIT_1
-#define BP_STATUS_CHANGE_CAP     0x04	//BIT_2
-#define SW_CTL_CAP               0x08	//BIT_3
-#define BP_DIS_CAP               0x10	//BIT_4
-#define BP_DIS_STATUS_CAP        0x20	//BIT_5
-#define STD_NIC_CAP              0x40	//BIT_6
-#define BP_PWOFF_ON_CAP          0x80	//BIT_7
-#define BP_PWOFF_OFF_CAP         0x0100	//BIT_8
-#define BP_PWOFF_CTL_CAP         0x0200	//BIT_9
-#define BP_PWUP_ON_CAP           0x0400	//BIT_10
-#define BP_PWUP_OFF_CAP          0x0800	//BIT_11
-#define BP_PWUP_CTL_CAP          0x1000	//BIT_12
-#define WD_CTL_CAP               0x2000	//BIT_13
-#define WD_STATUS_CAP            0x4000	//BIT_14
-#define WD_TIMEOUT_CAP           0x8000	//BIT_15
-#define TX_CTL_CAP               0x10000	//BIT_16
-#define TX_STATUS_CAP            0x20000	//BIT_17
-#define TAP_CAP                  0x40000	//BIT_18
-#define TAP_STATUS_CAP           0x80000	//BIT_19
-#define TAP_STATUS_CHANGE_CAP    0x100000	//BIT_20
-#define TAP_DIS_CAP              0x200000	//BIT_21
-#define TAP_DIS_STATUS_CAP       0x400000	//BIT_22
-#define TAP_PWUP_ON_CAP          0x800000	//BIT_23
-#define TAP_PWUP_OFF_CAP         0x1000000	//BIT 24
-#define TAP_PWUP_CTL_CAP         0x2000000	//BIT 25
-#define NIC_CAP_NEG              0x4000000	//BIT 26
-#define TPL_CAP                  0x8000000	//BIT 27
-#define DISC_CAP                 0x10000000	//BIT 28
-#define DISC_DIS_CAP             0x20000000	//BIT 29
-#define DISC_PWUP_CTL_CAP        0x40000000	//BIT 30
+#define BP_CAP                   0x01	/* BIT_0 */
+#define BP_STATUS_CAP            0x02	/* BIT_1 */
+#define BP_STATUS_CHANGE_CAP     0x04	/* BIT_2 */
+#define SW_CTL_CAP               0x08	/* BIT_3 */
+#define BP_DIS_CAP               0x10	/* BIT_4 */
+#define BP_DIS_STATUS_CAP        0x20	/* BIT_5 */
+#define STD_NIC_CAP              0x40	/* BIT_6 */
+#define BP_PWOFF_ON_CAP          0x80	/* BIT_7 */
+#define BP_PWOFF_OFF_CAP         0x0100	/* BIT_8 */
+#define BP_PWOFF_CTL_CAP         0x0200	/* BIT_9 */
+#define BP_PWUP_ON_CAP           0x0400	/* BIT_10 */
+#define BP_PWUP_OFF_CAP          0x0800	/* BIT_11 */
+#define BP_PWUP_CTL_CAP          0x1000	/* BIT_12 */
+#define WD_CTL_CAP               0x2000	/* BIT_13 */
+#define WD_STATUS_CAP            0x4000	/* BIT_14 */
+#define WD_TIMEOUT_CAP           0x8000	/* BIT_15 */
+#define TX_CTL_CAP               0x10000	/* BIT_16 */
+#define TX_STATUS_CAP            0x20000	/* BIT_17 */
+#define TAP_CAP                  0x40000	/* BIT_18 */
+#define TAP_STATUS_CAP           0x80000	/* BIT_19 */
+#define TAP_STATUS_CHANGE_CAP    0x100000	/* BIT_20 */
+#define TAP_DIS_CAP              0x200000	/* BIT_21 */
+#define TAP_DIS_STATUS_CAP       0x400000	/* BIT_22 */
+#define TAP_PWUP_ON_CAP          0x800000	/* BIT_23 */
+#define TAP_PWUP_OFF_CAP         0x1000000	/* BIT 24 */
+#define TAP_PWUP_CTL_CAP         0x2000000	/* BIT 25 */
+#define NIC_CAP_NEG              0x4000000	/* BIT 26 */
+#define TPL_CAP                  0x8000000	/* BIT 27 */
+#define DISC_CAP                 0x10000000	/* BIT 28 */
+#define DISC_DIS_CAP             0x20000000	/* BIT 29 */
+#define DISC_PWUP_CTL_CAP        0x40000000	/* BIT 30 */
 
 #define WD_MIN_TIME_MASK(val)      (val & 0xf)
 #define WD_STEP_COUNT_MASK(val)    ((val & 0xf) << 5)
-#define WDT_STEP_TIME              0x10	//BIT_4
+#define WDT_STEP_TIME              0x10	/* BIT_4 */
 
 #define WD_MIN_TIME_GET(desc)   (desc & 0xf)
 #define WD_STEP_COUNT_GET(desc) (desc>>5) & 0xf
-- 
1.8.1.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 2/7] staging/silicom/bypasslib: Fix code indentation errors
  2013-05-23 20:51 [PATCH 1/7] staging/silicom/bypasslib: Reformat comments Lisa Nguyen
@ 2013-05-23 20:52 ` Lisa Nguyen
  2013-05-23 20:52 ` [PATCH 3/7] staging/silicom/bypasslib: Add space around == Lisa Nguyen
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Lisa Nguyen @ 2013-05-23 20:52 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel

Fixed code indentation errors generated by checkpatch.pl to
meet kernel coding standards in bplibk.h

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
---
 drivers/staging/silicom/bypasslib/bplibk.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/silicom/bypasslib/bplibk.h b/drivers/staging/silicom/bypasslib/bplibk.h
index d8c1d27..26ac570 100644
--- a/drivers/staging/silicom/bypasslib/bplibk.h
+++ b/drivers/staging/silicom/bypasslib/bplibk.h
@@ -24,9 +24,9 @@
 #define INTEL_PEG4BPFII_PID 0x10a1
 
 #define PEGII_IF_SERIES(vid, pid) \
-        ((vid==0x8086)&& \
-        ((pid==INTEL_PEG4BPII_PID)||   \
-          (pid==INTEL_PEG4BPFII_PID)))
+	((vid==0x8086)&& \
+	 ((pid==INTEL_PEG4BPII_PID)||   \
+	  (pid==INTEL_PEG4BPFII_PID)))
 
 #define EXPORT_SYMBOL_NOVERS EXPORT_SYMBOL
 
-- 
1.8.1.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 3/7] staging/silicom/bypasslib: Add space around ==
  2013-05-23 20:51 [PATCH 1/7] staging/silicom/bypasslib: Reformat comments Lisa Nguyen
  2013-05-23 20:52 ` [PATCH 2/7] staging/silicom/bypasslib: Fix code indentation errors Lisa Nguyen
@ 2013-05-23 20:52 ` Lisa Nguyen
  2013-05-23 20:53 ` [PATCH 4/7] staging/silicom/bypasslib: Add space around && Lisa Nguyen
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Lisa Nguyen @ 2013-05-23 20:52 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel

Added space around equal signs to resolve checkpatch errors and
meet kernel coding standards in bplibk.h

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
---
 drivers/staging/silicom/bypasslib/bplibk.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/silicom/bypasslib/bplibk.h b/drivers/staging/silicom/bypasslib/bplibk.h
index 26ac570..bf062c4 100644
--- a/drivers/staging/silicom/bypasslib/bplibk.h
+++ b/drivers/staging/silicom/bypasslib/bplibk.h
@@ -24,9 +24,9 @@
 #define INTEL_PEG4BPFII_PID 0x10a1
 
 #define PEGII_IF_SERIES(vid, pid) \
-	((vid==0x8086)&& \
-	 ((pid==INTEL_PEG4BPII_PID)||   \
-	  (pid==INTEL_PEG4BPFII_PID)))
+	((vid == 0x8086)&& \
+	 ((pid == INTEL_PEG4BPII_PID)||   \
+	  (pid == INTEL_PEG4BPFII_PID)))
 
 #define EXPORT_SYMBOL_NOVERS EXPORT_SYMBOL
 
-- 
1.8.1.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 4/7] staging/silicom/bypasslib: Add space around &&
  2013-05-23 20:51 [PATCH 1/7] staging/silicom/bypasslib: Reformat comments Lisa Nguyen
  2013-05-23 20:52 ` [PATCH 2/7] staging/silicom/bypasslib: Fix code indentation errors Lisa Nguyen
  2013-05-23 20:52 ` [PATCH 3/7] staging/silicom/bypasslib: Add space around == Lisa Nguyen
@ 2013-05-23 20:53 ` Lisa Nguyen
  2013-05-23 20:53 ` [PATCH 5/7] staging/silicom/bypasslib: Add space around || Lisa Nguyen
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Lisa Nguyen @ 2013-05-23 20:53 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel

Added space around double ampersands to resolve checkpatch errors
and meet kernel coding standards in bplibk.h

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
---
 drivers/staging/silicom/bypasslib/bplibk.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/silicom/bypasslib/bplibk.h b/drivers/staging/silicom/bypasslib/bplibk.h
index bf062c4..cf8eecd 100644
--- a/drivers/staging/silicom/bypasslib/bplibk.h
+++ b/drivers/staging/silicom/bypasslib/bplibk.h
@@ -24,7 +24,7 @@
 #define INTEL_PEG4BPFII_PID 0x10a1
 
 #define PEGII_IF_SERIES(vid, pid) \
-	((vid == 0x8086)&& \
+	((vid == 0x8086) && \
 	 ((pid == INTEL_PEG4BPII_PID)||   \
 	  (pid == INTEL_PEG4BPFII_PID)))
 
-- 
1.8.1.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 5/7] staging/silicom/bypasslib: Add space around ||
  2013-05-23 20:51 [PATCH 1/7] staging/silicom/bypasslib: Reformat comments Lisa Nguyen
                   ` (2 preceding siblings ...)
  2013-05-23 20:53 ` [PATCH 4/7] staging/silicom/bypasslib: Add space around && Lisa Nguyen
@ 2013-05-23 20:53 ` Lisa Nguyen
  2013-05-23 20:54 ` [PATCH 6/7] staging/silicom/bypasslib: Remove extra space before line Lisa Nguyen
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Lisa Nguyen @ 2013-05-23 20:53 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel

Added space around piping symbols to resolve checkpatch errors and
meet kernel coding standards in bplibk.h

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
---
 drivers/staging/silicom/bypasslib/bplibk.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/silicom/bypasslib/bplibk.h b/drivers/staging/silicom/bypasslib/bplibk.h
index cf8eecd..b15a2a4 100644
--- a/drivers/staging/silicom/bypasslib/bplibk.h
+++ b/drivers/staging/silicom/bypasslib/bplibk.h
@@ -25,7 +25,7 @@
 
 #define PEGII_IF_SERIES(vid, pid) \
 	((vid == 0x8086) && \
-	 ((pid == INTEL_PEG4BPII_PID)||   \
+	 ((pid == INTEL_PEG4BPII_PID) ||   \
 	  (pid == INTEL_PEG4BPFII_PID)))
 
 #define EXPORT_SYMBOL_NOVERS EXPORT_SYMBOL
-- 
1.8.1.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 6/7] staging/silicom/bypasslib: Remove extra space before line
  2013-05-23 20:51 [PATCH 1/7] staging/silicom/bypasslib: Reformat comments Lisa Nguyen
                   ` (3 preceding siblings ...)
  2013-05-23 20:53 ` [PATCH 5/7] staging/silicom/bypasslib: Add space around || Lisa Nguyen
@ 2013-05-23 20:54 ` Lisa Nguyen
  2013-05-23 20:54 ` [PATCH 7/7] staging/silicom/bypasslib: Move opening brace to previous line Lisa Nguyen
  2013-05-23 22:42 ` [PATCH 1/7] staging/silicom/bypasslib: Reformat comments Joe Perches
  6 siblings, 0 replies; 8+ messages in thread
From: Lisa Nguyen @ 2013-05-23 20:54 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel

Removed extra space at beginning of a statement to resolve
checkpatch errors and meet kernel coding standards in bplibk.h

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
---
 drivers/staging/silicom/bypasslib/bplibk.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/silicom/bypasslib/bplibk.h b/drivers/staging/silicom/bypasslib/bplibk.h
index b15a2a4..f88db4a 100644
--- a/drivers/staging/silicom/bypasslib/bplibk.h
+++ b/drivers/staging/silicom/bypasslib/bplibk.h
@@ -32,7 +32,7 @@
 
 #ifdef BP_VENDOR_SUPPORT
 char *bp_desc_array[] =
-    { "e1000bp", "e1000bpe", "slcm5700", "bnx2xbp", "ixgbp", "ixgbpe", NULL };
+{ "e1000bp", "e1000bpe", "slcm5700", "bnx2xbp", "ixgbp", "ixgbpe", NULL };
 #endif
 
 #endif
-- 
1.8.1.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 7/7] staging/silicom/bypasslib: Move opening brace to previous line
  2013-05-23 20:51 [PATCH 1/7] staging/silicom/bypasslib: Reformat comments Lisa Nguyen
                   ` (4 preceding siblings ...)
  2013-05-23 20:54 ` [PATCH 6/7] staging/silicom/bypasslib: Remove extra space before line Lisa Nguyen
@ 2013-05-23 20:54 ` Lisa Nguyen
  2013-05-23 22:42 ` [PATCH 1/7] staging/silicom/bypasslib: Reformat comments Joe Perches
  6 siblings, 0 replies; 8+ messages in thread
From: Lisa Nguyen @ 2013-05-23 20:54 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel

Moved opening brace to previous line to resolve checkpatch errors and
meet kernel coding standards in bplibk.h

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
---
 drivers/staging/silicom/bypasslib/bplibk.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/silicom/bypasslib/bplibk.h b/drivers/staging/silicom/bypasslib/bplibk.h
index f88db4a..b31694f 100644
--- a/drivers/staging/silicom/bypasslib/bplibk.h
+++ b/drivers/staging/silicom/bypasslib/bplibk.h
@@ -31,8 +31,8 @@
 #define EXPORT_SYMBOL_NOVERS EXPORT_SYMBOL
 
 #ifdef BP_VENDOR_SUPPORT
-char *bp_desc_array[] =
-{ "e1000bp", "e1000bpe", "slcm5700", "bnx2xbp", "ixgbp", "ixgbpe", NULL };
+char *bp_desc_array[] = { "e1000bp", "e1000bpe", "slcm5700",
+			"bnx2xbp", "ixgbp", "ixgbpe", NULL };
 #endif
 
 #endif
-- 
1.8.1.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/7] staging/silicom/bypasslib: Reformat comments
  2013-05-23 20:51 [PATCH 1/7] staging/silicom/bypasslib: Reformat comments Lisa Nguyen
                   ` (5 preceding siblings ...)
  2013-05-23 20:54 ` [PATCH 7/7] staging/silicom/bypasslib: Move opening brace to previous line Lisa Nguyen
@ 2013-05-23 22:42 ` Joe Perches
  6 siblings, 0 replies; 8+ messages in thread
From: Joe Perches @ 2013-05-23 22:42 UTC (permalink / raw)
  To: Lisa Nguyen; +Cc: gregkh, linux-kernel

On Thu, 2013-05-23 at 13:51 -0700, Lisa Nguyen wrote:
> Resolved the C99 comment style issue by reformatting existing comments 
> to meet kernel coding standards in bp_ioctl.h
[]
> diff --git a/drivers/staging/silicom/bypasslib/bp_ioctl.h b/drivers/staging/silicom/bypasslib/bp_ioctl.h
[]
> -#define BP_CAP                   0x01	//BIT_0
[...]
> +#define BP_CAP                   0x01	/* BIT_0 */

Better to use the more self-documenting

#define BP_CAP		BIT(0)

etc...  with out any comment at all.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-05-23 22:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-23 20:51 [PATCH 1/7] staging/silicom/bypasslib: Reformat comments Lisa Nguyen
2013-05-23 20:52 ` [PATCH 2/7] staging/silicom/bypasslib: Fix code indentation errors Lisa Nguyen
2013-05-23 20:52 ` [PATCH 3/7] staging/silicom/bypasslib: Add space around == Lisa Nguyen
2013-05-23 20:53 ` [PATCH 4/7] staging/silicom/bypasslib: Add space around && Lisa Nguyen
2013-05-23 20:53 ` [PATCH 5/7] staging/silicom/bypasslib: Add space around || Lisa Nguyen
2013-05-23 20:54 ` [PATCH 6/7] staging/silicom/bypasslib: Remove extra space before line Lisa Nguyen
2013-05-23 20:54 ` [PATCH 7/7] staging/silicom/bypasslib: Move opening brace to previous line Lisa Nguyen
2013-05-23 22:42 ` [PATCH 1/7] staging/silicom/bypasslib: Reformat comments Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®