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
Kirill Smelkov
linux
Commits
37b11faa
Commit
37b11faa
authored
Feb 19, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] PCI: remove large stack usage in pci_do_scan_bus()
parent
7f754cf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
drivers/pci/probe.c
drivers/pci/probe.c
+15
-8
No files found.
drivers/pci/probe.c
View file @
37b11faa
...
...
@@ -505,23 +505,30 @@ unsigned int __devinit pci_do_scan_bus(struct pci_bus *bus)
{
unsigned
int
devfn
,
max
,
pass
;
struct
list_head
*
ln
;
struct
pci_dev
*
dev
,
dev0
;
struct
pci_dev
*
dev
;
dev
=
kmalloc
(
sizeof
(
*
dev
),
GFP_KERNEL
);
if
(
!
dev
)
{
printk
(
KERN_ERR
"Out of memory in %s
\n
"
,
__FUNCTION__
);
return
0
;
}
DBG
(
"Scanning bus %02x
\n
"
,
bus
->
number
);
max
=
bus
->
secondary
;
/* Create a device template */
memset
(
&
dev0
,
0
,
sizeof
(
dev0
));
dev
0
.
bus
=
bus
;
dev
0
.
sysdata
=
bus
->
sysdata
;
dev
0
.
dev
.
parent
=
bus
->
dev
;
dev
0
.
dev
.
bus
=
&
pci_bus_type
;
memset
(
dev
,
0
,
sizeof
(
*
dev
));
dev
->
bus
=
bus
;
dev
->
sysdata
=
bus
->
sysdata
;
dev
->
dev
.
parent
=
bus
->
dev
;
dev
->
dev
.
bus
=
&
pci_bus_type
;
/* Go find them, Rover! */
for
(
devfn
=
0
;
devfn
<
0x100
;
devfn
+=
8
)
{
dev
0
.
devfn
=
devfn
;
pci_scan_slot
(
&
dev0
);
dev
->
devfn
=
devfn
;
pci_scan_slot
(
dev
);
}
kfree
(
dev
);
/*
* After performing arch-dependent fixup of the bus, look behind
...
...
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