lkml.org 
[lkml]   [2014]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: ced1401: fix sparse warning for ced1401
On Sat, Jun 14, 2014 at 02:04:38PM +0900, Seunghun Lee wrote:
> This patch fixes below warning.
>
> drivers/staging/ced1401/ced_ioc.c:703:30: warning: incorrect type in assignment (different address spaces)
> drivers/staging/ced1401/ced_ioc.c:703:30: expected void *[usertype] lpvBuff
> drivers/staging/ced1401/ced_ioc.c:703:30: got char [noderef] <asn:1>*puBuf
>
> Signed-off-by: Seunghun Lee <waydi1@gmail.com>
> ---
> drivers/staging/ced1401/ced_ioc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/ced1401/ced_ioc.c b/drivers/staging/ced1401/ced_ioc.c
> index ebbc509..963b941 100644
> --- a/drivers/staging/ced1401/ced_ioc.c
> +++ b/drivers/staging/ced1401/ced_ioc.c
> @@ -700,7 +700,7 @@ static int SetArea(DEVICE_EXTENSION *pdx, int nArea, char __user *puBuf,
> /* kmap() or kmap_atomic() to get a virtual address. page_address will give you */
> /* (null) or at least it does in this context with an x86 machine. */
> spin_lock_irq(&pdx->stagedLock);
> - pTA->lpvBuff = puBuf; /* keep start of region (user address) */
> + pTA->lpvBuff = (__force void *)puBuf; /* keep start of region (user address) */

Shouldn't you change the type of lpvBuff instead of having to force this
cast?

thanks,

greg k-h


\
 
 \ /
  Last update: 2014-06-19 08:21    [W:0.061 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site