diff --git a/arch/sim/src/sim/posix/sim_alsa.c b/arch/sim/src/sim/posix/sim_alsa.c index 60212ca82c0..558b8789e4b 100644 --- a/arch/sim/src/sim/posix/sim_alsa.c +++ b/arch/sim/src/sim/posix/sim_alsa.c @@ -29,17 +29,12 @@ #include #include +#include #include #include "sim_offload.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define AUDMIN(a,b) ((a) > (b) ? (b) : (a)) - /**************************************************************************** * Private Types ****************************************************************************/ @@ -707,7 +702,7 @@ static void sim_audio_process(struct sim_audio_s *priv) else { expect = priv->playback ? apb->nbytes / priv->frame_size - : AUDMIN(apb->nmaxbytes, priv->buffer_size) + : MIN(apb->nmaxbytes, priv->buffer_size) / priv->frame_size; } diff --git a/drivers/lcd/ssd1351.c b/drivers/lcd/ssd1351.c index aff32527683..c5e8f542dc0 100644 --- a/drivers/lcd/ssd1351.c +++ b/drivers/lcd/ssd1351.c @@ -24,6 +24,7 @@ #include +#include #include #include #include @@ -105,9 +106,7 @@ /* Macro Helpers ************************************************************/ -#define SSD1351_MAX(a, b) ((a) > (b) ? (a) : (b)) -#define SSD1351_MIN(a, b) ((a) < (b) ? (a) : (b)) -#define SSD1351_CLAMP(n, a, b) SSD1351_MIN(SSD1351_MAX(n, a), b) +#define SSD1351_CLAMP(n, a, b) MIN(MAX(n, a), b) /* Fundamental Commands *****************************************************/ diff --git a/fs/partition/fs_gpt.c b/fs/partition/fs_gpt.c index 8b0b3843966..acce18c4040 100644 --- a/fs/partition/fs_gpt.c +++ b/fs/partition/fs_gpt.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -40,7 +41,6 @@ #define GPT_HEADER_SIGNATURE 0x5452415020494645ull #define GPT_PARTNAME_MAX_SIZE (72 / sizeof(uint16_t)) #define GPT_LBA_TO_BLOCK(lba, blk) ((le64toh(lba) * 512 + (blk) -1) / (blk)) -#define GPT_MIN(x, y) (((x) < (y)) ? (x) : (y)) /**************************************************************************** * Private Types