diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-08-03 16:19:18 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-08-18 10:18:59 -0700 |
commit | 46f12960aad2d48fc6742470f718e147e5c85d06 (patch) | |
tree | 984dd692094c365a80fd2ae38376185aec1efe9c /drivers/video | |
parent | 84c10951da91575778cbc3d199cdddea3d42d905 (diff) | |
download | lwn-46f12960aad2d48fc6742470f718e147e5c85d06.tar.gz lwn-46f12960aad2d48fc6742470f718e147e5c85d06.zip |
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 <andriy.shevchenko@linux.intel.com>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org> # tty/serial
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> # gpu/ipu-v3
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@gmail.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/core/svgalib.c | 7 |
1 files changed, 1 insertions, 6 deletions
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 <linux/kernel.h> #include <linux/string.h> #include <linux/fb.h> +#include <linux/math.h> #include <linux/svga.h> #include <asm/types.h> #include <asm/io.h> @@ -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; |