* [PATCH] kill a useless global array from aacraid
@ 2004-02-07 14:58 Christoph Hellwig
0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2004-02-07 14:58 UTC (permalink / raw)
Cc: mark_salyzyn, linux-scsi
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..
--- 1.21/drivers/scsi/aacraid/aachba.c Wed Nov 19 19:36:23 2003
+++ edited/drivers/scsi/aacraid/aachba.c Mon Jan 12 10:19:36 2004
@@ -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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-02-07 14:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-07 14:58 [PATCH] kill a useless global array from aacraid Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox