From patchwork Wed Apr 1 16:15:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 6141151 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 51354BFFA8 for ; Wed, 1 Apr 2015 16:12:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A6B220351 for ; Wed, 1 Apr 2015 16:12:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 081B720373 for ; Wed, 1 Apr 2015 16:12:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6F5CC6E8C1; Wed, 1 Apr 2015 09:12:30 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by gabe.freedesktop.org (Postfix) with ESMTP id 3ECC26E34E for ; Wed, 1 Apr 2015 09:12:29 -0700 (PDT) Received: by wgoe14 with SMTP id e14so58605768wgo.0 for ; Wed, 01 Apr 2015 09:12:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=S0iniIwdVV13pCsK6Te0052gWXblQMudssfqHxu5/cw=; b=KIJgLyFX/fiPPeGK3Qb2OlIQpWt0tiRZGlfSRUpjHPjP9pB8zyUcnVqJ19K5VMFajz PaFwBf0XE9uyMeWHvt7kh0RAyRNiauyeGX8vbZEII33sNDbXMdD9X0RdshkPDSr0yiOm 0Lh0DZTygE7PAf08SXiJ0pYMVPp3IrPqGFpVa1fRBevbFIZuIL6y8wHkmUdCvpWXHEs7 REEpMudUnNOxmpaC3FfjZH5MlA3fA2G+96O76PoJMC0uJB9KGsSPAReO4+v5c7CLvcLL xE2WdmqXlqgx4vezL7/WLJmOHCcfA0jY4W/zuHLslC+Zbha6/tqVla43BnKO4fHF3rcW EvVg== X-Received: by 10.180.126.41 with SMTP id mv9mr16589308wib.72.1427904748635; Wed, 01 Apr 2015 09:12:28 -0700 (PDT) Received: from arch-x220.localdomain (cpc12-croy20-2-0-cust52.croy.cable.virginm.net. [82.44.54.53]) by mx.google.com with ESMTPSA id ge8sm3319498wjc.32.2015.04.01.09.12.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Apr 2015 09:12:28 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 03/24] radeon: remove unused functions Date: Wed, 1 Apr 2015 17:15:14 +0100 Message-Id: <1427904935-14387-4-git-send-email-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.3.1 In-Reply-To: <1427904935-14387-1-git-send-email-emil.l.velikov@gmail.com> References: <1427904935-14387-1-git-send-email-emil.l.velikov@gmail.com> Cc: Jerome Glisse , emil.l.velikov@gmail.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Namely bof_load_file, bof_print, bof_object_get. Unused since their introduction according to git log. Cc: Jerome Glisse Signed-off-by: Emil Velikov --- 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);}