add-ons/kernel: add casts when calling atomic_*()
Soon GCC is going to be a bit stricter about the type of pointer passed to atomic_*() functions. Signed-off-by: Paweł Dziepak <[email protected]>
This commit is contained in:
@@ -409,7 +409,7 @@ channel_removed(void *cookie)
|
|||||||
TRACE("channel_removed()\n");
|
TRACE("channel_removed()\n");
|
||||||
|
|
||||||
// disable access instantly
|
// disable access instantly
|
||||||
atomic_or(&channel->lost, 1);
|
atomic_or((int32*)&channel->lost, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -545,7 +545,7 @@ motor_off_daemon(void *t, int tim)
|
|||||||
for (i = 0; i < MAX_FLOPPIES; i++) {
|
for (i = 0; i < MAX_FLOPPIES; i++) {
|
||||||
if (floppies[i].iobase && !floppies[i].pending_cmd && floppies[i].motor_timeout > 0) {
|
if (floppies[i].iobase && !floppies[i].pending_cmd && floppies[i].motor_timeout > 0) {
|
||||||
TRACE("floppies[%d].motor_timeout = %ld\n", i, floppies[i].motor_timeout);
|
TRACE("floppies[%d].motor_timeout = %ld\n", i, floppies[i].motor_timeout);
|
||||||
if (atomic_add(&floppies[i].motor_timeout, -500000) <= 500000) {
|
if (atomic_add((int32*)&floppies[i].motor_timeout, -500000) <= 500000) {
|
||||||
dprintf("turning off motor for drive %d\n", floppies[i].drive_num);
|
dprintf("turning off motor for drive %d\n", floppies[i].drive_num);
|
||||||
turn_off_motor(&floppies[i]);
|
turn_off_motor(&floppies[i]);
|
||||||
floppies[i].motor_timeout = 0;
|
floppies[i].motor_timeout = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user