[Skiboot] [PATCH skiboot v4] witherspoon: Add nvlink2 interconnect information
Reza Arbab
arbab at linux.ibm.com
Fri Mar 15 03:02:33 AEDT 2019
On Thu, Mar 14, 2019 at 03:54:30PM +1100, Alexey Kardashevskiy wrote:
>diff --git a/platforms/astbmc/witherspoon.c b/platforms/astbmc/witherspoon.c
>index d8b24b012033..d9d1334c71f8 100644
>--- a/platforms/astbmc/witherspoon.c
>+++ b/platforms/astbmc/witherspoon.c
>@@ -363,6 +363,136 @@ const struct platform_ocapi witherspoon_ocapi = {
> .i2c_presence_brick5 = 0,
> };
>
>+static int gpu_slot_to_num(const char *slot)
>+{
>+ char *p = NULL;
>+ int ret;
>+
>+ if (!slot)
>+ return -1;
>+
>+ if (memcmp(slot, "GPU", 3))
>+ return -1;
>+
>+ ret = strtol(slot + 3, &p, 10);
>+ if (*p || p == slot)
>+ return -1;
I think this should be
if (*p || p == slot + 3)
Otherwise,
Acked-by: Reza Arbab <arbab at linux.ibm.com>
--
Reza Arbab
More information about the Skiboot
mailing list