treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / interconnect / trace.h
blob3d668ff566bfe4f87f1f293b6fd90037641c0657
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Interconnect framework tracepoints
4 * Copyright (c) 2019, Linaro Ltd.
5 * Author: Georgi Djakov <georgi.djakov@linaro.org>
6 */
8 #undef TRACE_SYSTEM
9 #define TRACE_SYSTEM interconnect
11 #if !defined(_TRACE_INTERCONNECT_H) || defined(TRACE_HEADER_MULTI_READ)
12 #define _TRACE_INTERCONNECT_H
14 #include <linux/interconnect.h>
15 #include <linux/tracepoint.h>
17 TRACE_EVENT(icc_set_bw,
19 TP_PROTO(struct icc_path *p, struct icc_node *n, int i,
20 u32 avg_bw, u32 peak_bw),
22 TP_ARGS(p, n, i, avg_bw, peak_bw),
24 TP_STRUCT__entry(
25 __string(path_name, p->name)
26 __string(dev, dev_name(p->reqs[i].dev))
27 __string(node_name, n->name)
28 __field(u32, avg_bw)
29 __field(u32, peak_bw)
30 __field(u32, node_avg_bw)
31 __field(u32, node_peak_bw)
34 TP_fast_assign(
35 __assign_str(path_name, p->name);
36 __assign_str(dev, dev_name(p->reqs[i].dev));
37 __assign_str(node_name, n->name);
38 __entry->avg_bw = avg_bw;
39 __entry->peak_bw = peak_bw;
40 __entry->node_avg_bw = n->avg_bw;
41 __entry->node_peak_bw = n->peak_bw;
44 TP_printk("path=%s dev=%s node=%s avg_bw=%u peak_bw=%u agg_avg=%u agg_peak=%u",
45 __get_str(path_name),
46 __get_str(dev),
47 __get_str(node_name),
48 __entry->avg_bw,
49 __entry->peak_bw,
50 __entry->node_avg_bw,
51 __entry->node_peak_bw)
54 TRACE_EVENT(icc_set_bw_end,
56 TP_PROTO(struct icc_path *p, int ret),
58 TP_ARGS(p, ret),
60 TP_STRUCT__entry(
61 __string(path_name, p->name)
62 __string(dev, dev_name(p->reqs[0].dev))
63 __field(int, ret)
66 TP_fast_assign(
67 __assign_str(path_name, p->name);
68 __assign_str(dev, dev_name(p->reqs[0].dev));
69 __entry->ret = ret;
72 TP_printk("path=%s dev=%s ret=%d",
73 __get_str(path_name),
74 __get_str(dev),
75 __entry->ret)
78 #endif /* _TRACE_INTERCONNECT_H */
80 /* This part must be outside protection */
82 #undef TRACE_INCLUDE_PATH
83 #define TRACE_INCLUDE_PATH .
85 #undef TRACE_INCLUDE_FILE
86 #define TRACE_INCLUDE_FILE trace
88 #include <trace/define_trace.h>