Skip to contentSkip to conversation

x86/mmcfg: Remove redundant code in pci_mmcfg_reject_broken()

PATCH In review Zhenzhong Duan 2 participants 2 messages Aug 16, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/mmcfg: Remove redundant code in pci_mmcfg_reject_broken()

No functional change.

---
 xen/arch/x86/x86_64/mmconfig-shared.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
xen/arch/x86/x86_64/mmconfig-shared.c +0 -2
index 7c3b7fd..4a6ca26 100644
@@ -371,8 +371,6 @@ static bool_t __init pci_mmcfg_reject_broken(void)
         (pci_mmcfg_config[0].address == 0))
         return 0;
 
-    cfg = &pci_mmcfg_config[0];
-
     for (i = 0; i < pci_mmcfg_config_num; i++) {
         u64 addr, size;
 
Signature · 6 lines
1.7.3

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 16.08.18 at 07:10, <[email protected]> wrote:

No functional change.

Albeit I would have wished you would have taken the opportunity to, at the very least, also move cfg's declaration into the for() scope. There's obvious further trivial cleanup potential in the function.

Jan

Quoted 13 lines
xen/arch/x86/x86_64/mmconfig-shared.c +0 -2
@@ -371,8 +371,6 @@ static bool_t __init pci_mmcfg_reject_broken(void)
         (pci_mmcfg_config[0].address == 0))
         return 0;
 
-    cfg = &pci_mmcfg_config[0];
-
     for (i = 0; i < pci_mmcfg_config_num; i++) {
         u64 addr, size;
 
Signature · 1 line
1.7.3

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel