]> Git Repo - J-u-boot.git/blame - include/tables_csum.h
pci: layerscape: move pci node search in a common function
[J-u-boot.git] / include / tables_csum.h
CommitLineData
83d290c5 1/* SPDX-License-Identifier: GPL-2.0+ */
2b445e4d
AG
2/*
3 * Copyright (C) 2015, Bin Meng <[email protected]>
2b445e4d
AG
4 */
5
6#ifndef _TABLES_CSUM_H_
7#define _TABLES_CSUM_H_
8
9static inline u8 table_compute_checksum(void *v, int len)
10{
11 u8 *bytes = v;
12 u8 checksum = 0;
13 int i;
14
15 for (i = 0; i < len; i++)
16 checksum -= bytes[i];
17
18 return checksum;
19}
20
21#endif
This page took 0.306895 seconds and 4 git commands to generate.