dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jerome Glisse <j.glisse@gmail.com>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Jerome Glisse <jglisse@redhat.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH libdrm 03/24] radeon: remove unused functions
Date: Wed, 1 Apr 2015 13:31:23 -0400	[thread overview]
Message-ID: <20150401173108.GB5061@gmail.com> (raw)
In-Reply-To: <1427904935-14387-4-git-send-email-emil.l.velikov@gmail.com>

On Wed, Apr 01, 2015 at 05:15:14PM +0100, Emil Velikov wrote:
> Namely bof_load_file, bof_print, bof_object_get. Unused since their
> introduction according to git log.
> 
> Cc: Jerome Glisse <jglisse@redhat.com>
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>


NAK

I use all this in tools to debug lockup. Best course of action is to
exclude bof.h from being distributed. My tools static link and i just
point them to libdrm git tree.

Cheers,
Jérôme

> ---
>  radeon/bof.c | 53 -----------------------------------------------------
>  radeon/bof.h |  3 ---
>  2 files changed, 56 deletions(-)
> 
> diff --git a/radeon/bof.c b/radeon/bof.c
> index 0598cc6..6f3760a 100644
> --- a/radeon/bof.c
> +++ b/radeon/bof.c
> @@ -61,18 +61,6 @@ bof_t *bof_object(void)
>  	return object;
>  }
>  
> -bof_t *bof_object_get(bof_t *object, const char *keyname)
> -{
> -	unsigned i;
> -
> -	for (i = 0; i < object->array_size; i += 2) {
> -		if (!strcmp(object->array[i]->value, keyname)) {
> -			return object->array[i + 1];
> -		}
> -	}
> -	return NULL;
> -}
> -
>  int bof_object_set(bof_t *object, const char *keyname, bof_t *value)
>  {
>  	bof_t *key;
> @@ -271,11 +259,6 @@ static void bof_print_rec(bof_t *bof, int level, int entry)
>  	}
>  }
>  
> -void bof_print(bof_t *bof)
> -{
> -	bof_print_rec(bof, 0, 0);
> -}
> -
>  static int bof_read(bof_t *root, FILE *file, long end, int level)
>  {
>  	bof_t *bof = NULL;
> @@ -333,42 +316,6 @@ out_err:
>  	return -EINVAL;
>  }
>  
> -bof_t *bof_load_file(const char *filename)
> -{
> -	bof_t *root = bof_object();
> -	int r;
> -
> -	if (root == NULL) {
> -		fprintf(stderr, "%s failed to create root object\n", __func__);
> -		return NULL;
> -	}
> -	root->file = fopen(filename, "r");
> -	if (root->file == NULL)
> -		goto out_err;
> -	r = fseek(root->file, 0L, SEEK_SET);
> -	if (r) {
> -		fprintf(stderr, "%s failed to seek into file %s\n", __func__, filename);
> -		goto out_err;
> -	}
> -	root->offset = ftell(root->file);
> -	r = fread(&root->type, 4, 1, root->file);
> -	if (r != 1)
> -		goto out_err;
> -	r = fread(&root->size, 4, 1, root->file);
> -	if (r != 1)
> -		goto out_err;
> -	r = fread(&root->array_size, 4, 1, root->file);
> -	if (r != 1)
> -		goto out_err;
> -	r = bof_read(root, root->file, root->offset + root->size, 2);
> -	if (r)
> -		goto out_err;
> -	return root;
> -out_err:
> -	bof_decref(root);
> -	return NULL;
> -}
> -
>  void bof_incref(bof_t *bof)
>  {
>  	bof->refcount++;
> diff --git a/radeon/bof.h b/radeon/bof.h
> index cb829a1..8e952c1 100644
> --- a/radeon/bof.h
> +++ b/radeon/bof.h
> @@ -53,7 +53,6 @@ typedef struct bof {
>  
>  /* object */
>  extern bof_t *bof_object(void);
> -extern bof_t *bof_object_get(bof_t *object, const char *keyname);
>  extern int bof_object_set(bof_t *object, const char *keyname, bof_t *value);
>  /* array */
>  extern bof_t *bof_array(void);
> @@ -72,9 +71,7 @@ extern int32_t bof_int32_value(bof_t *bof);
>  /* common functions */
>  extern void bof_decref(bof_t *bof);
>  extern void bof_incref(bof_t *bof);
> -extern bof_t *bof_load_file(const char *filename);
>  extern int bof_dump_file(bof_t *bof, const char *filename);
> -extern void bof_print(bof_t *bof);
>  
>  static inline int bof_is_object(bof_t *bof){return (bof->type == BOF_TYPE_OBJECT);}
>  static inline int bof_is_blob(bof_t *bof){return (bof->type == BOF_TYPE_BLOB);}
> -- 
> 2.3.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-04-01 17:31 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01 16:15 [PATCH libdrm 00/24] Annotate private symbols, drop drm_public macro Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 01/24] configure.ac: split -fvisibility and __attribute__((visibility)) checks Emil Velikov
2015-04-08  0:18   ` Alan Coopersmith
2015-04-01 16:15 ` [PATCH libdrm 02/24] radeon: remove empty function declarations Emil Velikov
2015-04-01 17:30   ` Jerome Glisse
2015-04-01 20:34     ` Emil Velikov
2015-04-01 20:57       ` Emil Velikov
2015-04-01 21:26         ` Jerome Glisse
2015-04-01 22:04           ` Emil Velikov
2015-04-02  3:51             ` Jerome Glisse
2015-04-01 21:24       ` Jerome Glisse
2015-04-01 16:15 ` [PATCH libdrm 03/24] radeon: remove unused functions Emil Velikov
2015-04-01 17:31   ` Jerome Glisse [this message]
2015-04-01 16:15 ` [PATCH libdrm 04/24] radeon: annotate bof_incref, bof_string functions as static Emil Velikov
2015-04-01 17:31   ` Jerome Glisse
2015-04-01 17:32   ` Jerome Glisse
2015-04-01 16:15 ` [PATCH libdrm 05/24] radeon: remove more unused functions Emil Velikov
2015-04-01 17:32   ` Jerome Glisse
2015-04-01 16:15 ` [PATCH libdrm 06/24] radeon: remove no-longer used static functions Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 07/24] radeon: annotate the private symbols Emil Velikov
2015-04-02  2:48   ` Michel Dänzer
2015-04-02  3:57     ` Jerome Glisse
2015-04-02 23:10       ` Emil Velikov
2015-04-05 15:29         ` [PATCH libdrm v2 02/19] radeon: move bof.[ch] out of libdrm_radeon Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 08/24] radeon: add symbols test Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 09/24] freedreno: annotate the private symbols Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 10/24] freedreno: add symbols test Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 11/24] intel: remove the drm_mm* symbol workarounds Emil Velikov
2015-04-09 14:56   ` Emil Velikov
2015-04-10  6:05     ` Eric Anholt
2015-04-10 17:40       ` Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 12/24] intel: remove unused mmFindBlock Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 13/24] intel: annotate the private symbols Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 14/24] intel: add symbols test Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 15/24] nouveau: annotate the private symbols Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 16/24] nouveau: add symbols test Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 17/24] libkms: annotate private symbols Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 18/24] libkms: add symbols test Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 19/24] exynos: " Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 20/24] omap: " Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 21/24] tegra: " Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 22/24] drm: rename libdrm{,_macros}.h Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 23/24] drm: remove no longer needed VISIBILITY_CFLAGS Emil Velikov
2015-04-01 16:15 ` [PATCH libdrm 24/24] drm: remove drm_public macro Emil Velikov
2015-04-21 15:41 ` [PATCH libdrm 00/24] Annotate private symbols, drop " Emil Velikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150401173108.GB5061@gmail.com \
    --to=j.glisse@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=jglisse@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox