Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
a3b0eef9
Commit
a3b0eef9
authored
Dec 15, 2004
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AGPGART] Remove unnecessary parenthesis on return statements.
Signed-off-by:
Dave Jones
<
davej@redhat.com
>
parent
53c3e863
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
50 deletions
+50
-50
drivers/char/agp/efficeon-agp.c
drivers/char/agp/efficeon-agp.c
+2
-2
drivers/char/agp/i460-agp.c
drivers/char/agp/i460-agp.c
+2
-2
drivers/char/agp/intel-agp.c
drivers/char/agp/intel-agp.c
+28
-28
drivers/char/agp/intel-mch-agp.c
drivers/char/agp/intel-mch-agp.c
+18
-18
No files found.
drivers/char/agp/efficeon-agp.c
View file @
a3b0eef9
...
...
@@ -375,7 +375,7 @@ static int __devinit agp_efficeon_probe(struct pci_dev *pdev,
if
(
!
r
->
start
&&
r
->
end
)
{
if
(
pci_assign_resource
(
pdev
,
0
))
{
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,
*/
if
(
pci_enable_device
(
pdev
))
{
printk
(
KERN_ERR
PFX
"Unable to Enable PCI device
\n
"
);
return
(
-
ENODEV
)
;
return
-
ENODEV
;
}
/* Fill in the mode register */
...
...
drivers/char/agp/i460-agp.c
View file @
a3b0eef9
...
...
@@ -532,8 +532,8 @@ static void i460_destroy_page (void *page)
static
unsigned
long
i460_mask_memory
(
unsigned
long
addr
,
int
type
)
{
/* Make sure the returned address is a valid GATT entry */
return
(
agp_bridge
->
driver
->
masks
[
0
].
mask
|
(((
addr
&
~
((
1
<<
I460_IO_PAGE_SHIFT
)
-
1
))
&
0xffffff000
)
>>
12
)
)
;
return
agp_bridge
->
driver
->
masks
[
0
].
mask
|
(((
addr
&
~
((
1
<<
I460_IO_PAGE_SHIFT
)
-
1
))
&
0xffffff000
)
>>
12
);
}
struct
agp_bridge_driver
intel_i460_driver
=
{
...
...
drivers/char/agp/intel-agp.c
View file @
a3b0eef9
...
...
@@ -318,7 +318,7 @@ static struct agp_memory *intel_i810_alloc_by_type(size_t pg_count, int type)
return
new
;
}
if
(
type
==
AGP_PHYS_MEMORY
)
return
(
alloc_agpphysmem_i8xx
(
pg_count
,
type
)
);
return
alloc_agpphysmem_i8xx
(
pg_count
,
type
);
return
NULL
;
}
...
...
@@ -462,7 +462,7 @@ static int intel_i830_create_gatt_table(void)
intel_i830_private
.
registers
=
ioremap
(
temp
,
128
*
4096
);
if
(
!
intel_i830_private
.
registers
)
return
(
-
ENOMEM
)
;
return
-
ENOMEM
;
temp
=
readb
(
intel_i830_private
.
registers
+
I810_PGETBL_CTL
)
&
0xfffff000
;
global_cache_flush
();
/* FIXME: ?? */
...
...
@@ -474,7 +474,7 @@ static int intel_i830_create_gatt_table(void)
agp_bridge
->
gatt_bus_addr
=
temp
;
return
(
0
)
;
return
0
;
}
/* 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)
*/
static
int
intel_i830_free_gatt_table
(
void
)
{
return
(
0
)
;
return
0
;
}
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 */
agp_bridge
->
previous_size
=
agp_bridge
->
current_size
=
(
void
*
)
values
;
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
);
...
...
@@ -505,14 +505,14 @@ static int intel_i830_fetch_size(void)
if
((
gmch_ctrl
&
I830_GMCH_MEM_MASK
)
==
I830_GMCH_MEM_128M
)
{
agp_bridge
->
previous_size
=
agp_bridge
->
current_size
=
(
void
*
)
values
;
agp_bridge
->
aperture_size_idx
=
0
;
return
(
values
[
0
].
size
)
;
return
values
[
0
].
size
;
}
else
{
agp_bridge
->
previous_size
=
agp_bridge
->
current_size
=
(
void
*
)
(
values
+
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
)
...
...
@@ -542,7 +542,7 @@ static int intel_i830_configure(void)
}
global_cache_flush
();
return
(
0
)
;
return
0
;
}
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
pg_start
,
intel_i830_private
.
gtt_entries
);
printk
(
KERN_INFO
PFX
"Trying to insert into local/stolen memory
\n
"
);
return
(
-
EINVAL
)
;
return
-
EINVAL
;
}
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,
* 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
if
((
type
!=
0
&&
type
!=
AGP_PHYS_MEMORY
)
||
(
mem
->
type
!=
0
&&
mem
->
type
!=
AGP_PHYS_MEMORY
))
return
(
-
EINVAL
)
;
return
-
EINVAL
;
global_cache_flush
();
/* FIXME: Necessary ?*/
...
...
@@ -587,7 +587,7 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, int
global_cache_flush
();
agp_bridge
->
driver
->
tlb_flush
(
mem
);
return
(
0
)
;
return
0
;
}
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
)
{
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
++
)
{
...
...
@@ -609,16 +609,16 @@ static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start,
global_cache_flush
();
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
)
{
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 */
return
(
NULL
)
;
return
NULL
;
}
static
int
intel_i915_configure
(
void
)
...
...
@@ -649,7 +649,7 @@ static int intel_i915_configure(void)
}
global_cache_flush
();
return
(
0
)
;
return
0
;
}
static
void
intel_i915_cleanup
(
void
)
...
...
@@ -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
);
printk
(
KERN_INFO
PFX
"Trying to insert into local/stolen memory
\n
"
);
return
(
-
EINVAL
)
;
return
-
EINVAL
;
}
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,
* 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,
if
((
type
!=
0
&&
type
!=
AGP_PHYS_MEMORY
)
||
(
mem
->
type
!=
0
&&
mem
->
type
!=
AGP_PHYS_MEMORY
))
return
(
-
EINVAL
)
;
return
-
EINVAL
;
global_cache_flush
();
...
...
@@ -695,7 +695,7 @@ static int intel_i915_insert_entries(struct agp_memory *mem,off_t pg_start,
global_cache_flush
();
agp_bridge
->
driver
->
tlb_flush
(
mem
);
return
(
0
)
;
return
0
;
}
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
)
{
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
++
)
{
...
...
@@ -717,7 +717,7 @@ static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start,
global_cache_flush
();
agp_bridge
->
driver
->
tlb_flush
(
mem
);
return
(
0
)
;
return
0
;
}
static
int
intel_i915_fetch_size
(
void
)
...
...
@@ -735,7 +735,7 @@ static int intel_i915_fetch_size(void)
else
offset
=
2
;
/* 256MB aperture */
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.
...
...
@@ -758,13 +758,13 @@ static int intel_i915_create_gatt_table(void)
intel_i830_private
.
gtt
=
ioremap
(
temp2
,
256
*
1024
);
if
(
!
intel_i830_private
.
gtt
)
return
(
-
ENOMEM
)
;
return
-
ENOMEM
;
temp
&=
0xfff80000
;
intel_i830_private
.
registers
=
ioremap
(
temp
,
128
*
4096
);
if
(
!
intel_i830_private
.
registers
)
return
(
-
ENOMEM
)
;
return
-
ENOMEM
;
temp
=
readl
(
intel_i830_private
.
registers
+
I810_PGETBL_CTL
)
&
0xfffff000
;
global_cache_flush
();
/* FIXME: ? */
...
...
@@ -776,7 +776,7 @@ static int intel_i915_create_gatt_table(void)
agp_bridge
->
gatt_bus_addr
=
temp
;
return
(
0
)
;
return
0
;
}
static
int
intel_fetch_size
(
void
)
...
...
drivers/char/agp/intel-mch-agp.c
View file @
a3b0eef9
...
...
@@ -173,7 +173,7 @@ static int intel_i830_create_gatt_table(void)
intel_i830_private
.
registers
=
(
volatile
u8
__iomem
*
)
ioremap
(
temp
,
128
*
4096
);
if
(
!
intel_i830_private
.
registers
)
return
(
-
ENOMEM
)
;
return
-
ENOMEM
;
temp
=
readl
(
intel_i830_private
.
registers
+
I810_PGETBL_CTL
)
&
0xfffff000
;
global_cache_flush
();
/* FIXME: ?? */
...
...
@@ -185,7 +185,7 @@ static int intel_i830_create_gatt_table(void)
agp_bridge
->
gatt_bus_addr
=
temp
;
return
(
0
)
;
return
0
;
}
/* 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)
*/
static
int
intel_i830_free_gatt_table
(
void
)
{
return
(
0
)
;
return
0
;
}
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 */
agp_bridge
->
previous_size
=
agp_bridge
->
current_size
=
(
void
*
)
values
;
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
);
...
...
@@ -216,14 +216,14 @@ static int intel_i830_fetch_size(void)
if
((
gmch_ctrl
&
I830_GMCH_MEM_MASK
)
==
I830_GMCH_MEM_128M
)
{
agp_bridge
->
previous_size
=
agp_bridge
->
current_size
=
(
void
*
)
values
;
agp_bridge
->
aperture_size_idx
=
0
;
return
(
values
[
0
].
size
)
;
return
values
[
0
].
size
;
}
else
{
agp_bridge
->
previous_size
=
agp_bridge
->
current_size
=
(
void
*
)
values
;
agp_bridge
->
aperture_size_idx
=
1
;
return
(
values
[
1
].
size
)
;
return
values
[
1
].
size
;
}
return
(
0
)
;
return
0
;
}
static
int
intel_i830_configure
(
void
)
...
...
@@ -252,7 +252,7 @@ static int intel_i830_configure(void)
}
}
global_cache_flush
();
return
(
0
)
;
return
0
;
}
static
void
intel_i830_cleanup
(
void
)
...
...
@@ -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
);
printk
(
KERN_INFO
PFX
"Trying to insert into local/stolen memory
\n
"
);
return
(
-
EINVAL
)
;
return
-
EINVAL
;
}
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,
* 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,
if
((
type
!=
0
&&
type
!=
AGP_PHYS_MEMORY
)
||
(
mem
->
type
!=
0
&&
mem
->
type
!=
AGP_PHYS_MEMORY
))
return
(
-
EINVAL
)
;
return
-
EINVAL
;
global_cache_flush
();
/* FIXME: ?? */
...
...
@@ -300,7 +300,7 @@ static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start,
agp_bridge
->
driver
->
tlb_flush
(
mem
);
return
(
0
)
;
return
0
;
}
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
)
{
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
++
)
{
...
...
@@ -322,16 +322,16 @@ static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start,
global_cache_flush
();
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
)
{
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 */
return
(
NULL
)
;
return
NULL
;
}
static
int
intel_8xx_fetch_size
(
void
)
...
...
@@ -540,7 +540,7 @@ static int __devinit agp_intelmch_probe(struct pci_dev *pdev,
if
(
!
r
->
start
&&
r
->
end
)
{
if
(
pci_assign_resource
(
pdev
,
0
))
{
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,
*/
if
(
pci_enable_device
(
pdev
))
{
printk
(
KERN_ERR
PFX
"Unable to Enable PCI device
\n
"
);
return
(
-
ENODEV
)
;
return
-
ENODEV
;
}
/* Fill in the mode register */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment