[ofw] [PATCH] remove unused, incorrect and dangerous code
Leonid Keller
leonid at mellanox.co.il
Sun Jun 5 00:23:41 PDT 2011
OK with me
> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org [mailto:ofw-
> bounces at lists.openfabrics.org] On Behalf Of Smith, Stan
> Sent: Friday, June 03, 2011 2:13 AM
> To: Tzachi Dar
> Cc: ofw at lists.openfabrics.org
> Subject: [ofw] [PATCH] remove unused, incorrect and dangerous code
>
> 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 ----
>
> _______________________________________________
> ofw mailing list
> ofw at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
More information about the ofw
mailing list