I agree Roland.
Only thing is it may save very few machine cycles :)

~subbu

--- fmr_pool.orig.c 2008-03-05 11:29:20.000000000 -0600
+++ fmr_pool.mod.c  2008-03-17 17:05:04.000000000 -0500
@@ -321,7 +321,9 @@
      fmr->pool             = pool;
      fmr->remap_count      = 0;
      fmr->ref_count        = 0;
-     INIT_HLIST_NODE(&fmr->cache_node);
+
+     if (params->cache)
+       INIT_HLIST_NODE(&fmr->cache_node);

      fmr->fmr = ib_alloc_fmr(pd, params->access, &fmr_attr);
      if (IS_ERR(fmr->fmr)) {



On Sun, Mar 9, 2008 at 3:51 PM, Roland Dreier <[EMAIL PROTECTED]> wrote:

>  > -                       INIT_HLIST_NODE(&fmr->cache_node);
>
>  > +                       if (params->cache) {
>  > +                               INIT_HLIST_NODE(&fmr->cache_node);
>  > +                       }
>
> I guess we could do that but in practice it doesn't make any
> difference, does it?  Adding the if statement makes the code bigger
> (and it's not a fast path anyway).
>
> (BTW the kernel style is to leave out the { } around a single line block)
>
>  - R.
>



-- 
. . . s u b b u
"You've got to be original, because if you're like someone else, what do
they need you for?"
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to