|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 2/2] iommu/arm: ipmmu-vmsa: Fix variable shadowing
On Tue, 7 Apr 2026, Michal Orzel wrote:
> Rename 'pdev' to 'pci_dev' in the dev_print_pci() macro to avoid
> 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: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> ---
> 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.
> --
> 2.43.0
>
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |