forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/video/fbdev/c2p_core.h
....@@ -12,6 +12,8 @@
1212 * for more details.
1313 */
1414
15
+#include <linux/build_bug.h>
16
+
1517
1618 /*
1719 * Basic transpose step
....@@ -27,9 +29,7 @@
2729 }
2830
2931
30
-extern void c2p_unsupported(void);
31
-
32
-static inline u32 get_mask(unsigned int n)
32
+static __always_inline u32 get_mask(unsigned int n)
3333 {
3434 switch (n) {
3535 case 1:
....@@ -48,7 +48,7 @@
4848 return 0x0000ffff;
4949 }
5050
51
- c2p_unsupported();
51
+ BUILD_BUG();
5252 return 0;
5353 }
5454
....@@ -57,7 +57,7 @@
5757 * Transpose operations on 8 32-bit words
5858 */
5959
60
-static inline void transp8(u32 d[], unsigned int n, unsigned int m)
60
+static __always_inline void transp8(u32 d[], unsigned int n, unsigned int m)
6161 {
6262 u32 mask = get_mask(n);
6363
....@@ -91,7 +91,7 @@
9191 return;
9292 }
9393
94
- c2p_unsupported();
94
+ BUILD_BUG();
9595 }
9696
9797
....@@ -99,7 +99,7 @@
9999 * Transpose operations on 4 32-bit words
100100 */
101101
102
-static inline void transp4(u32 d[], unsigned int n, unsigned int m)
102
+static __always_inline void transp4(u32 d[], unsigned int n, unsigned int m)
103103 {
104104 u32 mask = get_mask(n);
105105
....@@ -118,7 +118,7 @@
118118 return;
119119 }
120120
121
- c2p_unsupported();
121
+ BUILD_BUG();
122122 }
123123
124124
....@@ -126,7 +126,7 @@
126126 * Transpose operations on 4 32-bit words (reverse order)
127127 */
128128
129
-static inline void transp4x(u32 d[], unsigned int n, unsigned int m)
129
+static __always_inline void transp4x(u32 d[], unsigned int n, unsigned int m)
130130 {
131131 u32 mask = get_mask(n);
132132
....@@ -138,7 +138,7 @@
138138 return;
139139 }
140140
141
- c2p_unsupported();
141
+ BUILD_BUG();
142142 }
143143
144144