hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/gpu/arm/bifrost/mali_malisw.h
....@@ -1,7 +1,7 @@
11 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
22 /*
33 *
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.
55 *
66 * This program is free software and is provided to you under the terms of the
77 * GNU General Public License version 2 as published by the Free Software
....@@ -19,7 +19,7 @@
1919 *
2020 */
2121
22
-/**
22
+/*
2323 * Kernel-wide include for common macros and types.
2424 */
2525
....@@ -53,7 +53,8 @@
5353 #define MAX(x, y) ((x) < (y) ? (y) : (x))
5454
5555 /**
56
- * Function-like macro for suppressing unused variable warnings.
56
+ * CSTD_UNUSED - Function-like macro for suppressing unused variable warnings.
57
+ *
5758 * @x: unused variable
5859 *
5960 * Where possible such variables should be removed; this macro is present for
....@@ -62,7 +63,7 @@
6263 #define CSTD_UNUSED(x) ((void)(x))
6364
6465 /**
65
- * Function-like macro for use where "no behavior" is desired.
66
+ * CSTD_NOP - Function-like macro for use where "no behavior" is desired.
6667 * @...: no-op
6768 *
6869 * This is useful when compile time macros turn a function-like macro in to a
....@@ -71,7 +72,7 @@
7172 #define CSTD_NOP(...) ((void)#__VA_ARGS__)
7273
7374 /**
74
- * Function-like macro for stringizing a single level macro.
75
+ * CSTD_STR1 - Function-like macro for stringizing a single level macro.
7576 * @x: macro's value
7677 *
7778 * @code
....@@ -83,7 +84,7 @@
8384 #define CSTD_STR1(x) #x
8485
8586 /**
86
- * Function-like macro for stringizing a macro's value.
87
+ * CSTD_STR2 - Function-like macro for stringizing a macro's value.
8788 * @x: macro's value
8889 *
8990 * This should not be used if the macro is defined in a way which may have no
....@@ -96,4 +97,12 @@
9697 */
9798 #define CSTD_STR2(x) CSTD_STR1(x)
9899
100
+ #ifndef fallthrough
101
+ #define fallthrough __fallthrough
102
+ #endif /* fallthrough */
103
+
104
+#ifndef __fallthrough
105
+#define __fallthrough __attribute__((fallthrough))
106
+#endif /* __fallthrough */
107
+
99108 #endif /* _MALISW_H_ */