> > > @@ -249,44 +252,26 @@ static int __path_add(struct net_device *dev, > > > struct ipoib_path *path) > > > n = &pn->rb_left; > > > else if (ret > 0) > > > n = &pn->rb_right; > > > - else > > > - return -EEXIST; > > > + else /* Should never happen since we always search > > > first */ > > > + return; > > > } > > > > Why not remove the last else and change the "else if" into else? > > I don't understand. This is left, right, or return. > I'm only changing the return value to void since it is > never used.
It would probably be better to split that cleanup out into a separate patch. And since we have a "should never happen" condition in the code, I guess we should either trust our code and just assume that it really never happens (ie have just an if-else as Eli suggests), or add something like a WARN_ONCE() if it actually does happen (probably safer) -- Roland Dreier <[email protected]> || For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html -- 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
