Messages in this thread | | | Subject | Re: Bug in __ioremap() + Patch | Date | Thu, 22 Jan 1998 10:45:05 GMT | From | David Howells <> |
| |
> 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
| |