diff options
| author | Arnd Bergmann <[email protected]> | 2025-04-23 16:40:02 +0000 |
|---|---|---|
| committer | Joerg Roedel <[email protected]> | 2025-04-28 11:20:09 +0000 |
| commit | 33647d0be323f9e2f27cd1e86de5cfd965cec654 (patch) | |
| tree | 29f73c04807e44dcf5374afae6eb21b70374fb8a /scripts/gcc-plugins/sancov_plugin.c | |
| parent | Linux 6.15-rc2 (diff) | |
| download | kernel-33647d0be323f9e2f27cd1e86de5cfd965cec654.tar.gz kernel-33647d0be323f9e2f27cd1e86de5cfd965cec654.zip | |
iommu: ipmmu-vmsa: avoid Wformat-security warning
iommu_device_sysfs_add() requires a constant format string, otherwise
a W=1 build produces a warning:
drivers/iommu/ipmmu-vmsa.c:1093:62: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
1093 | ret = iommu_device_sysfs_add(&mmu->iommu, &pdev->dev, NULL, dev_name(&pdev->dev));
| ^~~~~~~~~~~~~~~~~~~~
drivers/iommu/ipmmu-vmsa.c:1093:62: note: treat the string as an argument to avoid this
1093 | ret = iommu_device_sysfs_add(&mmu->iommu, &pdev->dev, NULL, dev_name(&pdev->dev));
| ^
| "%s",
This was an old bug but I saw it now because the code was changed as part
of commit d9d3cede4167 ("iommu/ipmmu-vmsa: Register in a sensible order").
Fixes: 7af9a5fdb9e0 ("iommu/ipmmu-vmsa: Use iommu_device_sysfs_add()/remove()")
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/sancov_plugin.c')
0 files changed, 0 insertions, 0 deletions
