summaryrefslogtreecommitdiff
path: root/tools/perf/pmu-events/json.h
blob: 278ebd32cfb6f47146e796e0224f592cce479ec0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef JSON_H
#define JSON_H 1

#include "jsmn.h"

jsmntok_t *parse_json(const char *fn, char **map, size_t *size, int *len);
void free_json(char *map, size_t size, jsmntok_t *tokens);
int json_line(char *map, jsmntok_t *t);
const char *json_name(jsmntok_t *t);
int json_streq(char *map, jsmntok_t *t, const char *s);
int json_len(jsmntok_t *t);

extern int verbose;

#include <stdbool.h>

extern int eprintf(int level, int var, const char *fmt, ...);
#define pr_fmt(fmt)	fmt

#define pr_err(fmt, ...) \
	eprintf(0, verbose, pr_fmt(fmt), ##__VA_ARGS__)

#define pr_info(fmt, ...) \
	eprintf(1, verbose, pr_fmt(fmt), ##__VA_ARGS__)

#define pr_debug(fmt, ...) \
	eprintf(2, verbose, pr_fmt(fmt), ##__VA_ARGS__)

#ifndef roundup
#define roundup(x, y) (                                \
{                                                      \
        const typeof(y) __y = y;                       \
        (((x) + (__y - 1)) / __y) * __y;               \
}                                                      \
)
#endif

#endif
t.cgi/linux/net-next.git/diff/drivers/usb/host/uhci-hub.c?h=nds-private-remove&id=c67b42f3a3f03e68bf915f32c8f7be0b726fec1a&id2=027eb72cbcf81561867a764074964e2ce9828398'>diff)parentc8f325a59cfc718d13a50fbc746ed9b415c25e92 (diff)
Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull EFI fixes from Ingo Molnar: "Two EFI boot fixes, one for arm64 and one for x86 systems with certain firmware versions" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/fdt: Avoid FDT manipulation after ExitBootServices() x86/efi: Always map the first physical page into the EFI pagetables
Diffstat (limited to 'drivers/usb/host/uhci-hub.c')