30 Oct, 2008

1 commit


05 Mar, 2008

2 commits

  • Function __copy_user_zeroing in arch/lib/usercopy.c had the wrong parameter
    set as __user, and in include/asm-cris/uaccess.h, it was not set at all for
    some of the calling functions.

    This will cut the number of warnings quite dramatically when using sparse.

    While we're here, remove useless CVS log and correct confusing typo.

    Signed-off-by: Jesper Nilsson
    Cc: Mikael Starvik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Nilsson
     
  • Adrian Bunk reported another compile error with a SVN head GCC:

    ...
    CC arch/cris/arch-v10/lib/string.o
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/string.c:138:
    error: lvalue required as increment operand
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/string.c:138:
    error: lvalue required as increment operand
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/string.c:139:
    error: lvalue required as increment operand
    ...

    This is due to the use of the construct:

    *((long*)dst)++ = lc;

    Which isn't legal since casts don't return an lvalue.

    The solution is to import the implementation from newlib,
    which is continually autotested together with GCC mainline,
    and uses the construct:

    *(long *) dst = lc; dst += 4;

    Since this is an import of a file from newlib, I'm not touching
    the formatting or correcting any checkpatch errors.

    As for the earlier fix for memset.c, even if the two files for
    CRIS v10 and CRIS v32 are identical at the moment, it might
    be possible to tweak the CRIS v32 version.
    Thus, I'm not yet folding them into the same file, at least not
    until we've done some research on it.

    Signed-off-by: Jesper Nilsson
    Cc: Mikael Starvik
    Cc: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Nilsson
     

15 Feb, 2008

1 commit

  • Adrian Bunk reported the following compile error with a SVN head GCC:

    ...
    CC arch/cris/arch-v10/lib/memset.o
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c: In function 'memset':
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:164: error: lvalue required as increment operand
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:165: error: lvalue required as increment operand
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:166: error: lvalue required as increment operand
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:167: error: lvalue required as increment operand
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:185: error: lvalue required as increment operand
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:189: error: lvalue required as increment operand
    /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:192: error: lvalue required as increment operand
    ... etc ...

    This is due to the use of the construct:

    *((long*)dst)++ = lc;

    Which is no longer legal since casts don't return an lvalue.

    The solution is to import the implementation from newlib,
    which is continually autotested together with GCC mainline,
    and uses the construct:

    *(long *) dst = lc; dst += 4;

    With this change, the generated code actually shrinks 76 bytes
    since gcc notices that it can use autoincrement for the move
    instruction in CRIS.

    text data bss dec hex filename
    304 0 0 304 130 memset.old.o
    text data bss dec hex filename
    228 0 0 228 e4 memset.o

    Since this is an import of a file from newlib, I'm not touching
    the formatting or correcting any checkpatch errors.

    Note also that even if the two files for the CRIS v10 and CRIS v32
    are identical at the moment, it might be possible to tweak the
    CRIS v32 version. Thus, I'm not yet folding them into the same file,
    at least not until we've done some research on it.

    Signed-off-by: Jesper Nilsson
    Cc: Mikael Starvik
    Cc: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Nilsson
     

08 Feb, 2008

6 commits


20 Oct, 2007

2 commits


01 Jul, 2006

1 commit


28 Jul, 2005

1 commit