From patchwork Tue Oct 6 04:50:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 1377192 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=3dKyCumA; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C54lq0Gdtz9sSs for ; Tue, 6 Oct 2020 15:50:28 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Date:Message-ID:Subject:From:To: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=MnoitU6goDhVNaJMgXCBJiN+7mxoav5bUz/dhB4WpQo=; b=3dKyCumALLl06S+uj5CVmBCjfI fw89TQNlQAl6T/7uPCh7QBTXK3EHob3QzOr9WuodV/O90oNQPSd5yw9NgmpPIuCkymCj43oslZ/Gu onF2qD1MYMy5ZmlR6MK3zjxfYDcfnsIvp6ZEoCdQn4Wztdfaq6nw7jS3FTmat0hbkKqDTZ2A7Vl9T 5RVUtrneHd13L1Km+f001LcFoPLlZlTSJZQr8x8qpmBEn8rZKJP2BdfJ/RLQE6Oy/082l+rFXeRIu xM6wxEQwuQfpeP84uGP5rjHO7pkfJOlbscRqhkLubHBJMqqjKItYl3boabZRs7b3cdsXvdpeMRKig ORTg6t6g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPevg-0008KF-6I; Tue, 06 Oct 2020 04:50:24 +0000 Received: from [2601:1c0:6280:3f0::2c9a] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPevb-0008JQ-K8; Tue, 06 Oct 2020 04:50:19 +0000 To: LKML , dri-devel From: Randy Dunlap Subject: [RFC PATCH] DRM: amd: powerplay: don't undef pr_warn() {causes ARC build errors} Message-ID: <9c86375d-34a9-6584-0069-452b193076d6@infradead.org> Date: Mon, 5 Oct 2020 21:50:15 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 Content-Language: en-US X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Evan Quan , kernel test robot , Vineet Gupta , "amd-gfx@lists.freedesktop.org" , Alex Deucher , "linux-snps-arc@lists.infradead.org" Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Randy Dunlap 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 Signed-off-by: Randy Dunlap Cc: Evan Quan Cc: amd-gfx@lists.freedesktop.org Cc: Alex Deucher Cc: Vineet Gupta Cc: linux-snps-arc@lists.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