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