Re: [patch] f2fs: dereferencing an ERR_PTR

Dan Carpenter
2013-05-23T10:12:40Z

Btw, Linus's new Sparse changes don't like the f2fs's NEW_ADDR
macro.

#define NEW_ADDR -1U

We use it like this:

block_t src, dest;

if (src != dest && dest != NEW_ADDR && dest != NULL_ADDR) {

block_t is 64 bits so probably the macro should probably be:

#define NEW_ADDR ((block_t)-1)

I'm not able to test this so there may be some reason why changing
this breaks something. In that case we could do:

#define NEW_ADDR ((u32)(block_t)-1) /* explanation */

regards,
dan carpenter