With the old checkpatch we cannot use the correct format for the SPDX tags in the file .c, in fact the C99 comments are not allowed and we had to use the block comment. With the new checkpatch, let's switch to the correct SPDX format. Change created automatically through the command: sed -i \ 's,^/\* *\(SPDX-License-Identifier: .*[^ ]\) *\*/$,// \1,' \ $(find src/ contrib/ -name \*.c) Change-Id: I6da16506baa7af718947562505dd49606d124171 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7153 Tested-by: jenkins
34 lines
845 B
C
34 lines
845 B
C
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
/***************************************************************************
|
|
* Copyright (C) 2015 Andreas Fritiofson *
|
|
* andreas.fritiofson@gmail.com *
|
|
***************************************************************************/
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#include "jep106.h"
|
|
#include "log.h"
|
|
|
|
static const char * const jep106[][126] = {
|
|
#include "jep106.inc"
|
|
};
|
|
|
|
const char *jep106_table_manufacturer(unsigned int bank, unsigned int id)
|
|
{
|
|
if (id < 1 || id > 126) {
|
|
LOG_DEBUG("BUG: Caller passed out-of-range JEP106 ID!");
|
|
return "<invalid>";
|
|
}
|
|
|
|
/* index is zero based */
|
|
id--;
|
|
|
|
if (bank >= ARRAY_SIZE(jep106) || jep106[bank][id] == 0)
|
|
return "<unknown>";
|
|
|
|
return jep106[bank][id];
|
|
}
|