From 2408e5f96de93e22590ee9528c9c46ed40b65698 Mon Sep 17 00:00:00 2001 From: Alexander Viro Date: Fri, 27 Aug 2004 06:59:05 -0700 Subject: [PATCH] [PATCH] misc alpha bits * long constant in a.out.h * missing cast to pointer in pgtable.h * removed useless __chk_user_ptr() in get_user() and put_user() - with fixed typeof handling in sparse we are getting the check from __typeof__(*(ptr)) __user *__pu_addr = (ptr); \ anyway, so __chk_user_ptr() is redundant there. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- include/asm-alpha/a.out.h | 2 +- include/asm-alpha/pgtable.h | 2 +- include/asm-alpha/uaccess.h | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/asm-alpha/a.out.h b/include/asm-alpha/a.out.h index 709ea3e381c35..d97daf42753d7 100644 --- a/include/asm-alpha/a.out.h +++ b/include/asm-alpha/a.out.h @@ -95,7 +95,7 @@ struct exec Worse, we have to notice the start address before swapping to use /sbin/loader, which of course is _not_ a TASO application. */ #define SET_AOUT_PERSONALITY(BFPM, EX) \ - set_personality (((BFPM->sh_bang || EX.ah.entry < 0x100000000 \ + set_personality (((BFPM->sh_bang || EX.ah.entry < 0x100000000L \ ? ADDR_LIMIT_32BIT : 0) | PER_OSF4)) #define STACK_TOP \ diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h index 8707a399b3a05..3f1ed39d25e40 100644 --- a/include/asm-alpha/pgtable.h +++ b/include/asm-alpha/pgtable.h @@ -328,7 +328,7 @@ extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset) #endif #define io_remap_page_range(vma, start, busaddr, size, prot) \ - remap_page_range(vma, start, virt_to_phys(__ioremap(busaddr, size)), size, prot) + remap_page_range(vma, start, virt_to_phys((void *)__ioremap(busaddr, size)), size, prot) #define pte_ERROR(e) \ printk("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e)) diff --git a/include/asm-alpha/uaccess.h b/include/asm-alpha/uaccess.h index cc5394e2c7db1..474d06689a1eb 100644 --- a/include/asm-alpha/uaccess.h +++ b/include/asm-alpha/uaccess.h @@ -108,7 +108,6 @@ extern void __get_user_unknown(void); ({ \ long __gu_err = -EFAULT, __gu_val = 0; \ const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ - __chk_user_ptr(ptr); \ if (__access_ok((unsigned long)__gu_addr,size,segment)) { \ __gu_err = 0; \ switch (size) { \ @@ -223,7 +222,6 @@ extern void __put_user_unknown(void); ({ \ long __pu_err = -EFAULT; \ __typeof__(*(ptr)) __user *__pu_addr = (ptr); \ - __chk_user_ptr(ptr); \ if (__access_ok((unsigned long)__pu_addr,size,segment)) { \ __pu_err = 0; \ switch (size) { \ -- 2.53.0