From patchwork Fri Feb 16 15:26:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10224959 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6E349602CB for ; Fri, 16 Feb 2018 15:27:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D217288B5 for ; Fri, 16 Feb 2018 15:27:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F6D5288D2; Fri, 16 Feb 2018 15:27:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 53D5A288B5 for ; Fri, 16 Feb 2018 15:27:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6405B6E071; Fri, 16 Feb 2018 15:27:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4D4736E071; Fri, 16 Feb 2018 15:27:21 +0000 (UTC) Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0M1QSH-1eXMza2RYn-00tQEc; Fri, 16 Feb 2018 16:27:15 +0100 From: Arnd Bergmann To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= Subject: [PATCH] radeon: hide pointless #warning when compile testing Date: Fri, 16 Feb 2018 16:26:57 +0100 Message-Id: <20180216152713.1628013-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:7HIl8TMjfbgARLpOfK0R9jPulB0f9eguU+5e7NN1qU5XEsZBcR7 CGgH/PNAQ6hYTe5aR4xs0O8c0ivSW1VMWmG0BAJrac2ePGzsBxaw0x9ZXzouV1rFZBiyutm POf32Bke4bq8KQDwFoJMbcCFbgcIF7M8SOTXuOseOeEa1V3EZ4gwr2o6SUzMj6TVlIjmKR4 da7SqVIGm6NUScrZwx3Ag== X-UI-Out-Filterresults: notjunk:1; V01:K0:p6W9yiGQQ/c=:tOLfvxmvKStKUjx94JXEjx nptsFhHupBmncCZrR1V1bJCBYyXBR3QBs5MsPL7fipd+NJ2FF6XzHrnicJ0ZYU6IPVU7Mwynn zcSukgAC0qF0/2mXn3SJnnFC+ZjBNi7Ol7cg87EyzDxcblfTNTPQ1CEFRQ+67kdqxOli6JuTC w6lrlN+pdAgTOdUkfkgDnLO95jV7x0B9MRERofe3ZteGgC0JoHTVkBq7fj2yBX8BgDhY2wfV8 808kUC9FGBcQdXogwhqoAcrWqTQ8zbtSQyL41BYaiHGCJvYqIJrn6Txb6wtWyEy6mL1gMo8C7 /dCh35bVSXr0+io3LgdxxUzAvxibN5mFGT3apSgXvzArQvqglz/nxUBDu7eOvELc5DdJEvogf fWUSkdfPlsWG71kdnzzvMgB6C9nSvlCJx8T/tADueLDKtBuTzGHUcN+hL673j3ea97RkO/VIf 2pIwoWkKPPnZla9/qeqiWej0JgE5j66rkx+wDsz8zd8ZqW5t2VHf3reWcPLumB3eKEKAkV4sa pcOsvaQxPHL+oMuYtxhuO9MkGx/DL6S2dRDHbgxHkTVcbgnaSjLuAsb93XssrFayx2y4AKLMJ sR8MbJ8AqF0WUj7BkvhgM2iUbeh5A4gV479BytX/Py8Zv6h/XG//2DhZGNSR9g6bj3u0K4HRk 5fo35uzG0JKB4NPpwou0MtXhulL0C78TniPstk0tmVWZS605UktwSsT3bAs0y7MzPIzrsdeaN v6TbM0qZq/yn3NgcPDINjlvuEGKD6ccq2PxKDQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: amd-gfx@lists.freedesktop.org, Arnd Bergmann , Cihangir Akturk , David Airlie , dri-devel@lists.freedesktop.org, Christopher James Halse Rogers , stable@vger.kernel.org, linux-kernel@vger.kernel.org, Julien Isorce , Kent Russell MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP In randconfig testing, we sometimes get this warning: drivers/gpu/drm/radeon/radeon_object.c: In function 'radeon_bo_create': drivers/gpu/drm/radeon/radeon_object.c:242:2: error: #warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance thanks to write-combining [-Werror=cpp] #warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance \ This is rather annoying since almost all other code produces no build-time output unless we have found a real bug. We already fixed this in the amdgpu driver in commit 31bb90f1cd08 ("drm/amdgpu: shut up #warning for compile testing") by adding a CONFIG_COMPILE_TEST check last year and agreed to do the same here, but both Michel and I then forgot about it until I came across the issue again now. For stable kernels, as this is one of very few remaining randconfig warnings in 4.14. Cc: stable@vger.kernel.org Link: https://patchwork.kernel.org/patch/9550009/ Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/radeon/radeon_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index 093594976126..54c2b4fc5ead 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -238,9 +238,10 @@ int radeon_bo_create(struct radeon_device *rdev, * may be slow * See https://bugs.freedesktop.org/show_bug.cgi?id=88758 */ - +#ifndef CONFIG_COMPILE_TEST #warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance \ thanks to write-combining +#endif if (bo->flags & RADEON_GEM_GTT_WC) DRM_INFO_ONCE("Please enable CONFIG_MTRR and CONFIG_X86_PAT for "