On 31/10/2013 5:24, Sagi Grimberg wrote:
+ /* connect to MR tree */ + write_lock_irq(&table->lock); + err = radix_tree_insert(&table->tree, mr->key & 0xffffff00, mr); + write_unlock_irq(&table->lock);
The conversion from MR key into radix tree index occurs three times so maybe it's worth to introduce an (inline) helper function for this conversion.
Another comment about this conversion: is the mlx5 driver supported on 32-bit platforms ? I think that 0xffffff00 should be changed into 0xffffff00u to avoid that a compiler warning is triggered on 32-bit platforms.
Thanks, Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
