1*c85f09ccSJohn Levon #define __user __attribute__((address_space(__user)))
2*c85f09ccSJohn Levon 
3*c85f09ccSJohn Levon extern void fun(void *addr);
4*c85f09ccSJohn Levon 
foo(void __user * ptr)5*c85f09ccSJohn Levon static void foo(void __user *ptr)
6*c85f09ccSJohn Levon {
7*c85f09ccSJohn Levon 	return fun(ptr);
8*c85f09ccSJohn Levon }
9*c85f09ccSJohn Levon /*
10*c85f09ccSJohn Levon  * check-name: as-name attribute
11*c85f09ccSJohn Levon  *
12*c85f09ccSJohn Levon  * check-error-start
13*c85f09ccSJohn Levon as-name.c:7:20: warning: incorrect type in argument 1 (different address spaces)
14*c85f09ccSJohn Levon as-name.c:7:20:    expected void *addr
15*c85f09ccSJohn Levon as-name.c:7:20:    got void __user *ptr
16*c85f09ccSJohn Levon  * check-error-end
17*c85f09ccSJohn Levon  */
18