From db95dfe2523439fcae2d56b75ff68a631cfa6a25 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 17 Aug 2020 16:09:36 -0700 Subject: [PATCH] freedreno: Reuse u_math.h instead of open coding ALIGN/ARRAY_SIZE. Part-of: --- src/freedreno/decode/redump.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/freedreno/decode/redump.h b/src/freedreno/decode/redump.h index c7121e8650d..5c4b8f0a41b 100644 --- a/src/freedreno/decode/redump.h +++ b/src/freedreno/decode/redump.h @@ -24,6 +24,8 @@ #ifndef REDUMP_H_ #define REDUMP_H_ +#include "util/u_math.h" + enum rd_sect_type { RD_NONE, RD_TEST, /* ascii text */ @@ -79,12 +81,6 @@ void rd_write_section(enum rd_sect_type type, const void *buf, int sz) rd_write_section(t, b, s); \ } while (0) -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) -#endif -#undef ALIGN -#define ALIGN(v, a) (((v) + (a)-1) & ~((a)-1)) - #define min(a, b) (((a) < (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b))