From patchwork Sat Oct 14 12:52:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christos Gkekas X-Patchwork-Id: 10006411 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 8658B602B3 for ; Sat, 14 Oct 2017 12:53:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75FEC29193 for ; Sat, 14 Oct 2017 12:53:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A9B2291CD; Sat, 14 Oct 2017 12:53:15 +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=unavailable 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 6EA8129193 for ; Sat, 14 Oct 2017 12:53:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753538AbdJNMxA (ORCPT ); Sat, 14 Oct 2017 08:53:00 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:36068 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753143AbdJNMw7 (ORCPT ); Sat, 14 Oct 2017 08:52:59 -0400 Received: by mail-wr0-f194.google.com with SMTP id l10so2236604wre.3; Sat, 14 Oct 2017 05:52:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=b3v+i7SI5cWBzLELVZauetOMDqv5iC22TIl4tbgPvsM=; b=ueq/IWr5EiyGyM4+fsxy0DneHK+DRCMSG95OgBI949gG1VzWmm9RVw7iBmUXU+/xMV ACAgVGa+VTvLq9zJC7z5nixk7P7TmEqJSj+dfLnk8HN+bG/lsFDYpdBaKRhACq/oFodW yaU4gglxHFbmSNDAlaipuHP/SG3NazHBX0wDDSg10l5K9ckQTeIE2EIpWUwA537b2oBY WmHo1sBGH7DFNBaFoU34YRIR5qjbxyDBDBSvgao7jJAbcNZVmUVbb6Do7zx/rpsSIpEI 6YQb9zO/JQIgoX5wpUm/eaHKpyQUY/E2xvocnIJGJ/ogkDIy+imy3ABGEFc/ELX0ZCRv KQ0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=b3v+i7SI5cWBzLELVZauetOMDqv5iC22TIl4tbgPvsM=; b=FDYOQQPEYkKl6ZVYg+WWkKJh4RK/FF9JkoL7f354hKOmM4NeIHyFhpiSxjULptJ/H8 zEG2BxLndajOMBVkGxloZo6vvXfoUOBJCY+6oahEqWz9PURom5NJZVBdlNkuJxwnvAq9 YU1xvYxaRYXib8O+zOVRjNU/NBi4yamITwbaUg+rBmUWT0RNNMzxlIj/PaoJFq0yZ8Yl CclalegVuyjQ/v+f3tGq3ty5oGf6sam3ajCjR4MTaGqpn0FUfja/qHUNSrAsfZ19vjGk l83sbQoKO6X8Pjxn48YDtOK3xiIozWqbiBeEe+lpsER4WM+fUsHfDhEb3r3WQ3JXM7+G ni/Q== X-Gm-Message-State: AMCzsaWoBpqK9YShH1YoUZbkayL5+wRGlO31aUM7Myz0tzE5djF+p1Y+ de0SQpn789/8CtwnGlX/46c= X-Google-Smtp-Source: AOwi7QAZidYwpvTQtsXpAHRnKXRGSR6b8Ko7dVNWrsU1hUXPp3Ba+EL4xqAGAntta5V5i38D9uaYeQ== X-Received: by 10.223.151.151 with SMTP id s23mr3765388wrb.44.1507985577951; Sat, 14 Oct 2017 05:52:57 -0700 (PDT) Received: from inspiron ([2a02:c7d:5e0c:c300:4c41:282:53db:800d]) by smtp.gmail.com with ESMTPSA id a195sm2451116wme.34.2017.10.14.05.52.57 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 14 Oct 2017 05:52:57 -0700 (PDT) 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] scsi: fnic: Clean up redundant variables Date: Sat, 14 Oct 2017 13:52:55 +0100 Message-Id: <1507985575-25516-1-git-send-email-chris.gekas@gmail.com> 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]) {