aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/i460-agp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/agp/i460-agp.c')
-rw-r--r--drivers/char/agp/i460-agp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c
index 8ee19a4a6bce..91769443d8fe 100644
--- a/drivers/char/agp/i460-agp.c
+++ b/drivers/char/agp/i460-agp.c
@@ -400,10 +400,10 @@ static int i460_insert_memory_large_io_page (struct agp_memory *mem,
400 num_entries = A_SIZE_8(temp)->num_entries; 400 num_entries = A_SIZE_8(temp)->num_entries;
401 401
402 /* Figure out what pg_start means in terms of our large GART pages */ 402 /* Figure out what pg_start means in terms of our large GART pages */
403 start = &i460.lp_desc[pg_start / I460_KPAGES_PER_IOPAGE]; 403 start = &i460.lp_desc[pg_start / I460_KPAGES_PER_IOPAGE];
404 end = &i460.lp_desc[(pg_start + mem->page_count - 1) / I460_KPAGES_PER_IOPAGE]; 404 end = &i460.lp_desc[(pg_start + mem->page_count - 1) / I460_KPAGES_PER_IOPAGE];
405 start_offset = pg_start % I460_KPAGES_PER_IOPAGE; 405 start_offset = pg_start % I460_KPAGES_PER_IOPAGE;
406 end_offset = (pg_start + mem->page_count - 1) % I460_KPAGES_PER_IOPAGE; 406 end_offset = (pg_start + mem->page_count - 1) % I460_KPAGES_PER_IOPAGE;
407 407
408 if (end > i460.lp_desc + num_entries) { 408 if (end > i460.lp_desc + num_entries) {
409 printk(KERN_ERR PFX "Looks like we're out of AGP memory\n"); 409 printk(KERN_ERR PFX "Looks like we're out of AGP memory\n");
@@ -458,10 +458,10 @@ static int i460_remove_memory_large_io_page (struct agp_memory *mem,
458 num_entries = A_SIZE_8(temp)->num_entries; 458 num_entries = A_SIZE_8(temp)->num_entries;
459 459
460 /* Figure out what pg_start means in terms of our large GART pages */ 460 /* Figure out what pg_start means in terms of our large GART pages */
461 start = &i460.lp_desc[pg_start / I460_KPAGES_PER_IOPAGE]; 461 start = &i460.lp_desc[pg_start / I460_KPAGES_PER_IOPAGE];
462 end = &i460.lp_desc[(pg_start + mem->page_count - 1) / I460_KPAGES_PER_IOPAGE]; 462 end = &i460.lp_desc[(pg_start + mem->page_count - 1) / I460_KPAGES_PER_IOPAGE];
463 start_offset = pg_start % I460_KPAGES_PER_IOPAGE; 463 start_offset = pg_start % I460_KPAGES_PER_IOPAGE;
464 end_offset = (pg_start + mem->page_count - 1) % I460_KPAGES_PER_IOPAGE; 464 end_offset = (pg_start + mem->page_count - 1) % I460_KPAGES_PER_IOPAGE;
465 465
466 for (i = 0, lp = start; lp <= end; ++lp) { 466 for (i = 0, lp = start; lp <= end; ++lp) {
467 for (idx = ((lp == start) ? start_offset : 0); 467 for (idx = ((lp == start) ? start_offset : 0);