Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1206326pxy; Fri, 23 Apr 2021 02:54:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbU5Mcmz8epfLUGnBBPBxmB276XBv7Uzi3RybZ+OJzMlmDZcs2A7arX9DJobkaaxQossgn X-Received: by 2002:a17:90b:88f:: with SMTP id bj15mr4878467pjb.147.1619171666195; Fri, 23 Apr 2021 02:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619171666; cv=none; d=google.com; s=arc-20160816; b=MTlDR7dOKApO0SxE1BqvVC2kz8BhRI+8LXQiI0SynC5GiWl93EbcGqL/npX2QnWczq KLDeq7naW6XejGflf8vqcq6PfUjW6AA3tesG1meMj6LHCAqrBI3WkjBU41znW8NDrrFC /H+DJaFSFBnA3pyajeWAEzpKNF86g4DGtkhbFiYvQCmIab4tkCRhLjyRtXQH/cELfyi3 i2mVjxMYq0wHqjQmYSncPchkIwLG7b0VEsfxEnfzZhZiZrq18d++s3SFh/iInFYgoNXh kIMNXRR08zcfYjnjODguqO5Ow62FainiLf+0Mbcn3SgvgSoCs5gpccM/wtVfEdADRf26 pzQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=EV4WidmCaOdRQ+8wN9llAE3N97QH+ZsPLiXEzmrJsUQ=; b=kdjPKAV+f2iGS7YLyTPW+fppDY7Kozq2tMJVG9IlOo0vsDoNil9TbvI/C20dqOHfeM +PoQZ0kn1CDHHGuIcgmcncmCCgtd9LWbfEmp7Ljng0+aBkNP9VWIxkj+xb46G8tbYSf/ lukLVhtbWrbK2uibzREOojm9IM9qXrQDOhY426zWE7Zyh/ecN4uZXitOKy1kFCjCwVKB Fs2O72FVsUqCkECj0Zk0eS6J1sbjfsd/uXYbN5IgZrETuBNcBC4bjuZRVmTb5ABbCUAO tqc73qnI98lBS0Tzxtaa7qaEtoqHXX8TxGSmFZMT0X1F/DS5vvu8mucgGDtkPDE4cJS8 AhFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r8si6102775pfg.41.2021.04.23.02.54.13; Fri, 23 Apr 2021 02:54:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242108AbhDWJxp (ORCPT + 99 others); Fri, 23 Apr 2021 05:53:45 -0400 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:45950 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230246AbhDWJxn (ORCPT ); Fri, 23 Apr 2021 05:53:43 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0UWUyULS_1619171545; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UWUyULS_1619171545) by smtp.aliyun-inc.com(127.0.0.1); Fri, 23 Apr 2021 17:53:05 +0800 From: Jiapeng Chong To: ayush.sawal@chelsio.com Cc: vinay.yadav@chelsio.com, rohitm@chelsio.com, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] ch_ktls: Remove redundant variable result Date: Fri, 23 Apr 2021 17:52:23 +0800 Message-Id: <1619171543-117550-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Variable result is being assigned a value from a calculation however the variable is never read, so this redundant variable can be removed. Cleans up the following clang-analyzer warning: drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c:1488:2: warning: Value stored to 'pos' is never read [clang-analyzer-deadcode.DeadStores]. drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c:876:3: warning: Value stored to 'pos' is never read [clang-analyzer-deadcode.DeadStores]. drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c:36:3: warning: Value stored to 'start' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c b/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c index a3f5b80..ef3f1e9 100644 --- a/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c +++ b/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c @@ -33,7 +33,6 @@ static int chcr_get_nfrags_to_send(struct sk_buff *skb, u32 start, u32 len) if (unlikely(start < skb_linear_data_len)) { frag_size = min(len, skb_linear_data_len - start); - start = 0; } else { start -= skb_linear_data_len; @@ -873,10 +872,10 @@ static int chcr_ktls_xmit_tcb_cpls(struct chcr_ktls_info *tx_info, } /* update receive window */ if (first_wr || tx_info->prev_win != tcp_win) { - pos = chcr_write_cpl_set_tcb_ulp(tx_info, q, tx_info->tid, pos, - TCB_RCV_WND_W, - TCB_RCV_WND_V(TCB_RCV_WND_M), - TCB_RCV_WND_V(tcp_win), 0); + chcr_write_cpl_set_tcb_ulp(tx_info, q, tx_info->tid, pos, + TCB_RCV_WND_W, + TCB_RCV_WND_V(TCB_RCV_WND_M), + TCB_RCV_WND_V(tcp_win), 0); tx_info->prev_win = tcp_win; cpl++; } @@ -1485,7 +1484,6 @@ static int chcr_ktls_tx_plaintxt(struct chcr_ktls_info *tx_info, wr->op_to_compl = htonl(FW_WR_OP_V(FW_ULPTX_WR)); wr->flowid_len16 = htonl(wr_mid | FW_WR_LEN16_V(len16)); wr->cookie = 0; - pos += sizeof(*wr); /* ULP_TXPKT */ ulptx = (struct ulp_txpkt *)(wr + 1); ulptx->cmd_dest = htonl(ULPTX_CMD_V(ULP_TX_PKT) | -- 1.8.3.1