diff options
author | David Howells <dhowells@redhat.com> | 2008-08-18 05:58:17 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-21 03:55:47 -0400 |
commit | 85d577979a8a94a32ca1d828a91c2eb8300bc9f2 (patch) | |
tree | 2ed7e2fcb462ac65665583efe9467805263304e8 /arch | |
parent | 80a8c9fffa78f57d7d4351af2f15a56386805ceb (diff) |
werror: fix pci calgary
Fix an integer comparison always false warning in the PCI Calgary 64 driver.
A u8 is being compared to something that's 512 by default, resulting in the
following warning:
arch/x86/kernel/pci-calgary_64.c:1285: warning: comparison is always false due to limited range of data type
This was introduced by patch b34e90b8f0f30151349134f87b5dc6ef75a5218c.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/pci-calgary_64.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c index 218d783ed7a8..363a74ec7a76 100644 --- a/arch/x86/kernel/pci-calgary_64.c +++ b/arch/x86/kernel/pci-calgary_64.c | |||
@@ -1269,13 +1269,15 @@ static inline int __init determine_tce_table_size(u64 ram) | |||
1269 | static int __init build_detail_arrays(void) | 1269 | static int __init build_detail_arrays(void) |
1270 | { | 1270 | { |
1271 | unsigned long ptr; | 1271 | unsigned long ptr; |
1272 | int i, scal_detail_size, rio_detail_size; | 1272 | unsigned numnodes, i; |
1273 | int scal_detail_size, rio_detail_size; | ||
1273 | 1274 | ||
1274 | if (rio_table_hdr->num_scal_dev > MAX_NUMNODES){ | 1275 | numnodes = rio_table_hdr->num_scal_dev; |
1276 | if (numnodes > MAX_NUMNODES){ | ||
1275 | printk(KERN_WARNING | 1277 | printk(KERN_WARNING |
1276 | "Calgary: MAX_NUMNODES too low! Defined as %d, " | 1278 | "Calgary: MAX_NUMNODES too low! Defined as %d, " |
1277 | "but system has %d nodes.\n", | 1279 | "but system has %d nodes.\n", |
1278 | MAX_NUMNODES, rio_table_hdr->num_scal_dev); | 1280 | MAX_NUMNODES, numnodes); |
1279 | return -ENODEV; | 1281 | return -ENODEV; |
1280 | } | 1282 | } |
1281 | 1283 | ||
@@ -1296,8 +1298,7 @@ static int __init build_detail_arrays(void) | |||
1296 | } | 1298 | } |
1297 | 1299 | ||
1298 | ptr = ((unsigned long)rio_table_hdr) + 3; | 1300 | ptr = ((unsigned long)rio_table_hdr) + 3; |
1299 | for (i = 0; i < rio_table_hdr->num_scal_dev; | 1301 | for (i = 0; i < numnodes; i++, ptr += scal_detail_size) |
1300 | i++, ptr += scal_detail_size) | ||
1301 | scal_devs[i] = (struct scal_detail *)ptr; | 1302 | scal_devs[i] = (struct scal_detail *)ptr; |
1302 | 1303 | ||
1303 | for (i = 0; i < rio_table_hdr->num_rio_dev; | 1304 | for (i = 0; i < rio_table_hdr->num_rio_dev; |