Re: [PATCH 1/2] drm/msm: Use designated initializers for the map_ops tables

From: Konrad Dybcio

Date: Mon Nov 30 2026 - 10:05:47 EST


On 11/30/26 3:15 PM, Sasha Levin wrote:
> struct map_ops has only function pointers, so CONFIG_RANDSTRUCT
> randomizes its layout and it can't be initialized positionally. Builds
> with RANDSTRUCT fail on both tables:
>
> drivers/gpu/drm/msm/msm_iommu.c:228:2: error: a randomized struct can only be initialized with a designated initializer
> drivers/gpu/drm/msm/msm_iommu.c:762:2: error: a randomized struct can only be initialized with a designated initializer
>
> allmodconfig selects RANDSTRUCT_FULL when the compiler supports it and
> no Rust toolchain is available, so KernelCI's allmodconfig builds
> fail too.
>
> Use designated initializers.
>
> Fixes: aa20cf2a2960 ("drm/msm: Extract out map/unmap helpers")
> Fixes: 1600c10eeda0 ("drm/msm: Convert iommu map/unmap to helpers")
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/20261130033851.XvzzLGV5-lkp@xxxxxxxxx/
> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>

Konrad