From patchwork Fri Sep 14 10:41:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10600607 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 65B4414DB for ; Fri, 14 Sep 2018 10:32:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C7192AD7D for ; Fri, 14 Sep 2018 10:32:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EF442AD92; Fri, 14 Sep 2018 10:32:03 +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 8664F2AD7D for ; Fri, 14 Sep 2018 10:32:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727992AbeINPpx (ORCPT ); Fri, 14 Sep 2018 11:45:53 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:54036 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726868AbeINPpx (ORCPT ); Fri, 14 Sep 2018 11:45:53 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id D3BDECCFDEEE; Fri, 14 Sep 2018 18:31:57 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.399.0; Fri, 14 Sep 2018 18:31:49 +0800 From: YueHaibing To: James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" CC: YueHaibing , , Subject: [PATCH -next] scsi: lpfc: Remove set but not used variables 'fc_hdr' and 'hw_page_size' Date: Fri, 14 Sep 2018 10:41:44 +0000 Message-ID: <1536921704-43136-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-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/lpfc/lpfc_sli.c: In function 'lpfc_sli4_sp_handle_rcqe': drivers/scsi/lpfc/lpfc_sli.c:13430:26: warning: variable 'fc_hdr' set but not used [-Wunused-but-set-variable] drivers/scsi/lpfc/lpfc_sli.c: In function 'lpfc_cq_create': drivers/scsi/lpfc/lpfc_sli.c:14852:11: warning: variable 'hw_page_size' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing --- drivers/scsi/lpfc/lpfc_sli.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index c378230..783a154 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -13427,7 +13427,6 @@ void lpfc_sli4_els_xri_abort_event_proc(struct lpfc_hba *phba) lpfc_sli4_sp_handle_rcqe(struct lpfc_hba *phba, struct lpfc_rcqe *rcqe) { bool workposted = false; - struct fc_frame_header *fc_hdr; struct lpfc_queue *hrq = phba->sli4_hba.hdr_rq; struct lpfc_queue *drq = phba->sli4_hba.dat_rq; struct lpfc_nvmet_tgtport *tgtp; @@ -13464,9 +13463,6 @@ void lpfc_sli4_els_xri_abort_event_proc(struct lpfc_hba *phba) hrq->RQ_buf_posted--; memcpy(&dma_buf->cq_event.cqe.rcqe_cmpl, rcqe, sizeof(*rcqe)); - /* If a NVME LS event (type 0x28), treat it as Fast path */ - fc_hdr = (struct fc_frame_header *)dma_buf->hbuf.virt; - /* save off the frame for the word thread to process */ list_add_tail(&dma_buf->cq_event.list, &phba->sli4_hba.sp_queue_event); @@ -14849,13 +14845,10 @@ struct lpfc_queue * int rc, length, status = 0; uint32_t shdr_status, shdr_add_status; union lpfc_sli4_cfg_shdr *shdr; - uint32_t hw_page_size = phba->sli4_hba.pc_sli4_params.if_page_sz; /* sanity check on queue memory */ if (!cq || !eq) return -ENODEV; - if (!phba->sli4_hba.pc_sli4_params.supported) - hw_page_size = cq->page_size; mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); if (!mbox)