From: Arnd Bergmann Date: Tue, 19 May 2026 20:36:51 +0000 (+0200) Subject: iommu: vsi: avoid -Wformat-security warning X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=80b0d3546ce18c5bbae7cebec014beb2fbe81580;p=thirdparty%2Flinux.git iommu: vsi: avoid -Wformat-security warning When -Wformat-security is enabled, it catches a call to iommu_device_sysfs_add() that passes a string variable in place of a format: drivers/iommu/vsi-iommu.c: In function 'vsi_iommu_probe': drivers/iommu/vsi-iommu.c:717:9: error: format not a string literal and no format arguments [-Werror=format-security] 717 | err = iommu_device_sysfs_add(&iommu->iommu, dev, NULL, dev_name(dev)); | ^~~ Pass this indirectly using "%s" as the format instead. Fixes: 917ace84b770 ("iommu: Add verisilicon IOMMU driver") Signed-off-by: Arnd Bergmann Reviewed-by: Benjamin Gaignard Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/vsi-iommu.c b/drivers/iommu/vsi-iommu.c index 5d0721bd2c7af..23913720d4840 100644 --- a/drivers/iommu/vsi-iommu.c +++ b/drivers/iommu/vsi-iommu.c @@ -714,7 +714,8 @@ static int vsi_iommu_probe(struct platform_device *pdev) pm_runtime_use_autosuspend(dev); pm_runtime_enable(dev); - err = iommu_device_sysfs_add(&iommu->iommu, dev, NULL, dev_name(dev)); + err = iommu_device_sysfs_add(&iommu->iommu, dev, NULL, "%s", + dev_name(dev)); if (err) goto err_runtime_disable;