kill a useless global array from aacraid
Subsystems (2)
PATCH 1/1 kill a useless global array from aacraid
We can always get the fsa_scsi_hba from the aac_dev. Not that I have the slightest clue why we need two structures to start with..
drivers/scsi/aacraid/aachba.c +2 -8
@@ -195,7 +195,6 @@* M O D U L E G L O B A L S */ -static struct fsa_scsi_hba *fsa_dev[MAXIMUM_NUM_ADAPTERS ];/* SCSI Device Instance Pointers */ static struct sense_data sense_data[MAXIMUM_NUM_CONTAINERS ];static unsigned long aac_build_sg (struct scsi_cmnd * scsicmd,struct sgmap * sgmap);static unsigned long aac_build_sg64 (struct scsi_cmnd * scsicmd,struct sgmap64 * psg);
@@ -264,7 +263,6 @@ } }fib_free (fibptr); - fsa_dev[instance] = fsa_dev_ptr;return status; }
@@ -859,16 +857,12 @@int aac_scsi_cmd (struct scsi_cmnd * scsicmd) {u32 cid =0 ; -struct fsa_scsi_hba *fsa_dev_ptr; -int cardtype;int ret;struct Scsi_Host *host = scsicmd->device->host;struct aac_dev *dev = (struct aac_dev *)host->hostdata; +struct fsa_scsi_hba *fsa_dev_ptr = &dev->fsa_dev; +int cardtype = dev->cardtype; - cardtype = dev->cardtype; - - fsa_dev_ptr = fsa_dev[host->unique_id]; -/* * If the bus, target or lun is out of range, return fail * Test does not apply to ID 16, the pseudo id for the controller