Author: hselasky Date: Wed May 11 17:17:48 2016 New Revision: 299468 URL: https://svnweb.freebsd.org/changeset/base/299468
Log: The idr_for_each() function is now part of the LinuxKPI. Use the LinuxKPI's idr_for_each() function instead of the local one to avoid compilation issues. Discussed with: np @ MFC after: 1 week Modified: head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Modified: head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed May 11 17:07:29 2016 (r299467) +++ head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed May 11 17:17:48 2016 (r299468) @@ -1004,43 +1004,6 @@ gen_pool_destroy(struct gen_pool *gp) #define L1_CACHE_BYTES 32 #endif -static inline -int idr_for_each(struct idr *idp, - int (*fn)(int id, void *p, void *data), void *data) -{ - int n, id, max, error = 0; - struct idr_layer *p; - struct idr_layer *pa[MAX_LEVEL]; - struct idr_layer **paa = &pa[0]; - - n = idp->layers * IDR_BITS; - p = idp->top; - max = 1 << n; - - id = 0; - while (id < max) { - while (n > 0 && p) { - n -= IDR_BITS; - *paa++ = p; - p = p->ary[(id >> n) & IDR_MASK]; - } - - if (p) { - error = fn(id, (void *)p, data); - if (error) - break; - } - - id += 1 << n; - while (n < fls(id)) { - n += IDR_BITS; - p = *--paa; - } - } - - return error; -} - void c4iw_cm_init_cpl(struct adapter *); void c4iw_cm_term_cpl(struct adapter *); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"