summaryrefslogtreecommitdiff
path: root/tprintf.h
blob: b2ca69ea6c327db8b2928174555e3d9186f4fc5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef TPRINTF_H
#define TPRINTF_H

#include "built_in.h"
#include "colors.h"
#include "colorize.h"

extern void tprintf_init(void);
extern void tprintf(char *msg, ...) __check_format_printf(1, 2);
extern void tprintf_flush(void);
extern void tprintf_cleanup(void);

extern void tputchar_safe(int c);
extern void tputs_safe(const char *str, size_t len);

#define DEFAULT_TTY_SIZE	80

#endif /* TPRINTF_H */
(patch) tree2dbe35310b327e166e31cdc4f0e4752ce7889cbb parentaa70e567c4f0eeb849c6bcef3685bdf1fc3ca19d (diff)
spi/fsl-espi: avoid infinite loops on fsl_espi_cpu_irq()
It brought nearly infinite loops, and was possible to be occurred only if the SPI transaction total size are not alighed with 4. Loops are here at while (tmp--), tmp is unsigned, and set it with minus value. The loops are executed as a result of unexpected RX interrupt occurrence after that. This interrupt may be hardware eratta and is not fixed. Fix mspi->len from minus value to 0 and print warning message. Signed-off-by: Nobuteru Hayashi <hayashi.nbb@ncos.nec.co.jp> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat