Commit 13eb34b6 authored by YueHaibing's avatar YueHaibing Committed by Martin K. Petersen

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: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 0bfe7d3c
...@@ -201,13 +201,6 @@ int mraid_debug_level = CL_ANN; ...@@ -201,13 +201,6 @@ int mraid_debug_level = CL_ANN;
module_param_named(debug_level, mraid_debug_level, int, 0); module_param_named(debug_level, mraid_debug_level, int, 0);
MODULE_PARM_DESC(debug_level, "Debug level for driver (default=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. * PCI table for all supported controllers.
*/ */
...@@ -2544,7 +2537,6 @@ megaraid_reset_handler(struct scsi_cmnd *scp) ...@@ -2544,7 +2537,6 @@ megaraid_reset_handler(struct scsi_cmnd *scp)
uint8_t raw_mbox[sizeof(mbox_t)]; uint8_t raw_mbox[sizeof(mbox_t)];
int rval; int rval;
int recovery_window; int recovery_window;
int recovering;
int i; int i;
uioc_t *kioc; uioc_t *kioc;
...@@ -2558,7 +2550,6 @@ megaraid_reset_handler(struct scsi_cmnd *scp) ...@@ -2558,7 +2550,6 @@ megaraid_reset_handler(struct scsi_cmnd *scp)
return FAILED; return FAILED;
} }
// Under exceptional conditions, FW can take up to 3 minutes to // Under exceptional conditions, FW can take up to 3 minutes to
// complete command processing. Wait for additional 2 minutes for the // complete command processing. Wait for additional 2 minutes for the
// pending commands counter to go down to 0. If it doesn't, let 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) ...@@ -2607,8 +2598,6 @@ megaraid_reset_handler(struct scsi_cmnd *scp)
recovery_window = MBOX_RESET_WAIT + MBOX_RESET_EXT_WAIT; recovery_window = MBOX_RESET_WAIT + MBOX_RESET_EXT_WAIT;
recovering = adapter->outstanding_cmds;
for (i = 0; i < recovery_window; i++) { for (i = 0; i < recovery_window; i++) {
megaraid_ack_sequence(adapter); megaraid_ack_sequence(adapter);
...@@ -2692,13 +2681,10 @@ static int ...@@ -2692,13 +2681,10 @@ static int
mbox_post_sync_cmd(adapter_t *adapter, uint8_t raw_mbox[]) mbox_post_sync_cmd(adapter_t *adapter, uint8_t raw_mbox[])
{ {
mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter); mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter);
mbox64_t *mbox64;
mbox_t *mbox; mbox_t *mbox;
uint8_t status; uint8_t status;
int i; int i;
mbox64 = raid_dev->mbox64;
mbox = raid_dev->mbox; mbox = raid_dev->mbox;
/* /*
...@@ -3102,7 +3088,6 @@ megaraid_mbox_support_ha(adapter_t *adapter, uint16_t *init_id) ...@@ -3102,7 +3088,6 @@ megaraid_mbox_support_ha(adapter_t *adapter, uint16_t *init_id)
static int static int
megaraid_mbox_support_random_del(adapter_t *adapter) megaraid_mbox_support_random_del(adapter_t *adapter)
{ {
mbox_t *mbox;
uint8_t raw_mbox[sizeof(mbox_t)]; uint8_t raw_mbox[sizeof(mbox_t)];
int rval; int rval;
...@@ -3124,8 +3109,6 @@ megaraid_mbox_support_random_del(adapter_t *adapter) ...@@ -3124,8 +3109,6 @@ megaraid_mbox_support_random_del(adapter_t *adapter)
return 0; return 0;
} }
mbox = (mbox_t *)raw_mbox;
memset((caddr_t)raw_mbox, 0, sizeof(mbox_t)); memset((caddr_t)raw_mbox, 0, sizeof(mbox_t));
raw_mbox[0] = FC_DEL_LOGDRV; raw_mbox[0] = FC_DEL_LOGDRV;
...@@ -3230,12 +3213,8 @@ megaraid_mbox_enum_raid_scsi(adapter_t *adapter) ...@@ -3230,12 +3213,8 @@ megaraid_mbox_enum_raid_scsi(adapter_t *adapter)
static void static void
megaraid_mbox_flush_cache(adapter_t *adapter) megaraid_mbox_flush_cache(adapter_t *adapter)
{ {
mbox_t *mbox;
uint8_t raw_mbox[sizeof(mbox_t)]; uint8_t raw_mbox[sizeof(mbox_t)];
mbox = (mbox_t *)raw_mbox;
memset((caddr_t)raw_mbox, 0, sizeof(mbox_t)); memset((caddr_t)raw_mbox, 0, sizeof(mbox_t));
raw_mbox[0] = FLUSH_ADAPTER; raw_mbox[0] = FLUSH_ADAPTER;
...@@ -3266,7 +3245,6 @@ megaraid_mbox_fire_sync_cmd(adapter_t *adapter) ...@@ -3266,7 +3245,6 @@ megaraid_mbox_fire_sync_cmd(adapter_t *adapter)
mbox_t *mbox; mbox_t *mbox;
uint8_t raw_mbox[sizeof(mbox_t)]; uint8_t raw_mbox[sizeof(mbox_t)];
mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter); mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter);
mbox64_t *mbox64;
int status = 0; int status = 0;
int i; int i;
uint32_t dword; uint32_t dword;
...@@ -3277,7 +3255,6 @@ megaraid_mbox_fire_sync_cmd(adapter_t *adapter) ...@@ -3277,7 +3255,6 @@ megaraid_mbox_fire_sync_cmd(adapter_t *adapter)
raw_mbox[0] = 0xFF; raw_mbox[0] = 0xFF;
mbox64 = raid_dev->mbox64;
mbox = raid_dev->mbox; mbox = raid_dev->mbox;
/* Wait until mailbox is free */ /* Wait until mailbox is free */
...@@ -3761,10 +3738,6 @@ megaraid_mbox_mm_done(adapter_t *adapter, scb_t *scb) ...@@ -3761,10 +3738,6 @@ megaraid_mbox_mm_done(adapter_t *adapter, scb_t *scb)
static int static int
gather_hbainfo(adapter_t *adapter, mraid_hba_info_t *hinfo) 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_vendor_id = adapter->pdev->vendor;
hinfo->pci_device_id = adapter->pdev->device; hinfo->pci_device_id = adapter->pdev->device;
hinfo->subsys_vendor_id = adapter->pdev->subsystem_vendor; hinfo->subsys_vendor_id = adapter->pdev->subsystem_vendor;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment