lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 25 Nov 2014 00:48:49 +0000
From:	"Dilger, Andreas" <andreas.dilger@...el.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
CC:	Zahari Doychev <zahari.doychev@...ux.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	"Drokin, Oleg" <oleg.drokin@...el.com>,
	"bergwolf@...il.com" <bergwolf@...il.com>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
Subject: Re: [PATCH 1/2] [drivers] staging/lustre: fix sparse warnings

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@...cle.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
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ