09 May, 2007

2 commits

  • It is sometimes useful to compile individual drivers with optimization
    disabled for easier debugging. Currently drivers which use htonl() and
    similar functions don't compile with -O0. This patch fixes it. It also
    removes obsolete and misleading comments. This header is not for
    userspace, so we don't have to care about strange programs these comments
    mention.

    (akpm: -O0 probably isn't a good idea, but this code looks pretty crufty and
    unuseful)

    Signed-off-by: Michal Schmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michal Schmidt
     
  • Constant folding does not work for the swabXX() byte swapping functions,
    and the C versions optimize poorly.

    Attempting to initialize a global variable to swab16(0x1234) or put
    something like "case swab32(42):" in a switch statement will not compile.
    It can work, swab.h just isn't doing it correctly. This patch fixes that.

    Contrary to the comment in asm-i386/byteorder.h, gcc does not recognize the
    "C" version of swab16 and turn it into efficient code. gcc can do this,
    just not with the current code. The simple function:

    u16 foo(u16 x) { return swab16(x); }

    Would compile to:
    movzwl %ax, %eax
    movl %eax, %edx
    shrl $8, %eax
    sall $8, %edx
    orl %eax, %edx

    With this patch, it will compile to:
    rolw $8, %ax

    I also attempted to document the maze different macros/inline functions
    that are used to create the final product.

    Signed-off-by: Trent Piepho
    Cc: Francois-Rene Rideau
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Trent Piepho
     

12 Feb, 2007

2 commits


19 Sep, 2006

1 commit


18 Jun, 2006

1 commit


09 Jan, 2006

1 commit

  • Remove various things which were checking for gcc-1.x and gcc-2.x compilers.

    From: Adrian Bunk

    Some documentation updates and removes some code paths for gcc < 3.2.

    Acked-by: Russell King
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

20 Sep, 2005

1 commit


29 Jun, 2005

1 commit

  • In file included from drivers/media/dvb/ttpci/av7110_hw.c:38:
    include/linux/byteorder/swabb.h:96: warning: type qualifiers ignored on function return type
    include/linux/byteorder/swabb.h:110: warning: type qualifiers ignored on function return type
    In file included from drivers/media/dvb/ttpci/av7110_v4l.c:36:
    include/linux/byteorder/swabb.h:96: warning: type qualifiers ignored on function return type
    include/linux/byteorder/swabb.h:110: warning: type qualifiers ignored on function return type
    In file included from drivers/media/dvb/ttpci/av7110_av.c:37:
    include/linux/byteorder/swabb.h:96: warning: type qualifiers ignored on function return type
    include/linux/byteorder/swabb.h:110: warning: type qualifiers ignored on function return type
    drivers/isdn/icn/icn.c:719:4: warning: #warning TODO test headroom or use skb->nb to flag ACK
    In file included from drivers/media/dvb/ttpci/av7110_ca.c:39:
    include/linux/byteorder/swabb.h:96: warning: type qualifiers ignored on function return type
    include/linux/byteorder/swabb.h:110: warning: type qualifiers ignored on function return type
    In file included from drivers/media/dvb/ttpci/av7110.c:41:
    include/linux/byteorder/swabb.h:96: warning: type qualifiers ignored on function return type
    include/linux/byteorder/swabb.h:110: warning: type qualifiers ignored on function return type

    Does declaring a function to return a const value actually mean something to
    gcc?

    Dunno. Kill it and replace sone `__inline__'s with `inline' too.

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds