* [PATCH 0/3] staging: vt6655: Remove else after return
@ 2020-10-31 9:00 Marcos Antonio de Jesus Filho
2020-10-31 9:00 ` [PATCH 1/3] staging: vt6655: Remove useless else Marcos Antonio de Jesus Filho
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Marcos Antonio de Jesus Filho @ 2020-10-31 9:00 UTC (permalink / raw)
To: Forest Bond, Greg Kroah-Hartman, outreachy-kernel
This patchset removes multiples useless else statements after return statements. Reported by check patch.
Observation
-----------
After cleaning up the code I noticed that the code from 530 to 548 repeats at 551,569 and that it can be removed and one of the conditional statements can be simplified.
Marcos Antonio de Jesus Filho (3):
staging: vt6655: Remove useless else
staging: vt6655: Remove useless else
staging: vt6655: Remove useless else
drivers/staging/vt6655/rxtx.c | 99 ++++++++++++++++++-----------------
1 file changed, 51 insertions(+), 48 deletions(-)
--
2.28.0
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH 1/3] staging: vt6655: Remove useless else 2020-10-31 9:00 [PATCH 0/3] staging: vt6655: Remove else after return Marcos Antonio de Jesus Filho @ 2020-10-31 9:00 ` Marcos Antonio de Jesus Filho 2020-10-31 9:01 ` [PATCH 2/3] " Marcos Antonio de Jesus Filho ` (2 subsequent siblings) 3 siblings, 0 replies; 10+ messages in thread From: Marcos Antonio de Jesus Filho @ 2020-10-31 9:00 UTC (permalink / raw) To: Forest Bond, Greg Kroah-Hartman, outreachy-kernel The else statement is not useful due to the presence of a return statement on the if block. Remove the else statement and adjust the indentation of the code. Reported by checkpatch. Signed-off-by: Marcos Antonio de Jesus Filho <mdejesusfilho@gmail.com> --- drivers/staging/vt6655/rxtx.c | 48 ++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 477d19314634..c1da54314fbd 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -444,6 +444,9 @@ s_uFillDataHead( return 0; if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { + /* Auto Fallback */ + struct vnt_tx_datahead_g_fb *buf = pTxDataHead; + if (byFBOption == AUTO_FB_NONE) { struct vnt_tx_datahead_g *buf = pTxDataHead; /* Get SignalField, ServiceField & Length */ @@ -477,31 +480,30 @@ s_uFillDataHead( buf->time_stamp_off_b = vnt_time_stamp_off(pDevice, pDevice->byTopCCKBasicRate); return buf->duration_a; - } else { - /* Auto Fallback */ - struct vnt_tx_datahead_g_fb *buf = pTxDataHead; - /* Get SignalField, ServiceField & Length */ - vnt_get_phy_field(pDevice, cbFrameLength, wCurrentRate, - byPktType, &buf->a); - - vnt_get_phy_field(pDevice, cbFrameLength, - pDevice->byTopCCKBasicRate, - PK_TYPE_11B, &buf->b); - /* Get Duration and TimeStamp */ - buf->duration_a = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); - buf->duration_b = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, PK_TYPE_11B, - pDevice->byTopCCKBasicRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); - buf->duration_a_f0 = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F0, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); - buf->duration_a_f1 = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F1, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); + } - buf->time_stamp_off_a = vnt_time_stamp_off(pDevice, wCurrentRate); - buf->time_stamp_off_b = vnt_time_stamp_off(pDevice, pDevice->byTopCCKBasicRate); + /* Get SignalField, ServiceField & Length */ + vnt_get_phy_field(pDevice, cbFrameLength, wCurrentRate, + byPktType, &buf->a); - return buf->duration_a; - } /* if (byFBOption == AUTO_FB_NONE) */ + vnt_get_phy_field(pDevice, cbFrameLength, + pDevice->byTopCCKBasicRate, + PK_TYPE_11B, &buf->b); + /* Get Duration and TimeStamp */ + buf->duration_a = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, + wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); + buf->duration_b = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, PK_TYPE_11B, + pDevice->byTopCCKBasicRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); + buf->duration_a_f0 = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F0, cbFrameLength, byPktType, + wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); + buf->duration_a_f1 = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F1, cbFrameLength, byPktType, + wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); + + buf->time_stamp_off_a = vnt_time_stamp_off(pDevice, wCurrentRate); + buf->time_stamp_off_b = vnt_time_stamp_off(pDevice, pDevice->byTopCCKBasicRate); + + return buf->duration_a; + /* if (byFBOption == AUTO_FB_NONE) */ } else if (byPktType == PK_TYPE_11A) { if (byFBOption != AUTO_FB_NONE) { /* Auto Fallback */ -- 2.28.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] staging: vt6655: Remove useless else 2020-10-31 9:00 [PATCH 0/3] staging: vt6655: Remove else after return Marcos Antonio de Jesus Filho 2020-10-31 9:00 ` [PATCH 1/3] staging: vt6655: Remove useless else Marcos Antonio de Jesus Filho @ 2020-10-31 9:01 ` Marcos Antonio de Jesus Filho 2020-10-31 9:01 ` [PATCH 3/3] " Marcos Antonio de Jesus Filho 2020-10-31 9:37 ` [Outreachy kernel] [PATCH 0/3] staging: vt6655: Remove else after return Julia Lawall 3 siblings, 0 replies; 10+ messages in thread From: Marcos Antonio de Jesus Filho @ 2020-10-31 9:01 UTC (permalink / raw) To: Forest Bond, Greg Kroah-Hartman, outreachy-kernel The else statement is not useful due to the presence of a return statement on the if block. Remove the else statement and adjust the indentation of the code. Reported by checkpatch. Signed-off-by: Marcos Antonio de Jesus Filho <mdejesusfilho@gmail.com> --- drivers/staging/vt6655/rxtx.c | 37 ++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index c1da54314fbd..9db4317f9a42 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -505,6 +505,8 @@ s_uFillDataHead( return buf->duration_a; /* if (byFBOption == AUTO_FB_NONE) */ } else if (byPktType == PK_TYPE_11A) { + struct vnt_tx_datahead_ab *buf = pTxDataHead; + if (byFBOption != AUTO_FB_NONE) { /* Auto Fallback */ struct vnt_tx_datahead_a_fb *buf = pTxDataHead; @@ -521,28 +523,27 @@ s_uFillDataHead( wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate); return buf->duration; - } else { - struct vnt_tx_datahead_ab *buf = pTxDataHead; - /* Get SignalField, ServiceField & Length */ - vnt_get_phy_field(pDevice, cbFrameLength, wCurrentRate, - byPktType, &buf->ab); + } - if (is_pspoll) { - __le16 dur = cpu_to_le16(pDevice->current_aid | BIT(14) | BIT(15)); + /* Get SignalField, ServiceField & Length */ + vnt_get_phy_field(pDevice, cbFrameLength, wCurrentRate, + byPktType, &buf->ab); - buf->duration = dur; - } else { - /* Get Duration and TimeStampOff */ - buf->duration = - cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, - cbLastFragmentSize, uMACfragNum, - byFBOption)); - } + if (is_pspoll) { + __le16 dur = cpu_to_le16(pDevice->current_aid | BIT(14) | BIT(15)); - buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate); - return buf->duration; + buf->duration = dur; + } else { + /* Get Duration and TimeStampOff */ + buf->duration = + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, + wCurrentRate, bNeedAck, uFragIdx, + cbLastFragmentSize, uMACfragNum, + byFBOption)); } + + buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate); + return buf->duration; } else { struct vnt_tx_datahead_ab *buf = pTxDataHead; /* Get SignalField, ServiceField & Length */ -- 2.28.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/3] staging: vt6655: Remove useless else 2020-10-31 9:00 [PATCH 0/3] staging: vt6655: Remove else after return Marcos Antonio de Jesus Filho 2020-10-31 9:00 ` [PATCH 1/3] staging: vt6655: Remove useless else Marcos Antonio de Jesus Filho 2020-10-31 9:01 ` [PATCH 2/3] " Marcos Antonio de Jesus Filho @ 2020-10-31 9:01 ` Marcos Antonio de Jesus Filho 2020-10-31 9:25 ` [Outreachy kernel] " Julia Lawall 2020-10-31 9:28 ` Julia Lawall 2020-10-31 9:37 ` [Outreachy kernel] [PATCH 0/3] staging: vt6655: Remove else after return Julia Lawall 3 siblings, 2 replies; 10+ messages in thread From: Marcos Antonio de Jesus Filho @ 2020-10-31 9:01 UTC (permalink / raw) To: Forest Bond, Greg Kroah-Hartman, outreachy-kernel The else statement is not useful due to the presence of a return statement on the if block. Remove the else statement, adjust the indentation of the code and remove useless return statement. Reported by checkpatch. Signed-off-by: Marcos Antonio de Jesus Filho <mdejesusfilho@gmail.com> --- drivers/staging/vt6655/rxtx.c | 38 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 9db4317f9a42..508e1bd7d76e 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -440,6 +440,8 @@ s_uFillDataHead( bool is_pspoll ) { + struct vnt_tx_datahead_ab *buf = pTxDataHead; + if (!pTxDataHead) return 0; @@ -544,29 +546,27 @@ s_uFillDataHead( buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate); return buf->duration; - } else { - struct vnt_tx_datahead_ab *buf = pTxDataHead; - /* Get SignalField, ServiceField & Length */ - vnt_get_phy_field(pDevice, cbFrameLength, wCurrentRate, - byPktType, &buf->ab); + } - if (is_pspoll) { - __le16 dur = cpu_to_le16(pDevice->current_aid | BIT(14) | BIT(15)); + /* Get SignalField, ServiceField & Length */ + vnt_get_phy_field(pDevice, cbFrameLength, wCurrentRate, + byPktType, &buf->ab); - buf->duration = dur; - } else { - /* Get Duration and TimeStampOff */ - buf->duration = - cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, byPktType, - wCurrentRate, bNeedAck, uFragIdx, - cbLastFragmentSize, uMACfragNum, - byFBOption)); - } + if (is_pspoll) { + __le16 dur = cpu_to_le16(pDevice->current_aid | BIT(14) | BIT(15)); - buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate); - return buf->duration; + buf->duration = dur; + } else { + /* Get Duration and TimeStampOff */ + buf->duration = + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, byPktType, + wCurrentRate, bNeedAck, uFragIdx, + cbLastFragmentSize, uMACfragNum, + byFBOption)); } - return 0; + + buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate); + return buf->duration; } static -- 2.28.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Outreachy kernel] [PATCH 3/3] staging: vt6655: Remove useless else 2020-10-31 9:01 ` [PATCH 3/3] " Marcos Antonio de Jesus Filho @ 2020-10-31 9:25 ` Julia Lawall 2020-10-31 9:28 ` Julia Lawall 1 sibling, 0 replies; 10+ messages in thread From: Julia Lawall @ 2020-10-31 9:25 UTC (permalink / raw) To: Marcos Antonio de Jesus Filho Cc: Forest Bond, Greg Kroah-Hartman, outreachy-kernel On Sat, 31 Oct 2020, Marcos Antonio de Jesus Filho wrote: > The else statement is not useful due to the presence of a return > statement on the if block. Remove the else statement, adjust the > indentation of the code and remove useless return statement. Reported by checkpatch. > > Signed-off-by: Marcos Antonio de Jesus Filho <mdejesusfilho@gmail.com> > --- > drivers/staging/vt6655/rxtx.c | 38 +++++++++++++++++------------------ > 1 file changed, 19 insertions(+), 19 deletions(-) > > diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c > index 9db4317f9a42..508e1bd7d76e 100644 > --- a/drivers/staging/vt6655/rxtx.c > +++ b/drivers/staging/vt6655/rxtx.c > @@ -440,6 +440,8 @@ s_uFillDataHead( > bool is_pspoll > ) > { > + struct vnt_tx_datahead_ab *buf = pTxDataHead; > + This part of the patch isn't related to what is described in the log message. julia > if (!pTxDataHead) > return 0; > > @@ -544,29 +546,27 @@ s_uFillDataHead( > > buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate); > return buf->duration; > - } else { > - struct vnt_tx_datahead_ab *buf = pTxDataHead; > - /* Get SignalField, ServiceField & Length */ > - vnt_get_phy_field(pDevice, cbFrameLength, wCurrentRate, > - byPktType, &buf->ab); > + } > > - if (is_pspoll) { > - __le16 dur = cpu_to_le16(pDevice->current_aid | BIT(14) | BIT(15)); > + /* Get SignalField, ServiceField & Length */ > + vnt_get_phy_field(pDevice, cbFrameLength, wCurrentRate, > + byPktType, &buf->ab); > > - buf->duration = dur; > - } else { > - /* Get Duration and TimeStampOff */ > - buf->duration = > - cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, byPktType, > - wCurrentRate, bNeedAck, uFragIdx, > - cbLastFragmentSize, uMACfragNum, > - byFBOption)); > - } > + if (is_pspoll) { > + __le16 dur = cpu_to_le16(pDevice->current_aid | BIT(14) | BIT(15)); > > - buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate); > - return buf->duration; > + buf->duration = dur; > + } else { > + /* Get Duration and TimeStampOff */ > + buf->duration = > + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, byPktType, > + wCurrentRate, bNeedAck, uFragIdx, > + cbLastFragmentSize, uMACfragNum, > + byFBOption)); > } > - return 0; > + > + buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate); > + return buf->duration; > } > > static > -- > 2.28.0 > > -- > 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 outreachy-kernel+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/a794bc3814ffac8027cef21e2993de67fa7e30d0.1604133727.git.mdejesusfilho%40gmail.com. > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Outreachy kernel] [PATCH 3/3] staging: vt6655: Remove useless else 2020-10-31 9:01 ` [PATCH 3/3] " Marcos Antonio de Jesus Filho 2020-10-31 9:25 ` [Outreachy kernel] " Julia Lawall @ 2020-10-31 9:28 ` Julia Lawall 2020-10-31 14:48 ` Marcos Antonio de Jesus Filho 1 sibling, 1 reply; 10+ messages in thread From: Julia Lawall @ 2020-10-31 9:28 UTC (permalink / raw) To: Marcos Antonio de Jesus Filho Cc: Forest Bond, Greg Kroah-Hartman, outreachy-kernel On Sat, 31 Oct 2020, Marcos Antonio de Jesus Filho wrote: > The else statement is not useful due to the presence of a return > statement on the if block. Remove the else statement, adjust the > indentation of the code and remove useless return statement. Reported by checkpatch. > > Signed-off-by: Marcos Antonio de Jesus Filho <mdejesusfilho@gmail.com> > --- > drivers/staging/vt6655/rxtx.c | 38 +++++++++++++++++------------------ > 1 file changed, 19 insertions(+), 19 deletions(-) > > diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c > index 9db4317f9a42..508e1bd7d76e 100644 > --- a/drivers/staging/vt6655/rxtx.c > +++ b/drivers/staging/vt6655/rxtx.c > @@ -440,6 +440,8 @@ s_uFillDataHead( > bool is_pspoll > ) > { > + struct vnt_tx_datahead_ab *buf = pTxDataHead; > + I'm not sure what was the goal of the above addition, but it also looks strange to declare the variable buf and then, on immediately the next line, not to use it. julia > if (!pTxDataHead) > return 0; > > @@ -544,29 +546,27 @@ s_uFillDataHead( > > buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate); > return buf->duration; > - } else { > - struct vnt_tx_datahead_ab *buf = pTxDataHead; > - /* Get SignalField, ServiceField & Length */ > - vnt_get_phy_field(pDevice, cbFrameLength, wCurrentRate, > - byPktType, &buf->ab); > + } > > - if (is_pspoll) { > - __le16 dur = cpu_to_le16(pDevice->current_aid | BIT(14) | BIT(15)); > + /* Get SignalField, ServiceField & Length */ > + vnt_get_phy_field(pDevice, cbFrameLength, wCurrentRate, > + byPktType, &buf->ab); > > - buf->duration = dur; > - } else { > - /* Get Duration and TimeStampOff */ > - buf->duration = > - cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, byPktType, > - wCurrentRate, bNeedAck, uFragIdx, > - cbLastFragmentSize, uMACfragNum, > - byFBOption)); > - } > + if (is_pspoll) { > + __le16 dur = cpu_to_le16(pDevice->current_aid | BIT(14) | BIT(15)); > > - buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate); > - return buf->duration; > + buf->duration = dur; > + } else { > + /* Get Duration and TimeStampOff */ > + buf->duration = > + cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, byPktType, > + wCurrentRate, bNeedAck, uFragIdx, > + cbLastFragmentSize, uMACfragNum, > + byFBOption)); > } > - return 0; > + > + buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate); > + return buf->duration; > } > > static > -- > 2.28.0 > > -- > 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 outreachy-kernel+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/a794bc3814ffac8027cef21e2993de67fa7e30d0.1604133727.git.mdejesusfilho%40gmail.com. > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Outreachy kernel] [PATCH 3/3] staging: vt6655: Remove useless else 2020-10-31 9:28 ` Julia Lawall @ 2020-10-31 14:48 ` Marcos Antonio de Jesus Filho 0 siblings, 0 replies; 10+ messages in thread From: Marcos Antonio de Jesus Filho @ 2020-10-31 14:48 UTC (permalink / raw) To: Julia Lawall; +Cc: Forest Bond, Greg Kroah-Hartman, outreachy-kernel On Sat, Oct 31, 2020 at 10:28:18AM +0100, Julia Lawall wrote: > > > On Sat, 31 Oct 2020, Marcos Antonio de Jesus Filho wrote: > > > The else statement is not useful due to the presence of a return > > statement on the if block. Remove the else statement, adjust the > > indentation of the code and remove useless return statement. Reported by checkpatch. > > > > Signed-off-by: Marcos Antonio de Jesus Filho <mdejesusfilho@gmail.com> > > --- > > drivers/staging/vt6655/rxtx.c | 38 +++++++++++++++++------------------ > > 1 file changed, 19 insertions(+), 19 deletions(-) > > > > diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c > > index 9db4317f9a42..508e1bd7d76e 100644 > > --- a/drivers/staging/vt6655/rxtx.c > > +++ b/drivers/staging/vt6655/rxtx.c > > @@ -440,6 +440,8 @@ s_uFillDataHead( > > bool is_pspoll > > ) > > { > > + struct vnt_tx_datahead_ab *buf = pTxDataHead; > > + > > I'm not sure what was the goal of the above addition, but it also looks > strange to declare the variable buf and then, on immediately the next > line, not to use it. The goal of this change is to make the fix and not introduce a build warning, because I can not mix variable declaration and code, otherwise I would get an "ISO C90 forbids mixed declarations and code in C" warning. Marcos ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Outreachy kernel] [PATCH 0/3] staging: vt6655: Remove else after return 2020-10-31 9:00 [PATCH 0/3] staging: vt6655: Remove else after return Marcos Antonio de Jesus Filho ` (2 preceding siblings ...) 2020-10-31 9:01 ` [PATCH 3/3] " Marcos Antonio de Jesus Filho @ 2020-10-31 9:37 ` Julia Lawall 2020-10-31 14:25 ` Marcos Antonio de Jesus Filho 3 siblings, 1 reply; 10+ messages in thread From: Julia Lawall @ 2020-10-31 9:37 UTC (permalink / raw) To: Marcos Antonio de Jesus Filho Cc: Forest Bond, Greg Kroah-Hartman, outreachy-kernel On Sat, 31 Oct 2020, Marcos Antonio de Jesus Filho wrote: > This patchset removes multiples useless else statements after return statements. Reported by check patch. > > Observation > ----------- > > After cleaning up the code I noticed that the code from 530 to 548 repeats at 551,569 and that it can be removed and one of the conditional statements can be simplified. > > Marcos Antonio de Jesus Filho (3): > staging: vt6655: Remove useless else > staging: vt6655: Remove useless else > staging: vt6655: Remove useless else The patches need different subject lines. julia > > drivers/staging/vt6655/rxtx.c | 99 ++++++++++++++++++----------------- > 1 file changed, 51 insertions(+), 48 deletions(-) > > -- > 2.28.0 > > -- > 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 outreachy-kernel+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1604133727.git.mdejesusfilho%40gmail.com. > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Outreachy kernel] [PATCH 0/3] staging: vt6655: Remove else after return 2020-10-31 9:37 ` [Outreachy kernel] [PATCH 0/3] staging: vt6655: Remove else after return Julia Lawall @ 2020-10-31 14:25 ` Marcos Antonio de Jesus Filho 2020-10-31 15:05 ` Julia Lawall 0 siblings, 1 reply; 10+ messages in thread From: Marcos Antonio de Jesus Filho @ 2020-10-31 14:25 UTC (permalink / raw) To: Julia Lawall; +Cc: Forest Bond, Greg Kroah-Hartman, outreachy-kernel On Sat, Oct 31, 2020 at 10:37:02AM +0100, Julia Lawall wrote: > > > On Sat, 31 Oct 2020, Marcos Antonio de Jesus Filho wrote: > > > This patchset removes multiples useless else statements after return statements. Reported by check patch. > > > > Observation > > ----------- > > > > After cleaning up the code I noticed that the code from 530 to 548 repeats at 551,569 and that it can be removed and one of the conditional statements can be simplified. > > > > Marcos Antonio de Jesus Filho (3): > > staging: vt6655: Remove useless else > > staging: vt6655: Remove useless else > > staging: vt6655: Remove useless else > > The patches need different subject lines. How would I name patchs like this, that do the same thing but in different parts of the code? > > julia > > > > > drivers/staging/vt6655/rxtx.c | 99 ++++++++++++++++++----------------- > > 1 file changed, 51 insertions(+), 48 deletions(-) > > > > -- > > 2.28.0 > > > > -- > > 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 outreachy-kernel+unsubscribe@googlegroups.com. > > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1604133727.git.mdejesusfilho%40gmail.com. > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Outreachy kernel] [PATCH 0/3] staging: vt6655: Remove else after return 2020-10-31 14:25 ` Marcos Antonio de Jesus Filho @ 2020-10-31 15:05 ` Julia Lawall 0 siblings, 0 replies; 10+ messages in thread From: Julia Lawall @ 2020-10-31 15:05 UTC (permalink / raw) To: Marcos Antonio de Jesus Filho Cc: Forest Bond, Greg Kroah-Hartman, outreachy-kernel On Sat, 31 Oct 2020, Marcos Antonio de Jesus Filho wrote: > On Sat, Oct 31, 2020 at 10:37:02AM +0100, Julia Lawall wrote: > > > > > > On Sat, 31 Oct 2020, Marcos Antonio de Jesus Filho wrote: > > > > > This patchset removes multiples useless else statements after return statements. Reported by check patch. > > > > > > Observation > > > ----------- > > > > > > After cleaning up the code I noticed that the code from 530 to 548 repeats at 551,569 and that it can be removed and one of the conditional statements can be simplified. > > > > > > Marcos Antonio de Jesus Filho (3): > > > staging: vt6655: Remove useless else > > > staging: vt6655: Remove useless else > > > staging: vt6655: Remove useless else > > > > The patches need different subject lines. > > How would I name patchs like this, that do the same thing but in different parts of the code? Since it's always the same file, it could be one patch. Or I guess you could add the name of the affected function to the subject line. julia > > > > > julia > > > > > > > > drivers/staging/vt6655/rxtx.c | 99 ++++++++++++++++++----------------- > > > 1 file changed, 51 insertions(+), 48 deletions(-) > > > > > > -- > > > 2.28.0 > > > > > > -- > > > 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 outreachy-kernel+unsubscribe@googlegroups.com. > > > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1604133727.git.mdejesusfilho%40gmail.com. > > > > ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-10-31 15:05 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-10-31 9:00 [PATCH 0/3] staging: vt6655: Remove else after return Marcos Antonio de Jesus Filho 2020-10-31 9:00 ` [PATCH 1/3] staging: vt6655: Remove useless else Marcos Antonio de Jesus Filho 2020-10-31 9:01 ` [PATCH 2/3] " Marcos Antonio de Jesus Filho 2020-10-31 9:01 ` [PATCH 3/3] " Marcos Antonio de Jesus Filho 2020-10-31 9:25 ` [Outreachy kernel] " Julia Lawall 2020-10-31 9:28 ` Julia Lawall 2020-10-31 14:48 ` Marcos Antonio de Jesus Filho 2020-10-31 9:37 ` [Outreachy kernel] [PATCH 0/3] staging: vt6655: Remove else after return Julia Lawall 2020-10-31 14:25 ` Marcos Antonio de Jesus Filho 2020-10-31 15:05 ` Julia Lawall
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.