[PATCH 09/12] staging: ks7010: replace MichaelBlockFunction macro with inline function

Dan Carpenter dan.carpenter at oracle.com
Fri Mar 23 10:56:23 UTC 2018


On Fri, Mar 23, 2018 at 11:14:59AM +0100, Sergio Paracuellos wrote:
> On Fri, Mar 23, 2018 at 10:49 AM, Dan Carpenter
> <dan.carpenter at oracle.com> wrote:
> > On Thu, Mar 22, 2018 at 08:19:20PM +0100, Sergio Paracuellos wrote:
> >> This commit replaces MichaelBlockFunction macro with similar inline function
> >> renaming it to michael_block.
> >>
> >> Signed-off-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
> >> ---
> >>  drivers/staging/ks7010/michael_mic.c | 30 +++++++++++++++---------------
> >>  1 file changed, 15 insertions(+), 15 deletions(-)
> >>
> >> diff --git a/drivers/staging/ks7010/michael_mic.c b/drivers/staging/ks7010/michael_mic.c
> >> index 6829cb5..07913d0 100644
> >> --- a/drivers/staging/ks7010/michael_mic.c
> >> +++ b/drivers/staging/ks7010/michael_mic.c
> >> @@ -48,17 +48,17 @@ static void michael_init(struct michael_mic_t *mic, uint8_t *key)
> >>       michael_clear(mic);
> >>  }
> >>
> >> -#define MichaelBlockFunction(L, R)                           \
> >> -do {                                                         \
> >> -     R ^= rol32(L, 17);                                      \
> >> +     *l ^= rol32(*l, 17);
> >
> > It feels like this should be:
> >
> >         *r ^= rol32(*l, 17);
> >
> > right?
> 
> True. Thanks for catching this. Should I resend v2 or whole patch
> series or only for this patch?
>

I don't know?  I think Greg prefers if you resend the whole thing.

regards,
dan carpenter



More information about the devel mailing list