lkml.org 
[lkml]   [2007]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    Subjectinteger overflow in i2o_block
    Got this warning on 32-bit ppc, seems real? And it seems I2O 
    subsystem has no maintainer (only DPT_I2O has one)?

    CC [M] drivers/message/i2o/i2o_block.o
    drivers/message/i2o/i2o_block.c: In function 'i2o_block_transfer':
    drivers/message/i2o/i2o_block.c:837: warning: integer overflow in expression

    The line in question is
    msg->u.head[1] = cpu_to_le32(I2O_CMD_PRIVATE << 24 | HOST_TID << 12 | tid);
    and I2O_CMD_PRIVATE is defined as 0xFF. This gets "0xFF0100 | tid" and
    fits into 32-bit unsigned but not into 32-bit signed integer properly.
    Target value head[*] is defined as u32 so the claculation does not fit
    during computation? Should we mark the shiftable inputas as unsigned?

    --
    Meelis Roos (mroos@linux.ee)
    -
    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/

    \
     
     \ /
      Last update: 2007-07-26 22:33    [W:0.023 / U:122.436 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site