Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: memtest: use pointers of equal type for comparison
This commit is contained in:
Linus Torvalds 2009-06-11 11:26:56 -07:00
Родитель b415c49a86 9866b7e86a
Коммит 7702667bb4
1 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -40,21 +40,20 @@ static void __init reserve_bad_mem(u64 pattern, u64 start_bad, u64 end_bad)
static void __init memtest(u64 pattern, u64 start_phys, u64 size) static void __init memtest(u64 pattern, u64 start_phys, u64 size)
{ {
u64 *p; u64 *p, *start, *end;
void *start, *end;
u64 start_bad, last_bad; u64 start_bad, last_bad;
u64 start_phys_aligned; u64 start_phys_aligned;
size_t incr; const size_t incr = sizeof(pattern);
incr = sizeof(pattern);
start_phys_aligned = ALIGN(start_phys, incr); start_phys_aligned = ALIGN(start_phys, incr);
start = __va(start_phys_aligned); start = __va(start_phys_aligned);
end = start + size - (start_phys_aligned - start_phys); end = start + (size - (start_phys_aligned - start_phys)) / incr;
start_bad = 0; start_bad = 0;
last_bad = 0; last_bad = 0;
for (p = start; p < end; p++) for (p = start; p < end; p++)
*p = pattern; *p = pattern;
for (p = start; p < end; p++, start_phys_aligned += incr) { for (p = start; p < end; p++, start_phys_aligned += incr) {
if (*p == pattern) if (*p == pattern)
continue; continue;