kernel/net/smc/smc_pnet.c
/* Find an infiniband device by a given name. The device might not exist. */
Find an infiniband device by a given name. The device might not exist.
Find an infiniband device by a given name . The device might not exist .
static struct smc_ib_device *smc_pnet_find_ib(char *ib_name)
{
	struct smc_ib_device *ibdev;
	spin_lock(&smc_ib_devices.lock);
	list_for_each_entry(ibdev, &smc_ib_devices.list, list) {
		if (!strncmp(ibdev->ibdev->name, ib_name,
			     sizeof(ibdev->ibdev->name))) {
			goto out;
		}
	}
	ibdev = NULL;
out:
	spin_unlock(&smc_ib_devices.lock);
	return ibdev;
}
static struct smc_ib_device * smc_pnet_find_ib ( char * ib_name ) { struct smc_ib_device * ibdev ; spin_lock ( & smc_ib_devices . lock ) ; list_for_each_entry ( ibdev , & smc_ib_devices . list , list ) { if ( ! strncmp ( ibdev -> ibdev -> name , ib_name , sizeof ( ibdev -> ibdev -> name ) ) ) { goto out ; } } ibdev = NULL ; out : spin_unlock ( & smc_ib_devices . lock ) ; return ibdev ; }
Find an infiniband device by a given name.
Find an infiniband device by a given name .