From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (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 B0B153EC6A4 for ; Mon, 14 Sep 2026 08:18:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789373906; cv=none; b=o46Wdnu+qYg96mvx/KmkLfqBZehZl3Jy4ig1xCjxMw0OFjrKqvOEQ9RoyYefh2WqayLDyqrB4XkDURl3+p7QhMI/FyjrDlsH1B1jr2kSSWPjuh+QhcZCjGVxdh1k4zQOP8LgTpMndgIOCSWtQiLgRuBMYDHpgDtFP/0DMFnwm9o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789373906; c=relaxed/simple; bh=DWggKVY8dMTtllAFA52TbFspZ6he1PLAFTJ0dJKkSDk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tO+meYRuwiCbJzRYgmmjo7FpP36XrdQV3uSB9ouqMdpWYHB8sVggsXwsz4nZvWJGZNMgP17xaMaCm4ggaX3+alefbyjvYqZVc4gq3JG4Tu60KAFVxenFPcWWcPn5nIQf3i7BHOd3L04vP0iyoC7QzFDjkru+/u16u3tQ5/TUbPk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=I25XpAC0; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="I25XpAC0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1789373902; bh=DWggKVY8dMTtllAFA52TbFspZ6he1PLAFTJ0dJKkSDk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=I25XpAC06/I3GfHLgZt/v9IewDM52y/atTzc4iP6NsBkhEcubS81cw/KOMU9IzYZD TdzCWfEYrcLUNsM9x0IMC3EvudaVv9uQ7SsvVtaE+Bi1H8Xg+jCkuzV6bpb3G6M3PA cC5+Wr3zzOixAPGFCzH50qNxdIsS7uUxGVvm/BSN8fF/VesB3rD39ERE/YexmxsfIC MEby6kGFk+MdwrsaJ4PDtqqGYd4fMT88WQLGkozyvX9/CUnVmH6XdM9iP4Nd7or5h6 0rUaA3jwfphEhZxr3gbtDE09jzGxMmO1+ZunKkHYyABuLAJTnq7PY5khliM1lo6IRD 0Yvv0wu3jhV+g== Received: from [100.64.1.21] (unknown [100.64.1.21]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: kholk11) by bali.collaboradmins.com (Postfix) with ESMTPSA id F311717E020C; Mon, 14 Sep 2026 10:18:21 +0200 (CEST) Message-ID: Date: Mon, 14 Sep 2026 10:18:21 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] phy: phy-mtk-dp: Fix pdata array members initialized as pointers To: Sasha Levin , Chun-Kuang Hu , Philipp Zabel , Chunfeng Yun , Vinod Koul , Matthias Brugger , Nathan Chancellor , Manivannan Sadhasivam Cc: Neil Armstrong , Manivannan Sadhasivam , Nick Desaulniers , Bill Wendling , Justin Stitt , dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev References: <20260913172930.1150324-1-sashal@kernel.org> From: AngeloGioacchino Del Regno Content-Language: en-US In-Reply-To: <20260913172930.1150324-1-sashal@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/13/26 19:29, Sasha Levin wrote: > Building arm/arm64/i386 allmodconfig with clang fails: > > drivers/phy/mediatek/phy-mtk-dp.c:761:18: error: incompatible pointer > to integer conversion initializing 'u16' (aka 'unsigned short') with > an expression of type 'const u16[4]' [-Wint-conversion] > drivers/phy/mediatek/phy-mtk-dp.c:761:18: error: initializer element > is not a compile-time constant > drivers/phy/mediatek/phy-mtk-dp.c:761:18: error: suggest braces around > initialization of subobject [-Werror,-Wmissing-braces] > > 14 errors in total, one set per offending member. > > off_ana_lane, off_dig_lane and driving_params are declared as arrays in > struct mtk_dp_phy_pdata: > > u16 off_ana_lane[MTK_DP_PHY_MAX_LANES]; > u16 off_dig_lane[MTK_DP_PHY_MAX_LANES]; > u32 driving_params[PHYD_DIG_NUM_DRV_PARA_REGS]; > > but the SoC data instances initialize them with compound literals. A > compound literal is an object, not an initializer list, so this is not > an array initializer: the member is initialized element-wise from a > scalar, the first element gets the address of the literal truncated to > u16/u32, and the remaining elements are zeroed. Hence the three > diagnostics above - the pointer-to-integer conversion, the address not > being a compile-time constant, and the missing braces. > > Arrays are the right type here, since both members are indexed per lane > and driving_params is sized with ARRAY_SIZE(), so drop the casts and use > plain braced initializers. > > Found by KernelCI builds of the linus-next tree. > > Fixes: ae859204b519 ("phy: phy-mtk-dp: Migrate register offsets to SoC specific pdata") > Fixes: 7cf38eb0ab59 ("phy: phy-mtk-dp: Add support for digital and analog calibration") > Fixes: 6fe4d5beac72 ("phy: phy-mtk-dp: Add support for MT8196 eDP PHY") > Assisted-by: LLM > Signed-off-by: Sasha Levin Whoops, sorry. Reviewed-by: AngeloGioacchino Del Regno