Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spec-sw
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
fmc-projects
spec
spec-sw
Commits
24b4eca2
There was an error fetching the commit references. Please try again later.
Commit
24b4eca2
authored
12 years ago
by
Alessandro Rubini
Browse files
Options
Downloads
Patches
Plain Diff
kernel/fmc: better dumping of sdb trees
parent
262ee0a4
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kernel/fmc-sdb.c
+6
-8
6 additions, 8 deletions
kernel/fmc-sdb.c
with
6 additions
and
8 deletions
kernel/fmc-sdb.c
+
6
−
8
View file @
24b4eca2
...
...
@@ -44,8 +44,6 @@ static struct sdb_array *__fmc_scan_sdb_tree(struct fmc_device *fmc,
/* So, the magic was there: get the count from offset 4*/
onew
=
__sdb_rd
(
fmc
,
address
+
4
,
convert
);
n
=
__be16_to_cpu
(
*
(
uint16_t
*
)
&
onew
);
dev_info
(
fmc
->
hwdev
,
"address %lx, %i items (%08x) - c %i
\n
"
,
address
,
n
,
onew
,
convert
);
arr
=
kzalloc
(
sizeof
(
*
arr
),
GFP_KERNEL
);
if
(
arr
)
{
arr
->
record
=
kzalloc
(
sizeof
(
arr
->
record
[
0
])
*
n
,
GFP_KERNEL
);
...
...
@@ -123,7 +121,7 @@ int fmc_free_sdb_tree(struct fmc_device *fmc)
}
EXPORT_SYMBOL
(
fmc_free_sdb_tree
);
static
void
__fmc_show_sdb_tree
(
struct
sdb_array
*
arr
)
static
void
__fmc_show_sdb_tree
(
struct
fmc_device
*
fmc
,
struct
sdb_array
*
arr
)
{
int
i
,
j
,
n
=
arr
->
len
,
level
=
arr
->
level
;
struct
sdb_array
*
ap
;
...
...
@@ -133,15 +131,15 @@ static void __fmc_show_sdb_tree(struct sdb_array *arr)
union
sdb_record
*
r
;
struct
sdb_product
*
p
;
struct
sdb_component
*
c
;
for
(
j
=
0
;
j
<
level
;
j
++
)
printk
(
" "
);
r
=
&
arr
->
record
[
i
];
c
=
&
r
->
dev
.
sdb_component
;
p
=
&
c
->
product
;
base
=
0
;
for
(
ap
=
arr
;
ap
;
ap
=
ap
->
parent
)
base
+=
ap
->
baseaddr
;
dev_info
(
fmc
->
hwdev
,
"SDB: "
);
for
(
j
=
0
;
j
<
level
;
j
++
)
printk
(
" "
);
switch
(
r
->
empty
.
record_type
)
{
case
sdb_type_interconnect
:
printk
(
"%08llx:%08x %.19s
\n
"
,
...
...
@@ -168,7 +166,7 @@ static void __fmc_show_sdb_tree(struct sdb_array *arr)
PTR_ERR
(
arr
->
subtree
[
i
]));
break
;
}
__fmc_show_sdb_tree
(
arr
->
subtree
[
i
]);
__fmc_show_sdb_tree
(
fmc
,
arr
->
subtree
[
i
]);
break
;
case
sdb_type_integration
:
printk
(
"integration
\n
"
);
...
...
@@ -187,7 +185,7 @@ void fmc_show_sdb_tree(struct fmc_device *fmc)
{
if
(
!
fmc
->
sdb
)
return
;
__fmc_show_sdb_tree
(
fmc
->
sdb
);
__fmc_show_sdb_tree
(
fmc
,
fmc
->
sdb
);
}
EXPORT_SYMBOL
(
fmc_show_sdb_tree
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment