Message ID | 534D6DE1.4010306@dev.mellanox.co.il (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Ira Weiny |
Headers | show |
> > > Based on patch for this for width 0 from Ammar Haj Hamad > <ahamad@asaltech.com> > > Some implementations when port is down appear to return a link width of 0 > > Signed-off-by: Hal Rosenstock <hal@mellanox.com> Thanks applied, Ira > --- > diff --git a/src/dump.c b/src/dump.c > index 7f3ef7d..efe4bc4 100644 > --- a/src/dump.c > +++ b/src/dump.c > @@ -185,7 +185,8 @@ void mad_dump_linkwidth(char *buf, int bufsz, void > *val, int valsz) > break; > default: > IBWARN("bad width %d", width); > - buf[0] = 0; > + snprintf(buf, bufsz, "undefined (%d)", width); > + break; > } > } > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/src/dump.c b/src/dump.c index 7f3ef7d..efe4bc4 100644 --- a/src/dump.c +++ b/src/dump.c @@ -185,7 +185,8 @@ void mad_dump_linkwidth(char *buf, int bufsz, void *val, int valsz) break; default: IBWARN("bad width %d", width); - buf[0] = 0; + snprintf(buf, bufsz, "undefined (%d)", width); + break; } }
Based on patch for this for width 0 from Ammar Haj Hamad <ahamad@asaltech.com> Some implementations when port is down appear to return a link width of 0 Signed-off-by: Hal Rosenstock <hal@mellanox.com> --- -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html