lkml.org 
[lkml]   [2016]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space
On Wed, Dec 07, 2016 at 04:20:06PM +0100, Quentin Lambert wrote:
> Hi all,
>
> I am looking at the drivers/staging/lustre/lustre/llite/dir.c:
>
> 1469 /* Call mdc_iocontrol */
> 1470 rc = obd_iocontrol(LL_IOC_FID2MDTIDX, exp,
> sizeof(fid), &fid,
> 1471 &index);
> 1472 if (rc)
>
> and sparse says:
>
> drivers/staging/lustre/lustre/llite/dir.c:1471:37: warning:
> incorrect type in argument 5 (different address spaces)
>
> I was wondering if there was any value to add a cast to fix the warning?
> And I guess this solution would also apply in my original patch to
>
> drivers/staging/lustre/lnet/lnet/lib-socket.c

Just leave these alone until someone can come clean it up properly.

Warnings are good! People have spent years and years to create
programs to print warnings. Don't silence the warning by adding a cast.
The warning means show that the code is dangerous.

regards,
dan carpenter

\
 
 \ /
  Last update: 2016-12-07 16:33    [W:0.065 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site