* [PATCH 0/2] staging: rtlwifi: Modify bool operations and clean up spacing
@ 2018-11-01 4:03 Maya Nakamura
2018-11-01 4:04 ` [PATCH 1/2] staging: rtlwifi: Replace 1 with true and remove comparison for bool Maya Nakamura
2018-11-01 4:06 ` [PATCH 2/2] staging: rtlwifi: Change line and comment spacing Maya Nakamura
0 siblings, 2 replies; 5+ messages in thread
From: Maya Nakamura @ 2018-11-01 4:03 UTC (permalink / raw)
To: gregkh, outreachy-kernel
This patchset modifies bool assignments of 1 and a comparison with 1. It
adds blank lines after if's and spaces before and after comments. It also
changes line endings.
Maya Nakamura (2):
staging: rtlwifi: Replace 1 with true and remove comparison for bool
staging: rtlwifi: Change line and comment spacing
drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c | 12 ++++++------
drivers/staging/rtlwifi/phydm/phydm_ccx.c | 12 +++++++-----
2 files changed, 13 insertions(+), 11 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] staging: rtlwifi: Replace 1 with true and remove comparison for bool
2018-11-01 4:03 [PATCH 0/2] staging: rtlwifi: Modify bool operations and clean up spacing Maya Nakamura
@ 2018-11-01 4:04 ` Maya Nakamura
2018-11-01 4:06 ` [PATCH 2/2] staging: rtlwifi: Change line and comment spacing Maya Nakamura
1 sibling, 0 replies; 5+ messages in thread
From: Maya Nakamura @ 2018-11-01 4:04 UTC (permalink / raw)
To: gregkh, outreachy-kernel
Replace 1 with true for bool assignments and remove a comparison of a bool
with 1. Issues found by Coccinelle's semantic patch results for
boolinit.cocci.
Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
---
drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c | 2 +-
drivers/staging/rtlwifi/phydm/phydm_ccx.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c b/drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c
index d6cea73fa185..7853031ee91f 100644
--- a/drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c
+++ b/drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c
@@ -555,7 +555,7 @@ void phydm_lamode_trigger_setting(void *dm_void, char input[][16], u32 *_used,
output + used, out_len - used,
"{En} {0:BB,1:BB_MAC,2:RF0,3:RF1,4:MAC}\n {BB:dbg_port[bit],BB_MAC:0-ok/1-fail/2-cca,MAC:ref} {DMA type} {TrigTime}\n {polling_time/ref_mask} {dbg_port} {0:P_Edge, 1:N_Edge} {SpRate:0-80M,1-40M,2-20M} {Capture num}\n");
/**/
- } else if (is_enable_la_mode == 1) {
+ } else if (is_enable_la_mode) {
PHYDM_SSCANF(input[2], DCMD_DECIMAL, &var1[1]);
trig_mode = (u8)var1[1];
diff --git a/drivers/staging/rtlwifi/phydm/phydm_ccx.c b/drivers/staging/rtlwifi/phydm/phydm_ccx.c
index 57138606d9be..f292b23a2db1 100644
--- a/drivers/staging/rtlwifi/phydm/phydm_ccx.c
+++ b/drivers/staging/rtlwifi/phydm/phydm_ccx.c
@@ -338,7 +338,7 @@ bool phydm_check_nhm_ready(void *dm_void)
ODM_delay_ms(1);
if (odm_get_bb_reg(dm, ODM_REG_NHM_DUR_READY_11AC,
BIT(17))) {
- ret = 1;
+ ret = true;
break;
}
}
@@ -351,7 +351,7 @@ bool phydm_check_nhm_ready(void *dm_void)
ODM_delay_ms(1);
if (odm_get_bb_reg(dm, ODM_REG_NHM_DUR_READY_11AC,
BIT(17))) {
- ret = 1;
+ ret = true;
break;
}
}
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] staging: rtlwifi: Change line and comment spacing
2018-11-01 4:03 [PATCH 0/2] staging: rtlwifi: Modify bool operations and clean up spacing Maya Nakamura
2018-11-01 4:04 ` [PATCH 1/2] staging: rtlwifi: Replace 1 with true and remove comparison for bool Maya Nakamura
@ 2018-11-01 4:06 ` Maya Nakamura
2018-11-05 13:47 ` Greg KH
1 sibling, 1 reply; 5+ messages in thread
From: Maya Nakamura @ 2018-11-01 4:06 UTC (permalink / raw)
To: gregkh, outreachy-kernel
Add blank lines at the end of if statements and spaces before and after
comments. Edit statements so that the line does not end with an assignment
operator or a parenthesis. Remove a blank comment, too.
Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
---
drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c | 10 +++++-----
drivers/staging/rtlwifi/phydm/phydm_ccx.c | 8 +++++---
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c b/drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c
index 7853031ee91f..f94c9d19491e 100644
--- a/drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c
+++ b/drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c
@@ -551,10 +551,9 @@ void phydm_lamode_trigger_setting(void *dm_void, char input[][16], u32 *_used,
/*dbg_print("echo cmd input_num = %d\n", input_num);*/
if ((strcmp(input[1], help) == 0)) {
- PHYDM_SNPRINTF(
- output + used, out_len - used,
- "{En} {0:BB,1:BB_MAC,2:RF0,3:RF1,4:MAC}\n {BB:dbg_port[bit],BB_MAC:0-ok/1-fail/2-cca,MAC:ref} {DMA type} {TrigTime}\n {polling_time/ref_mask} {dbg_port} {0:P_Edge, 1:N_Edge} {SpRate:0-80M,1-40M,2-20M} {Capture num}\n");
- /**/
+ PHYDM_SNPRINTF(output + used,
+ out_len - used,
+ "{En} {0:BB,1:BB_MAC,2:RF0,3:RF1,4:MAC}\n {BB:dbg_port[bit],BB_MAC:0-ok/1-fail/2-cca,MAC:ref} {DMA type} {TrigTime}\n {polling_time/ref_mask} {dbg_port} {0:P_Edge, 1:N_Edge} {SpRate:0-80M,1-40M,2-20M} {Capture num}\n");
} else if (is_enable_la_mode) {
PHYDM_SSCANF(input[2], DCMD_DECIMAL, &var1[1]);
@@ -564,6 +563,7 @@ void phydm_lamode_trigger_setting(void *dm_void, char input[][16], u32 *_used,
PHYDM_SSCANF(input[3], DCMD_HEX, &var1[2]);
else
PHYDM_SSCANF(input[3], DCMD_DECIMAL, &var1[2]);
+
trig_sig_sel = var1[2];
PHYDM_SSCANF(input[4], DCMD_DECIMAL, &var1[3]);
@@ -575,7 +575,7 @@ void phydm_lamode_trigger_setting(void *dm_void, char input[][16], u32 *_used,
PHYDM_SSCANF(input[10], DCMD_DECIMAL, &var1[9]);
dma_data_sig_sel = (u8)var1[3];
- trigger_time_mu_sec = var1[4]; /*unit: us*/
+ trigger_time_mu_sec = var1[4]; /* unit: us */
adc_smp->la_mac_ref_mask = var1[5];
adc_smp->la_dbg_port = var1[6];
diff --git a/drivers/staging/rtlwifi/phydm/phydm_ccx.c b/drivers/staging/rtlwifi/phydm/phydm_ccx.c
index f292b23a2db1..80679a6d5047 100644
--- a/drivers/staging/rtlwifi/phydm/phydm_ccx.c
+++ b/drivers/staging/rtlwifi/phydm/phydm_ccx.c
@@ -317,7 +317,7 @@ void phydm_get_nhm_result(void *dm_void)
ccx_info->NHM_result[10] = (u8)((value32 & MASKBYTE2) >> 16);
ccx_info->NHM_result[11] = (u8)((value32 & MASKBYTE3) >> 24);
- /*Get NHM duration*/
+ /* Get NHM duration */
value32 = odm_read_4byte(dm, ODM_REG_NHM_CNT10_TO_CNT11_11N);
ccx_info->NHM_duration = (u16)(value32 & MASKLWORD);
}
@@ -331,8 +331,9 @@ bool phydm_check_nhm_ready(void *dm_void)
bool ret = false;
if (dm->support_ic_type & ODM_IC_11AC_SERIES) {
- value32 =
- odm_get_bb_reg(dm, ODM_REG_CLM_RESULT_11AC, MASKDWORD);
+ value32 = odm_get_bb_reg(dm,
+ ODM_REG_CLM_RESULT_11AC,
+ MASKDWORD);
for (i = 0; i < 200; i++) {
ODM_delay_ms(1);
@@ -356,6 +357,7 @@ bool phydm_check_nhm_ready(void *dm_void)
}
}
}
+
return ret;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] staging: rtlwifi: Change line and comment spacing
2018-11-01 4:06 ` [PATCH 2/2] staging: rtlwifi: Change line and comment spacing Maya Nakamura
@ 2018-11-05 13:47 ` Greg KH
2018-11-08 8:20 ` Maya Nakamura
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2018-11-05 13:47 UTC (permalink / raw)
To: Maya Nakamura; +Cc: outreachy-kernel
On Wed, Oct 31, 2018 at 09:06:27PM -0700, Maya Nakamura wrote:
> Add blank lines at the end of if statements and spaces before and after
> comments. Edit statements so that the line does not end with an assignment
> operator or a parenthesis. Remove a blank comment, too.
That is a lot of different things all in one patch. Please only do one
"logical" type of thing. This should be broken up into multiple patches
please.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] staging: rtlwifi: Change line and comment spacing
2018-11-05 13:47 ` Greg KH
@ 2018-11-08 8:20 ` Maya Nakamura
0 siblings, 0 replies; 5+ messages in thread
From: Maya Nakamura @ 2018-11-08 8:20 UTC (permalink / raw)
To: Greg KH; +Cc: outreachy-kernel
On Mon, Nov 05, 2018 at 02:47:35PM +0100, Greg KH wrote:
> On Wed, Oct 31, 2018 at 09:06:27PM -0700, Maya Nakamura wrote:
> > Add blank lines at the end of if statements and spaces before and after
> > comments. Edit statements so that the line does not end with an assignment
> > operator or a parenthesis. Remove a blank comment, too.
>
> That is a lot of different things all in one patch. Please only do one
> "logical" type of thing. This should be broken up into multiple patches
> please.
>
> thanks,
>
> greg k-h
Hi Greg,
Sorry for taking time to resubmit my correction! It is a new patchset
because you accepted a part of the previous patchset ([PATCH 0/2] staging:
rtlwifi: Modify bool operations and clean up spacing) on the 5th.
Thank you!
Maya
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-11-08 8:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-01 4:03 [PATCH 0/2] staging: rtlwifi: Modify bool operations and clean up spacing Maya Nakamura
2018-11-01 4:04 ` [PATCH 1/2] staging: rtlwifi: Replace 1 with true and remove comparison for bool Maya Nakamura
2018-11-01 4:06 ` [PATCH 2/2] staging: rtlwifi: Change line and comment spacing Maya Nakamura
2018-11-05 13:47 ` Greg KH
2018-11-08 8:20 ` Maya Nakamura
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.