[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] iommu/arm: ipmmu-vmsa: Fix variable shadowing
On 4/7/26 13:34, Michal Orzel wrote:
Hello Michal
Rename 'pdev' to 'pci_dev' in the dev_print_pci() macro to avoid
NIT: The macro is named dev_print, not dev_print_pci.
shadowing local 'pdev' variables at call sites.
Remove the unused 'ret' declaration from ipmmu_assign_device() where
the function-scope 'ret' is sufficient.
This fixes MISRA C R5.3.
Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
---
xen/drivers/passthrough/arm/ipmmu-vmsa.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/xen/drivers/passthrough/arm/ipmmu-vmsa.c
b/xen/drivers/passthrough/arm/ipmmu-vmsa.c
index ea9fa9ddf3ce..fa9ab9cb1330 100644
--- a/xen/drivers/passthrough/arm/ipmmu-vmsa.c
+++ b/xen/drivers/passthrough/arm/ipmmu-vmsa.c
@@ -65,8 +65,8 @@
printk(lvl "ipmmu: %s: " fmt, dev_name((dev)), ## __VA_ARGS__); \
else \
{ \
- struct pci_dev *pdev = dev_to_pci((dev)); \
- printk(lvl "ipmmu: %pp: " fmt, &pdev->sbdf, ## __VA_ARGS__); \
+ struct pci_dev *pci_dev = dev_to_pci((dev)); \
+ printk(lvl "ipmmu: %pp: " fmt, &pci_dev->sbdf, ## __VA_ARGS__); \
} \
})
#endif
@@ -1171,8 +1171,6 @@ static int ipmmu_assign_device(struct domain *d, u8
devfn, struct device *dev,
/* dom_io is used as a sentinel for quarantined devices */
if ( d == dom_io )
{
- int ret;
-
/*
* Try to de-assign: do not return error if it was already
* de-assigned.
|