diff mbox series

[v2,17/22] libpdbg: Do not make pdbg_default_dtb public

Message ID 20190920051651.9620-22-amitay@ozlabs.org
State Superseded
Headers show
Series Add system device tree to libpdbg | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch warning Failed to apply on branch master (8a10a05c89db666bf98734139334166da7c370a4)
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch

Commit Message

Amitay Isaacs Sept. 20, 2019, 5:16 a.m. UTC
Applications should never need to know the default fdt to be used.
For some reason applications need to get access to the fdt blob, we can
add appropriate public api.

Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libpdbg/dtb.c     | 1 +
 libpdbg/libpdbg.h | 1 -
 libpdbg/target.h  | 1 +
 3 files changed, 2 insertions(+), 1 deletion(-)

Comments

Alistair Popple Sept. 23, 2019, 3:51 a.m. UTC | #1
On Friday, 20 September 2019 3:16:46 PM AEST Amitay Isaacs wrote:
> Applications should never need to know the default fdt to be used.
> For some reason applications need to get access to the fdt blob, we can
> add appropriate public api.

Yeah, I think we added this back when the application would have to pass in 
the tree to use rather than being able to pass in NULL to pdbg_targets_init().

Reviewed-by: Alistair Popple <alistair@popple.id.au>
 
> Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
> ---
>  libpdbg/dtb.c     | 1 +
>  libpdbg/libpdbg.h | 1 -
>  libpdbg/target.h  | 1 +
>  3 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c
> index 92a4efb..ec2b672 100644
> --- a/libpdbg/dtb.c
> +++ b/libpdbg/dtb.c
> @@ -27,6 +27,7 @@
>  #include <errno.h>
>  
>  #include "libpdbg.h"
> +#include "target.h"
>  
>  #include "fake.dt.h"
>  
> diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
> index 64db5b9..371af05 100644
> --- a/libpdbg/libpdbg.h
> +++ b/libpdbg/libpdbg.h
> @@ -108,7 +108,6 @@ void pdbg_target_release(struct pdbg_target *target);
>  enum pdbg_target_status pdbg_target_status(struct pdbg_target *target);
>  void pdbg_target_status_set(struct pdbg_target *target, enum 
pdbg_target_status status);
>  bool pdbg_set_backend(enum pdbg_backend backend, const char 
*backend_option);
> -void *pdbg_default_dtb(void);
>  uint32_t pdbg_target_index(struct pdbg_target *target);
>  char *pdbg_target_path(struct pdbg_target *target);
>  struct pdbg_target *pdbg_target_from_path(struct pdbg_target *target, const 
char *path);
> diff --git a/libpdbg/target.h b/libpdbg/target.h
> index 7419ce5..0d47edb 100644
> --- a/libpdbg/target.h
> +++ b/libpdbg/target.h
> @@ -63,6 +63,7 @@ bool pdbg_target_is_class(struct pdbg_target *target, 
const char *class);
>  extern struct list_head empty_list;
>  extern struct list_head target_classes;
>  
> +void *pdbg_default_dtb(void);
>  const char *pdbg_get_backend_option(void);
>  
>  struct sbefifo *pib_to_sbefifo(struct pdbg_target *target);
>
diff mbox series

Patch

diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c
index 92a4efb..ec2b672 100644
--- a/libpdbg/dtb.c
+++ b/libpdbg/dtb.c
@@ -27,6 +27,7 @@ 
 #include <errno.h>
 
 #include "libpdbg.h"
+#include "target.h"
 
 #include "fake.dt.h"
 
diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
index 64db5b9..371af05 100644
--- a/libpdbg/libpdbg.h
+++ b/libpdbg/libpdbg.h
@@ -108,7 +108,6 @@  void pdbg_target_release(struct pdbg_target *target);
 enum pdbg_target_status pdbg_target_status(struct pdbg_target *target);
 void pdbg_target_status_set(struct pdbg_target *target, enum pdbg_target_status status);
 bool pdbg_set_backend(enum pdbg_backend backend, const char *backend_option);
-void *pdbg_default_dtb(void);
 uint32_t pdbg_target_index(struct pdbg_target *target);
 char *pdbg_target_path(struct pdbg_target *target);
 struct pdbg_target *pdbg_target_from_path(struct pdbg_target *target, const char *path);
diff --git a/libpdbg/target.h b/libpdbg/target.h
index 7419ce5..0d47edb 100644
--- a/libpdbg/target.h
+++ b/libpdbg/target.h
@@ -63,6 +63,7 @@  bool pdbg_target_is_class(struct pdbg_target *target, const char *class);
 extern struct list_head empty_list;
 extern struct list_head target_classes;
 
+void *pdbg_default_dtb(void);
 const char *pdbg_get_backend_option(void);
 
 struct sbefifo *pib_to_sbefifo(struct pdbg_target *target);