mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-18 05:06:31 +00:00
mpt: Avoid that checkpatch complains about stm_[gs]et_dma_addr()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5205 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
+16
-12
@@ -251,22 +251,26 @@ typedef struct _MPT_STM_PRIV {
|
||||
#define MPT_STM_SIMPLE SGESimple64_t
|
||||
#define MPT_STM_CHAIN SGEChain64_t
|
||||
#define MPI_SGE_FLAGS_MPT_STM_ADDRESSING MPI_SGE_FLAGS_64_BIT_ADDRESSING
|
||||
#define stm_get_dma_addr(x, y) \
|
||||
x = le32_to_cpu(y.Low); \
|
||||
if (sizeof(dma_addr_t) == sizeof(u64)) \
|
||||
x |= (u64)le32_to_cpu(y.High)<<32;
|
||||
#define stm_set_dma_addr(x, y) \
|
||||
x.Low = cpu_to_le32(y); \
|
||||
if (sizeof(dma_addr_t) == sizeof(u64)) \
|
||||
x.High = cpu_to_le32((u64)y>>32); \
|
||||
else \
|
||||
x.High = 0;
|
||||
#define stm_get_dma_addr(x, y) \
|
||||
do { \
|
||||
(x) = le32_to_cpu((y).Low); \
|
||||
if (sizeof(dma_addr_t) == sizeof(u64)) \
|
||||
(x) |= (u64)le32_to_cpu((y).High)<<32; \
|
||||
} while (0)
|
||||
#define stm_set_dma_addr(x, y) \
|
||||
do { \
|
||||
(x).Low = cpu_to_le32((y)); \
|
||||
if (sizeof(dma_addr_t) == sizeof(u64)) \
|
||||
(x).High = cpu_to_le32((u64)(y)>>32); \
|
||||
else \
|
||||
(x).High = 0; \
|
||||
} while (0)
|
||||
#else
|
||||
#define MPT_STM_SIMPLE SGESimple32_t
|
||||
#define MPT_STM_CHAIN SGEChain32_t
|
||||
#define MPI_SGE_FLAGS_MPT_STM_ADDRESSING MPI_SGE_FLAGS_32_BIT_ADDRESSING
|
||||
#define stm_get_dma_addr(x, y) x = le32_to_cpu(y);
|
||||
#define stm_set_dma_addr(x, y) x = cpu_to_le32(y);
|
||||
#define stm_get_dma_addr(x, y) ((x) = le32_to_cpu((y)))
|
||||
#define stm_set_dma_addr(x, y) ((x) = cpu_to_le32((y)))
|
||||
#endif
|
||||
|
||||
#ifndef MPT_MAX_ADAPTERS
|
||||
|
||||
Reference in New Issue
Block a user