提交 ca0bda15 编写于 作者: S Sergio Paracuellos 提交者: Greg Kroah-Hartman

staging: ks7010: replace macro MichaelClear with inline function

This commit replaces MichaelClear macro with similar inline function
renaming it to michael_clear.
Signed-off-by: NSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 79955850
...@@ -28,12 +28,12 @@ do { \ ...@@ -28,12 +28,12 @@ do { \
} while (0) } while (0)
// Reset the state to the empty message. // Reset the state to the empty message.
#define MichaelClear(A) \ static inline void michael_clear(struct michael_mic_t *mic)
do { \ {
A->l = A->k0; \ mic->l = mic->k0;
A->r = A->k1; \ mic->r = mic->k1;
A->m_bytes = 0; \ mic->m_bytes = 0;
} while (0) }
static void michael_init(struct michael_mic_t *mic, uint8_t *key) static void michael_init(struct michael_mic_t *mic, uint8_t *key)
{ {
...@@ -42,7 +42,7 @@ static void michael_init(struct michael_mic_t *mic, uint8_t *key) ...@@ -42,7 +42,7 @@ static void michael_init(struct michael_mic_t *mic, uint8_t *key)
mic->k1 = getUInt32(key, 4); mic->k1 = getUInt32(key, 4);
//clear(); //clear();
MichaelClear(mic); michael_clear(mic);
} }
#define MichaelBlockFunction(L, R) \ #define MichaelBlockFunction(L, R) \
...@@ -118,7 +118,7 @@ void MichaelGetMIC(struct michael_mic_t *Mic, uint8_t *dst) ...@@ -118,7 +118,7 @@ void MichaelGetMIC(struct michael_mic_t *Mic, uint8_t *dst)
putUInt32(dst, 4, Mic->r); putUInt32(dst, 4, Mic->r);
// Reset to the empty message. // Reset to the empty message.
MichaelClear(Mic); michael_clear(Mic);
} }
void michael_mic_function(struct michael_mic_t *mic, u8 *key, void michael_mic_function(struct michael_mic_t *mic, u8 *key,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册