1. 09 2月, 2008 1 次提交
    • M
      byteorder: move le32_add_cpu & friends from OCFS2 to core · 8b5f6883
      Marcin Slusarz 提交于
      This patchset moves le*_add_cpu and be*_add_cpu functions from OCFS2 to core
      header (1st), converts ext3 filesystem to this API (2nd) and replaces XFS
      different named functions with new ones (3rd).
      
      There are many places where these functions will be useful.  Just look at:
      grep -r 'cpu_to_[ble12346]*([ble12346]*_to_cpu.*[-+]' linux-src/ Patch for
      ext3 is an example how conversions will probably look like.
      
      This patch:
      
      - move inline functions which add native byte order variable to
        little/big endian variable to core header
        * le16_add_cpu(__le16 *var, u16 val)
        * le32_add_cpu(__le32 *var, u32 val)
        * le64_add_cpu(__le64 *var, u64 val)
        * be32_add_cpu(__be32 *var, u32 val)
      - add for completeness:
        * be16_add_cpu(__be16 *var, u16 val)
        * be64_add_cpu(__be64 *var, u64 val)
      Signed-off-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
      Acked-by: NMark Fasheh <mark.fasheh@oracle.com>
      Cc: David Chinner <dgc@sgi.com>
      Cc: Timothy Shimmin <tes@sgi.com>
      Cc: <linux-ext4@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8b5f6883
  2. 09 5月, 2007 2 次提交
    • M
      Fix compilation of drivers with -O0 · ee7b9e37
      Michal Schmidt 提交于
      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: NMichal Schmidt <mschmidt@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ee7b9e37
    • T
      Fix constant folding and poor optimization in byte swapping code · 8e2c2002
      Trent Piepho 提交于
      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: NTrent Piepho <xyzzy@speakeasy.org>
      Cc: Francois-Rene Rideau <fare@tunes.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8e2c2002
  3. 12 2月, 2007 2 次提交
  4. 19 9月, 2006 1 次提交
  5. 18 6月, 2006 1 次提交
  6. 09 1月, 2006 1 次提交
  7. 20 9月, 2005 1 次提交
  8. 29 6月, 2005 1 次提交
    • A
      [PATCH] swabb.h warning fixes · 05133fc4
      Andrew Morton 提交于
      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: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      05133fc4
  9. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      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!
      1da177e4