Re: [PATCH] ULL fixes for qlogicfc

From: H. Peter Anvin (hpa_at_zytor.com)
Date: 09/29/03

  • Next message: Hanna Linder: "10/1 LSE call topics: Cpusets and real-time app needs."
    Date:	Mon, 29 Sep 2003 14:24:15 -0700
    To: Jeff Garzik <jgarzik@pobox.com>
    
    

    Jeff Garzik wrote:
    > H. Peter Anvin wrote:
    >
    >> 0xffffffff is unsigned int and will be promoted to
    >
    > 0xffffffff without a prefix is signed.

    No, it's not.

    ISO/IEC 9899:1999(E) §6.4.4.1, page 55f:

    5 The type of an integer constant is the first of the corresponding list
    in which its value can be represented.

    Suffix Decimal Constant Octal or Hexadecimal
                                            Constant

    none int int
                    long int unsigned int
                    long long int long int
                                            unsigned long int
                                            long long int
                                            unsigned long long int

    ... so 0x7fffffff is signed int, but 0xffffffff is unsigned int on an
    I32-model system (all Linux systems are I32-model.)

            -hpa

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Hanna Linder: "10/1 LSE call topics: Cpusets and real-time app needs."

    Relevant Pages

    • Re: Merging relayfs?
      ... relayfs client still need some ... I would prefer "unsigned int" over just "unsigned" ... In general I'm not against merging, but I have a few ideas for further ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Touchpad problems with 2.6.11-rc2
      ... I like this patch, too. ... static void mousedev_touchpad_event(struct input_dev *dev, struct mousedev *mousedev, unsigned int code, int value) ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Linux 2.6.12-rc3
      ... static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [patch 1/8] [PATCH] sys_set_mempolicy() doesnt check if mode < 0
      ... A kernel BUG() is triggered by a call to set_mempolicywith a negative ... declared as unsigned int or unsigned long. ... err = get_nodes; ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH 2.4.23-pre3] signed/unsigned mismatches in include/net/tcp.h
      ... so maybe we should cast the left side to u32. ... Number 2 changes the type of mss from int to unsigned int. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)