334.16 won't compile for Linux v3.13 (patch included)

The first half of your patch works, it’s just the last chunk that changes nvidia_uvm_linux.h that’s broken. In fact, since you have CONFIG_UID_GID_STRICT_TYPE_CHECKS off, uid.val isn’t even the right thing to return, and would result in a compilation failure if that segment was used. I didn’t say that it would work out of the box on 3.13, just that the change in the patch to nvidia_uvm_linux.h was wrong. Drop that change from your patch and try it. It will compile and work.