From patchwork Thu Jun 7 06:54:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Neuling X-Patchwork-Id: 926168 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 411brQ1KWMz9s4w for ; Thu, 7 Jun 2018 16:54:46 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=neuling.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 411brP68DKzF32k for ; Thu, 7 Jun 2018 16:54:45 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=neuling.org X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 411brL00STzF32Q for ; Thu, 7 Jun 2018 16:54:42 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=neuling.org Received: from localhost.localdomain (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 411brK4Cgzz9s2t; Thu, 7 Jun 2018 16:54:41 +1000 (AEST) Received: by localhost.localdomain (Postfix, from userid 1000) id 7CB1FEE791D; Thu, 7 Jun 2018 16:54:41 +1000 (AEST) From: Michael Neuling To: alistair@popple.id.au Date: Thu, 7 Jun 2018 16:54:30 +1000 Message-Id: <20180607065438.18257-3-mikey@neuling.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180607065438.18257-1-mikey@neuling.org> References: <20180607065438.18257-1-mikey@neuling.org> Subject: [Pdbg] [PATCH 03/11] host: Make debugfs scom file hex digit not decimal X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pdbg@lists.ozlabs.org MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" The kernel uses hex numbers not decimal hence this was broken on a 2 DCM Tuletta which uses chip ids above 9. Signed-off-by: Michael Neuling --- libpdbg/host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpdbg/host.c b/libpdbg/host.c index 5e0e08fc33..483e04881c 100644 --- a/libpdbg/host.c +++ b/libpdbg/host.c @@ -95,7 +95,7 @@ static int host_pib_probe(struct pdbg_target *target) if (chip_id == -1) goto out; - if (asprintf(&access_fn, "%s/%08d/access", XSCOM_BASE_PATH, chip_id) < 0) + if (asprintf(&access_fn, "%s/%08x/access", XSCOM_BASE_PATH, chip_id) < 0) goto out; *fd = open(access_fn, O_RDWR);