Skip to contentSkip to conversation

staging: vt6655: Rename `by_preamble_type` parameter

PATCH Superseded Karolina Drobnik 3 participants 6 messages Oct 20, 2021 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: vt6655: Rename `by_preamble_type` parameter

Drop by prefix in the first parameter of bb_get_frame_time function. As the original argument, byPreambleType, was renamed to preamble_type, the parameter referring to it is now renamed to match the new naming convention.
Update bb_get_frame_time comment to reflect that change.

This patch is a follow-up work to this commit:
Commit 548b6d7ebfa4 ("staging: vt6655: Rename byPreambleType field")

---
 drivers/staging/vt6655/baseband.c | 6 +++---
 drivers/staging/vt6655/baseband.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/vt6655/baseband.c +3 -3
index 5efca92f1f18..8f9177db6663 100644
@@ -1691,7 +1691,7 @@ static const unsigned short awc_frame_time[MAX_RATE] = {
  *
  * Parameters:
  *  In:
- *      by_preamble_type  - Preamble Type
+ *      preamble_type     - Preamble Type
  *      by_pkt_type        - PK_TYPE_11A, PK_TYPE_11B, PK_TYPE_11GB, PK_TYPE_11GA
  *      cb_frame_length   - Baseband Type
  *      tx_rate           - Tx Rate
@@ -1700,7 +1700,7 @@ static const unsigned short awc_frame_time[MAX_RATE] = {
  * Return Value: FrameTime
  *
  */
-unsigned int bb_get_frame_time(unsigned char by_preamble_type,
+unsigned int bb_get_frame_time(unsigned char preamble_type,
 			       unsigned char by_pkt_type,
 			       unsigned int cb_frame_length,
 			       unsigned short tx_rate)
@@ -1717,7 +1717,7 @@ unsigned int bb_get_frame_time(unsigned char by_preamble_type,
 	rate = (unsigned int)awc_frame_time[rate_idx];
 
 	if (rate_idx <= 3) {		    /* CCK mode */
-		if (by_preamble_type == 1) /* Short */
+		if (preamble_type == 1) /* Short */
 			preamble = 96;
 		else
 			preamble = 192;
drivers/staging/vt6655/baseband.h +1 -1
index 0a30afaa7cc3..15b2802ed727 100644
@@ -44,7 +44,7 @@
 #define TOP_RATE_2M         0x00200000
 #define TOP_RATE_1M         0x00100000
 
-unsigned int bb_get_frame_time(unsigned char by_preamble_type,
+unsigned int bb_get_frame_time(unsigned char preamble_type,
 			       unsigned char by_pkt_type,
 			       unsigned int cb_frame_length,
 			       unsigned short w_rate);
Signature · 1 line
2.30.2
#1 lore raw
Quoted 8 lines · Karolina Drobnik

Drop by prefix in the first parameter of bb_get_frame_time function. As the original argument, byPreambleType, was renamed to preamble_type, the parameter referring to it is now renamed to match the new naming convention.
Update bb_get_frame_time comment to reflect that change.

This patch is a follow-up work to this commit:
Commit 548b6d7ebfa4 ("staging: vt6655: Rename byPreambleType field")

This is not going to be practical. If the previous patch is accepted, then this it not needed. If the previous patch is not yet accepted, then there needs to be a vn+1 putting the patches together into a series.

Quoted 11 lines
---
 drivers/staging/vt6655/baseband.c | 6 +++---
 drivers/staging/vt6655/baseband.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/vt6655/baseband.c +0 -0
index 5efca92f1f18..8f9177db6663 100644

drivers/staging/vt6655/baseband.c static const unsigned short awc_frame_time[MAX_RATE] = { · line 1695

Quoted 6 lines
drivers/staging/vt6655/baseband.c +1 -1
@@ -1691,7 +1691,7 @@ static const unsigned short awc_frame_time[MAX_RATE] = {
  *
  * Parameters:
  *  In:
- *      by_preamble_type  - Preamble Type
+ *      preamble_type     - Preamble Type
  *      by_pkt_type        - PK_TYPE_11A, PK_TYPE_11B, PK_TYPE_11GB, PK_TYPE_11GA

In the realm of small cleanups to this driver, the extra space in front of the - above is a bit annoying.

Quoted 12 lines
drivers/staging/vt6655/baseband.c +1 -1
  *      cb_frame_length   - Baseband Type
  *      tx_rate           - Tx Rate
@@ -1700,7 +1700,7 @@ static const unsigned short awc_frame_time[MAX_RATE] = {
  * Return Value: FrameTime
  *
  */
-unsigned int bb_get_frame_time(unsigned char by_preamble_type,
+unsigned int bb_get_frame_time(unsigned char preamble_type,
 			       unsigned char by_pkt_type,
 			       unsigned int cb_frame_length,
 			       unsigned short tx_rate)

drivers/staging/vt6655/baseband.c unsigned int bb_get_frame_time(unsigned char by_preamble_type, · line 1720

Quoted 5 lines
drivers/staging/vt6655/baseband.c +1 -1
@@ -1717,7 +1717,7 @@ unsigned int bb_get_frame_time(unsigned char by_preamble_type,
 	rate = (unsigned int)awc_frame_time[rate_idx];
 
 	if (rate_idx <= 3) {		    /* CCK mode */
-		if (by_preamble_type == 1) /* Short */
+		if (preamble_type == 1) /* Short */

I hope you will get around to replacing the 1 by the appropriate constant and removing the "Short" comment.

julia

Quoted 24 lines
drivers/staging/vt6655/baseband.c +0 -0
 			preamble = 96;
 		else
 			preamble = 192;
drivers/staging/vt6655/baseband.h +1 -2
index 0a30afaa7cc3..15b2802ed727 100644
@@ -44,7 +44,7 @@
 #define TOP_RATE_2M         0x00200000
 #define TOP_RATE_1M         0x00100000
 
-unsigned int bb_get_frame_time(unsigned char by_preamble_type,
+unsigned int bb_get_frame_time(unsigned char preamble_type,
 			       unsigned char by_pkt_type,
 			       unsigned int cb_frame_length,
 			       unsigned short w_rate);
--

2.30.2

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20211020084033.414994-1-karolinadrobnik%40gmail.com.

#2 lore raw
Quoted 11 lines · Julia Lawall
Quoted 9 lines · Karolina Drobnik

Drop by prefix in the first parameter of bb_get_frame_time function.
As the original argument, byPreambleType, was renamed to preamble_type,
the parameter referring to it is now renamed to match the new naming
convention.
Update bb_get_frame_time comment to reflect that change.

Quoted 6 lines
Quoted 3 lines

This patch is a follow-up work to this commit:
Commit 548b6d7ebfa4 ("staging: vt6655: Rename byPreambleType
field")

This is not going to be practical. If the previous patch is accepted, then this it not needed.

This change was there before but Greg told me to do only one logical change per patch (which was a struct member rename), so I reverted it. I believe this is needed because this parameter still uses Hungarian notation, which is against the LK coding style. Also, it makes sense to update the name given my previous change.

Quoted 1 line

there needs to be a vn+1 putting the patches together into a series.

I didn't know that it should be send this way, especially given the fact that Outreachy applicants should first get 3-5 patches out before creating a patchset. Or has something changed in this regard?

Quoted 4 lines
Quoted 4 lines
drivers/staging/vt6655/baseband.c +0 -0
@@ -1691,7 +1691,7 @@ static const unsigned short
 awc_frame_time[MAX_RATE] = {
  *
  * Parameters:
Quoted 8 lines
Quoted 5 lines
drivers/staging/vt6655/baseband.c +1 -1
  *  In:
- *      by_preamble_type  - Preamble Type
+ *      preamble_type     - Preamble Type
  *      by_pkt_type        - PK_TYPE_11A, PK_TYPE_11B,

PK_TYPE_11GB, PK_TYPE_11GA

In the realm of small cleanups to this driver, the extra space in front of the - above is a bit annoying.

I can add this in but will that still count as a one logical change? I described the comment update, will that suffice?

Quoted 10 lines

drivers/staging/vt6655/baseband.c unsigned int bb_get_frame_time(unsigned char · line 1721

Quoted 7 lines
drivers/staging/vt6655/baseband.c +1 -1
@@ -1717,7 +1717,7 @@ unsigned int bb_get_frame_time(unsigned char
 by_preamble_type,
        rate = (unsigned int)awc_frame_time[rate_idx];
 
        if (rate_idx <= 3) {                /* CCK mode */
-               if (by_preamble_type == 1) /* Short */
+               if (preamble_type == 1) /* Short */

I hope you will get around to replacing the 1 by the appropriate constant and removing the "Short" comment.

I plan to do so after correcting the name variable.

Quoted 10 lines · Greg KH
Quoted 9 lines · Karolina Drobnik

Drop by prefix in the first parameter of bb_get_frame_time function.
As the original argument, byPreambleType, was renamed to preamble_type,
the parameter referring to it is now renamed to match the new naming
convention.
Update bb_get_frame_time comment to reflect that change.

Quoted 7 lines
Quoted 3 lines

This patch is a follow-up work to this commit:
Commit 548b6d7ebfa4 ("staging: vt6655: Rename byPreambleType
field")

There is no need for these two lines in the changelog text. They can go
below --- if you want to have them.

Thank you for clarifying this. I've been following the Submitting Patches docs[1] and thought this is needed.

Thanks,
Karolina
-------------------------------------------------------------------
[1]:
https://elixir.bootlin.com/linux/latest/source/Documentation/process/submitting-patches.rst#L106

#3 lore raw
Quoted 16 lines · Karolina Drobnik
Quoted 15 lines · Julia Lawall
Quoted 12 lines · Karolina Drobnik

Drop by prefix in the first parameter of bb_get_frame_time function.
As the original argument, byPreambleType, was renamed to preamble_type,
the parameter referring to it is now renamed to match the new naming
convention.
Update bb_get_frame_time comment to reflect that change.

This patch is a follow-up work to this commit:
Commit 548b6d7ebfa4 ("staging: vt6655: Rename byPreambleType
field")

Quoted 8 lines
Quoted 2 lines

This is not going to be practical. If the previous patch is accepted, then this it not needed.

This change was there before but Greg told me to do only one logical change per patch (which was a struct member rename), so I reverted it. I believe this is needed because this parameter still uses Hungarian notation, which is against the LK coding style. Also, it makes sense to update the name given my previous change.

Sorry, I think I was not clear. It's not practical to explain constraints on other patches in the log message.

Quoted 6 lines
Quoted 2 lines

there needs to be a vn+1 putting the patches together into a series.

I didn't know that it should be send this way, especially given the fact that Outreachy applicants should first get 3-5 patches out before creating a patchset. Or has something changed in this regard?

I think that the 3-5 rule is not that important. The important thing is that if you want to make two different changes on the same file, either the first one has to be accepted before you submit the second one, or they have to be in a series.

Quoted 13 lines
Quoted 4 lines
Quoted 4 lines
drivers/staging/vt6655/baseband.c +0 -0
@@ -1691,7 +1691,7 @@ static const unsigned short
 awc_frame_time[MAX_RATE] = {
  *
  * Parameters:
Quoted 8 lines
Quoted 5 lines
drivers/staging/vt6655/baseband.c +1 -1
  *  In:
- *      by_preamble_type  - Preamble Type
+ *      preamble_type     - Preamble Type
  *      by_pkt_type        - PK_TYPE_11A, PK_TYPE_11B,

PK_TYPE_11GB, PK_TYPE_11GA

In the realm of small cleanups to this driver, the extra space in front of the - above is a bit annoying.

Quoted 1 line

I can add this in but will that still count as a one logical change?

No. It's a different change. It's just a small whitespace issue, but it's not triggered by the other changes you have made.

julia

Quoted 47 lines

I described the comment update, will that suffice?

Quoted 10 lines

drivers/staging/vt6655/baseband.c unsigned int bb_get_frame_time(unsigned char · line 1721

Quoted 7 lines
drivers/staging/vt6655/baseband.c +1 -1
@@ -1717,7 +1717,7 @@ unsigned int bb_get_frame_time(unsigned char
 by_preamble_type,
        rate = (unsigned int)awc_frame_time[rate_idx];
 
        if (rate_idx <= 3) {                /* CCK mode */
-               if (by_preamble_type == 1) /* Short */
+               if (preamble_type == 1) /* Short */

I hope you will get around to replacing the 1 by the appropriate constant and removing the "Short" comment.

I plan to do so after correcting the name variable.

Quoted 10 lines · Greg KH
Quoted 9 lines · Karolina Drobnik

Drop by prefix in the first parameter of bb_get_frame_time function.
As the original argument, byPreambleType, was renamed to preamble_type,
the parameter referring to it is now renamed to match the new naming
convention.
Update bb_get_frame_time comment to reflect that change.

Quoted 7 lines
Quoted 3 lines

This patch is a follow-up work to this commit:
Commit 548b6d7ebfa4 ("staging: vt6655: Rename byPreambleType
field")

There is no need for these two lines in the changelog text. They can go
below --- if you want to have them.

Thank you for clarifying this. I've been following the Submitting Patches docs[1] and thought this is needed.

Thanks,
Karolina
-------------------------------------------------------------------
[1]:
https://elixir.bootlin.com/linux/latest/source/Documentation/process/submitting-patches.rst#L106

#4 lore raw
Quoted 32 lines · Julia Lawall
Quoted 20 lines · Karolina Drobnik
Quoted 11 lines · Julia Lawall
Quoted 9 lines · Karolina Drobnik

Drop by prefix in the first parameter of bb_get_frame_time function.
As the original argument, byPreambleType, was renamed to preamble_type,
the parameter referring to it is now renamed to match the new naming
convention.
Update bb_get_frame_time comment to reflect that change.

Quoted 7 lines
Quoted 4 lines

This patch is a follow-up work to this commit:
    Commit 548b6d7ebfa4 ("staging: vt6655: Rename
byPreambleType
field")

This is not going to be practical.  If the previous patch is accepted, then this it not needed.

Quoted 9 lines

This change was there before but Greg told me to do only one logical
change per patch (which was a struct member rename), so I reverted it.
I believe this is needed because this parameter still uses Hungarian
notation, which is against the LK coding style. Also, it makes sense to
update the name given my previous change.

Quoted 3 lines

Sorry, I think I was not clear.  It's not practical to explain constraints
on other patches in the log message.

Oh, I see. I thought about this log message as "why" but now, when I come think of it, just saying it's about the Hungarian notation should be enough. I'll correct the log message, thank you.

Quoted 7 lines

The important thing is
that if you want to make two different changes on the same file, either
the first one has to be accepted before you submit the second one, or they
have to be in a series.

I see, thanks for clarification.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

I can add this in but will that still count as a one logical change?

No.  It's a different change.  It's just a small whitespace issue, but
it's not triggered by the other changes you have made.

Ok, I'll submit a separate patch for it later on.

Thanks,
Karolina

maintainer
#5 lore raw
In reply to Karolina Drobnik
Quoted 8 lines · Karolina Drobnik

Drop by prefix in the first parameter of bb_get_frame_time function. As the original argument, byPreambleType, was renamed to preamble_type, the parameter referring to it is now renamed to match the new naming convention.
Update bb_get_frame_time comment to reflect that change.

This patch is a follow-up work to this commit:
Commit 548b6d7ebfa4 ("staging: vt6655: Rename byPreambleType field")

There is no need for these two lines in the changelog text. They can go below --- if you want to have them.

But, as the above commit is already in my tree, there's no need for this information at all, right?

thanks,

greg k-h