From 7d1207288fdff3f645f3f7a5c8cf658b3e389c5d Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 15 Jun 2018 14:41:55 -0700 Subject: [PATCH] scsi: mpt3sas: Remove set-but-not-used variables This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Sathya Prakash Cc: Chaitra P B Cc: Suganath Prabu Subramani Signed-off-by: Martin K. Petersen --- drivers/scsi/mpt3sas/mpt3sas_base.c | 10 ---------- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 5 ----- 2 files changed, 15 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 5e632bbd8410..3bf9ee7d9603 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -2155,11 +2155,9 @@ base_is_prp_possible(struct MPT3SAS_ADAPTER *ioc, struct _pcie_device *pcie_device, struct scsi_cmnd *scmd, int sge_count) { u32 data_length = 0; - struct scatterlist *sg_scmd; bool build_prp = true; data_length = scsi_bufflen(scmd); - sg_scmd = scsi_sglist(scmd); /* If Datalenth is <= 16K and number of SGE’s entries are <= 2 * we built IEEE SGL @@ -2190,11 +2188,9 @@ _base_check_pcie_native_sgl(struct MPT3SAS_ADAPTER *ioc, Mpi25SCSIIORequest_t *mpi_request, u16 smid, struct scsi_cmnd *scmd, struct _pcie_device *pcie_device) { - struct scatterlist *sg_scmd; int sges_left; /* Get the SG list pointer and info. */ - sg_scmd = scsi_sglist(scmd); sges_left = scsi_dma_map(scmd); if (sges_left < 0) { sdev_printk(KERN_ERR, scmd->device, @@ -3498,11 +3494,8 @@ mpt3sas_base_put_smid_hi_priority(struct MPT3SAS_ADAPTER *ioc, u16 smid, u64 *request; if (ioc->is_mcpu_endpoint) { - MPI2RequestHeader_t *request_hdr; - __le32 *mfp = (__le32 *)mpt3sas_base_get_msg_frame(ioc, smid); - request_hdr = (MPI2RequestHeader_t *)mfp; /* TBD 256 is offset within sys register. */ mpi_req_iomem = (void __force *)ioc->chip + MPI_FRAME_START_OFFSET @@ -3565,13 +3558,10 @@ mpt3sas_base_put_smid_default(struct MPT3SAS_ADAPTER *ioc, u16 smid) Mpi2RequestDescriptorUnion_t descriptor; void *mpi_req_iomem; u64 *request; - MPI2RequestHeader_t *request_hdr; if (ioc->is_mcpu_endpoint) { __le32 *mfp = (__le32 *)mpt3sas_base_get_msg_frame(ioc, smid); - request_hdr = (MPI2RequestHeader_t *)mfp; - _clone_sg_entries(ioc, (void *) mfp, smid); /* TBD 256 is offset within sys register */ mpi_req_iomem = (void __force *)ioc->chip + diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index f3fcdd465479..4f7a91f63f01 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -1653,7 +1653,6 @@ scsih_target_destroy(struct scsi_target *starget) struct _raid_device *raid_device; struct _pcie_device *pcie_device; unsigned long flags; - struct sas_rphy *rphy; sas_target_priv_data = starget->hostdata; if (!sas_target_priv_data) @@ -1693,7 +1692,6 @@ scsih_target_destroy(struct scsi_target *starget) } spin_lock_irqsave(&ioc->sas_device_lock, flags); - rphy = dev_to_rphy(starget->dev.parent); sas_device = __mpt3sas_get_sdev_from_target(ioc, sas_target_priv_data); if (sas_device && (sas_device->starget == starget) && (sas_device->id == starget->id) && @@ -6872,7 +6870,6 @@ _scsih_pcie_add_device(struct MPT3SAS_ADAPTER *ioc, u16 handle) Mpi2ConfigReply_t mpi_reply; struct _pcie_device *pcie_device; struct _enclosure_node *enclosure_dev; - u32 pcie_device_type; u32 ioc_status; u64 wwid; @@ -6934,8 +6931,6 @@ _scsih_pcie_add_device(struct MPT3SAS_ADAPTER *ioc, u16 handle) pcie_device->port_num = pcie_device_pg0.PortNum; pcie_device->fast_path = (le32_to_cpu(pcie_device_pg0.Flags) & MPI26_PCIEDEV0_FLAGS_FAST_PATH_CAPABLE) ? 1 : 0; - pcie_device_type = pcie_device->device_info & - MPI26_PCIE_DEVINFO_MASK_DEVICE_TYPE; pcie_device->enclosure_handle = le16_to_cpu(pcie_device_pg0.EnclosureHandle); -- 2.30.2