init/do_mounts_initrd.c: fix sparse warning
Subsystems (2)
PATCH 1/1 init/do_mounts_initrd.c: fix sparse warning
Signed-off-by Alexey Dobriyan <[email protected]>
init/do_mounts_initrd.c +2 -2
@@ -41,7 +41,7 @@ static int __init do_linuxrc(void * shelstatic void __init handle_initrd (void ) {int error; -int i, pid; +int pid; real_root_dev =new_encode_dev (ROOT_DEV );create_dev ("/dev/root.old" , Root_RAM0,NULL );
@@ -58,7 +58,7 @@ static void __init handle_initrd(void) pid =kernel_thread (do_linuxrc,"/linuxrc" ,SIGCHLD );if (pid >0 ) { -while (pid !=sys_wait4 (-1 , &i,0 ,NULL )) +while (pid !=sys_wait4 (-1 ,NULL ,0 ,NULL ))yield (); }
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
[walter, I got "Sender address rejected: Access denied", replying to the list]
Quoted 1 line · walter harms
pid should be
pid_t
Well, yes.
Quoted 1 line
because different architectures have different sizes for it.
No. pid_t => __kernel_pid_t => int => 32 bit an all archs. Look at include/asm-*/types.h and see what s32 is always typedef'ed to.
Alexey
Quoted 8 lines
init/do_mounts_initrd.c static int __init do_linuxrc(void * shel
Quoted 8 lines
init/do_mounts_initrd.c +2
-2-int i, pid; +int pid; -while (pid !=sys_wait4 (-1 , &i,0 ,NULL )) +while (pid !=sys_wait4 (-1 ,NULL ,0 ,NULL ))
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors