lkml.org 
[lkml]   [2009]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 12/27] asm-generic: add a NOMMU uaccess.h
On Thu, Nov 06, 2008 at 04:31:03PM +0100, Arnd Bergmann wrote:
> +#define put_user(x, ptr) ( \
> + access_ok(VERIFY_WRITE, ptr, sizeof (*ptr)) ? \
> + __put_user(x, ptr) : \
> + -EFAULT)
> +
> +#ifndef __get_user
> +#define __get_user(x, ptr) \
> +({ \
> + int __gu_err = 0; \
> + unsigned long __gu_val = (unsigned long)*ptr; \
> + switch (sizeof(*(ptr))) { \
> + case 1: \
> + case 2: \
> + case 4: \
> + case 8: \
> + break; \

If sizeof(unsigned long) = 4, then how can the sizeof(*(ptr)) > 4 case
work?
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:


\
 
 \ /
  Last update: 2009-05-01 12:25    [from the cache]
©2003-2011 Jasper Spaans