util: revert back to ALIGN since it moved to util
authorRohan Garg <rohan.garg@intel.com>
Fri, 2 Dec 2022 17:32:26 +0000 (23:02 +0530)
committerMarge Bot <emma+marge@anholt.net>
Thu, 25 May 2023 21:24:45 +0000 (21:24 +0000)
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20153>

src/util/blob.c

index a42e4a4..7f11790 100644 (file)
@@ -85,7 +85,7 @@ grow_to_fit(struct blob *blob, size_t additional)
 bool
 blob_align(struct blob *blob, size_t alignment)
 {
-   const size_t new_size = align64(blob->size, alignment);
+   const size_t new_size = ALIGN(blob->size, alignment);
 
    if (blob->size < new_size) {
       if (!grow_to_fit(blob, new_size - blob->size))
@@ -102,7 +102,7 @@ blob_align(struct blob *blob, size_t alignment)
 void
 blob_reader_align(struct blob_reader *blob, size_t alignment)
 {
-   blob->current = blob->data + align64(blob->current - blob->data, alignment);
+   blob->current = blob->data + ALIGN(blob->current - blob->data, alignment);
 }
 
 void
@@ -212,7 +212,7 @@ BLOB_WRITE_TYPE(blob_write_uint64, uint64_t)
 BLOB_WRITE_TYPE(blob_write_intptr, intptr_t)
 
 #define ASSERT_ALIGNED(_offset, _align) \
-   assert(align64((_offset), (_align)) == (_offset))
+   assert(ALIGN((_offset), (_align)) == (_offset))
 
 bool
 blob_overwrite_uint8 (struct blob *blob,