[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <9c86375d-34a9-6584-0069-452b193076d6@infradead.org>
Date: Mon, 5 Oct 2020 21:50:15 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: LKML <linux-kernel@...r.kernel.org>,
dri-devel <dri-devel@...ts.freedesktop.org>
Cc: kernel test robot <lkp@...el.com>, Evan Quan <evan.quan@....com>,
"amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
Alex Deucher <alexander.deucher@....com>,
Vineet Gupta <vgupta@...opsys.com>,
"linux-snps-arc@...ts.infradead.org"
<linux-snps-arc@...ts.infradead.org>
Subject: [RFC PATCH] DRM: amd: powerplay: don't undef pr_warn() {causes ARC
build errors}
From: Randy Dunlap <rdunlap@...radead.org>
arch/arc/ implements BUG_ON() with BUG(). ARC has its own BUG()
function and that function uses pr_warn() as part of its implementation.
Several (8) files in amd/powerplay/ #undef various pr_xyz() functions so
that they won't be used by these drivers, since dev_() functions are
preferred here and the #undefs make the pr_() functions unavailable.
Hence the following build errors are reported in ARC builds:
../drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c: In function 'navi10_fill_i2c_req':
../arch/arc/include/asm/bug.h:24:2: error: implicit declaration of function 'pr_warn'; did you mean 'drm_warn'? [-Werror=implicit-function-declaration]
../drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c: In function 'sienna_cichlid_fill_i2c_req':
../arch/arc/include/asm/bug.h:24:2: error: implicit declaration of function 'pr_warn'; did you mean 'drm_warn'? [-Werror=implicit-function-declaration]
Fixes: 55084d7f4022 ("drm/amd/powerplay: forbid to use pr_err/warn/info/debug")
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
Cc: Evan Quan <evan.quan@....com>
Cc: amd-gfx@...ts.freedesktop.org
Cc: Alex Deucher <alexander.deucher@....com>
Cc: Vineet Gupta <vgupta@...opsys.com>
Cc: linux-snps-arc@...ts.infradead.org
---
Another alternative is for amd/powerplay/ drivers not to use BUG()
or BUG_ON().
A third alternative is to ask the ARC developers to implement BUG()
without using any pr_() functions.
drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 2 +-
drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- lnx-59-rc7.orig/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
+++ lnx-59-rc7/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
@@ -52,7 +52,7 @@
* They are more MGPU friendly.
*/
#undef pr_err
-#undef pr_warn
+//#undef pr_warn
#undef pr_info
#undef pr_debug
--- lnx-59-rc7.orig/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c
+++ lnx-59-rc7/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c
@@ -54,7 +54,7 @@
* They are more MGPU friendly.
*/
#undef pr_err
-#undef pr_warn
+//#undef pr_warn
#undef pr_info
#undef pr_debug
Powered by blists - more mailing lists