Re: [PATCH] bitfield: use BUILD_BUG_ON_ZERO()

From: kbuild test robot
Date: Fri Oct 12 2018 - 21:30:56 EST


Hi Johannes,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.19-rc7 next-20181012]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Johannes-Berg/bitfield-use-BUILD_BUG_ON_ZERO/20181013-081047
config: i386-randconfig-x0-10130855 (attached as .config)
compiler: gcc-5 (Debian 5.5.0-3) 5.4.1 20171010
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All warnings (new ones prefixed by >>):

In file included from include/linux/kernel.h:15:0,
from drivers/crypto/ccree/cc_driver.c:4:
drivers/crypto/ccree/cc_hw_queue_defs.h: In function 'set_din_type':
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
>> drivers/crypto/ccree/cc_hw_queue_defs.h:226:20: note: in expansion of macro 'FIELD_PREP'
pdesc->word[5] |= FIELD_PREP(WORD5_DIN_ADDR_HIGH, ((u16)(addr >> 32)));
^
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:228:20: note: in expansion of macro 'FIELD_PREP'
pdesc->word[1] |= FIELD_PREP(WORD1_DIN_DMA_MODE, dma_mode) |
^
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:229:5: note: in expansion of macro 'FIELD_PREP'
FIELD_PREP(WORD1_DIN_SIZE, size) |
^
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:230:5: note: in expansion of macro 'FIELD_PREP'
FIELD_PREP(WORD1_NS_BIT, axi_sec);
^
drivers/crypto/ccree/cc_hw_queue_defs.h: In function 'set_din_no_dma':
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:244:20: note: in expansion of macro 'FIELD_PREP'
pdesc->word[1] |= FIELD_PREP(WORD1_DIN_SIZE, size);
^
drivers/crypto/ccree/cc_hw_queue_defs.h: In function 'set_din_sram':
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:260:20: note: in expansion of macro 'FIELD_PREP'
pdesc->word[1] |= FIELD_PREP(WORD1_DIN_SIZE, size) |
^
drivers/crypto/ccree/cc_hw_queue_defs.h: In function 'set_din_const':
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:276:4: note: in expansion of macro 'FIELD_PREP'
FIELD_PREP(WORD1_DIN_SIZE, size);
^
drivers/crypto/ccree/cc_hw_queue_defs.h: In function 'set_dout_type':
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:304:20: note: in expansion of macro 'FIELD_PREP'
pdesc->word[5] |= FIELD_PREP(WORD5_DOUT_ADDR_HIGH, ((u16)(addr >> 32)));
^
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:306:20: note: in expansion of macro 'FIELD_PREP'
--
In file included from include/asm-generic/atomic-instrumented.h:16:0,
from arch/x86/include/asm/atomic.h:265,
from include/linux/atomic.h:7,
from include/linux/crypto.h:20,
from include/crypto/aead.h:16,
from include/crypto/internal/aead.h:16,
from drivers/crypto/ccree/cc_buffer_mgr.c:4:
drivers/crypto/ccree/cc_hw_queue_defs.h: In function 'set_din_type':
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
>> drivers/crypto/ccree/cc_hw_queue_defs.h:226:20: note: in expansion of macro 'FIELD_PREP'
pdesc->word[5] |= FIELD_PREP(WORD5_DIN_ADDR_HIGH, ((u16)(addr >> 32)));
^
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:228:20: note: in expansion of macro 'FIELD_PREP'
pdesc->word[1] |= FIELD_PREP(WORD1_DIN_DMA_MODE, dma_mode) |
^
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:229:5: note: in expansion of macro 'FIELD_PREP'
FIELD_PREP(WORD1_DIN_SIZE, size) |
^
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:230:5: note: in expansion of macro 'FIELD_PREP'
FIELD_PREP(WORD1_NS_BIT, axi_sec);
^
drivers/crypto/ccree/cc_hw_queue_defs.h: In function 'set_din_no_dma':
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:244:20: note: in expansion of macro 'FIELD_PREP'
pdesc->word[1] |= FIELD_PREP(WORD1_DIN_SIZE, size);
^
drivers/crypto/ccree/cc_hw_queue_defs.h: In function 'set_din_sram':
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:260:20: note: in expansion of macro 'FIELD_PREP'
pdesc->word[1] |= FIELD_PREP(WORD1_DIN_SIZE, size) |
^
drivers/crypto/ccree/cc_hw_queue_defs.h: In function 'set_din_const':
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:276:4: note: in expansion of macro 'FIELD_PREP'
FIELD_PREP(WORD1_DIN_SIZE, size);
^
drivers/crypto/ccree/cc_hw_queue_defs.h: In function 'set_dout_type':
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:304:20: note: in expansion of macro 'FIELD_PREP'
pdesc->word[5] |= FIELD_PREP(WORD5_DOUT_ADDR_HIGH, ((u16)(addr >> 32)));
^
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:306:20: note: in expansion of macro 'FIELD_PREP'
--
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:455:20: note: in expansion of macro 'FIELD_PREP'
pdesc->word[4] |= FIELD_PREP(WORD4_CIPHER_MODE, mode);
^
drivers/crypto/ccree/cc_hw_queue_defs.h: In function 'set_cipher_config0':
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:467:20: note: in expansion of macro 'FIELD_PREP'
pdesc->word[4] |= FIELD_PREP(WORD4_CIPHER_CONF0, mode);
^
drivers/crypto/ccree/cc_hw_queue_defs.h: In function 'set_cipher_config1':
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:479:20: note: in expansion of macro 'FIELD_PREP'
pdesc->word[4] |= FIELD_PREP(WORD4_CIPHER_CONF1, config);
^
drivers/crypto/ccree/cc_hw_queue_defs.h: In function 'set_hw_crypto_key':
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:493:4: note: in expansion of macro 'FIELD_PREP'
FIELD_PREP(WORD4_CIPHER_CONF2,
^
drivers/crypto/ccree/cc_hw_queue_defs.h: In function 'set_bytes_swap':
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:505:20: note: in expansion of macro 'FIELD_PREP'
pdesc->word[4] |= FIELD_PREP(WORD4_BYTES_SWAP, config);
^
drivers/crypto/ccree/cc_hw_queue_defs.h: In function 'set_key_size':
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:526:20: note: in expansion of macro 'FIELD_PREP'
pdesc->word[4] |= FIELD_PREP(WORD4_KEY_SIZE, size);
^
drivers/crypto/ccree/cc_hw_queue_defs.h: In function 'set_setup_mode':
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_hw_queue_defs.h:560:20: note: in expansion of macro 'FIELD_PREP'
pdesc->word[4] |= FIELD_PREP(WORD4_SETUP_OPERATION, mode);
^
drivers/crypto/ccree/cc_lli_defs.h: In function 'cc_lli_set_addr':
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
>> drivers/crypto/ccree/cc_lli_defs.h:49:29: note: in expansion of macro 'FIELD_PREP'
lli_p[LLI_WORD1_OFFSET] |= FIELD_PREP(LLI_HADDR_MASK, (addr >> 32));
^
drivers/crypto/ccree/cc_lli_defs.h: In function 'cc_lli_set_size':
include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
^
include/linux/bitfield.h:57:2: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO(__builtin_constant_p(_val) ? \
^
include/linux/bitfield.h:82:3: note: in expansion of macro '__BF_FIELD_CHECK'
(__BF_FIELD_CHECK(_mask, 0ULL, _val) + \
^
drivers/crypto/ccree/cc_lli_defs.h:56:29: note: in expansion of macro 'FIELD_PREP'
lli_p[LLI_WORD1_OFFSET] |= FIELD_PREP(LLI_SIZE_MASK, size);
^
..

vim +/FIELD_PREP +226 drivers/crypto/ccree/cc_hw_queue_defs.h

4c3f9727 Gilad Ben-Yossef 2018-01-22 210
4c3f9727 Gilad Ben-Yossef 2018-01-22 211 /*
4c3f9727 Gilad Ben-Yossef 2018-01-22 212 * Set the DIN field of a HW descriptors
4c3f9727 Gilad Ben-Yossef 2018-01-22 213 *
4c3f9727 Gilad Ben-Yossef 2018-01-22 214 * @pdesc: pointer HW descriptor struct
4c3f9727 Gilad Ben-Yossef 2018-01-22 215 * @dma_mode: dmaMode The DMA mode: NO_DMA, SRAM, DLLI, MLLI, CONSTANT
4c3f9727 Gilad Ben-Yossef 2018-01-22 216 * @addr: dinAdr DIN address
4c3f9727 Gilad Ben-Yossef 2018-01-22 217 * @size: Data size in bytes
4c3f9727 Gilad Ben-Yossef 2018-01-22 218 * @axi_sec: AXI secure bit
4c3f9727 Gilad Ben-Yossef 2018-01-22 219 */
4c3f9727 Gilad Ben-Yossef 2018-01-22 220 static inline void set_din_type(struct cc_hw_desc *pdesc,
4c3f9727 Gilad Ben-Yossef 2018-01-22 221 enum cc_dma_mode dma_mode, dma_addr_t addr,
4c3f9727 Gilad Ben-Yossef 2018-01-22 222 u32 size, enum cc_axi_sec axi_sec)
4c3f9727 Gilad Ben-Yossef 2018-01-22 223 {
4c3f9727 Gilad Ben-Yossef 2018-01-22 224 pdesc->word[0] = (u32)addr;
4c3f9727 Gilad Ben-Yossef 2018-01-22 225 #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
4c3f9727 Gilad Ben-Yossef 2018-01-22 @226 pdesc->word[5] |= FIELD_PREP(WORD5_DIN_ADDR_HIGH, ((u16)(addr >> 32)));
4c3f9727 Gilad Ben-Yossef 2018-01-22 227 #endif
4c3f9727 Gilad Ben-Yossef 2018-01-22 228 pdesc->word[1] |= FIELD_PREP(WORD1_DIN_DMA_MODE, dma_mode) |
4c3f9727 Gilad Ben-Yossef 2018-01-22 229 FIELD_PREP(WORD1_DIN_SIZE, size) |
4c3f9727 Gilad Ben-Yossef 2018-01-22 230 FIELD_PREP(WORD1_NS_BIT, axi_sec);
4c3f9727 Gilad Ben-Yossef 2018-01-22 231 }
4c3f9727 Gilad Ben-Yossef 2018-01-22 232

:::::: The code at line 226 was first introduced by commit
:::::: 4c3f97276e156820a0433bf7b59a4df1100829ae crypto: ccree - introduce CryptoCell driver

:::::: TO: Gilad Ben-Yossef <gilad@xxxxxxxxxxxxx>
:::::: CC: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip