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

Smith, Stan stan.smith at intel.com
Tue Jun 14 09:06:55 PDT 2011


>-----Original Message-----
>From: Leonid Keller [mailto:leonid at mellanox.co.il]
>Sent: Tuesday, June 14, 2011 5:43 AM
>To: Smith, Stan; Tzachi Dar
>Cc: ofw at lists.openfabrics.org
>Subject: RE: [PATCH] remove unused, incorrect and dangerous code
>
>Your "thanks" caused me to re-check it. :(
>Why won't we remove the same string in ual_pnp.c and al_pnp.h ?


Thanks for checking, good catch!
Specified items removed in svn.3119

Stan.

>
>
>> -----Original Message-----
>> From: Smith, Stan [mailto:stan.smith at intel.com]
>> Sent: Tuesday, June 07, 2011 2:39 AM
>> To: Leonid Keller; Tzachi Dar
>> Cc: ofw at lists.openfabrics.org
>> Subject: RE: [PATCH] remove unused, incorrect and dangerous code
>>
>> Hello Leo,
>>   Thanks for the review.
>>
>> Stan.
>>
>> Done in
>> Revision: 3118
>> Author: stansmith
>> Date: 8:43:13 AM, Monday, June 06, 2011
>> Message:
>> [AL] remove unused code; instead use ib_get_pnp_event_str() in ib_al.h
>> ----
>> Modified : /gen1/trunk/core/al/kernel/al_pnp.c
>>
>>
>> >-----Original Message-----
>> >From: Leonid Keller [mailto:leonid at mellanox.co.il]
>> >Sent: Sunday, June 05, 2011 12:24 AM
>> >To: Smith, Stan; Tzachi Dar
>> >Cc: ofw at lists.openfabrics.org
>> >Subject: RE: [PATCH] remove unused, incorrect and dangerous code
>> >
>> >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