From 43158d9e744e8012e28fecdb4d317d391a1db8ff Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 13 Oct 2017 12:03:58 +0200 Subject: backports: add fixed version of __verify_pcpu_ptr Some parts of the code (ath_cmn_is_fft_buf_full) use a per-CPU pointer to an array, so we need to backport the fixed version or this fails to compile in 3.10/3.11. Signed-off-by: Johannes Berg --- backport/backport-include/linux/percpu-defs.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 backport/backport-include/linux/percpu-defs.h diff --git a/backport/backport-include/linux/percpu-defs.h b/backport/backport-include/linux/percpu-defs.h new file mode 100644 index 00000000..87a92e07 --- /dev/null +++ b/backport/backport-include/linux/percpu-defs.h @@ -0,0 +1,13 @@ +#ifndef __BACKPORT_PERCPU_DEFS_H +#define __BACKPORT_PERCPU_DEFS_H +#include_next + +/* override this with the array-safe version */ +#undef __verify_pcpu_ptr +#define __verify_pcpu_ptr(ptr) \ +do { \ + const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \ + (void)__vpp_verify; \ +} while (0) + +#endif /* __BACKPORT_PERCPU_DEFS_H */ -- cgit v1.2.3