Remove the remain MIN/MAX like macro

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-02-03 00:05:40 +08:00 committed by archer
parent d423992988
commit 09841300b0
3 changed files with 5 additions and 11 deletions

View File

@ -29,17 +29,12 @@
#include <nuttx/nuttx.h>
#include <debug.h>
#include <sys/param.h>
#include <alsa/asoundlib.h>
#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;
}

View File

@ -24,6 +24,7 @@
#include <nuttx/config.h>
#include <sys/param.h>
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
@ -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 *****************************************************/

View File

@ -26,6 +26,7 @@
#include <debug.h>
#include <endian.h>
#include <inttypes.h>
#include <sys/param.h>
#include <nuttx/crc32.h>
#include <nuttx/kmalloc.h>
@ -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