On Thu, Mar 12, 2009 at 12:07:21PM -0400, Chuck Lever wrote: > Clean up: add documentating comment and use appropriate data types for > svc_find_xprt()'s arguments. > > This also eliminates a mixed sign comparison: @port was an int, while > the return value of svc_xprt_local_port() is an unsigned short. OK. Applied, though: > @@ -1042,14 +1048,14 @@ static struct svc_deferred_req *svc_deferred_dequeue(struct svc_xprt *xprt) > * wild-card, and will result in matching the first transport in the > * service's list that has a matching class name. > */ > -struct svc_xprt *svc_find_xprt(struct svc_serv *serv, char *xcl_name, > - int af, int port) > +struct svc_xprt *svc_find_xprt(struct svc_serv *serv, const char *xcl_name, > + const sa_family_t af, const unsigned short port) > { > struct svc_xprt *xprt; > struct svc_xprt *found = NULL; > > /* Sanity check the args */ > - if (!serv || !xcl_name) > + if (serv == NULL || xcl_name == NULL) > return found; Maybe that's better, maybe not, I don't know, but: let's make allowances for *some* variation in individual style. Applying as-is, but in future, I'd rather that level of decision be left to the preferences of whoever wrote the code. --b. -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html