Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4535282ybv; Mon, 10 Feb 2020 21:58:27 -0800 (PST) X-Google-Smtp-Source: APXvYqxEl9OYQeNwLVrbnl9LYa4epEvq8ycGcGxFUC8ZWWGLhf/OOXCsabxH84FM3wNEJtV/xKdW X-Received: by 2002:aca:af09:: with SMTP id y9mr1776598oie.101.1581400707450; Mon, 10 Feb 2020 21:58:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581400707; cv=none; d=google.com; s=arc-20160816; b=hbS2q648YBQdzfvTVgcMuw7AO2CdfeQ4GyhcjLhhNraNew1ofQjiFsfjjFoGE4PSaK EK0BXUkLnzSm/R9TluUl/jvL8knm0oCufBlJMj7Yd/kq80hc12BAHNjRse2cpMEHVWVt 3TF0ENQNOzNdBOUB9TqTkX/nUjLSz0u3uH89Pgr7IBNhP9w3Ly9Vl/MQ+qi/s7fpGNmE Cx/agCj3IxB9wHVZ+Tzav/GZtdFEaHNC1epClFTVE3gHJKyBd0xKFtLM2ipzFZYlIZgq mwMSj495HxDDXJFVjVjPVvEYcZlsGTmOelk52maMtK+XfF12lVMpJ5CfYmrXgVJLK/o6 5ziw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=PzVeAyFZDO+woAn09FRMNrkoa0zSne0dLCKhCXRtKF4=; b=wLPvct8UJlJb4yzMO04URcC4j/rFOtf3zE5RU60Tfh5TvA6IlhjW9T9wSlDZ0HSyYm LV9aWHXZ58/Gmer8Z83VZUpnoZ2xyp/06HoI6auukMRwgTnV9u0EoEZG+AQ6FF/XkiIb 9nB69PclafbTb0JHG5SQ5imp5CuidwH7EWbiCn0DfoyJIl9MlB9CBsNJHQn8JpwQya1F tIYlNj8XdHT8Ny7iXbth8+py59zzFsym4JcTEmW5A+1FpBpw/JJXxjsLuQNZFoJbLvp+ DK3UBKM6gj2NKtX2gHhuqNQrCmXlKlBmHOOEataA5MAmeRmXukh4NRpIlaUkQwY12y7k qlVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=q19RtMc0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s77si1352000oih.51.2020.02.10.21.58.16; Mon, 10 Feb 2020 21:58:27 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=q19RtMc0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728011AbgBKFIh (ORCPT + 99 others); Tue, 11 Feb 2020 00:08:37 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:41676 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727617AbgBKFIg (ORCPT ); Tue, 11 Feb 2020 00:08:36 -0500 Received: by mail-ot1-f66.google.com with SMTP id r27so8861758otc.8 for ; Mon, 10 Feb 2020 21:08:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PzVeAyFZDO+woAn09FRMNrkoa0zSne0dLCKhCXRtKF4=; b=q19RtMc0tzaSrg/nVN9T+kDTIgE8GoGHNomGjMNGenUlgmowB17Sqh3zey54f8gwwm BR4NEdvdNkRA2Bt8im+h0tZV4M0sHqG14O8zHW8GXGcY92EGJPUwcoRKNQT+o8GOviIq vSQXanqPppwaTlPZXXu5SEGn0NtNXBd8lw6KA9PnfTiDeQbt/jgLtEfkoQJjF8NWBhUi qhW6ZBmXY3R4d2N2H+odyUXA49/16Rp7mZZVYqyMLKBYZaORunQcif9aVgEHiihUbOYV co150RBv41MIHzSY/ynkVRopA+Dxyr5mWI/fMf+GbykRcpD+ZWO2oE5EIWQKAq927rNS fWiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PzVeAyFZDO+woAn09FRMNrkoa0zSne0dLCKhCXRtKF4=; b=SPxA03KODFolMokkPTcY6VNCJP8guVcfj/6Zajc1c24HLgscyDJb5nN0l/60rECrOZ pCA/P7G0T6R7hkdwoUYSqtrdzUamqMJxblln52gtHrDtObipjmBzp6OmZ4X/tlgmHJhu VLVH5+Gft5G1NpdkGhmK7iXdWeZeCpYW3IEZx2++dLqRax0V32Ss2qqALeeMb9jiDvWm 21f2mz+dgEuOITfm/vaVupUWs4JQVilpylJYqss2caGZbTAVdWOBd6cJo219Wb0xbSBZ TzT28dEaWrnvSTvBYHxWGYKQPegHZcpRflSrlVKW0Q1cq7Q5XKgO8tCq/izMxL+MxmjK 1MDg== X-Gm-Message-State: APjAAAUL/iWhlGdpEsvnrDW3BGHsXm3Q7eSs3FwwSXesKYYxm6Oloab1 09N5hL5EGBaQUJ5z5RKTMxp5TdSn X-Received: by 2002:a05:6830:1e37:: with SMTP id t23mr3936686otr.16.1581397714034; Mon, 10 Feb 2020 21:08:34 -0800 (PST) Received: from localhost.localdomain ([2604:1380:4111:8b00::1]) by smtp.gmail.com with ESMTPSA id d11sm862015otl.31.2020.02.10.21.08.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Feb 2020 21:08:33 -0800 (PST) From: Nathan Chancellor To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH] drm/i915: Disable -Wtautological-constant-out-of-range-compare Date: Mon, 10 Feb 2020 22:08:08 -0700 Message-Id: <20200211050808.29463-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A recent commit in clang added -Wtautological-compare to -Wall, which is enabled for i915 so we see the following warning: ../drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1485:22: warning: result of comparison of constant 576460752303423487 with expression of type 'unsigned int' is always false [-Wtautological-constant-out-of-range-compare] if (unlikely(remain > N_RELOC(ULONG_MAX))) ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ This warning only happens on x86_64 but that check is relevant for 32-bit x86 so we cannot remove it. -Wtautological-compare on a whole has good warnings but this one is not really relevant for the kernel because of all of the different configurations that are used to build the kernel. When -Wtautological-compare is enabled for the kernel, this option will remain disabled so do that for i915 now. Link: https://github.com/ClangBuiltLinux/linux/issues/778 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/i915/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile index 38df01c23176..55dbcca179c7 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -21,6 +21,7 @@ subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable) subdir-ccflags-y += $(call cc-disable-warning, sign-compare) subdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized) subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides) +subdir-ccflags-y += $(call cc-disable-warning, tautological-constant-out-of-range-compare) subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror # Fine grained warnings disable -- 2.25.0