1 #define __user __attribute__((address_space(1)))
3 typedef unsigned long ulong
;
4 typedef struct s obj_t
;
6 static void expl(ulong u
, void *v
, obj_t
*o
, obj_t __user
*p
)
22 (obj_t __user
*)(p
); // ok
26 * check-name: Waddress-space-strict
27 * check-command: sparse -Wcast-from-as -Wcast-to-as $file
30 Waddress-space-strict.c:12:10: warning: cast adds address space '<asn:1>' to expression
31 Waddress-space-strict.c:17:10: warning: cast adds address space '<asn:1>' to expression
32 Waddress-space-strict.c:19:10: warning: cast removes address space '<asn:1>' of expression
33 Waddress-space-strict.c:20:10: warning: cast removes address space '<asn:1>' of expression
34 Waddress-space-strict.c:21:10: warning: cast removes address space '<asn:1>' of expression