Skip to content
Snippets Groups Projects
Commit 0b94504d authored by Greg Lopp's avatar Greg Lopp Committed by Stefan Roese
Browse files

[PATCH] Fix use of "void *" for block dev read/write buffer pointers

parent 2ad3aba0
No related branches found
No related tags found
No related merge requests found
...@@ -1344,7 +1344,7 @@ ulong ide_read (int device, lbaint_t blknr, ulong blkcnt, void *buffer) ...@@ -1344,7 +1344,7 @@ ulong ide_read (int device, lbaint_t blknr, ulong blkcnt, void *buffer)
++n; ++n;
++blknr; ++blknr;
buffer += ATA_SECTORWORDS; buffer += ATA_BLOCKSIZE;
} }
IDE_READ_E: IDE_READ_E:
ide_led (DEVICE_LED(device), 0); /* LED off */ ide_led (DEVICE_LED(device), 0); /* LED off */
...@@ -1428,7 +1428,7 @@ ulong ide_write (int device, lbaint_t blknr, ulong blkcnt, void *buffer) ...@@ -1428,7 +1428,7 @@ ulong ide_write (int device, lbaint_t blknr, ulong blkcnt, void *buffer)
c = ide_inb (device, ATA_STATUS); /* clear IRQ */ c = ide_inb (device, ATA_STATUS); /* clear IRQ */
++n; ++n;
++blknr; ++blknr;
buffer += ATA_SECTORWORDS; buffer += ATA_BLOCKSIZE;
} }
WR_OUT: WR_OUT:
ide_led (DEVICE_LED(device), 0); /* LED off */ ide_led (DEVICE_LED(device), 0); /* LED off */
...@@ -2052,7 +2052,7 @@ ulong atapi_read (int device, lbaint_t blknr, ulong blkcnt, void *buffer) ...@@ -2052,7 +2052,7 @@ ulong atapi_read (int device, lbaint_t blknr, ulong blkcnt, void *buffer)
n+=cnt; n+=cnt;
blkcnt-=cnt; blkcnt-=cnt;
blknr+=cnt; blknr+=cnt;
buffer+=cnt*(ATAPI_READ_BLOCK_SIZE/4); /* ulong blocksize in ulong */ buffer+=(cnt*ATAPI_READ_BLOCK_SIZE);
} while (blkcnt > 0); } while (blkcnt > 0);
return (n); return (n);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment