Commit e55b73a3 authored by Linus Torvalds's avatar Linus Torvalds

Remove 'const' from min/max, to avoid gcc warning about double usage.

parent d4aecd1a
...@@ -168,14 +168,14 @@ extern void dump_stack(void); ...@@ -168,14 +168,14 @@ extern void dump_stack(void);
* "unnecessary" pointer comparison. * "unnecessary" pointer comparison.
*/ */
#define min(x,y) ({ \ #define min(x,y) ({ \
const typeof(x) _x = (x); \ typeof(x) _x = (x); \
const typeof(y) _y = (y); \ typeof(y) _y = (y); \
(void) (&_x == &_y); \ (void) (&_x == &_y); \
_x < _y ? _x : _y; }) _x < _y ? _x : _y; })
#define max(x,y) ({ \ #define max(x,y) ({ \
const typeof(x) _x = (x); \ typeof(x) _x = (x); \
const typeof(y) _y = (y); \ typeof(y) _y = (y); \
(void) (&_x == &_y); \ (void) (&_x == &_y); \
_x > _y ? _x : _y; }) _x > _y ? _x : _y; })
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment