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: 128600 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp681219ljc; Fri, 16 Feb 2018 07:27:45 -0800 (PST) X-Google-Smtp-Source: AH8x226mhT/Vl146wiLFj2su7RPbyvBVrR6TI/CQo5h3PGmx/a0fY4vhbhNoxAb7rUWy/RN6wNGL X-Received: by 10.99.37.7 with SMTP id l7mr5490214pgl.311.1518794865344; Fri, 16 Feb 2018 07:27:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518794865; cv=none; d=google.com; s=arc-20160816; b=ptcM38iEoj3YzKf7Q5LshbgepkA/z+QIaT5WiVnhQPsEPVjYRB7UfHWOIhtri8eD12 Pzx2MVj0/kSqj2OABjhINCpZuMOu0xuJfKzRBzuV574ZNiddIpPrTWy5u/IeS5kqFiSI fSKf7d86xCMPijpo78JeCh7Zx/zr70AlEwlPoj0cC39GO4r2ajwbP2WpmLF/ADRT7/qg tXOgZMtHKOAuhFISilogVnufijhZ26uBaeg2f/xumma8/6jxdS3zhOw/fqN4ynGKK+6E rGQB30aq6rTGbYls5gzTXeHOpFcGSHN0jY1sAC98aEOzHxc/pr9cdPhRPLRwaFLSGnIx bLlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=sROmB3ZIAYDAHsGl2oWRjKn5KGNQO14FSbILvGwIWGQ=; b=I8G7tbvSB5/2uSOtWhMnPPhS0k2NiGKX0HCbJ0m+z+OZcS++wyfbUzWjD1o662CnjZ IkWPQTgz1eZIRIJR7Ip+vGCMbesrdfnh8nLg7gV9+F30v/kDVmqBDSa/YdX/oERwMg+W hDt33uSuizlmcvLnPcIocaUUkd35a3UKW6D3uCF/HX0l/daQjRUpEW2H+TAeJnG7TbHP iJeYl42n3DEfjmZ64uGfxVVjUILVP2zI5R0QqF8rRPWQSMD+rqH9bZNSr0OkcOXsSlkA U0pAectOLJiVOCNY/D+fbife4zX+J2k5/j9cvr1KUWz3wsFANlLE7K3zMZawISWth6TZ vDtw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d64si1629576pfa.40.2018.02.16.07.27.45; Fri, 16 Feb 2018 07:27:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030256AbeBPP1k (ORCPT + 28 others); Fri, 16 Feb 2018 10:27:40 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:37925 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966777AbeBPP1Y (ORCPT ); Fri, 16 Feb 2018 10:27:24 -0500 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_K=C3=B6n?= =?utf-8?q?ig?= Cc: Arnd Bergmann , stable@vger.kernel.org, David Airlie , Julien Isorce , Kent Russell , Christopher James Halse Rogers , Cihangir Akturk , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org 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== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.9.0 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 "