x86: partially undo "fix build with gcc 7"
authorJan Beulich <jbeulich@suse.com>
Thu, 1 Jun 2017 08:50:25 +0000 (10:50 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 1 Jun 2017 08:50:25 +0000 (10:50 +0200)
While f32400e90c ("x86: fix build with gcc 7")'s change to
compat_array_access_ok() is necessary, I had blindly and needlessly
also added it to array_access_ok(). There's no conditional expression
involved there, so undo it.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/include/asm-x86/x86_64/uaccess.h

index 083ea9d0c39f615370d0ecc398b0ef1cdaa3d6f1..d7dad4f8bce595790f10cd1f269f23ca56108033 100644 (file)
@@ -42,7 +42,7 @@ extern void *xlat_malloc(unsigned long *xlat_page_current, size_t size);
 
 #define array_access_ok(addr, count, size) \
     (likely(((count) ?: 0UL) < (~0UL / (size))) && \
-     access_ok(addr, 0 + (count) * (size)))
+     access_ok(addr, (count) * (size)))
 
 #define __compat_addr_ok(d, addr) \
     ((unsigned long)(addr) < HYPERVISOR_COMPAT_VIRT_START(d))