소스 검색

[PATCH] uml: comment about cast build fix

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>
Paolo 'Blaisorblade' Giarrusso 20 년 전
부모
커밋
a46c904764
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      arch/um/os-Linux/aio.c

+ 1 - 0
arch/um/os-Linux/aio.c

@@ -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);