From 589dad39971df59a76a303a38950167106f7d1cc Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 18 Feb 2019 22:18:06 +0000 Subject: [PATCH] scst: Rework the scst_data_direction enum Since there is no relationship between enum dma_data_direction and the SCST data direction enum, introduce a new enumeration type for the SCST data direction. This patch does not change any functionality. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7961 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst.h | 2 -- scst/include/scst_const.h | 12 +++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scst/include/scst.h b/scst/include/scst.h index 68027ec4b..ecaf73e14 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -759,8 +759,6 @@ struct scst_opcode_descriptor; */ #define NO_SUCH_LUN ((uint64_t)-1) -typedef enum dma_data_direction scst_data_direction; - /* * SCST target template: defines target driver's parameters and callback * functions. diff --git a/scst/include/scst_const.h b/scst/include/scst_const.h index cb0caa2ea..a232de5e9 100644 --- a/scst/include/scst_const.h +++ b/scst/include/scst_const.h @@ -239,11 +239,13 @@ enum scst_cdb_flags { ** Data direction aliases. Changing it don't forget to change ** scst_to_tgt_dma_dir and SCST_DATA_DIR_MAX as well!! *************************************************************/ -#define SCST_DATA_UNKNOWN 0 -#define SCST_DATA_WRITE 1 -#define SCST_DATA_READ 2 -#define SCST_DATA_BIDI (SCST_DATA_WRITE | SCST_DATA_READ) -#define SCST_DATA_NONE 4 +typedef enum scst_data_direction { + SCST_DATA_UNKNOWN = 0, + SCST_DATA_WRITE = 1, + SCST_DATA_READ = 2, + SCST_DATA_BIDI = (SCST_DATA_WRITE | SCST_DATA_READ), + SCST_DATA_NONE = 4, +} scst_data_direction; #define SCST_DATA_DIR_MAX (SCST_DATA_NONE+1)