min, max macros has been implemented on its own module. This patch
unifies this kind of macros by moving it to common.h.
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+#define min(x, y) ((x) > (y) ? (y) : (x))
+#define max(x, y) ((x) > (y) ? (x) : (y))
+
#endif
#include "fabrics.h"
-#define min(x, y) ((x) > (y) ? (y) : (x))
-#define max(x, y) ((x) > (y) ? (x) : (y))
-
static struct stat nvme_stat;
const char *devicename;
#include "linux/nvme_ioctl.h"
+#include "common.h"
#include "nvme.h"
#include "nvme-print.h"
#include "nvme-ioctl.h"
}u;
};
-#define max(x,y) (x) > (y) ? (x) : (y)
-#define min(x,y) (x) > (y) ? (y) : (x)
-
static void print_intel_nlog(struct intel_vu_nlog *intel_nlog)
{
printf("Version Major %u\n"
#include <sys/ioctl.h>
#define CREATE_CMD
+#include "common.h"
#include "micron-nvme.h"
-#define min(x, y) ((x) > (y) ? (y) : (x))
-
static int micron_fw_commit(int fd, int select)
{
#include "linux/nvme_ioctl.h"
+#include "common.h"
#include "nvme.h"
#include "nvme-print.h"
#include "nvme-ioctl.h"
#define WDC_DE_DESTN_SPI 1
#define WDC_DE_DUMPTRACE_DESTINATION 6
-#define min(x, y) ((x) > (y) ? (y) : (x))
-
typedef enum _NVME_FEATURES_SELECT
{
FS_CURRENT = 0,