Received: by 10.223.185.116 with SMTP id b49csp1038485wrg; Fri, 16 Feb 2018 11:15:54 -0800 (PST) X-Google-Smtp-Source: AH8x225i3kkZJInKmjFciwmc/ODMQt0x8QH9WVjgH2L5N2Lug5pY/xnS45udC6F5BeLTOLoRTH4M X-Received: by 2002:a17:902:5582:: with SMTP id g2-v6mr6554299pli.4.1518808553943; Fri, 16 Feb 2018 11:15:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518808553; cv=none; d=google.com; s=arc-20160816; b=05qQvbfxFDc4I63tk2P9cUMnAGeIn+qqmI6qHWFbZuLDaTElw1s0TiWix+L9Aj7mYD +xrjEY3iSC1S3gNntan5kfbATiAM3brNzL02Pumab9iXXgm5G6lqITw7w7Ch08JBnwJQ /LgPZ7a8my3avccKocUOKBhbLv4XpOVbUbpKjoueroIqePQtltbok4UR0gtPyB1TVi55 fgN97OfEcKRmMXQ+npKlS8XV6vjuQAO+OxiYtI0L7IH4teN++jRC96Df62t+gPibB+hl Awj9edCnCIUMHTnYb843C7QXpwMi4mxRcER6uhZTjA35YJS5mZ9Sz2mS+L9oDtWvFWwf JYbw== 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 y8si1464291pgp.663.2018.02.16.11.15.37; Fri, 16 Feb 2018 11:15:53 -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 S1030235AbeBPP1k (ORCPT + 99 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=20K=C3=B6nig?= 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(-) 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 " -- 2.9.0