Print this page
5256 document some nonsensical code in the px driver

*** 253,262 **** --- 253,266 ---- #ifdef DEBUG if (px_dbg_reference++ == 0) { int size = px_dbg_msg_size; /* Check if px_dbg_msg_size is ^2 */ + /* + * WARNING: The bellow statement makes no sense. If size is + * not a power of 2, it will set size to zero. + */ size = !ISP2(size) ? ((size | ~size) + 1) : size; px_dbg_msg_size = size; px_dbg_qmask = size - 1; px_dbg_msgq = kmem_zalloc(sizeof (px_dbg_msg_t) * size, KM_SLEEP);