From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vakul Garg Subject: [net-next v6 2/2] net/tls: Remove redundant variable assignments and wakeup Date: Tue, 24 Jul 2018 15:44:03 +0530 Message-ID: <20180724101403.27040-3-vakul.garg@nxp.com> References: <20180724101403.27040-1-vakul.garg@nxp.com> Mime-Version: 1.0 Content-Type: text/plain Cc: borisp@mellanox.com, aviadye@mellanox.com, davejwatson@fb.com, davem@davemloft.net, Vakul Garg To: netdev@vger.kernel.org Return-path: Received: from mail-ve1eur01on0066.outbound.protection.outlook.com ([104.47.1.66]:61429 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388251AbeGXF7z (ORCPT ); Tue, 24 Jul 2018 01:59:55 -0400 In-Reply-To: <20180724101403.27040-1-vakul.garg@nxp.com> Sender: netdev-owner@vger.kernel.org List-ID: In function decrypt_skb_update(), the assignment to tls receive context variable 'decrypted' is redundant as the same is being done in function tls_sw_recvmsg() after calling decrypt_skb_update(). Also calling callback function to wakeup processes sleeping on socket data availability is useless as decrypt_skb_update() is invoked from user processes only. This patch cleans these up. Signed-off-by: Vakul Garg --- net/tls/tls_sw.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index fee1240eff92..6c71da7b147f 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -679,8 +679,6 @@ static int decrypt_skb_update(struct sock *sk, struct sk_buff *skb, rxm->offset += tls_ctx->rx.prepend_size; rxm->full_len -= tls_ctx->rx.overhead_size; tls_advance_record_sn(sk, &tls_ctx->rx); - ctx->decrypted = true; - ctx->saved_data_ready(sk); return err; } -- 2.13.6