From 46f12960aad2d48fc6742470f718e147e5c85d06 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Thu, 3 Aug 2023 16:19:18 +0300 Subject: drm/i915: Move abs_diff() to math.h abs_diff() belongs to math.h. Move it there. This will allow others to use it. [andriy.shevchenko@linux.intel.com: add abs_diff() documentation] Link: https://lkml.kernel.org/r/20230804050934.83223-1-andriy.shevchenko@linux.intel.com [akpm@linux-foundation.org: fix comment, per Randy] Link: https://lkml.kernel.org/r/20230803131918.53727-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Reviewed-by: Jiri Slaby # tty/serial Acked-by: Jani Nikula Acked-by: Greg Kroah-Hartman Reviewed-by: Andi Shyti Reviewed-by: Philipp Zabel # gpu/ipu-v3 Cc: Alexey Dobriyan Cc: Daniel Vetter Cc: David Airlie Cc: Helge Deller Cc: Imre Deak Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rasmus Villemoes Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: Randy Dunlap Signed-off-by: Andrew Morton --- drivers/video/fbdev/core/svgalib.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/core/svgalib.c b/drivers/video/fbdev/core/svgalib.c index 9e01322fabe3..2cba158888ea 100644 --- a/drivers/video/fbdev/core/svgalib.c +++ b/drivers/video/fbdev/core/svgalib.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -372,12 +373,6 @@ EXPORT_SYMBOL(svga_get_caps); * F_VCO = (F_BASE * M) / N * F_OUT = F_VCO / (2^R) */ - -static inline u32 abs_diff(u32 a, u32 b) -{ - return (a > b) ? (a - b) : (b - a); -} - int svga_compute_pll(const struct svga_pll *pll, u32 f_wanted, u16 *m, u16 *n, u16 *r, int node) { u16 am, an, ar; -- cgit v1.2.3