Re: [PATCH 2/3] tests/amdgpu: Fix unused function warning
On 2019-12-06 3:47 a.m., Christian König wrote: > Am 06.12.19 um 09:03 schrieb Chen, Guchun: >> [AMD Official Use Only - Internal Distribution Only] >> >> >> >> -Original Message- >> From: amd-gfx On Behalf Of Luben >> Tuikov >> Sent: Friday, December 6, 2019 12:32 PM >> To: amd-gfx@lists.freedesktop.org >> Cc: Deucher, Alexander ; Tuikov, Luben >> ; Koenig, Christian >> Subject: [PATCH 2/3] tests/amdgpu: Fix unused function warning >> >> This patch fixes: >> -Wunused-function >> >> Signed-off-by: Luben Tuikov >> --- >> 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. Okay. I'll remove the macro to permanently enable the test, and resubmit the patch series. Thank you for reviewing! Regards, Luben > > 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-gfxdata=02%7C01%7Cguchun.chen%40amd.com%7C747c6db36d1a4cbf536c08d77a05552b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637112035672155114sdata=9xTeNsC5bLPDXogxVuFnJhRlrCwIuD9Fm52X023wVx4%3Dreserved=0 > ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 2/3] tests/amdgpu: Fix unused function warning
Am 06.12.19 um 09:03 schrieb Chen, Guchun: [AMD Official Use Only - Internal Distribution Only] -Original Message- From: amd-gfx On Behalf Of Luben Tuikov Sent: Friday, December 6, 2019 12:32 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Tuikov, Luben ; Koenig, Christian Subject: [PATCH 2/3] tests/amdgpu: Fix unused function warning This patch fixes: -Wunused-function Signed-off-by: Luben Tuikov --- 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-gfxdata=02%7C01%7Cguchun.chen%40amd.com%7C747c6db36d1a4cbf536c08d77a05552b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637112035672155114sdata=9xTeNsC5bLPDXogxVuFnJhRlrCwIuD9Fm52X023wVx4%3Dreserved=0 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
RE: [PATCH 2/3] tests/amdgpu: Fix unused function warning
[AMD Official Use Only - Internal Distribution Only] -Original Message- From: amd-gfx On Behalf Of Luben Tuikov Sent: Friday, December 6, 2019 12:32 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Tuikov, Luben ; Koenig, Christian Subject: [PATCH 2/3] tests/amdgpu: Fix unused function warning This patch fixes: -Wunused-function Signed-off-by: Luben Tuikov --- 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 . 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-gfxdata=02%7C01%7Cguchun.chen%40amd.com%7C747c6db36d1a4cbf536c08d77a05552b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637112035672155114sdata=9xTeNsC5bLPDXogxVuFnJhRlrCwIuD9Fm52X023wVx4%3Dreserved=0 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx