1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
3  *
4  * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
5  *
6  * Modifications for inclusion into the Linux staging tree are
7  * Copyright(c) 2010 Larry Finger. All rights reserved.
8  *
9  * Contact information:
10  * WLAN FAE <wlanfae@realtek.com>
11  * Larry Finger <Larry.Finger@lwfinger.net>
12  *
13  ******************************************************************************/
14 #ifndef __BASIC_TYPES_H__
15 #define __BASIC_TYPES_H__
16 
17 #define SUCCESS	0
18 #define FAIL	(-1)
19 
20 #include <linux/types.h>
21 
22 #define SIZE_T __kernel_size_t
23 #define sint signed int
24 #define FIELD_OFFSET(s, field)	((addr_t)&((s *)(0))->field)
25 
26 /* Should we extend this to be host_addr_t and target_addr_t for case:
27  *	host : x86_64
28  *	target : mips64
29  */
30 #define addr_t unsigned long
31 
32 #define MEM_ALIGNMENT_OFFSET	(sizeof(SIZE_T))
33 #define MEM_ALIGNMENT_PADDING	(sizeof(SIZE_T) - 1)
34 
35 #endif /*__BASIC_TYPES_H__*/
36 
37