[PATCH] iommu: Unexport iommu_fwspec_free()

Robin Murphy robin.murphy at arm.com
Tue Mar 11 07:21:05 PDT 2025


On 11/03/2025 1:15 pm, Joerg Roedel wrote:
> This patch triggered two compile issues on ARM32, which I fixed up in my
> tree:
> 
> On Thu, Feb 27, 2025 at 02:47:47PM +0000, Robin Murphy wrote:
>>   static struct iommu_device *mtk_iommu_v1_probe_device(struct device *dev)
>>   {
>> -	struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
>> +	struct iommu_fwspec *fwspec = NULL
> 
> Missing semicolon here.
> 
>>   	struct of_phandle_args iommu_spec;
>>   	struct mtk_iommu_v1_data *data;
>>   	int err, idx = 0, larbid, larbidx;
>>   	struct device_link *link;
>>   	struct device *larbdev;
>>   
>> -	/*
>> -	 * In the deferred case, free the existed fwspec.
>> -	 * Always initialize the fwspec internally.
>> -	 */
>> -	if (fwspec) {
>> -		iommu_fwspec_free(dev);
>> -		fwspec = dev_iommu_fwspec_get(dev);
>> -	}
>> -
>>   	while (!of_parse_phandle_with_args(dev->of_node, "iommus",
>>   					   "#iommu-cells",
>>   					   idx, &iommu_spec)) {
>> @@ -476,6 +467,9 @@ static struct iommu_device *mtk_iommu_v1_probe_device(struct device *dev)
>>   		idx++;
>>   	}
>>   
>> +	if (!fwspec)
>> +		return -ENODEV;
>> +
> 
> Wrong return type here.
> 
> Please be more cautious next time and make sure to compile-test all
> changed files of a patch.

Oops, sorry, indeed that was a failure of my process - seems I need to 
be more diligent about COMPILE_TEST. Patch sent :)

Thanks a lot for the fixups!

Robin.



More information about the linux-arm-kernel mailing list