From patchwork Thu May 24 05:50:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 919596 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 40rz544qn7z9s1w for ; Thu, 24 May 2018 15:50:48 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="jUVH0PEq"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40rz542Vb1zF1Hm for ; Thu, 24 May 2018 15:50:48 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="jUVH0PEq"; dkim-atps=neutral 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 40rz4k3xrKzF1Gj for ; Thu, 24 May 2018 15:50:30 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="jUVH0PEq"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 40rz4j74PLz9s2S; Thu, 24 May 2018 15:50:29 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1527141030; bh=eybqDWahAJ1KXmDheF5se8QLZBZZIOl30M+OwOc7cI4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jUVH0PEqZjIZoLtSOL1jn2bLd1ffIHxamjwxehkou22S7ufyJ/AsNiW5gG3kg8BxV Ix9mpBvS1+H9gCuU3YgILSnW49w57+V9ZhZltkVaUY4XkgEBioBeOlLYFzPgtPTq+Q hLmWpgnpBlGJJPUrBF3vhOJ4OoXvhezoUDFu95tzjtCV/KftPVrsWNoBKZbD9PWfh5 Nf7LsT9QSnAhVT42o8bjZBGfBl70+ovWgnaplPitSVzajzHT5kv6BNUaYOEcdfDFph hNQIpR3wCBC7QYJ4b5NQ9XHTbCbcWr5gw1QYB4kn+/Go16gW6PXOXmxmRFMeLXYTBu vHhYA9tl4zdwg== From: Amitay Isaacs To: "pdbg@lists.ozlabs.org"@lists.ozlabs.org Date: Thu, 24 May 2018 15:50:09 +1000 Message-Id: <20180524055017.8801-4-amitay@ozlabs.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524055017.8801-1-amitay@ozlabs.org> References: <20180524055017.8801-1-amitay@ozlabs.org> Subject: [Pdbg] [PATCH v3 03/11] main: Do not include libpdbg internal headers 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: Amitay Isaacs MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" There are few execptions: - src/thread.c, src/htm.c These require bitutils.h. The correct fix might be to include thread abstraction in libpdbg. - src/main.c This requires target.h. Signed-off-by: Amitay Isaacs --- src/cfam.c | 2 -- src/htm.c | 5 +++-- src/htm.h | 2 -- src/main.c | 2 +- src/main.h | 4 +++- src/mem.c | 4 ++-- src/reg.c | 3 +-- src/scom.c | 2 +- src/scom.h | 2 -- src/thread.c | 4 +--- src/thread.h | 2 -- 11 files changed, 12 insertions(+), 20 deletions(-) diff --git a/src/cfam.c b/src/cfam.c index 3ba8224..269123e 100644 --- a/src/cfam.c +++ b/src/cfam.c @@ -19,8 +19,6 @@ #include #include -#include - #include "main.h" static int getcfam(struct pdbg_target *target, uint32_t index, uint64_t *addr, uint64_t *unused) diff --git a/src/htm.c b/src/htm.c index a1a88d1..a45facf 100644 --- a/src/htm.c +++ b/src/htm.c @@ -29,11 +29,12 @@ #include #include #include +#include #include -#include -#include +#include +#include #include "main.h" diff --git a/src/htm.h b/src/htm.h index fef569e..f5ffa76 100644 --- a/src/htm.h +++ b/src/htm.h @@ -16,8 +16,6 @@ #include #include -#include - int run_htm_start(int optind, int argc, char *argv[]); int run_htm_stop(int optind, int argc, char *argv[]); int run_htm_status(int optind, int argc, char *argv[]); diff --git a/src/main.c b/src/main.c index eb5d64d..ee41a1d 100644 --- a/src/main.c +++ b/src/main.c @@ -31,9 +31,9 @@ #include #include +#include #include "main.h" -#include "bitutils.h" #include "cfam.h" #include "scom.h" #include "reg.h" diff --git a/src/main.h b/src/main.h index e060553..b1366d9 100644 --- a/src/main.h +++ b/src/main.h @@ -13,9 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #include +#include -#include +#include enum backend { FSI, I2C, KERNEL, FAKE, HOST }; diff --git a/src/mem.c b/src/mem.c index 71e91d3..dfdcf01 100644 --- a/src/mem.c +++ b/src/mem.c @@ -19,9 +19,9 @@ #include #include #include +#include -#include -#include +#include #include "main.h" #include "progress.h" diff --git a/src/reg.c b/src/reg.c index d094fbe..002cfe9 100644 --- a/src/reg.c +++ b/src/reg.c @@ -19,8 +19,7 @@ #include #include -#include -#include +#include #include "main.h" diff --git a/src/scom.c b/src/scom.c index 4073d88..4c59e2a 100644 --- a/src/scom.c +++ b/src/scom.c @@ -19,7 +19,7 @@ #include #include -#include +#include #include "main.h" diff --git a/src/scom.h b/src/scom.h index 890207f..d4325b5 100644 --- a/src/scom.h +++ b/src/scom.h @@ -15,6 +15,4 @@ */ #include -#include - int handle_scoms(int optind, int argc, char *argv[]); diff --git a/src/thread.c b/src/thread.c index f32a437..e4253f6 100644 --- a/src/thread.c +++ b/src/thread.c @@ -19,11 +19,9 @@ #include #include +#include #include -#include -#include - #include "main.h" #include "mem.h" diff --git a/src/thread.h b/src/thread.h index 5fc2a80..0c1caa2 100644 --- a/src/thread.h +++ b/src/thread.h @@ -15,8 +15,6 @@ */ #include -#include - int thread_start(int optind, int argc, char *argv[]); int thread_step(int optind, int argc, char *argv[]); int thread_stop(int optind, int argc, char *argv[]);