On Wed, 2019-06-05 at 15:32 -0300, Jason Gunthorpe wrote: > +static int __ib_get_client_nl_info(struct ib_device *ibdev, > + const char *client_name, > + struct ib_client_nl_info *res) > +{ > + unsigned long index; > + void *client_data; > + int ret = -ENOENT; > + > + if (!ibdev) { > + struct ib_client *client; I agree with Leon, this function would look better as two separate functions. But that's more cosmetic than anything else. It's unfortunate that the two loops are so close to identical, but vary in such subtle ways that it prevents a reasonable joining of the loops. -- Doug Ledford <dledford@xxxxxxxxxx> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
Attachment:
signature.asc
Description: This is a digitally signed message part