* [PATCH] staging: rtl8192e: remove unnecessary break
@ 2021-03-02 15:29 Perrin Smith
2021-03-02 16:24 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Perrin Smith @ 2021-03-02 15:29 UTC (permalink / raw)
To: gregkh
Cc: will+git, dan.carpenter, tiwai, yashsri421, devel, linux-kernel,
perrinjamessmith
From: Perrin Smith <perrinjamessmith@gmail.com>
removed unnecessary break at end of while loop
Signed-off-by: Perrin Smith <perrinjamessmith@gmail.com>
---
drivers/staging/rtl8192e/rtllib_rx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index b8ab34250e6a..2de6330b7737 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -460,8 +460,6 @@ static bool AddReorderEntry(struct rx_ts_record *pTS,
((struct rx_reorder_entry *)list_entry(pList->next,
struct rx_reorder_entry, List))->SeqNum))
return false;
- else
- break;
}
pReorderEntry->List.next = pList->next;
pReorderEntry->List.next->prev = &pReorderEntry->List;
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: rtl8192e: remove unnecessary break
2021-03-02 15:29 [PATCH] staging: rtl8192e: remove unnecessary break Perrin Smith
@ 2021-03-02 16:24 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2021-03-02 16:24 UTC (permalink / raw)
To: Perrin Smith; +Cc: gregkh, devel, yashsri421, tiwai, linux-kernel
On Tue, Mar 02, 2021 at 11:29:03PM +0800, Perrin Smith wrote:
> From: Perrin Smith <perrinjamessmith@gmail.com>
>
> removed unnecessary break at end of while loop
>
> Signed-off-by: Perrin Smith <perrinjamessmith@gmail.com>
> ---
> drivers/staging/rtl8192e/rtllib_rx.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
> index b8ab34250e6a..2de6330b7737 100644
> --- a/drivers/staging/rtl8192e/rtllib_rx.c
> +++ b/drivers/staging/rtl8192e/rtllib_rx.c
> @@ -460,8 +460,6 @@ static bool AddReorderEntry(struct rx_ts_record *pTS,
> ((struct rx_reorder_entry *)list_entry(pList->next,
> struct rx_reorder_entry, List))->SeqNum))
> return false;
> - else
> - break;
No, this break is necessary. The patch introduces a bug. You need to
be careful following checkpatch's advice because it's just a simple
Perl script.
> }
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-02 20:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-02 15:29 [PATCH] staging: rtl8192e: remove unnecessary break Perrin Smith
2021-03-02 16:24 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).