.. | .. |
---|
1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
---|
2 | 2 | /* |
---|
3 | 3 | * |
---|
4 | | - * (C) COPYRIGHT 2014-2015, 2018, 2020-2021 ARM Limited. All rights reserved. |
---|
| 4 | + * (C) COPYRIGHT 2014-2015, 2018, 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 |
---|
.. | .. |
---|
19 | 19 | * |
---|
20 | 20 | */ |
---|
21 | 21 | |
---|
22 | | -/** |
---|
| 22 | +/* |
---|
23 | 23 | * Kernel-wide include for common macros and types. |
---|
24 | 24 | */ |
---|
25 | 25 | |
---|
.. | .. |
---|
53 | 53 | #define MAX(x, y) ((x) < (y) ? (y) : (x)) |
---|
54 | 54 | |
---|
55 | 55 | /** |
---|
56 | | - * Function-like macro for suppressing unused variable warnings. |
---|
| 56 | + * CSTD_UNUSED - Function-like macro for suppressing unused variable warnings. |
---|
| 57 | + * |
---|
57 | 58 | * @x: unused variable |
---|
58 | 59 | * |
---|
59 | 60 | * Where possible such variables should be removed; this macro is present for |
---|
.. | .. |
---|
62 | 63 | #define CSTD_UNUSED(x) ((void)(x)) |
---|
63 | 64 | |
---|
64 | 65 | /** |
---|
65 | | - * Function-like macro for use where "no behavior" is desired. |
---|
| 66 | + * CSTD_NOP - Function-like macro for use where "no behavior" is desired. |
---|
66 | 67 | * @...: no-op |
---|
67 | 68 | * |
---|
68 | 69 | * This is useful when compile time macros turn a function-like macro in to a |
---|
.. | .. |
---|
71 | 72 | #define CSTD_NOP(...) ((void)#__VA_ARGS__) |
---|
72 | 73 | |
---|
73 | 74 | /** |
---|
74 | | - * Function-like macro for stringizing a single level macro. |
---|
| 75 | + * CSTD_STR1 - Function-like macro for stringizing a single level macro. |
---|
75 | 76 | * @x: macro's value |
---|
76 | 77 | * |
---|
77 | 78 | * @code |
---|
.. | .. |
---|
83 | 84 | #define CSTD_STR1(x) #x |
---|
84 | 85 | |
---|
85 | 86 | /** |
---|
86 | | - * Function-like macro for stringizing a macro's value. |
---|
| 87 | + * CSTD_STR2 - Function-like macro for stringizing a macro's value. |
---|
87 | 88 | * @x: macro's value |
---|
88 | 89 | * |
---|
89 | 90 | * This should not be used if the macro is defined in a way which may have no |
---|
.. | .. |
---|
96 | 97 | */ |
---|
97 | 98 | #define CSTD_STR2(x) CSTD_STR1(x) |
---|
98 | 99 | |
---|
| 100 | + #ifndef fallthrough |
---|
| 101 | + #define fallthrough __fallthrough |
---|
| 102 | + #endif /* fallthrough */ |
---|
| 103 | + |
---|
| 104 | +#ifndef __fallthrough |
---|
| 105 | +#define __fallthrough __attribute__((fallthrough)) |
---|
| 106 | +#endif /* __fallthrough */ |
---|
| 107 | + |
---|
99 | 108 | #endif /* _MALISW_H_ */ |
---|