From patchwork Fri Oct 5 06:43:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10627409 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7BAAA16B1 for ; Fri, 5 Oct 2018 06:32:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67086291FB for ; Fri, 5 Oct 2018 06:32:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59BB229235; Fri, 5 Oct 2018 06:32:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06650291FB for ; Fri, 5 Oct 2018 06:32:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727739AbeJEN3V (ORCPT ); Fri, 5 Oct 2018 09:29:21 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:13189 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726732AbeJEN3U (ORCPT ); Fri, 5 Oct 2018 09:29:20 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 884F3FEA91435; Fri, 5 Oct 2018 14:32:03 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.399.0; Fri, 5 Oct 2018 14:31:55 +0800 From: YueHaibing To: Harsh Jain , Herbert Xu , zhong jiang , Arnd Bergmann , "Atul Gupta" , Michael Werner , "Gustavo A. R. Silva" CC: YueHaibing , , Subject: [PATCH -next] crypto: chtls - remove set but not used variable 'csk' Date: Fri, 5 Oct 2018 06:43:27 +0000 Message-ID: <1538721807-120297-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes gcc '-Wunused-but-set-variable' warning: drivers/crypto/chelsio/chtls/chtls_cm.c: In function 'chtls_disconnect': drivers/crypto/chelsio/chtls/chtls_cm.c:408:21: warning: variable 'csk' set but not used [-Wunused-but-set-variable] drivers/crypto/chelsio/chtls/chtls_cm.c: In function 'chtls_recv_sock': drivers/crypto/chelsio/chtls/chtls_cm.c:1016:23: warning: variable 'tcph' set but not used [-Wunused-but-set-variable] 'csk' and 'tcph' are never used since introduce in commit cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: YueHaibing --- drivers/crypto/chelsio/chtls/chtls_cm.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/crypto/chelsio/chtls/chtls_cm.c b/drivers/crypto/chelsio/chtls/chtls_cm.c index fd2ae1e..20209e2 100644 --- a/drivers/crypto/chelsio/chtls/chtls_cm.c +++ b/drivers/crypto/chelsio/chtls/chtls_cm.c @@ -405,12 +405,10 @@ static int wait_for_states(struct sock *sk, unsigned int states) int chtls_disconnect(struct sock *sk, int flags) { - struct chtls_sock *csk; struct tcp_sock *tp; int err; tp = tcp_sk(sk); - csk = rcu_dereference_sk_user_data(sk); chtls_purge_recv_queue(sk); chtls_purge_receive_queue(sk); chtls_purge_write_queue(sk); @@ -1013,7 +1011,6 @@ static struct sock *chtls_recv_sock(struct sock *lsk, const struct cpl_pass_accept_req *req, struct chtls_dev *cdev) { - const struct tcphdr *tcph; struct inet_sock *newinet; const struct iphdr *iph; struct net_device *ndev; @@ -1035,7 +1032,6 @@ static struct sock *chtls_recv_sock(struct sock *lsk, if (!dst) goto free_sk; - tcph = (struct tcphdr *)(iph + 1); n = dst_neigh_lookup(dst, &iph->saddr); if (!n) goto free_sk;