diff options
| author | Hannes Reinecke <hare@suse.de> | 2020-03-11 00:25:40 +0800 |
|---|---|---|
| committer | Hannes Reinecke <hare@suse.de> | 2021-11-07 16:13:27 +0100 |
| commit | 6c35d6adbd0e5c8c4634ca29482138fa9f369acb (patch) | |
| tree | cee113bb918624fb2b3781275bdb5396659308a7 | |
| parent | c99431781ac24872708d5c4cd78d088659c60c02 (diff) | |
| download | scsi-devel-6c35d6adbd0e5c8c4634ca29482138fa9f369acb.tar.gz | |
hpsa: drop refcount field from CommandList
Field is now unused, so drop it.
Signed-off-by: Hannes Reinecke <hare@suse.com>
| -rw-r--r-- | drivers/scsi/hpsa.c | 11 | ||||
| -rw-r--r-- | drivers/scsi/hpsa_cmd.h | 1 |
2 files changed, 2 insertions, 10 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 987381e2f983d..3647f4565c6df 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -5537,8 +5537,8 @@ static void hpsa_cmd_init(struct ctlr_info *h, int index, { dma_addr_t cmd_dma_handle, err_dma_handle; - /* Zero out all of commandlist except the last field, refcount */ - memset(c, 0, offsetof(struct CommandList, refcount)); + /* Zero out all of commandlist */ + memset(c, 0, sizeof(struct CommandList)); c->Header.tag = cpu_to_le64((u64) (index << DIRECT_LOOKUP_SHIFT)); cmd_dma_handle = h->cmd_pool_dhandle + index * sizeof(*c); c->err_info = h->errinfo_pool + index; @@ -5560,7 +5560,6 @@ static void hpsa_preinitialize_commands(struct ctlr_info *h) struct CommandList *c = h->cmd_pool + i; hpsa_cmd_init(h, i, c); - atomic_set(&c->refcount, 0); } } @@ -6171,7 +6170,6 @@ static struct CommandList *cmd_tagged_alloc(struct ctlr_info *h, return NULL; } - atomic_inc(&c->refcount); hpsa_cmd_partial_init(h, idx, c); /* @@ -6185,11 +6183,6 @@ static struct CommandList *cmd_tagged_alloc(struct ctlr_info *h, static void cmd_tagged_free(struct ctlr_info *h, struct CommandList *c) { - /* - * Release our reference to the block. We don't need to do anything - * else to free it, because it is accessed by index. - */ - (void)atomic_dec(&c->refcount); c->scsi_cmd = NULL; } diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi/hpsa_cmd.h index ba6a3aa8d9540..fe2044032ad42 100644 --- a/drivers/scsi/hpsa_cmd.h +++ b/drivers/scsi/hpsa_cmd.h @@ -454,7 +454,6 @@ struct CommandList { bool retry_pending; struct hpsa_scsi_dev_t *device; - atomic_t refcount; /* Must be last to avoid memset in hpsa_cmd_init() */ } __aligned(COMMANDLIST_ALIGNMENT); /* |
