[PATCH libdrm 03/24] radeon: remove unused functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Namely bof_load_file, bof_print, bof_object_get. Unused since their
introduction according to git log.

Cc: Jerome Glisse <jglisse@xxxxxxxxxx>
Signed-off-by: Emil Velikov <emil.l.velikov@xxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux