Skip to content

Commit

Permalink
[PATCH] uml: comment about cast build fix
Browse files Browse the repository at this point in the history
Explain why the casting we do to silence this warning is indeed safe.

It is because the field we're casting from, though being 64-bit wide, was filled
with a pointer in first place by ourselves.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Paolo 'Blaisorblade' Giarrusso authored and Linus Torvalds committed Sep 21, 2005
1 parent ae756df commit a46c904
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/um/os-Linux/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ static int aio_thread(void *arg)
"errno = %d\n", errno);
}
else {
/* This is safe as we've just a pointer here. */
aio = (struct aio_context *) (long) event.data;
if(update_aio(aio, event.res)){
do_aio(ctx, aio);
Expand Down

0 comments on commit a46c904

Please sign in to comment.