Date: Wed, 11 May 2016 17:17:48 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299468 - head/sys/dev/cxgbe/iw_cxgbe Message-ID: <201605111717.u4BHHmQU043014@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 *);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605111717.u4BHHmQU043014>