lkml.org 
[lkml]   [1998]   [Jan]   [22]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Bug in __ioremap() + Patch
DateThu, 22 Jan 1998 10:45:05 GMT
FromDavid 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

\
 
 \ /
  Last update: 2005-03-22 12:41    [from the cache]
©2003-2008