[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e56d9ca89544ad015c6cfabaf2859027c0dd50e5.camel@perches.com>
Date: Wed, 06 Apr 2022 02:54:30 -0700
From: Joe Perches <joe@...ches.com>
To: Michael Straube <straube.linux@...il.com>,
gregkh@...uxfoundation.org
Cc: Larry.Finger@...inger.net, phil@...lpotter.co.uk,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] staging: r8188eu: use round_up() instead of RND4()
On Wed, 2022-04-06 at 08:18 +0200, Michael Straube wrote:
> Use in-kernel round_up() instead of custom RND4().
[]
> diff --git a/drivers/staging/r8188eu/core/rtw_security.c b/drivers/staging/r8188eu/core/rtw_security.c
[]
> @@ -63,7 +63,7 @@ void rtw_wep_encrypt(struct adapter *padapter, struct xmit_frame *pxmitframe)
> arc4_crypt(ctx, payload + length, crc.f1, 4);
>
> pframe += pxmitpriv->frag_len;
> - pframe = (u8 *)RND4((size_t)(pframe));
> + pframe = (u8 *)round_up((size_t)pframe, 4);
Perhaps use PTR_ALIGN
pframe = PTR_ALIGN(pframe, 4);
etc...
Powered by blists - more mailing lists