From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 562563F54C6 for ; Tue, 25 Aug 2026 10:29:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787653791; cv=none; b=C+e/llN2WqX90f69Wrq6Z0ajFG5jLfPvY9O/42wDu+83ZnciIJU/saCHbcRypRwok+4d3fVV/tjVmGBZfjHbaYj76BmQcikJM01CAfUQCxO1CHGw+Sy5O6999as9suu/YBNZ3YsghLoCQgLGTGkmPQ2pMatfiejPD9G1siZWCi8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787653791; c=relaxed/simple; bh=JGBFtUtJW7Q1eT+UC3LLB2zRK/feS4sxhZgOiIWSH4k=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=RCtsqxQ2BKeJvmOK8xgrp6hM4PqtU872Uaoy2SpEDCBG58k28ouCW6s6sqNGmWJq5iP8byYrZuX99yMgTznARyHQhFNuLHVGBHCTtnvqM22zh6yvVpWemBuRyu5u8bSViHt96cpasvYGscCs48B7X2xdyNTEbnYS1VuFWTtfEv4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=g/RI7u33; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="g/RI7u33" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 849C61A180A; Tue, 25 Aug 2026 10:29:46 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 5652D604C4; Tue, 25 Aug 2026 10:29:46 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 3FE7411C7A421; Tue, 25 Aug 2026 12:29:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1787653781; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=JGBFtUtJW7Q1eT+UC3LLB2zRK/feS4sxhZgOiIWSH4k=; b=g/RI7u33Vl0dfzQMHPpzKeBjPRViB9uVUBsdA0YXWKZ7LSBMNi5m9gGcN9nkXUN2xi598+ ZPyMzNk/bmh8EvR5ITvc3xsma6Y/w/NlPb6yKcjcuF/QTatHGoCQfxJaiO8nZkLQ99/j8s zNXocDYZnhJqofw404ZpT8k00G1/eT3L1Rv1tqD/t7Eo814tuqC8Ic1eUoKKccRC7rBswz UWCdGwzCmh7YLGz0fGu1mJO3DN2OzFb8J0UVI3F7cRE4sCcnhciVZRmU0PnYa+qpJbjwiw kmFecGaxlEUuPWQo0FxNGRCYo7eiIpHCgzOb6Ut9rA9Cc56YDrC5ZlqvIiRLfA== 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 Date: Tue, 25 Aug 2026 12:29:29 +0200 Message-Id: Subject: Re: [PATCH v1] drm: bridge: dw_hdmi: Fix constant truncation warning on phy_mask Cc: "Laurent Pinchart" , "Jonas Karlman" , "Jernej Skrabec" , "Luca Ceresoli" , "Liu Ying" , "Jani Nikula" , "Shengjiu Wang" , "Javier Martinez Canillas" , , To: "Sean Chang" , "Andrzej Hajda" , "Neil Armstrong" , "Robert Foss" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" From: "Luca Ceresoli" X-Mailer: aerc 0.22.0 References: <20260819151216.56833-1-seanwascoding@gmail.com> In-Reply-To: <20260819151216.56833-1-seanwascoding@gmail.com> X-Last-TLS-Session-Version: TLSv1.3 On Wed Aug 19, 2026 at 5:12 PM CEST, Sean Chang wrote: > In dw_hdmi_probe(), casting the bitwise complement of (HDMI_PHY_HPD | > HDMI_PHY_RX_SENSE) directly to u8 triggers a compiler warning > (-Wconstant-conversion). > > Due to C integer promotion rules, the bitwise OR and bitwise NOT are > evaluated as 32-bit signed integers, producing 0xFFFFFF0D before being > cast down to u8. > > Fix this by explicitly masking the inverted 32-bit result with 0xFF > to keep only the lower byte and prevent implicit upper-bit truncation. > > Signed-off-by: Sean Chang Reviewed-by: Luca Ceresoli -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com