aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/nvidia-agp.c
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2006-02-28 00:54:25 -0500
committerDave Jones <davej@redhat.com>2006-02-28 00:54:25 -0500
commit6a92a4e0d201aea6d7c83f100d77310676b2e049 (patch)
tree89a17578d18b1cc3d653c75f00da6455e4bdcaa7 /drivers/char/agp/nvidia-agp.c
parenta8b76b491510b7591c584838d0d7922f9ffe5c2c (diff)
[AGPGART] Lots of CodingStyle/whitespace cleanups.
Eliminate trailing whitespace. s/if(/if (/ s/for(/for (/ Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers/char/agp/nvidia-agp.c')
-rw-r--r--drivers/char/agp/nvidia-agp.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c
index 80dafa3030bd..70b8ed9cd172 100644
--- a/drivers/char/agp/nvidia-agp.c
+++ b/drivers/char/agp/nvidia-agp.c
@@ -72,7 +72,7 @@ static int nvidia_init_iorr(u32 base, u32 size)
72 /* Find the iorr that is already used for the base */ 72 /* Find the iorr that is already used for the base */
73 /* If not found, determine the uppermost available iorr */ 73 /* If not found, determine the uppermost available iorr */
74 free_iorr_addr = AMD_K7_NUM_IORR; 74 free_iorr_addr = AMD_K7_NUM_IORR;
75 for(iorr_addr = 0; iorr_addr < AMD_K7_NUM_IORR; iorr_addr++) { 75 for (iorr_addr = 0; iorr_addr < AMD_K7_NUM_IORR; iorr_addr++) {
76 rdmsr(IORR_BASE0 + 2 * iorr_addr, base_lo, base_hi); 76 rdmsr(IORR_BASE0 + 2 * iorr_addr, base_lo, base_hi);
77 rdmsr(IORR_MASK0 + 2 * iorr_addr, mask_lo, mask_hi); 77 rdmsr(IORR_MASK0 + 2 * iorr_addr, mask_lo, mask_hi);
78 78
@@ -82,7 +82,7 @@ static int nvidia_init_iorr(u32 base, u32 size)
82 if ((mask_lo & 0x00000800) == 0) 82 if ((mask_lo & 0x00000800) == 0)
83 free_iorr_addr = iorr_addr; 83 free_iorr_addr = iorr_addr;
84 } 84 }
85 85
86 if (iorr_addr >= AMD_K7_NUM_IORR) { 86 if (iorr_addr >= AMD_K7_NUM_IORR) {
87 iorr_addr = free_iorr_addr; 87 iorr_addr = free_iorr_addr;
88 if (iorr_addr >= AMD_K7_NUM_IORR) 88 if (iorr_addr >= AMD_K7_NUM_IORR)
@@ -139,7 +139,7 @@ static int nvidia_configure(void)
139 } 139 }
140 140
141 /* attbase */ 141 /* attbase */
142 for(i = 0; i < 8; i++) { 142 for (i = 0; i < 8; i++) {
143 pci_write_config_dword(nvidia_private.dev_2, NVIDIA_2_ATTBASE(i), 143 pci_write_config_dword(nvidia_private.dev_2, NVIDIA_2_ATTBASE(i),
144 (agp_bridge->gatt_bus_addr + (i % num_dirs) * 64 * 1024) | 1); 144 (agp_bridge->gatt_bus_addr + (i % num_dirs) * 64 * 1024) | 1);
145 } 145 }
@@ -197,15 +197,15 @@ extern int agp_memory_reserved;
197static int nvidia_insert_memory(struct agp_memory *mem, off_t pg_start, int type) 197static int nvidia_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
198{ 198{
199 int i, j; 199 int i, j;
200 200
201 if ((type != 0) || (mem->type != 0)) 201 if ((type != 0) || (mem->type != 0))
202 return -EINVAL; 202 return -EINVAL;
203 203
204 if ((pg_start + mem->page_count) > 204 if ((pg_start + mem->page_count) >
205 (nvidia_private.num_active_entries - agp_memory_reserved/PAGE_SIZE)) 205 (nvidia_private.num_active_entries - agp_memory_reserved/PAGE_SIZE))
206 return -EINVAL; 206 return -EINVAL;
207 207
208 for(j = pg_start; j < (pg_start + mem->page_count); j++) { 208 for (j = pg_start; j < (pg_start + mem->page_count); j++) {
209 if (!PGE_EMPTY(agp_bridge, readl(agp_bridge->gatt_table+nvidia_private.pg_offset+j))) 209 if (!PGE_EMPTY(agp_bridge, readl(agp_bridge->gatt_table+nvidia_private.pg_offset+j)))
210 return -EBUSY; 210 return -EBUSY;
211 } 211 }
@@ -264,9 +264,9 @@ static void nvidia_tlbflush(struct agp_memory *mem)
264 } 264 }
265 265
266 /* flush TLB entries */ 266 /* flush TLB entries */
267 for(i = 0; i < 32 + 1; i++) 267 for (i = 0; i < 32 + 1; i++)
268 temp = readl(nvidia_private.aperture+(i * PAGE_SIZE / sizeof(u32))); 268 temp = readl(nvidia_private.aperture+(i * PAGE_SIZE / sizeof(u32)));
269 for(i = 0; i < 32 + 1; i++) 269 for (i = 0; i < 32 + 1; i++)
270 temp = readl(nvidia_private.aperture+(i * PAGE_SIZE / sizeof(u32))); 270 temp = readl(nvidia_private.aperture+(i * PAGE_SIZE / sizeof(u32)));
271} 271}
272 272
@@ -323,7 +323,7 @@ static int __devinit agp_nvidia_probe(struct pci_dev *pdev,
323 pci_find_slot((unsigned int)pdev->bus->number, PCI_DEVFN(0, 2)); 323 pci_find_slot((unsigned int)pdev->bus->number, PCI_DEVFN(0, 2));
324 nvidia_private.dev_3 = 324 nvidia_private.dev_3 =
325 pci_find_slot((unsigned int)pdev->bus->number, PCI_DEVFN(30, 0)); 325 pci_find_slot((unsigned int)pdev->bus->number, PCI_DEVFN(30, 0));
326 326
327 if (!nvidia_private.dev_1 || !nvidia_private.dev_2 || !nvidia_private.dev_3) { 327 if (!nvidia_private.dev_1 || !nvidia_private.dev_2 || !nvidia_private.dev_3) {
328 printk(KERN_INFO PFX "Detected an NVIDIA nForce/nForce2 " 328 printk(KERN_INFO PFX "Detected an NVIDIA nForce/nForce2 "
329 "chipset, but could not find the secondary devices.\n"); 329 "chipset, but could not find the secondary devices.\n");