Blob Blame History Raw
From: Dave Airlie <airlied@redhat.com>
Date: Fri, 29 Sep 2017 17:13:27 +1000
Subject: amdgpu/dc: inline fixed31_32 div_int
Git-commit: bd6d15769e6dcd22c57224b67376e1c6fb44b04f
Patch-mainline: v4.15-rc1
References: FATE#326289 FATE#326079 FATE#326049 FATE#322398 FATE#326166

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Petr Tesarik <ptesarik@suse.com>
---
 drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c |    9 ---------
 drivers/gpu/drm/amd/display/include/fixed31_32.h   |    9 ++++++---
 2 files changed, 6 insertions(+), 12 deletions(-)

--- a/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c
+++ b/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c
@@ -266,15 +266,6 @@ struct fixed31_32 dal_fixed31_32_sqr(
 	return res;
 }
 
-struct fixed31_32 dal_fixed31_32_div_int(
-	struct fixed31_32 arg1,
-	int64_t arg2)
-{
-	return dal_fixed31_32_from_fraction(
-		arg1.value,
-		dal_fixed31_32_from_int(arg2).value);
-}
-
 struct fixed31_32 dal_fixed31_32_recip(
 	struct fixed31_32 arg)
 {
--- a/drivers/gpu/drm/amd/display/include/fixed31_32.h
+++ b/drivers/gpu/drm/amd/display/include/fixed31_32.h
@@ -308,9 +308,12 @@ struct fixed31_32 dal_fixed31_32_sqr(
  * @brief
  * result = arg1 / arg2
  */
-struct fixed31_32 dal_fixed31_32_div_int(
-	struct fixed31_32 arg1,
-	int64_t arg2);
+static inline struct fixed31_32 dal_fixed31_32_div_int(struct fixed31_32 arg1,
+						       int64_t arg2)
+{
+	return dal_fixed31_32_from_fraction(arg1.value,
+					    dal_fixed31_32_from_int(arg2).value);
+}
 
 /*
  * @brief