]> git.ipfire.org Git - thirdparty/u-boot.git/blame - lib/tables_csum.c
sunxi: Silence warning about non-static inline function
[thirdparty/u-boot.git] / lib / tables_csum.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
1befb38b
AG
2/*
3 * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
1befb38b
AG
4 */
5
6#include <common.h>
7#include <linux/ctype.h>
8
9u8 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}