Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6bef3f01 authored by Bing Sun's avatar Bing Sun Committed by Greg Kroah-Hartman
Browse files

Staging: ks7010: michael_mic: fixed macros coding style issue



Fixed coding style issue:
Enclose multiple statements macros definition in a do while loop.
Use one space around binary operators.

Signed-off-by: default avatarBing Sun <sunbing@redflag-linux.com>
Reviewed-by: default avatarWolfram Sang <wsa@the-dreams.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 695872ea
Loading
Loading
Loading
Loading
+13 −7
Original line number Original line Diff line number Diff line
@@ -20,15 +20,21 @@
#define getUInt32( A, B ) 	(uint32_t)(A[B+0] << 0) + (A[B+1] << 8) + (A[B+2] << 16) + (A[B+3] << 24)
#define getUInt32( A, B ) 	(uint32_t)(A[B+0] << 0) + (A[B+1] << 8) + (A[B+2] << 16) + (A[B+3] << 24)


// Convert from UInt32 to Byte[] in a portable way
// Convert from UInt32 to Byte[] in a portable way
#define putUInt32( A, B, C ) 	A[B+0] = (uint8_t) (C & 0xff);		\
#define putUInt32(A, B, C)					\
do {								\
	A[B + 0] = (uint8_t)(C & 0xff);				\
	A[B + 1] = (uint8_t)((C >> 8) & 0xff);			\
	A[B + 1] = (uint8_t)((C >> 8) & 0xff);			\
	A[B + 2] = (uint8_t)((C >> 16) & 0xff);			\
	A[B + 2] = (uint8_t)((C >> 16) & 0xff);			\
				A[B+3] = (uint8_t) ((C>>24) & 0xff)
	A[B + 3] = (uint8_t)((C >> 24) & 0xff);			\
} while (0)


// Reset the state to the empty message.
// Reset the state to the empty message.
#define MichaelClear( A ) 	A->L = A->K0; \
#define MichaelClear(A)			\
do {					\
	A->L = A->K0;			\
	A->R = A->K1;			\
	A->R = A->K1;			\
				A->nBytesInM = 0;
	A->nBytesInM = 0;		\
} while (0)


static
static
void MichaelInitializeFunction(struct michel_mic_t *Mic, uint8_t * key)
void MichaelInitializeFunction(struct michel_mic_t *Mic, uint8_t * key)