All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksandr Tyshchenko <olekstysh@gmail.com>
To: Michal Orzel <michal.orzel@amd.com>, xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Julien Grall <julien@xen.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [PATCH 2/2] iommu/arm: ipmmu-vmsa: Fix variable shadowing
Date: Tue, 7 Apr 2026 16:48:04 +0300	[thread overview]
Message-ID: <93e606cd-a30e-4367-b4e0-05812512ac03@gmail.com> (raw)
In-Reply-To: <20260407103434.90838-3-michal.orzel@amd.com>



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@amd.com>

Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.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.



  reply	other threads:[~2026-04-07 13:48 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 ` [PATCH 2/2] iommu/arm: ipmmu-vmsa: " Michal Orzel
2026-04-07 13:48   ` Oleksandr Tyshchenko [this message]
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=93e606cd-a30e-4367-b4e0-05812512ac03@gmail.com \
    --to=olekstysh@gmail.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=bertrand.marquis@arm.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --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.