From: Roland Dreier Date: Thu, 1 Dec 2011 00:30:33 +0000 (-0800) Subject: [SCSI] mpt2sas: Fix possible integer truncation of cpu_count X-Git-Tag: v3.3-rc1~124^2~20 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f73b9a896634dd0ce68b5af9ae5f475e24ce51e;p=pandora-kernel.git [SCSI] mpt2sas: Fix possible integer truncation of cpu_count When computing reply_queue_count (the number of MSI-X vectors to use), the driver does ioc->reply_queue_count = min_t(u8, ioc->cpu_count, ioc->msix_vector_count); However, on a big machine, ioc->cpu_count could be outside the range that fits in a u8; eg a system with 256 CPUs will end up reply_queue_count set to 0. Fix this by calculating the minimum as ints and then letting the assignment to reply_queue_count handle integer demotion. Signed-off-by: Roland Dreier Acked-by: "Nandigama, Nagalakshmi" Signed-off-by: James Bottomley --- Reading git-diff-tree failed