I don't think doing this: #ifdef IB_NODE_CA dev->node_type = IB_NODE_CA; #else dev->node_type = RDMA_NODE_IB_CA; #endif bought you anything. IB_NODE_CA is an enum, not a macro. - R.