treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / soc / qcom / trace-rpmh.h
blobfeb0cb455e37485963dc37210b387ff56e08d788
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
4 */
6 #if !defined(_TRACE_RPMH_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define _TRACE_RPMH_H
9 #undef TRACE_SYSTEM
10 #define TRACE_SYSTEM rpmh
12 #include <linux/tracepoint.h>
13 #include "rpmh-internal.h"
15 TRACE_EVENT(rpmh_tx_done,
17 TP_PROTO(struct rsc_drv *d, int m, const struct tcs_request *r, int e),
19 TP_ARGS(d, m, r, e),
21 TP_STRUCT__entry(
22 __string(name, d->name)
23 __field(int, m)
24 __field(u32, addr)
25 __field(u32, data)
26 __field(int, err)
29 TP_fast_assign(
30 __assign_str(name, d->name);
31 __entry->m = m;
32 __entry->addr = r->cmds[0].addr;
33 __entry->data = r->cmds[0].data;
34 __entry->err = e;
37 TP_printk("%s: ack: tcs-m: %d addr: %#x data: %#x errno: %d",
38 __get_str(name), __entry->m, __entry->addr, __entry->data,
39 __entry->err)
42 TRACE_EVENT(rpmh_send_msg,
44 TP_PROTO(struct rsc_drv *d, int m, int n, u32 h,
45 const struct tcs_cmd *c),
47 TP_ARGS(d, m, n, h, c),
49 TP_STRUCT__entry(
50 __string(name, d->name)
51 __field(int, m)
52 __field(int, n)
53 __field(u32, hdr)
54 __field(u32, addr)
55 __field(u32, data)
56 __field(bool, wait)
59 TP_fast_assign(
60 __assign_str(name, d->name);
61 __entry->m = m;
62 __entry->n = n;
63 __entry->hdr = h;
64 __entry->addr = c->addr;
65 __entry->data = c->data;
66 __entry->wait = c->wait;
69 TP_printk("%s: send-msg: tcs(m): %d cmd(n): %d msgid: %#x addr: %#x data: %#x complete: %d",
70 __get_str(name), __entry->m, __entry->n, __entry->hdr,
71 __entry->addr, __entry->data, __entry->wait)
74 #endif /* _TRACE_RPMH_H */
76 #undef TRACE_INCLUDE_PATH
77 #define TRACE_INCLUDE_PATH .
79 #undef TRACE_INCLUDE_FILE
80 #define TRACE_INCLUDE_FILE trace-rpmh
82 #include <trace/define_trace.h>