FreeBSD/sys/dev/bhnd/bhndb/bhndb_subr.c
/**
 * Find the entry matching @p r in @p dwa's references, if any.
 * 
 * @param dwa The dynamic window allocation to search
 * @param r The resource to search for in @p dwa.
 */
Find the entry matching @p r in @p dwa's references, if any.

@param dwa The dynamic window allocation to search
@param r The resource to search for in @p dwa.
Find the entry matching @p r in @p dwa ' s references if any . @param dwa The dynamic window allocation to search @param r The resource to search for in @p dwa .
static struct bhndb_dw_rentry *
bhndb_dw_find_resource_entry(struct bhndb_dw_alloc *dwa, struct resource *r)
{
	struct bhndb_dw_rentry	*rentry;
	LIST_FOREACH(rentry, &dwa->refs, dw_link) {
		struct resource *dw_res = rentry->dw_res;
		if (rman_get_device(dw_res)	!= rman_get_device(r) ||
			rman_get_rid(dw_res)	!= rman_get_rid(r) ||
			rman_get_start(dw_res)	!= rman_get_start(r) ||
			rman_get_size(dw_res)	!= rman_get_size(r))
		{
			continue;
		}
		return (rentry);
	}
	return (NULL);
}
static struct bhndb_dw_rentry * bhndb_dw_find_resource_entry ( struct bhndb_dw_alloc * dwa , struct resource * r ) { struct bhndb_dw_rentry * rentry ; LIST_FOREACH ( rentry , & dwa -> refs , dw_link ) { struct resource * dw_res = rentry -> dw_res ; if ( rman_get_device ( dw_res ) != rman_get_device ( r ) || rman_get_rid ( dw_res ) != rman_get_rid ( r ) || rman_get_start ( dw_res ) != rman_get_start ( r ) || rman_get_size ( dw_res ) != rman_get_size ( r ) ) { continue ; } return ( rentry ) ; } return ( NULL ) ; }
Find the entry matching @p r in @p dwa's references, if any.
Find the entry matching @p r in @p dwa ' s references if any .
/* Match dev/rid/addr/size */ /* Matching allocation found */