Re: drivers/mtd/devices/doc2000.c - address of 'eccbuf' will alwaysevaluate as 'true' , warnings

From: Gabriel C
Date: Sun Jul 22 2007 - 18:47:26 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/