kernel/net/smc/smc_pnet.c
/* Find a pnetid in the pnet table.
 */
Find a pnetid in the pnet table.
Find a pnetid in the pnet table .
static struct smc_pnetentry *smc_pnet_find_pnetid(char *pnet_name)
{
	struct smc_pnetentry *pnetelem, *found_pnetelem = NULL;
	read_lock(&smc_pnettable.lock);
	list_for_each_entry(pnetelem, &smc_pnettable.pnetlist, list) {
		if (!strncmp(pnetelem->pnet_name, pnet_name,
			     sizeof(pnetelem->pnet_name))) {
			found_pnetelem = pnetelem;
			break;
		}
	}
	read_unlock(&smc_pnettable.lock);
	return found_pnetelem;
}
static struct smc_pnetentry * smc_pnet_find_pnetid ( char * pnet_name ) { struct smc_pnetentry * pnetelem , * found_pnetelem = NULL ; read_lock ( & smc_pnettable . lock ) ; list_for_each_entry ( pnetelem , & smc_pnettable . pnetlist , list ) { if ( ! strncmp ( pnetelem -> pnet_name , pnet_name , sizeof ( pnetelem -> pnet_name ) ) ) { found_pnetelem = pnetelem ; break ; } } read_unlock ( & smc_pnettable . lock ) ; return found_pnetelem ; }
Find a pnetid in the pnet table.
Find a pnetid in the pnet table .