<div dir="ltr">On Wed, Apr 10, 2013 at 1:04 AM, Eric Blake <span dir="ltr"><<a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On 04/09/2013 12:38 AM, Tal Kain wrote:<br>

> On Mon, Apr 8, 2013 at 4:32 PM, Daniel P. Berrange <<a href="mailto:berrange@redhat.com">berrange@redhat.com</a>>wrote:<br>
><br>
>> On Mon, Apr 08, 2013 at 03:33:07PM +0300, Tal Kain wrote:<br>
>>> Signed-off-by: Tal Kain <<a href="mailto:tal.kain@ravellosystems.com">tal.kain@ravellosystems.com</a>><br>
>>> ---<br>
>>>  src/qemu/qemu_capabilities.c |   13 +++++++------<br>
>>>  1 file changed, 7 insertions(+), 6 deletions(-)<br>
>><br>
>> What is the motivation for doing this ?  it just looks like<br>
>> overkill to me, since virArchFromHost isn't really an<br>
>> expensive method to invoke.<br>
>><br>
<br>
</div><div class="im">> This patch's motivation is not about making this function faster.<br>
> Even if virArchFromHost isn't expensive, It seemed to me like there is no<br>
> good reason for calling it 3 times at the same context, It is just<br>
> unnecessary.<br>
> Why using a local variable instead of calling the same function three times<br>
> is an overkill?<br>
<br>
</div>Personally, I don't think the patch is too bad, and I'll probably apply<br>
it unless Dan can give a stronger objection.<br>
<div class="im"><br>
><br>
>>From my perspective, by calling it just once I'm making it easier for a<br>
> reader to understand the usage of this function without reading its code.<br>
<br>
</div>A good compiler will already factor out invariant calls; but we don't<br>
use enough annotations to tell the compiler that virArchFromHost is<br>
invariant.<br>
<span class=""><font color="#888888"><br>
--<br>
Eric Blake   eblake redhat com    <a href="tel:%2B1-919-301-3266" value="+19193013266">+1-919-301-3266</a><br>
Libvirt virtualization library <a href="http://libvirt.org" target="_blank">http://libvirt.org</a><br>
<br>
</font></span></blockquote></div><br></div><div class="gmail_extra">Hey,<div><br></div><div>I was wondering if there are any updates about this patch</div><div><br></div><div style>Thanks in advance,</div><div style>Tal Kain</div>
</div></div>