diff options
author | Christoph Hellwig <hch@lst.de> | 2018-10-13 09:26:28 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-10-15 23:00:39 -0400 |
commit | 86117d7f9569820795c8f6b9a1c9b911cb5037c7 (patch) | |
tree | 350a38e72a681be34bc16dba275b97c17bb1fe10 /drivers/scsi/esp_scsi.c | |
parent | 3f9295b65ea44194252d60376036a3618d822152 (diff) |
scsi: esp_scsi: remove union in esp_cmd_priv
The dma_addr_t member is unused ever since we switched the SCSI
layer to send down single-segement command using a scatterlist
as well many years ago.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/esp_scsi.c')
-rw-r--r-- | drivers/scsi/esp_scsi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c index c88d0cbe5d1f..5cd97d2e9105 100644 --- a/drivers/scsi/esp_scsi.c +++ b/drivers/scsi/esp_scsi.c @@ -379,14 +379,14 @@ static void esp_map_dma(struct esp *esp, struct scsi_cmnd *cmd) * For pseudo DMA and PIO we need the virtual address instead of * a dma address, so perform an identity mapping. */ - spriv->u.num_sg = scsi_sg_count(cmd); - for (i = 0; i < spriv->u.num_sg; i++) { + spriv->num_sg = scsi_sg_count(cmd); + for (i = 0; i < spriv->num_sg; i++) { sg[i].dma_address = (uintptr_t)sg_virt(&sg[i]); total += sg_dma_len(&sg[i]); } } else { - spriv->u.num_sg = scsi_dma_map(cmd); - for (i = 0; i < spriv->u.num_sg; i++) + spriv->num_sg = scsi_dma_map(cmd); + for (i = 0; i < spriv->num_sg; i++) total += sg_dma_len(&sg[i]); } spriv->cur_residue = sg_dma_len(sg); @@ -982,7 +982,7 @@ static int esp_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_ cmd->scsi_done = done; spriv = ESP_CMD_PRIV(cmd); - spriv->u.dma_addr = ~(dma_addr_t)0x0; + spriv->num_sg = 0; list_add_tail(&ent->list, &esp->queued_cmds); @@ -1372,7 +1372,7 @@ static int esp_data_bytes_sent(struct esp *esp, struct esp_cmd_entry *ent, struct esp_cmd_priv *p = ESP_CMD_PRIV(cmd); u8 *ptr; - ptr = scsi_kmap_atomic_sg(p->cur_sg, p->u.num_sg, + ptr = scsi_kmap_atomic_sg(p->cur_sg, p->num_sg, &offset, &count); if (likely(ptr)) { *(ptr + offset) = bval; |