[ofw] [PATCH] remove unused, incorrect and dangerous code

Smith, Stan stan.smith at intel.com
Thu Jun 2 16:12:30 PDT 2011


Remove unused, incorrect (indexed by value) and dangerous (indexing by value can SEGFAULT as IB_PNP_* are not enums nor sequential defines).
Instead use ib_get_pnp_event_str() in ib_al.h.

Signed-off-by: stan smith <stan.smith at intel.com>

*** core/al/kernel/al_pnp.c	Thu Jun 02 16:02:44 2011
--- core/al/kernel/al_pnp.c	Thu Jun 02 15:59:20 2011
***************
*** 51,81 ****
  #define PNP_CA_VECTOR_GROW		10
  
  
- /* ib_pnp_event_t values converted to text strings. */
- char*	ib_pnp_event_str[] =
- {
- 	"IB_PNP_CA_ADD",
- 	"IB_PNP_CA_REMOVE",
- 	"IB_PNP_PORT_ADD",
- 	"IB_PNP_PORT_REMOVE",
- 	"IB_PNP_PORT_INIT",
- 	"IB_PNP_PORT_ARMED",
- 	"IB_PNP_PORT_ACTIVE",
- 	"IB_PNP_PORT_DOWN",
- 	"IB_PNP_PKEY_CHANGE",
- 	"IB_PNP_SM_CHANGE",
- 	"IB_PNP_GID_CHANGE",
- 	"IB_PNP_LID_CHANGE",
- 	"IB_PNP_SUBNET_TIMEOUT_CHANGE",
- 	"IB_PNP_IOU_ADD",
- 	"IB_PNP_IOU_REMOVE",
- 	"IB_PNP_IOC_ADD",
- 	"IB_PNP_IOC_REMOVE",
- 	"IB_PNP_IOC_PATH_ADD",
- 	"IB_PNP_IOC_PATH_REMOVE"
- };
- 
- 
  /*
   * Declarations.
   */
--- 51,56 ----




More information about the ofw mailing list