2017-04-02 03:29:16

by Daniel Cashman

[permalink] [raw]
Subject: [PATCH] staging: vt6656: Fix spaces, char limit and embedded func name in print.

From: Dan Cashman <[email protected]>

Address errors and warning found in rf.c by checkpatch kernel style script.
Specifically, change spaces to tabs, split function arguments across a new
line to avoid 80 character limit, and remove use of embedded function name
in a dev_dbg() call.

Signed-off-by: Daniel Cashman <[email protected]>
---
drivers/staging/vt6656/rf.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 068c1c8..23581af 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -771,7 +771,7 @@ int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, u32 rate)
ret &= vnt_rf_write_embedded(priv, 0x015C0800);
} else {
dev_dbg(&priv->usb->dev,
- "@@@@ vnt_rf_set_txpower> 11G mode\n");
+ "@@@@ %s> 11G mode\n", __func__);

power_setting = ((0x3f - power) << 20) | (0x7 << 8);

@@ -876,7 +876,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr1, length1);

vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
- MESSAGE_REQUEST_RF_INIT, length1, array);
+ MESSAGE_REQUEST_RF_INIT, length1, array);

/* Channel Table 0 */
value = 0;
@@ -889,7 +889,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);

vnt_control_out(priv, MESSAGE_TYPE_WRITE,
- value, MESSAGE_REQUEST_RF_CH0, length, array);
+ value, MESSAGE_REQUEST_RF_CH0, length, array);

length2 -= length;
value += length;
@@ -907,7 +907,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr3, length);

vnt_control_out(priv, MESSAGE_TYPE_WRITE,
- value, MESSAGE_REQUEST_RF_CH1, length, array);
+ value, MESSAGE_REQUEST_RF_CH1, length, array);

length3 -= length;
value += length;
@@ -924,7 +924,7 @@ void vnt_rf_table_download(struct vnt_private *priv)

/* Init Table 2 */
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
- 0, MESSAGE_REQUEST_RF_INIT2, length1, array);
+ 0, MESSAGE_REQUEST_RF_INIT2, length1, array);

/* Channel Table 0 */
value = 0;
@@ -937,7 +937,8 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);

vnt_control_out(priv, MESSAGE_TYPE_WRITE,
- value, MESSAGE_REQUEST_RF_CH2, length, array);
+ value, MESSAGE_REQUEST_RF_CH2,
+ length, array);

length2 -= length;
value += length;
--
2.7.4


2017-04-02 06:02:36

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] staging: vt6656: Fix spaces, char limit and embedded func name in print.

On Sat, Apr 01, 2017 at 08:29:00PM -0700, Daniel Cashman wrote:
> From: Dan Cashman <[email protected]>
>
> Address errors and warning found in rf.c by checkpatch kernel style script.
> Specifically, change spaces to tabs, split function arguments across a new
> line to avoid 80 character limit, and remove use of embedded function name
> in a dev_dbg() call.

That's a lot of different things all in one patch, please break this up
into doing only one type of thing per patch.

thanks,

greg k-h

2017-04-02 20:48:41

by Daniel Cashman

[permalink] [raw]
Subject: [Patch v2 0/3] staging: vt6656: Fix checkpatch style violations.

From: Dan Cashman <[email protected]>

This patchset fixes the checkpatch-reported kernel style guide violations for
rf.c in the vt6656 staging area. Specifically, the first patch fixes the
errors, which are all spaces -> tabs conversions, and the second and third fix the warnings, which are an embedded function name in a debug statement and an
exceeded 80-char line, respectively.

Signed-off-by: Daniel Cashman <[email protected]>


Dan Cashman (3):
staging: vt6656: convert spaces to tabs for rf.c
staging: vt6656: Replace embedded function name with __func__ in rf.c
staging: vt6656: Split arguments to avoid 80-char violation in rf.c

drivers/staging/vt6656/rf.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

--
2.7.4

2017-04-02 20:48:47

by Daniel Cashman

[permalink] [raw]
Subject: [Patch v2 1/3] staging: vt6656: convert spaces to tabs for rf.c

From: Dan Cashman <[email protected]>

Address checkpatch errors encountered in rf.c by removing use of spaces
and replacing with properly aligned tabs.

Signed-off-by: Daniel Cashman <[email protected]>
---
drivers/staging/vt6656/rf.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 068c1c8..1e19579 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -876,7 +876,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr1, length1);

vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
- MESSAGE_REQUEST_RF_INIT, length1, array);
+ MESSAGE_REQUEST_RF_INIT, length1, array);

/* Channel Table 0 */
value = 0;
@@ -889,7 +889,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);

vnt_control_out(priv, MESSAGE_TYPE_WRITE,
- value, MESSAGE_REQUEST_RF_CH0, length, array);
+ value, MESSAGE_REQUEST_RF_CH0, length, array);

length2 -= length;
value += length;
@@ -907,7 +907,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr3, length);

vnt_control_out(priv, MESSAGE_TYPE_WRITE,
- value, MESSAGE_REQUEST_RF_CH1, length, array);
+ value, MESSAGE_REQUEST_RF_CH1, length, array);

length3 -= length;
value += length;
@@ -924,7 +924,7 @@ void vnt_rf_table_download(struct vnt_private *priv)

/* Init Table 2 */
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
- 0, MESSAGE_REQUEST_RF_INIT2, length1, array);
+ 0, MESSAGE_REQUEST_RF_INIT2, length1, array);

/* Channel Table 0 */
value = 0;
@@ -937,7 +937,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);

vnt_control_out(priv, MESSAGE_TYPE_WRITE,
- value, MESSAGE_REQUEST_RF_CH2, length, array);
+ value, MESSAGE_REQUEST_RF_CH2, length, array);

length2 -= length;
value += length;
--
2.7.4

2017-04-02 20:48:45

by Daniel Cashman

[permalink] [raw]
Subject: [Patch v2 2/3] staging: vt6656: Replace embedded function name with __func__ in rf.c

From: Dan Cashman <[email protected]>

Change embedded function name in vnt_rf_set_txpower with %s format with
__func__ argument to make it consistent with other part of if-else and
kernel coding style standards as reported by checkpatch.

Signed-off-by: Daniel Cashman <[email protected]>
---
drivers/staging/vt6656/rf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 1e19579..d157e5c 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -771,7 +771,7 @@ int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, u32 rate)
ret &= vnt_rf_write_embedded(priv, 0x015C0800);
} else {
dev_dbg(&priv->usb->dev,
- "@@@@ vnt_rf_set_txpower> 11G mode\n");
+ "@@@@ %s> 11G mode\n", __func__);

power_setting = ((0x3f - power) << 20) | (0x7 << 8);

--
2.7.4

2017-04-02 20:49:11

by Daniel Cashman

[permalink] [raw]
Subject: [Patch v2 3/3] staging: vt6656: Split arguments to avoid 80-char violation in rf.c

From: Dan Cashman <[email protected]>

Wrap arguments of call to vnt_control_out() to avoid exceeding 80
character limit, but maintain alignment.

Signed-off-by: Daniel Cashman <[email protected]>
---
drivers/staging/vt6656/rf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index d157e5c..23581af 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -937,7 +937,8 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);

vnt_control_out(priv, MESSAGE_TYPE_WRITE,
- value, MESSAGE_REQUEST_RF_CH2, length, array);
+ value, MESSAGE_REQUEST_RF_CH2,
+ length, array);

length2 -= length;
value += length;
--
2.7.4