Skip to contentSkip to conversation

Fill in remaining MTD driver data for OneNAND (take #2)

PATCH New Fathi BOUDRA 2 participants 2 messages Aug 6, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fill in remaining MTD driver data for OneNAND (take #2)

Quoted 1 line

Don't cast the return of malloc.

ok.

Quoted 1 line

Why not just declare a static array?

I tried with a static array but it doesn't give the expected result (a quick test with onenand info command returns an empty mtd name), so I used a pointer.

Quoted 2 lines

It'd be better to use snprintf, even if you're pretty sure it won't overflow.

I tried it too :) U-Boot doesn't have snprintf or asprintf or I missed something.

Do I need to re-submit the patch only for cast ?

cheers,

Fathi

#1 lore raw

PATCH 1/1 Fill in remaining MTD driver data for OneNAND (take #2)

Quoted 5 lines · Fathi BOUDRA
Quoted 1 line

Why not just declare a static array?

I tried with a static array but it doesn't give the expected result (a quick test with onenand info command returns an empty mtd name), so I used a pointer.

Odd... Maybe a relocation issue?

Quoted 5 lines
Quoted 2 lines

It'd be better to use snprintf, even if you're pretty sure it won't overflow.

I tried it too :) U-Boot doesn't have snprintf or asprintf or I missed something.

Hmm, so it doesn't. That sucks.

Quoted 1 line

Do I need to re-submit the patch only for cast ?

No, I'll fix it and apply to nand-flash/testing.

-Scott