repo.or.cz
/
coreboot.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
libpayload: hexdump: Use `p` as conversion specifier for pointers
[coreboot.git]
/
util
/
getpir
/
checksum.c
blob
bcf342573f3602b55d3539c0992d5bf268f5b92b
1
#include
"pirq_routing.h"
2
#include
"checksum.h"
3
4
int
calc_checksum
(
struct
irq_routing_table
*
rt
)
5
{
6
long
i
;
7
uint8_t
*
addr
,
sum
=
0
;
8
9
addr
= (
uint8_t
*)
rt
;
10
for
(
i
=
0
;
i
<
rt
->
size
;
i
++)
11
sum
+=
addr
[
i
];
12
return
(
sum
);
13
}