netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 1/5] sctp: Remove superfluous test in sctp_ulpq_reasm_drain().
@ 2019-04-10 21:19 David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2019-04-10 21:19 UTC (permalink / raw)
  To: netdev


Inside the loop, we always start with event non-NULL.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/sctp/ulpqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
index 5dde92101743..0fecc1fb4ab7 100644
--- a/net/sctp/ulpqueue.c
+++ b/net/sctp/ulpqueue.c
@@ -745,7 +745,7 @@ static void sctp_ulpq_reasm_drain(struct sctp_ulpq *ulpq)
 
 	while ((event = sctp_ulpq_retrieve_reassembled(ulpq)) != NULL) {
 		/* Do ordering if needed.  */
-		if ((event) && (event->msg_flags & MSG_EOR)) {
+		if (event->msg_flags & MSG_EOR) {
 			skb_queue_head_init(&temp);
 			__skb_queue_tail(&temp, sctp_event2skb(event));
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v5 1/5] sctp: Remove superfluous test in sctp_ulpq_reasm_drain().
@ 2019-04-11 22:01 David Miller
  2019-04-11 22:17 ` Marcelo Ricardo Leitner
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2019-04-11 22:01 UTC (permalink / raw)
  To: netdev; +Cc: marcelo.leitner, lucien.xin, nhorman


Inside the loop, we always start with event non-NULL.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/sctp/ulpqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
index 5dde92101743..0fecc1fb4ab7 100644
--- a/net/sctp/ulpqueue.c
+++ b/net/sctp/ulpqueue.c
@@ -745,7 +745,7 @@ static void sctp_ulpq_reasm_drain(struct sctp_ulpq *ulpq)
 
 	while ((event = sctp_ulpq_retrieve_reassembled(ulpq)) != NULL) {
 		/* Do ordering if needed.  */
-		if ((event) && (event->msg_flags & MSG_EOR)) {
+		if (event->msg_flags & MSG_EOR) {
 			skb_queue_head_init(&temp);
 			__skb_queue_tail(&temp, sctp_event2skb(event));
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v5 1/5] sctp: Remove superfluous test in sctp_ulpq_reasm_drain().
  2019-04-11 22:01 [PATCH v5 1/5] sctp: Remove superfluous test in sctp_ulpq_reasm_drain() David Miller
@ 2019-04-11 22:17 ` Marcelo Ricardo Leitner
  0 siblings, 0 replies; 3+ messages in thread
From: Marcelo Ricardo Leitner @ 2019-04-11 22:17 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, lucien.xin, nhorman

On Thu, Apr 11, 2019 at 03:01:53PM -0700, David Miller wrote:
> 
> Inside the loop, we always start with event non-NULL.
> 
> Signed-off-by: David S. Miller <davem@davemloft.net>

Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>

> ---
>  net/sctp/ulpqueue.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
> index 5dde92101743..0fecc1fb4ab7 100644
> --- a/net/sctp/ulpqueue.c
> +++ b/net/sctp/ulpqueue.c
> @@ -745,7 +745,7 @@ static void sctp_ulpq_reasm_drain(struct sctp_ulpq *ulpq)
>  
>  	while ((event = sctp_ulpq_retrieve_reassembled(ulpq)) != NULL) {
>  		/* Do ordering if needed.  */
> -		if ((event) && (event->msg_flags & MSG_EOR)) {
> +		if (event->msg_flags & MSG_EOR) {
>  			skb_queue_head_init(&temp);
>  			__skb_queue_tail(&temp, sctp_event2skb(event));
>  
> -- 
> 2.20.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-11 22:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-11 22:01 [PATCH v5 1/5] sctp: Remove superfluous test in sctp_ulpq_reasm_drain() David Miller
2019-04-11 22:17 ` Marcelo Ricardo Leitner
  -- strict thread matches above, loose matches on Subject: below --
2019-04-10 21:19 David Miller

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).