From: Meelis Roos Date: Tue, 31 Jul 2007 07:39:41 +0000 (-0700) Subject: fix integer overflow warning in i2o_block X-Git-Tag: v2.6.23-rc2~42 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db7526f925b79293dc3b361a70db7f340870a298;p=pandora-kernel.git fix integer overflow warning in i2o_block drivers/message/i2o/i2o_block.c: In function 'i2o_block_transfer': drivers/message/i2o/i2o_block.c:837: warning: integer overflow in expression 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 is defined as u32 so the claculation does not fit during computation. Change local variable tid to u32 so the whole expression is of u32 type and fits well into u32 result. Signed-off-by: Meelis Roos Cc: "Salyzyn, Mark" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed