All of lore.kernel.org
 help / color / mirror / Atom feed
From: YueHaibing <yuehaibing@huawei.com>
To: kernel-janitors@vger.kernel.org
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	[thread overview]
Message-ID: <1536921704-43136-1-git-send-email-yuehaibing@huawei.com> (raw)
In-Reply-To: <1536804299-64730-1-git-send-email-yuehaibing@huawei.com>

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 <yuehaibing@huawei.com>
---
 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)

  reply	other threads:[~2018-09-14 10:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-13  1:58 [PATCH -next] scsi: lpfc: Remove set but not used variable 'sgl_size' YueHaibing
2018-09-14 10:41 ` YueHaibing [this message]
2018-09-17  7:02 ` Martin K. Petersen
2018-09-29 13:53 ` [PATCH -next] scsi: lpfc: Remove set but not used variable 'psli' YueHaibing
2018-10-04 10:51 ` [PATCH -next] scsi: lpfc: Remove set but not used variables 'tgtp' YueHaibing
2018-10-17  1:47 ` [PATCH -next] scsi: lpfc: Remove set but not used variable 'psli' Martin K. Petersen
2018-10-17  1:58 ` [PATCH -next] scsi: lpfc: Remove set but not used variables 'tgtp' Martin K. Petersen
2018-12-11  8:21 ` [PATCH -next] scsi: lpfc: Remove set but not used variable 'maxch' YueHaibing
2019-02-14 18:52 ` [PATCH -next] scsi: lpfc: Remove set but not used variable 'phys_id' James Smart
2019-02-14 19:39 ` James Bottomley
2019-02-14 19:46 ` Martin K. Petersen
2019-02-14 21:19 ` James Smart
2019-02-14 21:24 ` James Bottomley
2019-02-15  7:44 ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1536921704-43136-1-git-send-email-yuehaibing@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.