[PATCH xf86-video-r128 3/5] Convert R128Div to an inline function

Kevin Brace kevinbrace at gmx.com
Sat Jun 16 15:24:35 UTC 2018


Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
---
 src/r128.h        | 6 ++++++
 src/r128_driver.c | 6 ------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/r128.h b/src/r128.h
index aa98dd0..6142ff8 100644
--- a/src/r128.h
+++ b/src/r128.h
@@ -498,6 +498,12 @@ do {                                                                         \
     info->fifo_slots -= entries;                                             \
 } while (0)
 
+/* Compute n/d with rounding. */
+static inline int R128Div(int n, int d)
+{
+    return (n + (d / 2)) / d;
+}
+
 extern R128EntPtr R128EntPriv(ScrnInfoPtr pScrn);
 extern void        R128WaitForFifoFunction(ScrnInfoPtr pScrn, int entries);
 extern void        R128WaitForIdle(ScrnInfoPtr pScrn);
diff --git a/src/r128_driver.c b/src/r128_driver.c
index e902d6f..b814c1e 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -397,12 +397,6 @@ int R128MinBits(int val)
     return bits;
 }
 
-/* Compute n/d with rounding. */
-static int R128Div(int n, int d)
-{
-    return (n + (d / 2)) / d;
-}
-
 /* Finds the first output using a given crtc. */
 xf86OutputPtr R128FirstOutput(xf86CrtcPtr crtc)
 {
-- 
2.7.4



More information about the xorg-driver-ati mailing list