Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[deliverable/linux.git] / arch / powerpc / boot / types.h
CommitLineData
b2c5f619
MG
1#ifndef _TYPES_H_
2#define _TYPES_H_
3
4#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
5
6typedef unsigned char u8;
7typedef unsigned short u16;
8typedef unsigned int u32;
9typedef unsigned long long u64;
72d06895
GL
10typedef signed char s8;
11typedef short s16;
12typedef int s32;
13typedef long long s64;
b2c5f619 14
656ad58e
OH
15/* required for opal-api.h */
16typedef u8 uint8_t;
17typedef u16 uint16_t;
18typedef u32 uint32_t;
19typedef u64 uint64_t;
20typedef s8 int8_t;
21typedef s16 int16_t;
22typedef s32 int32_t;
23typedef s64 int64_t;
24
b2c5f619
MG
25#define min(x,y) ({ \
26 typeof(x) _x = (x); \
27 typeof(y) _y = (y); \
28 (void) (&_x == &_y); \
29 _x < _y ? _x : _y; })
30
31#define max(x,y) ({ \
32 typeof(x) _x = (x); \
33 typeof(y) _y = (y); \
34 (void) (&_x == &_y); \
35 _x > _y ? _x : _y; })
36
37#endif /* _TYPES_H_ */
This page took 0.620411 seconds and 5 git commands to generate.