From: Michal Orzel <michal.orzel@amd.com>
To: <xen-devel@lists.xenproject.org>
Cc: Michal Orzel <michal.orzel@amd.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Julien Grall <julien@xen.org>,
Bertrand Marquis <bertrand.marquis@arm.com>,
Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: [PATCH 2/2] iommu/arm: ipmmu-vmsa: Fix variable shadowing
Date: Tue, 7 Apr 2026 12:34:33 +0200 [thread overview]
Message-ID: <20260407103434.90838-3-michal.orzel@amd.com> (raw)
In-Reply-To: <20260407103434.90838-1-michal.orzel@amd.com>
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@amd.com>
---
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
next prev parent reply other threads:[~2026-04-07 10:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 10:34 [PATCH 0/2] Final series to make Arm MISRA allcode green Michal Orzel
2026-04-07 10:34 ` [PATCH 1/2] iommu/arm: smmu: Fix variable shadowing Michal Orzel
2026-04-07 20:30 ` Stefano Stabellini
2026-04-07 10:34 ` Michal Orzel [this message]
2026-04-07 13:48 ` [PATCH 2/2] iommu/arm: ipmmu-vmsa: " Oleksandr Tyshchenko
2026-04-07 20:32 ` Stefano Stabellini
2026-04-08 9:22 ` [PATCH 0/2] Final series to make Arm MISRA allcode green Andrew Cooper
2026-04-08 9:46 ` Nicola Vetrini
2026-04-08 9:51 ` Andrew Cooper
2026-04-08 10:21 ` Nicola Vetrini
2026-04-08 10:36 ` Orzel, Michal
2026-04-08 10:42 ` Andrew Cooper
2026-04-08 11:01 ` Orzel, Michal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260407103434.90838-3-michal.orzel@amd.com \
--to=michal.orzel@amd.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=bertrand.marquis@arm.com \
--cc=julien@xen.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.