Re: [PATCH 5/6] of: add infra to parse iommu-map per IOMMU cell count

From: Charan Teja Kalla
Date: Tue Nov 04 2025 - 05:59:04 EST




On 11/4/2025 4:16 PM, kernel test robot wrote:
>>> drivers/of/base.c:2127:6: warning: variable 'legacy_iommu_cells' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
> 2127 | if (map_len % 4 != 0)
> | ^~~~~~~~~~~~~~~~
> drivers/of/base.c:2130:9: note: uninitialized use occurs here
> 2130 | return legacy_iommu_cells ? : of_iommu_map_id_actual_cell_count(map, map_len, cells);
> | ^~~~~~~~~~~~~~~~~~
> drivers/of/base.c:2127:2: note: remove the 'if' if its condition is always true
> 2127 | if (map_len % 4 != 0)
> | ^~~~~~~~~~~~~~~~~~~~~
> 2128 | legacy_iommu_cells = of_iommu_map_id_legacy_cell_count(map, map_len);
> drivers/of/base.c:2125:24: note: initialize the variable 'legacy_iommu_cells' to silence this warning
> 2125 | u32 legacy_iommu_cells;
> | ^
> | = 0
> 1 warning generated.
Will wait for additional comments and take care of this in the next spin.