Skip to content

Commit b330f39

Browse files
geertudanvet
authored andcommitted
fbdev: c2p: Fix link failure on non-inlining
When the compiler decides not to inline the Chunky-to-Planar core functions, the build fails with: c2p_planar.c:(.text+0xd6): undefined reference to `c2p_unsupported' c2p_planar.c:(.text+0x1dc): undefined reference to `c2p_unsupported' c2p_iplan2.c:(.text+0xc4): undefined reference to `c2p_unsupported' c2p_iplan2.c:(.text+0x150): undefined reference to `c2p_unsupported' Fix this by marking the functions __always_inline. While this could be triggered before by manually enabling both CONFIG_OPTIMIZE_INLINING and CONFIG_CC_OPTIMIZE_FOR_SIZE, it was exposed in the m68k defconfig by commit ac7c3e4 ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly"). Fixes: 9012d01 ("compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING") Reported-by: [email protected] Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Masahiro Yamada <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent f70744c commit b330f39

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/video/fbdev/c2p_core.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static inline void _transp(u32 d[], unsigned int i1, unsigned int i2,
2929

3030
extern void c2p_unsupported(void);
3131

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:
@@ -57,7 +57,7 @@ static inline u32 get_mask(unsigned int n)
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

@@ -99,7 +99,7 @@ static inline void transp8(u32 d[], unsigned int n, unsigned int m)
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

@@ -126,7 +126,7 @@ static inline void transp4(u32 d[], unsigned int n, unsigned int m)
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

0 commit comments

Comments
 (0)