drm/tests: hdmi: Fix memory leaks in drm_display_mode_from_cea_vic()
[drm/drm-misc.git] / drivers / scsi / sd_trace.h
blobcba3c0b825bab835928227e0ae845c6d04b377b5
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (C) 2022 Western Digital Corporation or its affiliates.
4 */
5 #undef TRACE_SYSTEM
6 #define TRACE_SYSTEM sd
8 #undef TRACE_INCLUDE_FILE
9 #define TRACE_INCLUDE_FILE sd_trace
11 #if !defined(_SD_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
12 #include <scsi/scsi_cmnd.h>
13 #include <scsi/scsi_host.h>
14 #include <linux/tracepoint.h>
16 TRACE_EVENT(scsi_prepare_zone_append,
18 TP_PROTO(struct scsi_cmnd *cmnd, sector_t lba,
19 unsigned int wp_offset),
21 TP_ARGS(cmnd, lba, wp_offset),
23 TP_STRUCT__entry(
24 __field( unsigned int, host_no )
25 __field( unsigned int, channel )
26 __field( unsigned int, id )
27 __field( unsigned int, lun )
28 __field( sector_t, lba )
29 __field( unsigned int, wp_offset )
32 TP_fast_assign(
33 __entry->host_no = cmnd->device->host->host_no;
34 __entry->channel = cmnd->device->channel;
35 __entry->id = cmnd->device->id;
36 __entry->lun = cmnd->device->lun;
37 __entry->lba = lba;
38 __entry->wp_offset = wp_offset;
41 TP_printk("host_no=%u, channel=%u id=%u lun=%u lba=%llu wp_offset=%u",
42 __entry->host_no, __entry->channel, __entry->id,
43 __entry->lun, __entry->lba, __entry->wp_offset)
46 TRACE_EVENT(scsi_zone_wp_update,
48 TP_PROTO(struct scsi_cmnd *cmnd, sector_t rq_sector,
49 unsigned int wp_offset, unsigned int good_bytes),
51 TP_ARGS(cmnd, rq_sector, wp_offset, good_bytes),
53 TP_STRUCT__entry(
54 __field( unsigned int, host_no )
55 __field( unsigned int, channel )
56 __field( unsigned int, id )
57 __field( unsigned int, lun )
58 __field( sector_t, rq_sector )
59 __field( unsigned int, wp_offset )
60 __field( unsigned int, good_bytes )
63 TP_fast_assign(
64 __entry->host_no = cmnd->device->host->host_no;
65 __entry->channel = cmnd->device->channel;
66 __entry->id = cmnd->device->id;
67 __entry->lun = cmnd->device->lun;
68 __entry->rq_sector = rq_sector;
69 __entry->wp_offset = wp_offset;
70 __entry->good_bytes = good_bytes;
73 TP_printk("host_no=%u, channel=%u id=%u lun=%u rq_sector=%llu" \
74 " wp_offset=%u good_bytes=%u",
75 __entry->host_no, __entry->channel, __entry->id,
76 __entry->lun, __entry->rq_sector, __entry->wp_offset,
77 __entry->good_bytes)
79 #endif /* _SD_TRACE_H */
81 /* This part must be outside protection */
82 #undef TRACE_INCLUDE_PATH
83 #define TRACE_INCLUDE_PATH ../../drivers/scsi
84 #include <trace/define_trace.h>