Commit d8f5c254 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Jeff Garzik

[PATCH] ide: remove dead code from ide_raw_build_sglist()

parent e6b3b6c3
...@@ -250,6 +250,9 @@ static int ide_raw_build_sglist (ide_drive_t *drive, struct request *rq) ...@@ -250,6 +250,9 @@ static int ide_raw_build_sglist (ide_drive_t *drive, struct request *rq)
BUG(); BUG();
if (sector_count > 128) { if (sector_count > 128) {
#else
while (sector_count > 128) {
#endif
memset(&sg[nents], 0, sizeof(*sg)); memset(&sg[nents], 0, sizeof(*sg));
sg[nents].page = virt_to_page(virt_addr); sg[nents].page = virt_to_page(virt_addr);
sg[nents].offset = (unsigned long) virt_addr & ~PAGE_MASK; sg[nents].offset = (unsigned long) virt_addr & ~PAGE_MASK;
...@@ -263,22 +266,7 @@ static int ide_raw_build_sglist (ide_drive_t *drive, struct request *rq) ...@@ -263,22 +266,7 @@ static int ide_raw_build_sglist (ide_drive_t *drive, struct request *rq)
sg[nents].offset = (unsigned long) virt_addr & ~PAGE_MASK; sg[nents].offset = (unsigned long) virt_addr & ~PAGE_MASK;
sg[nents].length = sector_count * SECTOR_SIZE; sg[nents].length = sector_count * SECTOR_SIZE;
nents++; nents++;
#else
while (sector_count > 128) {
memset(&sg[nents], 0, sizeof(*sg));
sg[nents].address = virt_to_page(virt_addr);
sg[nents].offset = (unsigned long)virt_addr & ~PAGE_MASK;
sg[nents].length = 128 * SECTOR_SIZE;
nents++;
virt_addr = virt_addr + (128 * SECTOR_SIZE);
sector_count -= 128;
};
memset(&sg[nents], 0, sizeof(*sg));
sg[nents].page = virt_to_page(virt_addr);
sg[nents].offset = (unsigned long) virt_addr & ~PAGE_MASK;
sg[nents].length = sector_count * SECTOR_SIZE;
nents++;
#endif
return pci_map_sg(hwif->pci_dev, sg, nents, hwif->sg_dma_direction); return pci_map_sg(hwif->pci_dev, sg, nents, hwif->sg_dma_direction);
} }
......
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