Skip to content

Commit

Permalink
fbdev: c2p: Use BUILD_BUG() instead of custom solution
Browse files Browse the repository at this point in the history
Replace the call to the custom non-existing function by a standard
BUILD_BUG() invocation.

Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20200112171521.22443-1-geert@linux-m68k.org
  • Loading branch information
Geert Uytterhoeven committed Mar 9, 2020
1 parent 435cb3e commit ea66589
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/video/fbdev/c2p_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
* for more details.
*/

#include <linux/build_bug.h>


/*
* Basic transpose step
Expand All @@ -27,8 +29,6 @@ static inline void _transp(u32 d[], unsigned int i1, unsigned int i2,
}


extern void c2p_unsupported(void);

static __always_inline u32 get_mask(unsigned int n)
{
switch (n) {
Expand All @@ -48,7 +48,7 @@ static __always_inline u32 get_mask(unsigned int n)
return 0x0000ffff;
}

c2p_unsupported();
BUILD_BUG();
return 0;
}

Expand Down Expand Up @@ -91,7 +91,7 @@ static __always_inline void transp8(u32 d[], unsigned int n, unsigned int m)
return;
}

c2p_unsupported();
BUILD_BUG();
}


Expand All @@ -118,7 +118,7 @@ static __always_inline void transp4(u32 d[], unsigned int n, unsigned int m)
return;
}

c2p_unsupported();
BUILD_BUG();
}


Expand All @@ -138,7 +138,7 @@ static __always_inline void transp4x(u32 d[], unsigned int n, unsigned int m)
return;
}

c2p_unsupported();
BUILD_BUG();
}


Expand Down

0 comments on commit ea66589

Please sign in to comment.