Re: Bug in __ioremap() + Patch

David Howells (
Thu, 22 Jan 1998 10:45:05 GMT

> Will "~phys_addr + 1" be compiler-safer than "-phys_addr" above?

What effect does negating an unsigned number have? It's not something I've
ever tried... I suppose strictly, the answer probably ought to be zero.

My ~phys_addr+1 does the 2's complement, just as negate does.

> if (!size || -phys_addr < size)
> return NULL;

This looks fairly reasonable, apart from the fact the condition should be "<="
not "<", otherwise my particular case is excluded.

David Howells