.. | .. |
---|
1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
---|
2 | 2 | /* |
---|
3 | 3 | * |
---|
4 | | - * (C) COPYRIGHT 2020-2021 ARM Limited. All rights reserved. |
---|
| 4 | + * (C) COPYRIGHT 2020-2022 ARM Limited. All rights reserved. |
---|
5 | 5 | * |
---|
6 | 6 | * This program is free software and is provided to you under the terms of the |
---|
7 | 7 | * GNU General Public License version 2 as published by the Free Software |
---|
.. | .. |
---|
49 | 49 | /** |
---|
50 | 50 | * kbase_ktrace_init - initialize kbase ktrace. |
---|
51 | 51 | * @kbdev: kbase device |
---|
| 52 | + * Return: 0 if successful or a negative error code on failure. |
---|
52 | 53 | */ |
---|
53 | 54 | int kbase_ktrace_init(struct kbase_device *kbdev); |
---|
54 | 55 | |
---|
.. | .. |
---|
81 | 82 | */ |
---|
82 | 83 | #if KBASE_KTRACE_TARGET_RBUF |
---|
83 | 84 | /** |
---|
| 85 | + * kbasep_ktrace_initialized - Check whether kbase ktrace is initialized |
---|
| 86 | + * |
---|
| 87 | + * @ktrace: ktrace of kbase device. |
---|
| 88 | + * |
---|
| 89 | + * Return: true if ktrace has been initialized. |
---|
| 90 | + */ |
---|
| 91 | +static inline bool kbasep_ktrace_initialized(struct kbase_ktrace *ktrace) |
---|
| 92 | +{ |
---|
| 93 | + return ktrace->rbuf != NULL; |
---|
| 94 | +} |
---|
| 95 | + |
---|
| 96 | +/** |
---|
84 | 97 | * kbasep_ktrace_add - internal function to add trace to the ringbuffer. |
---|
85 | 98 | * @kbdev: kbase device |
---|
86 | 99 | * @code: ktrace code |
---|