mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Straube <straube.linux@gmail.com>
To: Joe Perches <joe@perches.com>, gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] staging: r8188eu: use round_up() instead of RND4()
Date: Wed, 6 Apr 2022 16:56:37 +0200	[thread overview]
Message-ID: <9d80845a-0ccb-b94f-a9c2-84559dcc0adc@gmail.com> (raw)
In-Reply-To: <e56d9ca89544ad015c6cfabaf2859027c0dd50e5.camel@perches.com>

On 4/6/22 11:54, Joe Perches wrote:
> 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...

Sounds reasonable, I'll send v2 soon.

Thanks,
Michael


  reply	other threads:[~2022-04-06 16:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06  6:18 [PATCH 0/5] staging: r8188eu: use round_up() Michael Straube
2022-04-06  6:18 ` [PATCH 1/5] staging: r8188eu: use round_up() instead of RND4() Michael Straube
2022-04-06  9:54   ` Joe Perches
2022-04-06 14:56     ` Michael Straube [this message]
2022-04-06  6:18 ` [PATCH 2/5] staging: r8188eu: use round_up() instead of _RND4() Michael Straube
2022-04-06  6:18 ` [PATCH 3/5] staging: r8188eu: use round_up() instead of _RND8() Michael Straube
2022-04-06  6:18 ` [PATCH 4/5] staging: r8188eu: use round_up() instead of _RND128() Michael Straube
2022-04-06  6:18 ` [PATCH 5/5] staging: r8188eu: remove unused _RND* from osdep_service.h Michael Straube

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9d80845a-0ccb-b94f-a9c2-84559dcc0adc@gmail.com \
    --to=straube.linux@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=phil@philpotter.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®