From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0D249FCB611 for ; Fri, 6 Mar 2026 15:07:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 687D010E3BE; Fri, 6 Mar 2026 15:06:59 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="gMT4GAbG"; dkim-atps=neutral Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id A264F10E3BE; Fri, 6 Mar 2026 15:06:57 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id A09F460127; Fri, 6 Mar 2026 15:06:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37261C2BC87; Fri, 6 Mar 2026 15:06:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772809616; bh=iPL1KTeGN4AZsj8P3Tdxd7pG3wQBIceCKNb1YSqkPQs=; h=From:To:Cc:Subject:Date:From; b=gMT4GAbGOkUvu7pEf3WSi3riN6UMGc5YzMkkvLDOlXF+526ctQGhiD7ZvUv7QRw1y tkpngcTHQl6PVkTm6iDdT7ksvB487fQzQ9G2+28JjpKpmOG/AQhd/5gVMTijwGHGo6 j0Dc2oHYklqBmie9o/HMFV+H3H96yXyZ/C7qokdgEeIcBFWA/DJb3NkM3TKnFLy7ap BGowVtLGopwB1UpOEBQk8A+sBDQkJyoh2Z5593Fq/vLqtC+Xr6EJBvQLH4SX5E1mPn 39EcZqvYSeB7RCuev2v77NDvRLkPCfES0nYPqcQMUl5VQS4rOAgd77T9H1efqY2z9A 79eDEe1Je/u7Q== From: Arnd Bergmann To: Lyude Paul , Danilo Krummrich , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Timur Tabi Cc: Arnd Bergmann , Dave Airlie , Ben Skeggs , dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/nouveau: avoid -Wtautological-constant-out-of-range-compare warning Date: Fri, 6 Mar 2026 16:06:44 +0100 Message-Id: <20260306150650.465132-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann Checking a large 64-bit constant against a 32-bit dma_addr_t produces a harmless compiler output when extra warnings are enabled, but leads to a build failure with -Werror: drivers/gpu/drm/nouveau/nvkm/subdev/fb/gb202.c:17:37: error: result of comparison of constant 4503599627370495 with expression of type 'dma_addr_t' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare] 17 | WARN_ON(fb->sysmem.flush_page_addr > DMA_BIT_MASK(52)); As the calculations of sysmem.flush_page_addr are mostly done on u64 types anyway, change the struct member to the same type. This feels less invasive than changing each WARN_ON() to add an extra cast or extended condition to shut up the warning. Fixes: 31d3354f42c0 ("drm/nouveau: verify that hardware supports the flush page address") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h index e0d777a933e1..7b932449606b 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h @@ -38,7 +38,7 @@ struct nvkm_fb { struct { struct page *flush_page; - dma_addr_t flush_page_addr; + u64 flush_page_addr; } sysmem; struct nvkm_ram *ram; -- 2.39.5