Today, while I'm trying to debug the kernel for the Samsung Galaxy S2 USB OTG with a USB hub and a usb mouse. I enabled "USB verbose debug messages" and got this error:

[code]

/mnt/tok/projects/s2kernel/samsung-kernel-galaxysii
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  GEN     usr/initramfs_data.cpio
  AS      usr/initramfs_data.o
  LD      usr/built-in.o
  CC      drivers/usb/core/usb.o
  CC      drivers/usb/core/hub.o
  CC      drivers/usb/core/hcd.o
  CC      drivers/usb/host/ehci-hcd.o
  CC      drivers/usb/core/urb.o
In file included from drivers/usb/host/ehci-hcd.c:116:
drivers/usb/host/ehci-dbg.c: In function 'dbg_hcc_params':
drivers/usb/host/ehci-dbg.c:93: warning: format '%d' expects type 'int', but argument 6 has type 'char * const'
drivers/usb/host/ehci-dbg.c:93: warning: too few arguments for format
drivers/usb/host/ehci-dbg.c: In function 'debug_lpm_write':
drivers/usb/host/ehci-dbg.c:993: error: implicit declaration of function 'copy_from_user'
  CC      drivers/usb/core/message.o
In file included from drivers/usb/host/ehci-hcd.c:1198:
drivers/usb/host/ehci-s5pv210.c: At top level:
drivers/usb/host/ehci-s5pv210.c:332: warning: initialization from incompatible pointer type
drivers/usb/host/ehci-s5pv210.c: In function 'create_ehci_sys_file':
drivers/usb/host/ehci-s5pv210.c:425: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result
make[3]: *** [drivers/usb/host/ehci-hcd.o] Error 1
make[2]: *** [drivers/usb/host] Error 2
make[2]: *** Waiting for unfinished jobs....
  CC      drivers/usb/core/driver.o
  CC      drivers/usb/core/config.o
  CC      drivers/usb/core/file.o
  CC      drivers/usb/core/buffer.o
  CC      drivers/usb/core/sysfs.o
  CC      drivers/usb/core/endpoint.o
  CC      drivers/usb/core/devio.o
  CC      drivers/usb/core/notify.o
  CC      drivers/usb/core/generic.o
  CC      drivers/usb/core/quirks.o
  CC      drivers/usb/core/devices.o
  CC      drivers/usb/core/inode.o
  LD      drivers/usb/core/usbcore.o
  LD      drivers/usb/core/built-in.o
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2
[/code]

The kernel is from here: https://github.com/GalaxySII/samsung-kernel-galaxysii.git

The problem is ehci-dbg.c does not include asm/uaccess.h, so to solve this, just add

[code]

#include <asm/uaccess.h>

 [/code]

to drivers/usb/host/ehci-dbg.c and you are good to go.