[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [Patch v6 07/11] IOMMU: propagate IOMMU Device-TLB flush error up to IOMMU suspending (top level ones)



>>> On 02.06.16 at 04:58, <quan.xu@xxxxxxxxx> wrote:
> On June 01, 2016 6:39 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>> >>> On 31.05.16 at 15:57, <quan.xu@xxxxxxxxx> wrote:
>> > @@ -2389,16 +2393,25 @@ static int intel_iommu_group_id(u16 seg, u8
>> > bus, u8 devfn)  }
>> >
>> >  static u32 iommu_state[MAX_IOMMUS][MAX_IOMMU_REGS];
>> > -static void vtd_suspend(void)
>> > +
>> > +static int __must_check vtd_suspend(void)
>> >  {
>> >      struct acpi_drhd_unit *drhd;
>> >      struct iommu *iommu;
>> >      u32    i;
>> > +    int rc = 0;
>> 
>> Pointless initializer.
>> 
> 
> Indeed, if "return 0" to make obvious that no error path comes at the end of 
> this function.

No, it's pointless even without that because ...

>> >      if ( !iommu_enabled )
>> > -        return;
>> > +        return 0;
>> >
>> > -    iommu_flush_all();
>> > +    rc = iommu_flush_all();

... here you unconditionally initialize it (i.e. there's no code path
bypassing this).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.