lkml.org 
[lkml]   [2014]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/2] [drivers] staging/lustre: fix sparse warnings
Date
The non-posix initializers are a holdover from Windows, where the compiler doesn't have C99 initializers. We don't need that anymore, so the initializer can indeed be uncommented. 

Cheers, Andreas

> On Nov 24, 2014, at 16:41, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
>> On Mon, Nov 24, 2014 at 07:55:41PM +0100, Zahari Doychev wrote:
>> --- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
>> +++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
>> @@ -784,7 +784,8 @@ lnet_copy_iov2flat(int dlen, void *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 = */ (void __user *)dest,
>> + /*.iov_len = */ dlen};
>>
>
> Why can't we just make the comments into code by removing the /*
> characters? Remove the cast by declaring the data as __user data to
> begin with instead of declaring it incorrectly and then casting to the
> correct type later.
>
> Also it's not allowed to send two patches with the exact same subject.
> Also the subject was sucky and too vague anyway. :)
>
> regards,
> dan carpenter
>


\
 
 \ /
  Last update: 2014-11-25 02:21    [W:0.085 / U:1.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site