Re: [patch 1/2] cciss: cleans up warnings in the 32/64 bit conversions
From: Maciej W. Rozycki
Date:  Thu Oct 21 2004 - 19:13:02 EST
On Thu, 21 Oct 2004 mike.miller@xxxxxx wrote:
> @@ -611,7 +610,7 @@ int cciss_ioctl32_passthru(unsigned int 
>  	err |= copy_from_user(&arg64.Request, &arg32->Request, sizeof(arg64.Request));
>  	err |= copy_from_user(&arg64.error_info, &arg32->error_info, sizeof(arg64.error_info));
>  	err |= get_user(arg64.buf_size, &arg32->buf_size);
> -	err |= get_user(arg64.buf, &arg32->buf);
> +	err |= get_user((__u64) arg64.buf, &arg32->buf);
>  	if (err) 
>  		return -EFAULT; 
>  
> @@ -641,7 +640,7 @@ int cciss_ioctl32_big_passthru(unsigned 
>  	err |= copy_from_user(&arg64.error_info, &arg32->error_info, sizeof(arg64.error_info));
>  	err |= get_user(arg64.buf_size, &arg32->buf_size);
>  	err |= get_user(arg64.malloc_size, &arg32->malloc_size);
> -	err |= get_user(arg64.buf, &arg32->buf);
> +	err |= get_user((__u64) arg64.buf, &arg32->buf);
>  	if (err) return -EFAULT; 
>  	old_fs = get_fs();
>  	set_fs(KERNEL_DS);
 These constructs (casts as lvalues) are deprecated with GCC 3.4 (a
warning is triggered) and no longer supported with 4.0.  Please consider
rewriting -- you'll probably need an auxiliary variable.
  Maciej
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/