diff options
author | YueHaibing | 2018-09-26 19:09:40 +0800 |
---|---|---|
committer | Martin K. Petersen | 2018-10-16 18:33:23 -0400 |
commit | 13eb34b669b8ac38fa4f3ea290237e936047d88b (patch) | |
tree | 7e70a3f4cec4a2c92ecdd78f0b5f66c0e4d57259 /drivers/scsi | |
parent | 0bfe7d3cae58f02a05c39fba6829d6e7b50802f5 (diff) |
scsi: megaraid_mbox: remove set but not used variables
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/scsi/megaraid/megaraid_mbox.c: In function 'megaraid_reset_handler':
drivers/scsi/megaraid/megaraid_mbox.c:2580:7: warning:
variable 'recovering' set but not used [-Wunused-but-set-variable]
drivers/scsi/megaraid/megaraid_mbox.c: In function 'mbox_post_sync_cmd':
drivers/scsi/megaraid/megaraid_mbox.c:2728:12: warning:
variable 'mbox64' set but not used [-Wunused-but-set-variable]
drivers/scsi/megaraid/megaraid_mbox.c: In function 'megaraid_mbox_support_random_del':
drivers/scsi/megaraid/megaraid_mbox.c:3138:11: warning:
variable 'mbox' set but not used [-Wunused-but-set-variable]
drivers/scsi/megaraid/megaraid_mbox.c: In function 'megaraid_mbox_flush_cache':
drivers/scsi/megaraid/megaraid_mbox.c:3266:10: warning:
variable 'mbox' set but not used [-Wunused-but-set-variable]
drivers/scsi/megaraid/megaraid_mbox.c: In function 'megaraid_mbox_fire_sync_cmd':
drivers/scsi/megaraid/megaraid_mbox.c:3302:12: warning:
variable 'mbox64' set but not used [-Wunused-but-set-variable]
drivers/scsi/megaraid/megaraid_mbox.c: In function 'gather_hbainfo':
drivers/scsi/megaraid/megaraid_mbox.c:3797:10: warning:
variable 'dmajor' set but not used [-Wunused-but-set-variable]
[mkp: applied by hand due to conflict with hch's DMA cleanup]
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_mbox.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index 89c85a5a47af..eae826ba0c05 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c @@ -202,13 +202,6 @@ module_param_named(debug_level, mraid_debug_level, int, 0); MODULE_PARM_DESC(debug_level, "Debug level for driver (default=0)"); /* - * ### global data ### - */ -static uint8_t megaraid_mbox_version[8] = - { 0x02, 0x20, 0x04, 0x06, 3, 7, 20, 5 }; - - -/* * PCI table for all supported controllers. */ static struct pci_device_id pci_id_table_g[] = { @@ -2544,7 +2537,6 @@ megaraid_reset_handler(struct scsi_cmnd *scp) uint8_t raw_mbox[sizeof(mbox_t)]; int rval; int recovery_window; - int recovering; int i; uioc_t *kioc; @@ -2558,7 +2550,6 @@ megaraid_reset_handler(struct scsi_cmnd *scp) return FAILED; } - // Under exceptional conditions, FW can take up to 3 minutes to // complete command processing. Wait for additional 2 minutes for the // pending commands counter to go down to 0. If it doesn't, let the @@ -2607,8 +2598,6 @@ megaraid_reset_handler(struct scsi_cmnd *scp) recovery_window = MBOX_RESET_WAIT + MBOX_RESET_EXT_WAIT; - recovering = adapter->outstanding_cmds; - for (i = 0; i < recovery_window; i++) { megaraid_ack_sequence(adapter); @@ -2692,13 +2681,10 @@ static int mbox_post_sync_cmd(adapter_t *adapter, uint8_t raw_mbox[]) { mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter); - mbox64_t *mbox64; mbox_t *mbox; uint8_t status; int i; - - mbox64 = raid_dev->mbox64; mbox = raid_dev->mbox; /* @@ -3102,7 +3088,6 @@ megaraid_mbox_support_ha(adapter_t *adapter, uint16_t *init_id) static int megaraid_mbox_support_random_del(adapter_t *adapter) { - mbox_t *mbox; uint8_t raw_mbox[sizeof(mbox_t)]; int rval; @@ -3124,8 +3109,6 @@ megaraid_mbox_support_random_del(adapter_t *adapter) return 0; } - mbox = (mbox_t *)raw_mbox; - memset((caddr_t)raw_mbox, 0, sizeof(mbox_t)); raw_mbox[0] = FC_DEL_LOGDRV; @@ -3230,12 +3213,8 @@ megaraid_mbox_enum_raid_scsi(adapter_t *adapter) static void megaraid_mbox_flush_cache(adapter_t *adapter) { - mbox_t *mbox; uint8_t raw_mbox[sizeof(mbox_t)]; - - mbox = (mbox_t *)raw_mbox; - memset((caddr_t)raw_mbox, 0, sizeof(mbox_t)); raw_mbox[0] = FLUSH_ADAPTER; @@ -3266,7 +3245,6 @@ megaraid_mbox_fire_sync_cmd(adapter_t *adapter) mbox_t *mbox; uint8_t raw_mbox[sizeof(mbox_t)]; mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter); - mbox64_t *mbox64; int status = 0; int i; uint32_t dword; @@ -3277,7 +3255,6 @@ megaraid_mbox_fire_sync_cmd(adapter_t *adapter) raw_mbox[0] = 0xFF; - mbox64 = raid_dev->mbox64; mbox = raid_dev->mbox; /* Wait until mailbox is free */ @@ -3761,10 +3738,6 @@ megaraid_mbox_mm_done(adapter_t *adapter, scb_t *scb) static int gather_hbainfo(adapter_t *adapter, mraid_hba_info_t *hinfo) { - uint8_t dmajor; - - dmajor = megaraid_mbox_version[0]; - hinfo->pci_vendor_id = adapter->pdev->vendor; hinfo->pci_device_id = adapter->pdev->device; hinfo->subsys_vendor_id = adapter->pdev->subsystem_vendor; |