[PATCH] Staging: memrar: moved user code away from core code moved memrar_ioctl, rar_reserve, rar_release, rar_handle_to_bus to memrar_user.c

Jiri Slaby jirislaby at gmail.com
Thu Jul 29 13:13:42 UTC 2010


On 07/29/2010 07:12 AM, Chris McIntosh wrote:
> +		/*
> +		 * @todo Do we need to verify destination pointer
> +		 *       "argp" is non-zero?  Is that already done by
> +		 *       copy_to_user()?
> +		 */

FWIW you need not. (Unless you want argp == NULL being noop and not to
return -EFAULT in that case.)

> +		return copy_to_user(argp,
> +				    &rar_info,
> +				    sizeof(rar_info)) ? -EFAULT : 0;

regards,
-- 
js



More information about the devel mailing list