[PATCH] staging: lustre: fix pointer declarations

Joe Perches joe at perches.com
Wed Nov 26 02:05:42 UTC 2014


On Tue, 2014-11-25 at 21:44 +0100, Zahari Doychev wrote:
> This patch fixes pointer declarations from void * to void __user * in order
> to remove some sparse warnings.

This patch does more than that.

Please make sure to describe all of the changes
in a patch in the commit message.

> diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
[]
> @@ -780,22 +780,22 @@ void lnet_copy_kiov2kiov(unsigned int ndkiov, lnet_kiov_t *dkiov,
>  			  unsigned int soffset, unsigned int nob);
>  
>  static inline void
> -lnet_copy_iov2flat(int dlen, void *dest, unsigned int doffset,
> +lnet_copy_iov2flat(int dlen, void __user *dest, unsigned int doffset,
>  		   unsigned int nsiov, struct iovec *siov, unsigned int soffset,
>  		   unsigned int nob)
>  {
> -	struct iovec diov = {/*.iov_base = */ dest, /*.iov_len = */ dlen};
> +	struct iovec diov = {.iov_base = dest, .iov_len = dlen};

Now using named initializers too.




More information about the devel mailing list