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

Nevertheless he’s right. uid_t is a simple unsigned int; kuid_t is a struct with an uid_t inside which was introduced late 2011. If you really need this hunk then you’re using some heavily patched third party sources. vanilla kernels don’t need it.

Btw, here’s a much simpler one which also works on 3.14 (all the way back to 3.0)

diff -Naurp NVIDIA-Linux-x86_64-334.16.ORIG/kernel/nv-linux.h NVIDIA-Linux-x86_64-334.16/kernel/nv-linux.h
--- NVIDIA-Linux-x86_64-334.16.ORIG/kernel/nv-linux.h   2014-02-04 22:45:24.000000000 +0100
+++ NVIDIA-Linux-x86_64-334.16/kernel/nv-linux.h        2014-02-11 21:00:58.172923793 +0100
@@ -273,7 +273,11 @@ extern int nv_pat_mode;
 #endif

 #if !defined(NV_VMWARE) && defined(CONFIG_ACPI)
-#include <acpi/acpi.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
+#include <acpi/acpi.h>
+#else
+#include <linux/acpi.h>
+#endif
 #include <acpi/acpi_drivers.h>
 #if defined(NV_ACPI_DEVICE_OPS_HAS_MATCH) || defined(ACPI_VIDEO_HID)
 #define NV_LINUX_ACPI_EVENTS_SUPPORTED 1
@@ -308,6 +312,7 @@ extern int nv_pat_mode;
 #endif

 #if defined(NV_LINUX_ACPI_EVENTS_SUPPORTED)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
 #if (NV_ACPI_OS_WAIT_EVENTS_COMPLETE_ARGUMENT_COUNT == 1)
 #define NV_ACPI_OS_WAIT_EVENTS_COMPLETE() \
     acpi_os_wait_events_complete(NULL)
@@ -317,6 +322,11 @@ extern int nv_pat_mode;
 #else
 #error "NV_ACPI_OS_WAIT_EVENTS_COMPLETE_ARGUMENT_COUNT value unrecognized!"
 #endif
+#else
+/* starting with 3.13 acpi_remove_notify_handler() waits for events to finish */
+#define NV_ACPI_OS_WAIT_EVENTS_COMPLETE() \
+    do { } while (0)
+#endif
 #endif

 #if defined(CONFIG_PREEMPT_RT) || defined(CONFIG_PREEMPT_RT_FULL)