[Pdbg] [PATCH 02/23] libpdbg: Drop const from pdbg_target_path() argument

Alistair Popple alistair at popple.id.au
Thu Sep 19 13:01:52 AEST 2019


Reviewed-by: Alistair Popple <alistair at popple.id.au>

On Thursday, 19 September 2019 12:33:12 PM AEST Amitay Isaacs wrote:
> Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
> ---
>  libpdbg/device.c  | 8 ++++----
>  libpdbg/libpdbg.h | 2 +-
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/libpdbg/device.c b/libpdbg/device.c
> index efa9ce4..6c3b769 100644
> --- a/libpdbg/device.c
> +++ b/libpdbg/device.c
> @@ -208,10 +208,10 @@ static bool dt_attach_root(struct pdbg_target *parent, struct pdbg_target *root)
>  	return true;
>  }
>  
> -static char *dt_get_path(const struct pdbg_target *node)
> +static char *dt_get_path(struct pdbg_target *node)
>  {
>  	unsigned int len = 0;
> -	const struct pdbg_target *n;
> +	struct pdbg_target *n;
>  	char *path, *p;
>  
>  	/* Dealing with NULL is for test/debug purposes */
> @@ -445,7 +445,7 @@ static struct pdbg_target *dt_next(const struct pdbg_target *root,
>  	return NULL;
>  }
>  
> -static const struct dt_property *dt_require_property(const struct pdbg_target *node,
> +static const struct dt_property *dt_require_property(struct pdbg_target *node,
>  						     const char *name, int wanted_len)
>  {
>  	const struct dt_property *p = dt_find_property(node, name);
> @@ -656,7 +656,7 @@ void pdbg_targets_init(void *fdt)
>  	dt_expand(pdbg_dt_root, fdt);
>  }
>  
> -char *pdbg_target_path(const struct pdbg_target *target)
> +char *pdbg_target_path(struct pdbg_target *target)
>  {
>  	return dt_get_path(target);
>  }
> diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
> index dffc346..caf8b85 100644
> --- a/libpdbg/libpdbg.h
> +++ b/libpdbg/libpdbg.h
> @@ -110,7 +110,7 @@ void pdbg_target_status_set(struct pdbg_target *target, enum pdbg_target_status
>  int 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(const 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);
>  uint32_t pdbg_parent_index(struct pdbg_target *target, char *klass);
>  const char *pdbg_target_class_name(struct pdbg_target *target);
> 






More information about the Pdbg mailing list