svn commit: r258856 - projects/altix2/sys/ia64/sgisn
Marcel Moolenaar
marcel at FreeBSD.org
Mon Dec 2 21:58:10 UTC 2013
Author: marcel
Date: Mon Dec 2 21:58:09 2013
New Revision: 258856
URL: http://svnweb.freebsd.org/changeset/base/258856
Log:
Fix a "possibly used uninitialized" warning.
Modified:
projects/altix2/sys/ia64/sgisn/sgisn_pcib.c
Modified: projects/altix2/sys/ia64/sgisn/sgisn_pcib.c
==============================================================================
--- projects/altix2/sys/ia64/sgisn/sgisn_pcib.c Mon Dec 2 19:49:52 2013 (r258855)
+++ projects/altix2/sys/ia64/sgisn/sgisn_pcib.c Mon Dec 2 21:58:09 2013 (r258856)
@@ -688,6 +688,7 @@ sgisn_pcib_iommu_map(device_t bus, devic
ate = 0;
entry = ~0;
+ bitshft = 0;
while (ate < (PCIB_REG_ATE_SIZE / 64) && entry == ~0) {
bits = sc->sc_ate[ate];
/* Move to the next long if this one is full. */
@@ -697,7 +698,6 @@ sgisn_pcib_iommu_map(device_t bus, devic
}
/* If this long is empty, take it (catches count == 64). */
if (bits == 0UL) {
- bitshft = 0;
entry = ate * 64;
break;
}
@@ -706,7 +706,6 @@ sgisn_pcib_iommu_map(device_t bus, devic
ate++;
continue;
}
- bitshft = 0;
do {
if ((bits & ((1UL << count) - 1UL)) == 0) {
entry = ate * 64 + bitshft;
@@ -721,8 +720,10 @@ sgisn_pcib_iommu_map(device_t bus, devic
bitshft++;
}
} while (bitshft <= (64 - count));
- if (entry == ~0)
+ if (entry == ~0) {
ate++;
+ bitshft = 0;
+ }
}
if (entry != ~0) {
KASSERT(ate < (PCIB_REG_ATE_SIZE / 64), ("foo: ate"));
More information about the svn-src-projects
mailing list