From: Roger Pau Monné Date: Tue, 1 Mar 2022 09:02:13 +0000 (+0100) Subject: vpci/msix: reduce indentation in msix_write PBA handling X-Git-Tag: archive/raspbian/4.17.0-1+rpi1^2~33^2~880 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=59c00502b2395b11a12cef6b231dd47e690f3dd2;p=xen.git vpci/msix: reduce indentation in msix_write PBA handling No functional change. Signed-off-by: Roger Pau Monné Acked-by: Jan Beulich --- diff --git a/xen/drivers/vpci/msix.c b/xen/drivers/vpci/msix.c index 2ab4079412..a1fa7a5f13 100644 --- a/xen/drivers/vpci/msix.c +++ b/xen/drivers/vpci/msix.c @@ -275,23 +275,24 @@ static int cf_check msix_write( if ( VMSIX_ADDR_IN_RANGE(addr, msix->pdev->vpci, VPCI_MSIX_PBA) ) { - /* Ignore writes to PBA for DomUs, it's behavior is undefined. */ - if ( is_hardware_domain(d) ) + + if ( !is_hardware_domain(d) ) + /* Ignore writes to PBA for DomUs, it's behavior is undefined. */ + return X86EMUL_OKAY; + + switch ( len ) { - switch ( len ) - { - case 4: - writel(data, addr); - break; + case 4: + writel(data, addr); + break; - case 8: - writeq(data, addr); - break; + case 8: + writeq(data, addr); + break; - default: - ASSERT_UNREACHABLE(); - break; - } + default: + ASSERT_UNREACHABLE(); + break; } return X86EMUL_OKAY;