From: Lokesh Vutla Date: Wed, 24 Oct 2018 15:40:04 +0530 Subject: [U-Boot] [PATCH] cmd: remoteproc: Fix the base of strtoul for ID conversion from 3 to 10 In-Reply-To: <1540361834-3935-1-git-send-email-j-keerthy@ti.com> References: <1540361834-3935-1-git-send-email-j-keerthy@ti.com> Message-ID: <50a89867-e180-1933-60dd-749fe67e0672@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday 24 October 2018 11:47 AM, Keerthy wrote: > Currently the base is 3 fix it 10 so that IDs follow decimal system. > > Signed-off-by: Keerthy So it would fail if there are more than 3 remoteproc drivers. Reviewed-by: Lokesh Vutla Thanks and regards, Lokesh > --- > cmd/remoteproc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/cmd/remoteproc.c b/cmd/remoteproc.c > index 9aebfc2..81463f3 100644 > --- a/cmd/remoteproc.c > +++ b/cmd/remoteproc.c > @@ -120,7 +120,7 @@ static int do_remoteproc_load(cmd_tbl_t *cmdtp, int flag, int argc, > if (argc != 4) > return CMD_RET_USAGE; > > - id = (int)simple_strtoul(argv[1], NULL, 3); > + id = (int)simple_strtoul(argv[1], NULL, 10); > addr = simple_strtoul(argv[2], NULL, 16); > > size = simple_strtoul(argv[3], NULL, 16); > @@ -163,7 +163,7 @@ static int do_remoteproc_wrapper(cmd_tbl_t *cmdtp, int flag, int argc, > if (argc != 2) > return CMD_RET_USAGE; > > - id = (int)simple_strtoul(argv[1], NULL, 3); > + id = (int)simple_strtoul(argv[1], NULL, 10); > > if (!rproc_is_initialized()) { > printf("\tRemote Processors are not initialized\n"); >