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
9d0ef4fd
Commit
9d0ef4fd
authored
Sep 30, 2006
by
Andi Kleen
Committed by
Andi Kleen
Sep 30, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Use ARRAY_SIZE in setup.c
Based on i386 patch from Bjorn. Signed-off-by:
Andi Kleen
<
ak@suse.de
>
parent
b9629b82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
arch/x86_64/kernel/setup.c
arch/x86_64/kernel/setup.c
+3
-8
No files found.
arch/x86_64/kernel/setup.c
View file @
9d0ef4fd
...
@@ -123,9 +123,6 @@ struct resource standard_io_resources[] = {
...
@@ -123,9 +123,6 @@ struct resource standard_io_resources[] = {
.
flags
=
IORESOURCE_BUSY
|
IORESOURCE_IO
}
.
flags
=
IORESOURCE_BUSY
|
IORESOURCE_IO
}
};
};
#define STANDARD_IO_RESOURCES \
(sizeof standard_io_resources / sizeof standard_io_resources[0])
#define IORESOURCE_RAM (IORESOURCE_BUSY | IORESOURCE_MEM)
#define IORESOURCE_RAM (IORESOURCE_BUSY | IORESOURCE_MEM)
struct
resource
data_resource
=
{
struct
resource
data_resource
=
{
...
@@ -172,9 +169,6 @@ static struct resource adapter_rom_resources[] = {
...
@@ -172,9 +169,6 @@ static struct resource adapter_rom_resources[] = {
.
flags
=
IORESOURCE_ROM
}
.
flags
=
IORESOURCE_ROM
}
};
};
#define ADAPTER_ROM_RESOURCES \
(sizeof adapter_rom_resources / sizeof adapter_rom_resources[0])
static
struct
resource
video_rom_resource
=
{
static
struct
resource
video_rom_resource
=
{
.
name
=
"Video ROM"
,
.
name
=
"Video ROM"
,
.
start
=
0xc0000
,
.
start
=
0xc0000
,
...
@@ -245,7 +239,8 @@ static void __init probe_roms(void)
...
@@ -245,7 +239,8 @@ static void __init probe_roms(void)
}
}
/* check for adapter roms on 2k boundaries */
/* check for adapter roms on 2k boundaries */
for
(
i
=
0
;
i
<
ADAPTER_ROM_RESOURCES
&&
start
<
upper
;
start
+=
2048
)
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
adapter_rom_resources
)
&&
start
<
upper
;
start
+=
2048
)
{
rom
=
isa_bus_to_virt
(
start
);
rom
=
isa_bus_to_virt
(
start
);
if
(
!
romsignature
(
rom
))
if
(
!
romsignature
(
rom
))
continue
;
continue
;
...
@@ -537,7 +532,7 @@ void __init setup_arch(char **cmdline_p)
...
@@ -537,7 +532,7 @@ void __init setup_arch(char **cmdline_p)
{
{
unsigned
i
;
unsigned
i
;
/* request I/O space for devices used on all i[345]86 PCs */
/* request I/O space for devices used on all i[345]86 PCs */
for
(
i
=
0
;
i
<
STANDARD_IO_RESOURCES
;
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
standard_io_resources
)
;
i
++
)
request_resource
(
&
ioport_resource
,
&
standard_io_resources
[
i
]);
request_resource
(
&
ioport_resource
,
&
standard_io_resources
[
i
]);
}
}
...
...
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