lkml.org 
[lkml]   [1998]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Bug in __ioremap() + Patch
Date
From

> 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 13:41    [W:0.039 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site