Re: [RFC] Optimising IS_ERR_OR_NULL

2014-04-05 Thread Alexander Holler
Am 05.04.2014 16:43, schrieb Matthew Wilcox: (4 days too late for April Fools ... oh well :-) I don't like the look of IS_ERR_OR_NULL. It does two tests when (due to the bit patterns used to represent errors and NULL pointers) it could use just one: #define IS_ERR_VALUE(x) unlikely((x) >= (un

[RFC] Optimising IS_ERR_OR_NULL

2014-04-05 Thread Matthew Wilcox
(4 days too late for April Fools ... oh well :-) I don't like the look of IS_ERR_OR_NULL. It does two tests when (due to the bit patterns used to represent errors and NULL pointers) it could use just one: #define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO) static inline long __m