From patchwork Tue Oct 31 21:01:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christos Gkekas X-Patchwork-Id: 10035423 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8571B60327 for ; Tue, 31 Oct 2017 21:01:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7462428A5A for ; Tue, 31 Oct 2017 21:01:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65C5C28AEB; Tue, 31 Oct 2017 21:01:59 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 E94F628A5A for ; Tue, 31 Oct 2017 21:01:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751318AbdJaVB6 (ORCPT ); Tue, 31 Oct 2017 17:01:58 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:54996 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750928AbdJaVB5 (ORCPT ); Tue, 31 Oct 2017 17:01:57 -0400 Received: by mail-wr0-f194.google.com with SMTP id o44so245020wrf.11; Tue, 31 Oct 2017 14:01:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=b3v+i7SI5cWBzLELVZauetOMDqv5iC22TIl4tbgPvsM=; b=WQqrCM2UASMrbV9PTTzPxssiM7+79R0rue7aMgCPZyMQ0bpdruBWl7Lo9mVFvl+sqL 4UUtVxu3mlJk5oidcm65GSpH52YrfD7hnMGqenYcV2liMsyymCY3NsMUkNUgOaHokwqo lMJ4eFxJK3oVhK72kWwWxjpSRv62ydPpeTP++ugYlmaOpElIwVS8viGYbkXDprFfu7UU NxJxw2KoEfvHm4rRPshk1l+7QgL4WC29YUjeDtBanBFS3zicOs5n7T5SbsuR8NrvVLUK ABsxSP0u1UjmHpE40QnNWBcz9jaFdSWdSbYQBT8ORK5QnHdvbtm3ZYaYYkHX6ZNkjZSY Vw0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=b3v+i7SI5cWBzLELVZauetOMDqv5iC22TIl4tbgPvsM=; b=sE2Ka8QcGzFF4cgaoMOgtXJA0bz5Yh7ODjLsrSs2KOpJC+wd9AeImxiuSpspixVEsI LB51JKAzOhml9+9XMecLyGzEyu0NFESLoBkwbZ3Qkuj/kmu2+DtpbBwQCtnJQuL3enjF fcnWHNbhwyjZhsNxPp0CM64SJS2Mza8/NO96AAMu5+hCXutUifNqK281yaCw6V9A6Rau s+CyoCxddOlzrKsoK1LcTnC7HpCK1AHfzMeZ45UncgZHyE8ofUHLfFcnMYQG1EFjoF7Z aMOqfoe4r8idvESD+oUxNfexl6fKfPkuVsHcc7p7t5c/0h38nLfdUnVIaovocoeDUW6U kUWQ== X-Gm-Message-State: AMCzsaVyL9K25nu5hMsMX7Ql9IF+nMqxSbtCIqR8yy3r/Isne+Q0OKfZ R3rGv/HFhBdyx7xFsueXzLo= X-Google-Smtp-Source: ABhQp+Tpb8VQjFAH9OJaKVnL90PEDKrHPTcOzzN47dqnHjQY2HoWClbYO1bvWtTBG8qFM4yFuqCBjw== X-Received: by 10.223.195.110 with SMTP id e43mr2802695wrg.219.1509483715744; Tue, 31 Oct 2017 14:01:55 -0700 (PDT) Received: from inspiron ([2a02:c7d:5e0c:c300:69d6:9778:a3b5:6781]) by smtp.gmail.com with ESMTPSA id 69sm4056746wmp.37.2017.10.31.14.01.54 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 31 Oct 2017 14:01:54 -0700 (PDT) Date: Tue, 31 Oct 2017 21:01:53 +0000 From: Christos Gkekas To: Satish Kharat , Sesidhar Baddela , Karan Tilak Kumar , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Christos Gkekas Subject: [PATCH RESEND] scsi: fnic: Clean up redundant variables Message-ID: <20171031210153.GA19945@inspiron> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email 2.7.4 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove variables that are set but not used. Signed-off-by: Christos Gkekas --- drivers/scsi/fnic/fnic_fcs.c | 9 --------- drivers/scsi/fnic/vnic_rq.c | 3 --- drivers/scsi/fnic/vnic_wq.c | 3 --- 3 files changed, 15 deletions(-) diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c index 999fc75..bc1fcce 100644 --- a/drivers/scsi/fnic/fnic_fcs.c +++ b/drivers/scsi/fnic/fnic_fcs.c @@ -293,12 +293,10 @@ static inline int is_fnic_fip_flogi_reject(struct fcoe_ctlr *fip, struct fc_frame_header *fh = NULL; struct fip_desc *desc; struct fip_encaps *els; - enum fip_desc_type els_dtype = 0; u16 op; u8 els_op; u8 sub; - size_t els_len = 0; size_t rlen; size_t dlen = 0; @@ -330,10 +328,8 @@ static inline int is_fnic_fip_flogi_reject(struct fcoe_ctlr *fip, if (dlen < sizeof(*els) + sizeof(*fh) + 1) return 0; - els_len = dlen - sizeof(*els); els = (struct fip_encaps *)desc; fh = (struct fc_frame_header *)(els + 1); - els_dtype = desc->fip_dtype; if (!fh) return 0; @@ -360,7 +356,6 @@ static void fnic_fcoe_send_vlan_req(struct fnic *fnic) struct fnic_stats *fnic_stats = &fnic->fnic_stats; struct sk_buff *skb; char *eth_fr; - int fr_len; struct fip_vlan *vlan; u64 vlan_tov; @@ -375,7 +370,6 @@ static void fnic_fcoe_send_vlan_req(struct fnic *fnic) if (!skb) return; - fr_len = sizeof(*vlan); eth_fr = (char *)skb->data; vlan = (struct fip_vlan *)eth_fr; @@ -823,7 +817,6 @@ static void fnic_rq_cmpl_frame_recv(struct vnic_rq *rq, struct cq_desc struct sk_buff *skb; struct fc_frame *fp; struct fnic_stats *fnic_stats = &fnic->fnic_stats; - unsigned int eth_hdrs_stripped; u8 type, color, eop, sop, ingress_port, vlan_stripped; u8 fcoe = 0, fcoe_sof, fcoe_eof; u8 fcoe_fc_crc_ok = 1, fcoe_enc_error = 0; @@ -853,7 +846,6 @@ static void fnic_rq_cmpl_frame_recv(struct vnic_rq *rq, struct cq_desc &ingress_port, &packet_error, &fcoe_enc_error, &fcs_ok, &vlan_stripped, &vlan); - eth_hdrs_stripped = 1; skb_trim(skb, fcp_bytes_written); fr_sof(fp) = sof; fr_eof(fp) = eof; @@ -870,7 +862,6 @@ static void fnic_rq_cmpl_frame_recv(struct vnic_rq *rq, struct cq_desc &tcp_udp_csum_ok, &udp, &tcp, &ipv4_csum_ok, &ipv6, &ipv4, &ipv4_fragment, &fcs_ok); - eth_hdrs_stripped = 0; skb_trim(skb, bytes_written); if (!fcs_ok) { atomic64_inc(&fnic_stats->misc_stats.frame_errors); diff --git a/drivers/scsi/fnic/vnic_rq.c b/drivers/scsi/fnic/vnic_rq.c index fd2068f..ae8b78c 100644 --- a/drivers/scsi/fnic/vnic_rq.c +++ b/drivers/scsi/fnic/vnic_rq.c @@ -27,12 +27,9 @@ static int vnic_rq_alloc_bufs(struct vnic_rq *rq) { struct vnic_rq_buf *buf; - struct vnic_dev *vdev; unsigned int i, j, count = rq->ring.desc_count; unsigned int blks = VNIC_RQ_BUF_BLKS_NEEDED(count); - vdev = rq->vdev; - for (i = 0; i < blks; i++) { rq->bufs[i] = kzalloc(VNIC_RQ_BUF_BLK_SZ, GFP_ATOMIC); if (!rq->bufs[i]) { diff --git a/drivers/scsi/fnic/vnic_wq.c b/drivers/scsi/fnic/vnic_wq.c index a414135..5f57809 100644 --- a/drivers/scsi/fnic/vnic_wq.c +++ b/drivers/scsi/fnic/vnic_wq.c @@ -27,12 +27,9 @@ static int vnic_wq_alloc_bufs(struct vnic_wq *wq) { struct vnic_wq_buf *buf; - struct vnic_dev *vdev; unsigned int i, j, count = wq->ring.desc_count; unsigned int blks = VNIC_WQ_BUF_BLKS_NEEDED(count); - vdev = wq->vdev; - for (i = 0; i < blks; i++) { wq->bufs[i] = kzalloc(VNIC_WQ_BUF_BLK_SZ, GFP_ATOMIC); if (!wq->bufs[i]) {