From nobody Thu Apr 9 17:07:57 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D1F239E190 for ; Fri, 6 Mar 2026 15:06:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772809616; cv=none; b=h807MXkqJbC215RWDnMeoSjDae6hweTjMY2ViHAXDnWGTKIEPz+aaZMv1DnLZOwHv+WvsU1SBT/mHukxXg3b0A4sB22zjL4BCQaGIFxnEr2tMDdjZCdP2T0mfLhWxIvMAPCo9bsxM/Y6Gurb6XqL393c8jVS0ApTlP5GuJpix9E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772809616; c=relaxed/simple; bh=iPL1KTeGN4AZsj8P3Tdxd7pG3wQBIceCKNb1YSqkPQs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=idBva+hDROkg88jXck9XB+gfRrSs+eDpX0N98xX9x8fii8wYkJJC/U3SMs1K3ewAV9XMDR7XX5exg/59WR5DmB7ycU4rvZ/tsXMuixgNw2Vcd+ko3+Z7NP/LmsPj2t1T7CVFTshOqIQ6flxxj8hSQgfEtHxijxrl0JFd0+eUmSk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gMT4GAbG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gMT4GAbG" 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann Checking a large 64-bit constant against a 32-bit dma_addr_t produces a har= mless compiler output when extra warnings are enabled, but leads to a build failu= re with -Werror: drivers/gpu/drm/nouveau/nvkm/subdev/fb/gb202.c:17:37: error: result of comp= arison of constant 4503599627370495 with expression of type 'dma_addr_t' (a= ka '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 ch= anging each WARN_ON() to add an extra cast or extended condition to shut up the wa= rning. 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 { =20 struct { struct page *flush_page; - dma_addr_t flush_page_addr; + u64 flush_page_addr; } sysmem; =20 struct nvkm_ram *ram; --=20 2.39.5