[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xen/pci: rename local variable to address MISRA C:2012 Rule 5.3
commit 4b40696fec1f4b2fcd7e5c34b43309fb14e07c48 Author: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx> AuthorDate: Tue Aug 1 11:51:01 2023 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Aug 1 11:51:01 2023 +0200 xen/pci: rename local variable to address MISRA C:2012 Rule 5.3 The rename s/pdev_type/type/ is done to avoid shadowing the homonymous function declaration. Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/drivers/passthrough/pci.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c index 95846e84f2..33452791a8 100644 --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -650,12 +650,12 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn, struct pci_seg *pseg; struct pci_dev *pdev; unsigned int slot = PCI_SLOT(devfn), func = PCI_FUNC(devfn); - const char *pdev_type; + const char *type; int ret; bool pf_is_extfn = false; if ( !info ) - pdev_type = "device"; + type = "device"; else if ( info->is_virtfn ) { pcidevs_lock(); @@ -668,12 +668,12 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn, if ( !pdev ) pci_add_device(seg, info->physfn.bus, info->physfn.devfn, NULL, node); - pdev_type = "virtual function"; + type = "virtual function"; } else if ( info->is_extfn ) - pdev_type = "extended function"; + type = "extended function"; else - pdev_type = "device"; + type = "device"; ret = xsm_resource_plug_pci(XSM_PRIV, (seg << 16) | (bus << 8) | devfn); if ( ret ) @@ -780,7 +780,7 @@ out: pcidevs_unlock(); if ( !ret ) { - printk(XENLOG_DEBUG "PCI add %s %pp\n", pdev_type, &pdev->sbdf); + printk(XENLOG_DEBUG "PCI add %s %pp\n", type, &pdev->sbdf); while ( pdev->phantom_stride ) { func += pdev->phantom_stride; -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |