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

Re: [Xen-devel] [PATCH v4 10/10] vt-d: propagate error up to ME phantom function mapping and unmapping



On May 12, 2016 4:45 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
> >>> On 12.05.16 at 07:16, <quan.xu@xxxxxxxxx> wrote:
> > Taken together, there are 3 call trees to me_wifi_quirk():
> >
> >  1).
> > ...--me_wifi_quirk()--domain_context_mapping_one()--
> domain_context_map
> > ping()--se
> > tup_hwdom_device()
> >
> >                     There is no use in calling this function if an
> > earlier error occurred. The change can be more lightweight (the
> > detailed change is pending).
> >
> > 2).  me_wifi_quirk()--domain_context_unmap_one()--...
> >
> >                    As you mentioned,  while in the unmap case it
> > should probably stay as is, to fit the "best effort" theme.
> >
> >                   Then I need to remove the  __must_check annotation
> > of me_wifi_quirk().
> 
> This does not follow from the above. You again should propagate the error in
> all cases (unless it would overwrite an earlier error - as you're doing in 
> various
> other places).
> 

Sorry, I know the item 2).  is tricky,  as I am confused about ' while in the 
unmap case it should probably stay as is, to fit the "best effort" theme '.


Actually, what I need to enhance the p10 are:

- drop ret
- replace the 

     if ( !seg )
-        me_wifi_quirk(domain, bus, devfn, MAP_ME_PHANTOM_FUNC);
+    {
+        ret = me_wifi_quirk(domain, bus, devfn, MAP_ME_PHANTOM_FUNC);
+
+        if ( !rc )
+            rc = ret;
+    }


____TO_____


-    if ( !seg )
-        me_wifi_quirk(domain, bus, devfn, MAP_ME_PHANTOM_FUNC);
+    if ( !seg && !rc )
+        rc = me_wifi_quirk(domain, bus, devfn, MAP_ME_PHANTOM_FUNC);



btw, I found I am struggling in this v4 and I will spend more time fixing. 
thanks for your patience.
Quan

_______________________________________________
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®.