Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754863AbaFNOfi (ORCPT ); Sat, 14 Jun 2014 10:35:38 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:54489 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754721AbaFNOfh (ORCPT ); Sat, 14 Jun 2014 10:35:37 -0400 Date: Sat, 14 Jun 2014 07:35:29 -0700 From: Greg KH To: Seunghun Lee Cc: devel@driverdev.osuosl.org, alois.schloegl@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: ced1401: fix sparse warning for ced1401 Message-ID: <20140614143529.GA20718@kroah.com> References: <1402722278-23040-1-git-send-email-waydi1@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1402722278-23040-1-git-send-email-waydi1@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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] *puBuf > > Signed-off-by: Seunghun Lee > --- > 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) */ It's usually not good to use __force unless you have to. Can't you fix the type of the variable instead? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/