gallium/cso_hash: remove always constant variable nodeSize
authorMarek Olšák <marek.olsak@amd.com>
Wed, 22 Jan 2020 01:18:54 +0000 (20:18 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 14 Feb 2020 23:16:28 +0000 (18:16 -0500)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>

src/gallium/auxiliary/cso_cache/cso_hash.c
src/gallium/auxiliary/cso_cache/cso_hash.h

index 753cd89f1ed6570fb43b615b7a1bd3eef0bcfbf4..e3495d5165a67c293e00ace96b33d5ce854ed9b0 100644 (file)
@@ -75,7 +75,7 @@ static int countBits(int hint)
 
 static void *cso_data_allocate_node(struct cso_hash_data *hash)
 {
-   return MALLOC(hash->nodeSize);
+   return MALLOC(sizeof(struct cso_node));
 }
 
 static void cso_free_node(struct cso_node *node)
@@ -208,7 +208,6 @@ bool cso_hash_init(struct cso_hash *hash)
    hash->data.d->fakeNext = 0;
    hash->data.d->buckets = 0;
    hash->data.d->size = 0;
-   hash->data.d->nodeSize = sizeof(struct cso_node);
    hash->data.d->userNumBits = (short)MinNumBits;
    hash->data.d->numBits = 0;
    hash->data.d->numBuckets = 0;
index b86e11c5fd50b6d1ec6be6ffe086eb0ac12d5896..182cef0a2af6f7a6faedc7c7eb400cdc055d520e 100644 (file)
@@ -73,7 +73,6 @@ struct cso_hash_data {
    struct cso_node *fakeNext;
    struct cso_node **buckets;
    int size;
-   int nodeSize;
    short userNumBits;
    short numBits;
    int numBuckets;