1 #ifndef __NVIF_UNPACK_H__
2 #define __NVIF_UNPACK_H__
4 #define nvif_unvers(d) ({ \
5 ret = (size == sizeof(d)) ? 0 : -ENOSYS; \
9 #define nvif_unpack(d,vl,vh,m) ({ \
10 if ((vl) == 0 || ret == -ENOSYS) { \
11 int _size = sizeof(d); \
12 if (_size <= size && (d).version >= (vl) && \
13 (d).version <= (vh)) { \
14 data = (u8 *)data + _size; \
15 size = size - _size; \
16 ret = ((m) || !size) ? 0 : -E2BIG; \