diff options
author | Sergio Paracuellos <sergio.paracuellos@gmail.com> | 2018-03-28 17:24:20 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-29 11:49:11 +0200 |
commit | ca0bda153137cc23204d2a7f47e952c0f41d7b1a (patch) | |
tree | 182de406bba590f5b179fbdba880d9a6782fadf5 /drivers/staging/ks7010 | |
parent | 79955850b18081e58a17ecf44e03fae2d0e3628d (diff) |
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: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ks7010')
-rw-r--r-- | drivers/staging/ks7010/michael_mic.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/ks7010/michael_mic.c b/drivers/staging/ks7010/michael_mic.c index 276ecd91f572..af36b12dcf3b 100644 --- a/drivers/staging/ks7010/michael_mic.c +++ b/drivers/staging/ks7010/michael_mic.c @@ -28,12 +28,12 @@ do { \ } while (0) // Reset the state to the empty message. -#define MichaelClear(A) \ -do { \ - A->l = A->k0; \ - A->r = A->k1; \ - A->m_bytes = 0; \ -} while (0) +static inline void michael_clear(struct michael_mic_t *mic) +{ + mic->l = mic->k0; + mic->r = mic->k1; + mic->m_bytes = 0; +} 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); //clear(); - MichaelClear(mic); + michael_clear(mic); } #define MichaelBlockFunction(L, R) \ @@ -118,7 +118,7 @@ void MichaelGetMIC(struct michael_mic_t *Mic, uint8_t *dst) putUInt32(dst, 4, Mic->r); // Reset to the empty message. - MichaelClear(Mic); + michael_clear(Mic); } void michael_mic_function(struct michael_mic_t *mic, u8 *key, |