1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/kernel.h>
3 #include <linux/string.h>
9 void _rtsx_trace(struct rtsx_chip
*chip
, const char *file
, const char *func
,
12 struct trace_msg_t
*msg
= &chip
->trace_msg
[chip
->msg_idx
];
14 file
= kbasename(file
);
15 dev_dbg(rtsx_dev(chip
), "[%s][%s]:[%d]\n", file
, func
, line
);
17 strncpy(msg
->file
, file
, MSG_FILE_LEN
- 1);
18 strncpy(msg
->func
, func
, MSG_FUNC_LEN
- 1);
19 msg
->line
= (u16
)line
;
20 get_current_time(msg
->timeval_buf
, TIME_VAL_LEN
);
24 if (chip
->msg_idx
>= TRACE_ITEM_CNT
)