diff options
author | Alejandro Colomar <alx.manpages@gmail.com> | 2021-11-19 19:20:56 +0100 |
---|---|---|
committer | Alejandro Colomar <alx.manpages@gmail.com> | 2021-11-20 17:04:28 +0100 |
commit | 10d8caa490ac80a2e204a7ee1b8b49ec7252ebca (patch) | |
tree | e2e462ff0088f096ddf74d0e983373c059cc628a | |
parent | 26bc41c0ad6477f8166aa99fd8b21ceb78b0bc97 (diff) |
arch/x86/: Don't redefine ARRAY_SIZE()
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rw-r--r-- | arch/x86/boot/boot.h | 4 | ||||
-rw-r--r-- | arch/x86/tools/relocs.h | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h index 34c9dbb6a47d..79ecdec0c684 100644 --- a/arch/x86/boot/boot.h +++ b/arch/x86/boot/boot.h @@ -18,6 +18,8 @@ #ifndef __ASSEMBLY__ + +#include <linux/array_size.h> #include <linux/stdarg.h> #include <linux/types.h> #include <linux/edd.h> @@ -27,8 +29,6 @@ #include "ctype.h" #include "cpuflags.h" -/* Useful macros */ -#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x))) extern struct setup_header hdr; extern struct boot_params boot_params; diff --git a/arch/x86/tools/relocs.h b/arch/x86/tools/relocs.h index 4c49c82446eb..6be1642da275 100644 --- a/arch/x86/tools/relocs.h +++ b/arch/x86/tools/relocs.h @@ -2,6 +2,8 @@ #ifndef RELOCS_H #define RELOCS_H + +#include <linux/array_size.h> #include <stdio.h> #include <stdarg.h> #include <stdlib.h> @@ -17,11 +19,10 @@ #include <regex.h> #include <tools/le_byteshift.h> + __attribute__((__format__(printf, 1, 2))) void die(char *fmt, ...) __attribute__((noreturn)); -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) - enum symtype { S_ABS, S_REL, |