Am 06.12.19 um 09:03 schrieb Chen, Guchun:
[AMD Official Use Only - Internal Distribution Only]



-----Original Message-----
From: amd-gfx <amd-gfx-boun...@lists.freedesktop.org> On Behalf Of Luben Tuikov
Sent: Friday, December 6, 2019 12:32 PM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander <alexander.deuc...@amd.com>; Tuikov, Luben 
<luben.tui...@amd.com>; Koenig, Christian <christian.koe...@amd.com>
Subject: [PATCH 2/3] tests/amdgpu: Fix unused function warning

This patch fixes:
-Wunused-function

Signed-off-by: Luben Tuikov <luben.tui...@amd.com>
---
  tests/amdgpu/ras_tests.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/amdgpu/ras_tests.c b/tests/amdgpu/ras_tests.c index 
d714be73..4c395382 100644
--- a/tests/amdgpu/ras_tests.c
+++ b/tests/amdgpu/ras_tests.c
@@ -709,6 +709,7 @@ static void amdgpu_ras_disable_test(void)
        }
  }
+#ifdef AMDGPU_RAS_TEST
[Guchun]Maybe it's more fine to name it to AMDGPU_RAS_ENABLE_TEST? 
AMDGPU_RAS_TEST is one more generic macro, which covers all sub-tests like 
query/inject/enable/disable test .

Well my question is more why do why do we have this define in the first place?

Test should always compile regardless if the kernel supports the feature or not.

Regards,
Christian.


  static void amdgpu_ras_enable_test(void)  {
        int i;
@@ -717,6 +718,7 @@ static void amdgpu_ras_enable_test(void)
                amdgpu_ras_features_test(1);
        }
  }
+#endif
static void __amdgpu_ras_ip_inject_test(const struct ras_inject_test_config *ip_test,
                                        uint32_t size)
@@ -881,7 +883,7 @@ CU_TestInfo ras_tests[] = {
        { "ras query test",   amdgpu_ras_query_test },
        { "ras inject test",  amdgpu_ras_inject_test },
        { "ras disable test", amdgpu_ras_disable_test },
-#if 0
+#ifdef AMDGPU_RAS_TEST
        { "ras enable test",  amdgpu_ras_enable_test },
  #endif
        CU_TEST_INFO_NULL,
--
2.24.0.155.gd9f6f3b619

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cguchun.chen%40amd.com%7C747c6db36d1a4cbf536c08d77a05552b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637112035672155114&amp;sdata=9xTeNsC5bLPDXogxVuFnJhRlrCwIuD9Fm52X023wVx4%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to