All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: outreachy-kernel@googlegroups.com
Cc: Vaishali Thakkar <vthakkar1994@gmail.com>,
	Jes Sorensen <jes.sorensen@gmail.com>
Subject: Re: [Outreachy kernel] [PATCH] Staging: rtl8188eu: Use put_unaligned_le16
Date: Wed, 18 Feb 2015 11:50:03 +0100	[thread overview]
Message-ID: <57794805.aPSQI7lfOj@wuerfel> (raw)
In-Reply-To: <CAK-LDbLbpQ0d7eyGbYfJPLWGASC9CJLfebpY+QwYeVFrdFssMg@mail.gmail.com>

On Wednesday 18 February 2015 07:02:34 Vaishali Thakkar wrote:
> On Wed, Feb 18, 2015 at 12:42 AM, Jes Sorensen <jes.sorensen@gmail.com> wrote:
> > On 02/17/15 05:11, Vaishali Thakkar wrote:
> > Your use of put_unaligned_le16() if good, the main issue is the above
> > assignment as you mention. Since you got rid of the tim_bitmap_le =
> > portion, the *dst_ie++ = is going to assigning random garbage since
> > tim_bitmap_le is not set.
> >
> > One way to solve the problem would be to make that line say
> >
> >                 if (tim_ielen == 4) {
> > -                       *dst_ie++ = *(u8 *)&tim_bitmap_le;
> > +                       *dst_ie++ = pstapriv->tim_bitmap & 0xff;
> >                 } else if (tim_ielen == 5) {
> > -                       memcpy(dst_ie, &tim_bitmap_le, 2);
> > +                       put_unaligned_le16(pstapriv->tim_bitmap, dst_ie);
> >
> > and hopefully eliminate the tim_bitmap_le variable completely.
> 
> Yes. This makes sense. And as there is only one use of tim_bitmap_le
> variable this will eliminate it completely. Should I go for v2 now, with this
> change?? I have one more such case in rtl8723au driver also. I think now
> I can go for it also.

Yes, please submit the change for both drivers as separate patches.

	Arnd


  reply	other threads:[~2015-02-18 10:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-17  4:42 [PATCH] Staging: rtl8188eu: Use put_unaligned_le16 Vaishali Thakkar
2015-02-17  9:02 ` [Outreachy kernel] " Arnd Bergmann
2015-02-17 10:11   ` Vaishali Thakkar
2015-02-17 19:12     ` Jes Sorensen
2015-02-18  1:32       ` Vaishali Thakkar
2015-02-18 10:50         ` Arnd Bergmann [this message]
2015-02-18 17:10           ` Jes Sorensen
2015-02-18 18:08             ` Vaishali Thakkar
2015-02-18 22:31               ` Jes Sorensen
2015-02-19  3:05                 ` Vaishali Thakkar
2015-02-19  8:28                   ` Arnd Bergmann
2015-02-19  8:43                     ` Vaishali Thakkar
2015-02-20 12:01                       ` Jes Sorensen

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=57794805.aPSQI7lfOj@wuerfel \
    --to=arnd@arndb.de \
    --cc=jes.sorensen@gmail.com \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=vthakkar1994@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.