On 18:02 Tue 07 Sep     , Yevgeny Kliteynik wrote:
> Max index of the ib_sm_method_str[] static array
> is 0x20. Fixing OSM_SM_METHOD_STR_UNKNOWN_VAL to
> match this value.
> 
> Signed-off-by: Yevgeny Kliteynik <klit...@dev.mellanox.co.il>
> ---
>  opensm/opensm/osm_helper.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/opensm/opensm/osm_helper.c b/opensm/opensm/osm_helper.c
> index 196d5aa..0233e70 100644
> --- a/opensm/opensm/osm_helper.c
> +++ b/opensm/opensm/osm_helper.c
> @@ -148,7 +148,7 @@ static const char *ib_sm_method_str[] = {
>       "UNKNOWN"               /* 20 */
>  };
> 
> -#define OSM_SM_METHOD_STR_UNKNOWN_VAL 0x21
> +#define OSM_SM_METHOD_STR_UNKNOWN_VAL 0x20

BTW, wouldn't it be better to use ARR_SIZE macro for those defines:

#define OSM_SM_METHOD_STR_UNKNOWN_VAL ARR_SIZE(ib_sm_method_str)

, where:

#define ARR_SIZE(a) (sizeof(a)/sizeof(a[0]))

?

Sasha

> 
>  static const char *ib_sm_attr_str[] = {
>       "RESERVED",             /* 0 */
> -- 
> 1.6.2.4
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to