lkml.org 
[lkml]   [2007]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: drivers/mtd/devices/doc2000.c - address of 'eccbuf' will always evaluate as 'true' , warnings
Jörn Engel wrote:
> On Sun, 22 July 2007 22:29:29 +0200, Gabriel C wrote:
>> @@ -896,25 +896,6 @@ static int doc_write(struct mtd_info *mtd, loff_t to, size_t len,
>> /* Let the caller know we completed it */
>> *retlen += len;
>>
>> - if (eccbuf) {
>> - unsigned char x[8];
>> - size_t dummy;
>> - int ret;
>> -
>> - /* Write the ECC data to flash */
>> - for (di=0; di<6; di++)
>> - x[di] = eccbuf[di];
>> -
>> - x[6]=0x55;
>> - x[7]=0x55;
>> -
>> - ret = doc_write_oob_nolock(mtd, to, 8, &dummy, x);
>> - if (ret) {
>> - mutex_unlock(&this->lock);
>> - return ret;
>> - }
>> - }
>> -
>> to += len;
>> left -= len;
>> buf += len;
>
> You should remove the condition, but not the conditional code.

Sorry , I was away from keyboard.

Then I can't understand what this code is doing :/

So let Thomas or someone know this code fix it.

>
> Jörn
>

Regards,

Gabriel
-
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/

\
 
 \ /
  Last update: 2007-07-23 00:49    [W:0.038 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site