Commit a3b0eef9 authored by Dave Jones's avatar Dave Jones

[AGPGART] Remove unnecessary parenthesis on return statements.

Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent 53c3e863
...@@ -375,7 +375,7 @@ static int __devinit agp_efficeon_probe(struct pci_dev *pdev, ...@@ -375,7 +375,7 @@ static int __devinit agp_efficeon_probe(struct pci_dev *pdev,
if (!r->start && r->end) { if (!r->start && r->end) {
if(pci_assign_resource(pdev, 0)) { if(pci_assign_resource(pdev, 0)) {
printk(KERN_ERR PFX "could not assign resource 0\n"); printk(KERN_ERR PFX "could not assign resource 0\n");
return (-ENODEV); return -ENODEV;
} }
} }
...@@ -386,7 +386,7 @@ static int __devinit agp_efficeon_probe(struct pci_dev *pdev, ...@@ -386,7 +386,7 @@ static int __devinit agp_efficeon_probe(struct pci_dev *pdev,
*/ */
if (pci_enable_device(pdev)) { if (pci_enable_device(pdev)) {
printk(KERN_ERR PFX "Unable to Enable PCI device\n"); printk(KERN_ERR PFX "Unable to Enable PCI device\n");
return (-ENODEV); return -ENODEV;
} }
/* Fill in the mode register */ /* Fill in the mode register */
......
...@@ -532,8 +532,8 @@ static void i460_destroy_page (void *page) ...@@ -532,8 +532,8 @@ static void i460_destroy_page (void *page)
static unsigned long i460_mask_memory (unsigned long addr, int type) static unsigned long i460_mask_memory (unsigned long addr, int type)
{ {
/* Make sure the returned address is a valid GATT entry */ /* Make sure the returned address is a valid GATT entry */
return (agp_bridge->driver->masks[0].mask return agp_bridge->driver->masks[0].mask
| (((addr & ~((1 << I460_IO_PAGE_SHIFT) - 1)) & 0xffffff000) >> 12)); | (((addr & ~((1 << I460_IO_PAGE_SHIFT) - 1)) & 0xffffff000) >> 12);
} }
struct agp_bridge_driver intel_i460_driver = { struct agp_bridge_driver intel_i460_driver = {
......
...@@ -318,7 +318,7 @@ static struct agp_memory *intel_i810_alloc_by_type(size_t pg_count, int type) ...@@ -318,7 +318,7 @@ static struct agp_memory *intel_i810_alloc_by_type(size_t pg_count, int type)
return new; return new;
} }
if (type == AGP_PHYS_MEMORY) if (type == AGP_PHYS_MEMORY)
return(alloc_agpphysmem_i8xx(pg_count, type)); return alloc_agpphysmem_i8xx(pg_count, type);
return NULL; return NULL;
} }
...@@ -462,7 +462,7 @@ static int intel_i830_create_gatt_table(void) ...@@ -462,7 +462,7 @@ static int intel_i830_create_gatt_table(void)
intel_i830_private.registers = ioremap(temp,128 * 4096); intel_i830_private.registers = ioremap(temp,128 * 4096);
if (!intel_i830_private.registers) if (!intel_i830_private.registers)
return (-ENOMEM); return -ENOMEM;
temp = readb(intel_i830_private.registers+I810_PGETBL_CTL) & 0xfffff000; temp = readb(intel_i830_private.registers+I810_PGETBL_CTL) & 0xfffff000;
global_cache_flush(); /* FIXME: ?? */ global_cache_flush(); /* FIXME: ?? */
...@@ -474,7 +474,7 @@ static int intel_i830_create_gatt_table(void) ...@@ -474,7 +474,7 @@ static int intel_i830_create_gatt_table(void)
agp_bridge->gatt_bus_addr = temp; agp_bridge->gatt_bus_addr = temp;
return(0); return 0;
} }
/* Return the gatt table to a sane state. Use the top of stolen /* Return the gatt table to a sane state. Use the top of stolen
...@@ -482,7 +482,7 @@ static int intel_i830_create_gatt_table(void) ...@@ -482,7 +482,7 @@ static int intel_i830_create_gatt_table(void)
*/ */
static int intel_i830_free_gatt_table(void) static int intel_i830_free_gatt_table(void)
{ {
return(0); return 0;
} }
static int intel_i830_fetch_size(void) static int intel_i830_fetch_size(void)
...@@ -497,7 +497,7 @@ static int intel_i830_fetch_size(void) ...@@ -497,7 +497,7 @@ static int intel_i830_fetch_size(void)
/* 855GM/852GM/865G has 128MB aperture size */ /* 855GM/852GM/865G has 128MB aperture size */
agp_bridge->previous_size = agp_bridge->current_size = (void *) values; agp_bridge->previous_size = agp_bridge->current_size = (void *) values;
agp_bridge->aperture_size_idx = 0; agp_bridge->aperture_size_idx = 0;
return(values[0].size); return values[0].size;
} }
pci_read_config_word(agp_bridge->dev,I830_GMCH_CTRL,&gmch_ctrl); pci_read_config_word(agp_bridge->dev,I830_GMCH_CTRL,&gmch_ctrl);
...@@ -505,14 +505,14 @@ static int intel_i830_fetch_size(void) ...@@ -505,14 +505,14 @@ static int intel_i830_fetch_size(void)
if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_128M) { if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_128M) {
agp_bridge->previous_size = agp_bridge->current_size = (void *) values; agp_bridge->previous_size = agp_bridge->current_size = (void *) values;
agp_bridge->aperture_size_idx = 0; agp_bridge->aperture_size_idx = 0;
return(values[0].size); return values[0].size;
} else { } else {
agp_bridge->previous_size = agp_bridge->current_size = (void *) (values + 1); agp_bridge->previous_size = agp_bridge->current_size = (void *) (values + 1);
agp_bridge->aperture_size_idx = 1; agp_bridge->aperture_size_idx = 1;
return(values[1].size); return values[1].size;
} }
return(0); return 0;
} }
static int intel_i830_configure(void) static int intel_i830_configure(void)
...@@ -542,7 +542,7 @@ static int intel_i830_configure(void) ...@@ -542,7 +542,7 @@ static int intel_i830_configure(void)
} }
global_cache_flush(); global_cache_flush();
return (0); return 0;
} }
static void intel_i830_cleanup(void) static void intel_i830_cleanup(void)
...@@ -563,11 +563,11 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, int ...@@ -563,11 +563,11 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, int
pg_start,intel_i830_private.gtt_entries); pg_start,intel_i830_private.gtt_entries);
printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n"); printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n");
return (-EINVAL); return -EINVAL;
} }
if ((pg_start + mem->page_count) > num_entries) if ((pg_start + mem->page_count) > num_entries)
return (-EINVAL); return -EINVAL;
/* The i830 can't check the GTT for entries since its read only, /* The i830 can't check the GTT for entries since its read only,
* depend on the caller to make the correct offset decisions. * depend on the caller to make the correct offset decisions.
...@@ -575,7 +575,7 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, int ...@@ -575,7 +575,7 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, int
if ((type != 0 && type != AGP_PHYS_MEMORY) || if ((type != 0 && type != AGP_PHYS_MEMORY) ||
(mem->type != 0 && mem->type != AGP_PHYS_MEMORY)) (mem->type != 0 && mem->type != AGP_PHYS_MEMORY))
return (-EINVAL); return -EINVAL;
global_cache_flush(); /* FIXME: Necessary ?*/ global_cache_flush(); /* FIXME: Necessary ?*/
...@@ -587,7 +587,7 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, int ...@@ -587,7 +587,7 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, int
global_cache_flush(); global_cache_flush();
agp_bridge->driver->tlb_flush(mem); agp_bridge->driver->tlb_flush(mem);
return(0); return 0;
} }
static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start, static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start,
...@@ -599,7 +599,7 @@ static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start, ...@@ -599,7 +599,7 @@ static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start,
if (pg_start < intel_i830_private.gtt_entries) { if (pg_start < intel_i830_private.gtt_entries) {
printk (KERN_INFO PFX "Trying to disable local/stolen memory\n"); printk (KERN_INFO PFX "Trying to disable local/stolen memory\n");
return (-EINVAL); return -EINVAL;
} }
for (i = pg_start; i < (mem->page_count + pg_start); i++) { for (i = pg_start; i < (mem->page_count + pg_start); i++) {
...@@ -609,16 +609,16 @@ static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start, ...@@ -609,16 +609,16 @@ static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start,
global_cache_flush(); global_cache_flush();
agp_bridge->driver->tlb_flush(mem); agp_bridge->driver->tlb_flush(mem);
return (0); return 0;
} }
static struct agp_memory *intel_i830_alloc_by_type(size_t pg_count,int type) static struct agp_memory *intel_i830_alloc_by_type(size_t pg_count,int type)
{ {
if (type == AGP_PHYS_MEMORY) if (type == AGP_PHYS_MEMORY)
return(alloc_agpphysmem_i8xx(pg_count, type)); return alloc_agpphysmem_i8xx(pg_count, type);
/* always return NULL for other allocation types for now */ /* always return NULL for other allocation types for now */
return(NULL); return NULL;
} }
static int intel_i915_configure(void) static int intel_i915_configure(void)
...@@ -649,7 +649,7 @@ static int intel_i915_configure(void) ...@@ -649,7 +649,7 @@ static int intel_i915_configure(void)
} }
global_cache_flush(); global_cache_flush();
return (0); return 0;
} }
static void intel_i915_cleanup(void) static void intel_i915_cleanup(void)
...@@ -672,11 +672,11 @@ static int intel_i915_insert_entries(struct agp_memory *mem,off_t pg_start, ...@@ -672,11 +672,11 @@ static int intel_i915_insert_entries(struct agp_memory *mem,off_t pg_start,
pg_start,intel_i830_private.gtt_entries); pg_start,intel_i830_private.gtt_entries);
printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n"); printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n");
return (-EINVAL); return -EINVAL;
} }
if ((pg_start + mem->page_count) > num_entries) if ((pg_start + mem->page_count) > num_entries)
return (-EINVAL); return -EINVAL;
/* The i830 can't check the GTT for entries since its read only, /* The i830 can't check the GTT for entries since its read only,
* depend on the caller to make the correct offset decisions. * depend on the caller to make the correct offset decisions.
...@@ -684,7 +684,7 @@ static int intel_i915_insert_entries(struct agp_memory *mem,off_t pg_start, ...@@ -684,7 +684,7 @@ static int intel_i915_insert_entries(struct agp_memory *mem,off_t pg_start,
if ((type != 0 && type != AGP_PHYS_MEMORY) || if ((type != 0 && type != AGP_PHYS_MEMORY) ||
(mem->type != 0 && mem->type != AGP_PHYS_MEMORY)) (mem->type != 0 && mem->type != AGP_PHYS_MEMORY))
return (-EINVAL); return -EINVAL;
global_cache_flush(); global_cache_flush();
...@@ -695,7 +695,7 @@ static int intel_i915_insert_entries(struct agp_memory *mem,off_t pg_start, ...@@ -695,7 +695,7 @@ static int intel_i915_insert_entries(struct agp_memory *mem,off_t pg_start,
global_cache_flush(); global_cache_flush();
agp_bridge->driver->tlb_flush(mem); agp_bridge->driver->tlb_flush(mem);
return(0); return 0;
} }
static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start, static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start,
...@@ -707,7 +707,7 @@ static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start, ...@@ -707,7 +707,7 @@ static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start,
if (pg_start < intel_i830_private.gtt_entries) { if (pg_start < intel_i830_private.gtt_entries) {
printk (KERN_INFO PFX "Trying to disable local/stolen memory\n"); printk (KERN_INFO PFX "Trying to disable local/stolen memory\n");
return (-EINVAL); return -EINVAL;
} }
for (i = pg_start; i < (mem->page_count + pg_start); i++) { for (i = pg_start; i < (mem->page_count + pg_start); i++) {
...@@ -717,7 +717,7 @@ static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start, ...@@ -717,7 +717,7 @@ static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start,
global_cache_flush(); global_cache_flush();
agp_bridge->driver->tlb_flush(mem); agp_bridge->driver->tlb_flush(mem);
return (0); return 0;
} }
static int intel_i915_fetch_size(void) static int intel_i915_fetch_size(void)
...@@ -735,7 +735,7 @@ static int intel_i915_fetch_size(void) ...@@ -735,7 +735,7 @@ static int intel_i915_fetch_size(void)
else else
offset = 2; /* 256MB aperture */ offset = 2; /* 256MB aperture */
agp_bridge->previous_size = agp_bridge->current_size = (void *)(values + offset); agp_bridge->previous_size = agp_bridge->current_size = (void *)(values + offset);
return(values[offset].size); return values[offset].size;
} }
/* The intel i915 automatically initializes the agp aperture during POST. /* The intel i915 automatically initializes the agp aperture during POST.
...@@ -758,13 +758,13 @@ static int intel_i915_create_gatt_table(void) ...@@ -758,13 +758,13 @@ static int intel_i915_create_gatt_table(void)
intel_i830_private.gtt = ioremap(temp2, 256 * 1024); intel_i830_private.gtt = ioremap(temp2, 256 * 1024);
if (!intel_i830_private.gtt) if (!intel_i830_private.gtt)
return (-ENOMEM); return -ENOMEM;
temp &= 0xfff80000; temp &= 0xfff80000;
intel_i830_private.registers = ioremap(temp,128 * 4096); intel_i830_private.registers = ioremap(temp,128 * 4096);
if (!intel_i830_private.registers) if (!intel_i830_private.registers)
return (-ENOMEM); return -ENOMEM;
temp = readl(intel_i830_private.registers+I810_PGETBL_CTL) & 0xfffff000; temp = readl(intel_i830_private.registers+I810_PGETBL_CTL) & 0xfffff000;
global_cache_flush(); /* FIXME: ? */ global_cache_flush(); /* FIXME: ? */
...@@ -776,7 +776,7 @@ static int intel_i915_create_gatt_table(void) ...@@ -776,7 +776,7 @@ static int intel_i915_create_gatt_table(void)
agp_bridge->gatt_bus_addr = temp; agp_bridge->gatt_bus_addr = temp;
return(0); return 0;
} }
static int intel_fetch_size(void) static int intel_fetch_size(void)
......
...@@ -173,7 +173,7 @@ static int intel_i830_create_gatt_table(void) ...@@ -173,7 +173,7 @@ static int intel_i830_create_gatt_table(void)
intel_i830_private.registers = (volatile u8 __iomem*) ioremap(temp,128 * 4096); intel_i830_private.registers = (volatile u8 __iomem*) ioremap(temp,128 * 4096);
if (!intel_i830_private.registers) if (!intel_i830_private.registers)
return (-ENOMEM); return -ENOMEM;
temp = readl(intel_i830_private.registers+I810_PGETBL_CTL) & 0xfffff000; temp = readl(intel_i830_private.registers+I810_PGETBL_CTL) & 0xfffff000;
global_cache_flush(); /* FIXME: ?? */ global_cache_flush(); /* FIXME: ?? */
...@@ -185,7 +185,7 @@ static int intel_i830_create_gatt_table(void) ...@@ -185,7 +185,7 @@ static int intel_i830_create_gatt_table(void)
agp_bridge->gatt_bus_addr = temp; agp_bridge->gatt_bus_addr = temp;
return(0); return 0;
} }
/* Return the gatt table to a sane state. Use the top of stolen /* Return the gatt table to a sane state. Use the top of stolen
...@@ -193,7 +193,7 @@ static int intel_i830_create_gatt_table(void) ...@@ -193,7 +193,7 @@ static int intel_i830_create_gatt_table(void)
*/ */
static int intel_i830_free_gatt_table(void) static int intel_i830_free_gatt_table(void)
{ {
return(0); return 0;
} }
static int intel_i830_fetch_size(void) static int intel_i830_fetch_size(void)
...@@ -208,7 +208,7 @@ static int intel_i830_fetch_size(void) ...@@ -208,7 +208,7 @@ static int intel_i830_fetch_size(void)
/* 855GM/852GM/865G has 128MB aperture size */ /* 855GM/852GM/865G has 128MB aperture size */
agp_bridge->previous_size = agp_bridge->current_size = (void *) values; agp_bridge->previous_size = agp_bridge->current_size = (void *) values;
agp_bridge->aperture_size_idx = 0; agp_bridge->aperture_size_idx = 0;
return(values[0].size); return values[0].size;
} }
pci_read_config_word(agp_bridge->dev,I830_GMCH_CTRL,&gmch_ctrl); pci_read_config_word(agp_bridge->dev,I830_GMCH_CTRL,&gmch_ctrl);
...@@ -216,14 +216,14 @@ static int intel_i830_fetch_size(void) ...@@ -216,14 +216,14 @@ static int intel_i830_fetch_size(void)
if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_128M) { if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_128M) {
agp_bridge->previous_size = agp_bridge->current_size = (void *) values; agp_bridge->previous_size = agp_bridge->current_size = (void *) values;
agp_bridge->aperture_size_idx = 0; agp_bridge->aperture_size_idx = 0;
return(values[0].size); return values[0].size;
} else { } else {
agp_bridge->previous_size = agp_bridge->current_size = (void *) values; agp_bridge->previous_size = agp_bridge->current_size = (void *) values;
agp_bridge->aperture_size_idx = 1; agp_bridge->aperture_size_idx = 1;
return(values[1].size); return values[1].size;
} }
return(0); return 0;
} }
static int intel_i830_configure(void) static int intel_i830_configure(void)
...@@ -252,7 +252,7 @@ static int intel_i830_configure(void) ...@@ -252,7 +252,7 @@ static int intel_i830_configure(void)
} }
} }
global_cache_flush(); global_cache_flush();
return (0); return 0;
} }
static void intel_i830_cleanup(void) static void intel_i830_cleanup(void)
...@@ -274,11 +274,11 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, ...@@ -274,11 +274,11 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start,
pg_start,intel_i830_private.gtt_entries); pg_start,intel_i830_private.gtt_entries);
printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n"); printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n");
return (-EINVAL); return -EINVAL;
} }
if ((pg_start + mem->page_count) > num_entries) if ((pg_start + mem->page_count) > num_entries)
return (-EINVAL); return -EINVAL;
/* The i830 can't check the GTT for entries since its read only, /* The i830 can't check the GTT for entries since its read only,
* depend on the caller to make the correct offset decisions. * depend on the caller to make the correct offset decisions.
...@@ -286,7 +286,7 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, ...@@ -286,7 +286,7 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start,
if ((type != 0 && type != AGP_PHYS_MEMORY) || if ((type != 0 && type != AGP_PHYS_MEMORY) ||
(mem->type != 0 && mem->type != AGP_PHYS_MEMORY)) (mem->type != 0 && mem->type != AGP_PHYS_MEMORY))
return (-EINVAL); return -EINVAL;
global_cache_flush(); /* FIXME: ?? */ global_cache_flush(); /* FIXME: ?? */
...@@ -300,7 +300,7 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, ...@@ -300,7 +300,7 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start,
agp_bridge->driver->tlb_flush(mem); agp_bridge->driver->tlb_flush(mem);
return(0); return 0;
} }
static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start, static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start,
...@@ -312,7 +312,7 @@ static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start, ...@@ -312,7 +312,7 @@ static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start,
if (pg_start < intel_i830_private.gtt_entries) { if (pg_start < intel_i830_private.gtt_entries) {
printk (KERN_INFO PFX "Trying to disable local/stolen memory\n"); printk (KERN_INFO PFX "Trying to disable local/stolen memory\n");
return (-EINVAL); return -EINVAL;
} }
for (i = pg_start; i < (mem->page_count + pg_start); i++) { for (i = pg_start; i < (mem->page_count + pg_start); i++) {
...@@ -322,16 +322,16 @@ static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start, ...@@ -322,16 +322,16 @@ static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start,
global_cache_flush(); global_cache_flush();
agp_bridge->driver->tlb_flush(mem); agp_bridge->driver->tlb_flush(mem);
return (0); return 0;
} }
static struct agp_memory *intel_i830_alloc_by_type(size_t pg_count,int type) static struct agp_memory *intel_i830_alloc_by_type(size_t pg_count,int type)
{ {
if (type == AGP_PHYS_MEMORY) if (type == AGP_PHYS_MEMORY)
return(alloc_agpphysmem_i8xx(pg_count, type)); return alloc_agpphysmem_i8xx(pg_count, type);
/* always return NULL for other allocation types for now */ /* always return NULL for other allocation types for now */
return(NULL); return NULL;
} }
static int intel_8xx_fetch_size(void) static int intel_8xx_fetch_size(void)
...@@ -540,7 +540,7 @@ static int __devinit agp_intelmch_probe(struct pci_dev *pdev, ...@@ -540,7 +540,7 @@ static int __devinit agp_intelmch_probe(struct pci_dev *pdev,
if (!r->start && r->end) { if (!r->start && r->end) {
if(pci_assign_resource(pdev, 0)) { if(pci_assign_resource(pdev, 0)) {
printk(KERN_ERR PFX "could not assign resource 0\n"); printk(KERN_ERR PFX "could not assign resource 0\n");
return (-ENODEV); return -ENODEV;
} }
} }
...@@ -551,7 +551,7 @@ static int __devinit agp_intelmch_probe(struct pci_dev *pdev, ...@@ -551,7 +551,7 @@ static int __devinit agp_intelmch_probe(struct pci_dev *pdev,
*/ */
if (pci_enable_device(pdev)) { if (pci_enable_device(pdev)) {
printk(KERN_ERR PFX "Unable to Enable PCI device\n"); printk(KERN_ERR PFX "Unable to Enable PCI device\n");
return (-ENODEV); return -ENODEV;
} }
/* Fill in the mode register */ /* Fill in the mode register */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment