1. 07 6月, 2014 1 次提交
    • H
      include/asm-generic/ioctl.h: fix _IOC_TYPECHECK sparse error · d55875f5
      Hans Verkuil 提交于
      When running sparse over drivers/media/v4l2-core/v4l2-ioctl.c I get these
      errors:
      
        drivers/media/v4l2-core/v4l2-ioctl.c:2043:9: error: bad integer constant expression
        drivers/media/v4l2-core/v4l2-ioctl.c:2044:9: error: bad integer constant expression
        drivers/media/v4l2-core/v4l2-ioctl.c:2045:9: error: bad integer constant expression
        drivers/media/v4l2-core/v4l2-ioctl.c:2046:9: error: bad integer constant expression
      
      etc.
      
      The root cause of that turns out to be in include/asm-generic/ioctl.h:
      
      #include <uapi/asm-generic/ioctl.h>
      
      /* provoke compile error for invalid uses of size argument */
      extern unsigned int __invalid_size_argument_for_IOC;
      #define _IOC_TYPECHECK(t) \
              ((sizeof(t) == sizeof(t[1]) && \
                sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
                sizeof(t) : __invalid_size_argument_for_IOC)
      
      If it is defined as this (as is already done if __KERNEL__ is not defined):
      
        #define _IOC_TYPECHECK(t) (sizeof(t))
      
      then all is well with the world.
      
      This patch allows sparse to work correctly.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d55875f5
  2. 05 10月, 2012 1 次提交
  3. 13 8月, 2008 1 次提交
    • M
      Make ioctl.h compatible with userland · 5f8c3c8e
      Michael Abbott 提交于
      The attached patch seems to already exist in a number of branches -- it
      keeps popping up on Google for me, and is certainly already in Debian --
      but is strangely absent from mainstream.
      
      The problem appears to be that the patched file ends up as part of the
      target toolchain, but unfortunately the gcc constant folding doesn't
      appear to eliminate the __invalid_size_argument_for_IOC value early
      enough.  Certainly compiling C++ programs which use _IO...  macros as
      constants fails without this patch.
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5f8c3c8e
  4. 29 4月, 2008 1 次提交
  5. 11 1月, 2006 1 次提交
  6. 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