treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / s390 / cio / vfio_ccw_trace.h
blob30162a318a8a12e4860919e7c6a50b040f265379
1 /* SPDX-License-Identifier: GPL-2.0
2 * Tracepoints for vfio_ccw driver
4 * Copyright IBM Corp. 2018
6 * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
7 * Halil Pasic <pasic@linux.vnet.ibm.com>
8 */
10 #include "cio.h"
12 #undef TRACE_SYSTEM
13 #define TRACE_SYSTEM vfio_ccw
15 #if !defined(_VFIO_CCW_TRACE_) || defined(TRACE_HEADER_MULTI_READ)
16 #define _VFIO_CCW_TRACE_
18 #include <linux/tracepoint.h>
20 TRACE_EVENT(vfio_ccw_fsm_async_request,
21 TP_PROTO(struct subchannel_id schid,
22 int command,
23 int errno),
24 TP_ARGS(schid, command, errno),
26 TP_STRUCT__entry(
27 __field(u8, cssid)
28 __field(u8, ssid)
29 __field(u16, sch_no)
30 __field(int, command)
31 __field(int, errno)
34 TP_fast_assign(
35 __entry->cssid = schid.cssid;
36 __entry->ssid = schid.ssid;
37 __entry->sch_no = schid.sch_no;
38 __entry->command = command;
39 __entry->errno = errno;
42 TP_printk("schid=%x.%x.%04x command=0x%x errno=%d",
43 __entry->cssid,
44 __entry->ssid,
45 __entry->sch_no,
46 __entry->command,
47 __entry->errno)
50 TRACE_EVENT(vfio_ccw_fsm_event,
51 TP_PROTO(struct subchannel_id schid, int state, int event),
52 TP_ARGS(schid, state, event),
54 TP_STRUCT__entry(
55 __field(u8, cssid)
56 __field(u8, ssid)
57 __field(u16, schno)
58 __field(int, state)
59 __field(int, event)
62 TP_fast_assign(
63 __entry->cssid = schid.cssid;
64 __entry->ssid = schid.ssid;
65 __entry->schno = schid.sch_no;
66 __entry->state = state;
67 __entry->event = event;
70 TP_printk("schid=%x.%x.%04x state=%d event=%d",
71 __entry->cssid, __entry->ssid, __entry->schno,
72 __entry->state,
73 __entry->event)
76 TRACE_EVENT(vfio_ccw_fsm_io_request,
77 TP_PROTO(int fctl, struct subchannel_id schid, int errno, char *errstr),
78 TP_ARGS(fctl, schid, errno, errstr),
80 TP_STRUCT__entry(
81 __field(u8, cssid)
82 __field(u8, ssid)
83 __field(u16, sch_no)
84 __field(int, fctl)
85 __field(int, errno)
86 __field(char*, errstr)
89 TP_fast_assign(
90 __entry->cssid = schid.cssid;
91 __entry->ssid = schid.ssid;
92 __entry->sch_no = schid.sch_no;
93 __entry->fctl = fctl;
94 __entry->errno = errno;
95 __entry->errstr = errstr;
98 TP_printk("schid=%x.%x.%04x fctl=0x%x errno=%d info=%s",
99 __entry->cssid,
100 __entry->ssid,
101 __entry->sch_no,
102 __entry->fctl,
103 __entry->errno,
104 __entry->errstr)
107 #endif /* _VFIO_CCW_TRACE_ */
109 /* This part must be outside protection */
111 #undef TRACE_INCLUDE_PATH
112 #define TRACE_INCLUDE_PATH .
113 #undef TRACE_INCLUDE_FILE
114 #define TRACE_INCLUDE_FILE vfio_ccw_trace
116 #include <trace/define_trace.h>