diff mbox series

[v5,02/10] AMD/IOMMU: drop stray "else"

Message ID 06b8a3a1-8e24-3b77-2a21-7802f4fb19af@suse.com (mailing list archive)
State New, archived
Headers show
Series [v5,01/10] AMD/IOMMU: miscellaneous DTE handling adjustments | expand

Commit Message

Jan Beulich Aug. 6, 2019, 1:08 p.m. UTC
The blank line between it and the prior if() clearly indicates that this
was meant to be a standalone if().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v5: New.

Comments

Andrew Cooper Aug. 7, 2019, 9:48 a.m. UTC | #1
On 06/08/2019 14:08, Jan Beulich wrote:
> The blank line between it and the prior if() clearly indicates that this
> was meant to be a standalone if().
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Looks like this was you in c/s 0e8e0a0854a

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Jan Beulich Aug. 7, 2019, 9:58 a.m. UTC | #2
On 07.08.2019 11:48, Andrew Cooper wrote:
> On 06/08/2019 14:08, Jan Beulich wrote:
>> The blank line between it and the prior if() clearly indicates that this
>> was meant to be a standalone if().
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> Looks like this was you in c/s 0e8e0a0854a

Right - quite embarrassing. I can only assume that there was a
plain if() paired with it earlier on, and I didn't notice that
the else should go away when dropping/moving it.

> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

Thanks.

Jan
Woods, Brian Aug. 8, 2019, 4:30 p.m. UTC | #3
On Tue, Aug 06, 2019 at 03:08:11PM +0200, Jan Beulich wrote:
> The blank line between it and the prior if() clearly indicates that this
> was meant to be a standalone if().
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Brian Woods <brian.woods@amd.com>

> ---
> v5: New.
> 
> --- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
> +++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
> @@ -166,8 +166,8 @@ static int __init iov_detect(void)
>      if ( !iommu_enable && !iommu_intremap )
>          return 0;
> -    else if ( (init_done ? amd_iommu_init_interrupt()
> -                         : amd_iommu_init(false)) != 0 )
> +    if ( (init_done ? amd_iommu_init_interrupt()
> +                    : amd_iommu_init(false)) != 0 )
>      {
>          printk("AMD-Vi: Error initialization\n");
>          return -ENODEV;
>
diff mbox series

Patch

--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -166,8 +166,8 @@  static int __init iov_detect(void)
      if ( !iommu_enable && !iommu_intremap )
          return 0;
  
-    else if ( (init_done ? amd_iommu_init_interrupt()
-                         : amd_iommu_init(false)) != 0 )
+    if ( (init_done ? amd_iommu_init_interrupt()
+                    : amd_iommu_init(false)) != 0 )
      {
          printk("AMD-Vi: Error initialization\n");
          return -ENODEV;