linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuhong Yuan <hslester96@gmail.com>
To: Ajay Singh <Ajay.Kathat@microchip.com>
Cc: Adham Abozaeid <Adham.Abozaeid@microchip.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: wilc1000: Merge memcpy + le32_to_cpus to get_unaligned_le32
Date: Fri, 19 Jul 2019 19:46:32 +0800	[thread overview]
Message-ID: <CANhBUQ3knUV44GiaB-xZMD8F6y8dcZQdznSmpk3E9ZKoakkBRQ@mail.gmail.com> (raw)
In-Reply-To: <8c14743d-efe1-3e3a-0419-bde22f848751@microchip.com>

<Ajay.Kathat@microchip.com> 于2019年7月19日周五 下午7:34写道:
>
> On 7/19/2019 1:40 PM, Chuhong Yuan wrote:
> >
> > Merge the combo use of memcpy and le32_to_cpus.
> > Use get_unaligned_le32 instead.
> > This simplifies the code.
> >
> > Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
> > ---
> >  drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> > index d72fdd333050..12fb4add05ec 100644
> > --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> > +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> > @@ -1038,8 +1038,7 @@ void wilc_wfi_p2p_rx(struct wilc_vif *vif, u8 *buff, u32 size)
> >       s32 freq;
> >       __le16 fc;
> >
> > -     memcpy(&header, (buff - HOST_HDR_OFFSET), HOST_HDR_OFFSET);
> > -     le32_to_cpus(&header);
> > +     header = get_unaligned_le32(buff - HOST_HDR_OFFSET);
> >       pkt_offset = GET_PKT_OFFSET(header);
> >
> >       if (pkt_offset & IS_MANAGMEMENT_CALLBACK) {
> >
>
> Thanks for sending the patches.
>
> The code change looks okay to me. Just a minor comment, avoid the use of
> same subject line for different patches.

These two patches are in the same subsystem and solve the same problem.
I splitted them into two patches by mistake since I did not notice the problems
in the second patch when I sent the first one.
Should I merge the two patches and resend?

>
> Regards,
> Ajay

  reply	other threads:[~2019-07-19 11:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-19  8:10 [PATCH] staging: wilc1000: Merge memcpy + le32_to_cpus to get_unaligned_le32 Chuhong Yuan
2019-07-19 11:34 ` Ajay.Kathat
2019-07-19 11:46   ` Chuhong Yuan [this message]
2019-07-19 12:05     ` Ajay.Kathat
2019-07-19 14:01       ` Dan Carpenter
2019-07-19 14:04         ` Dan Carpenter
2019-07-19  8:55 Chuhong Yuan

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=CANhBUQ3knUV44GiaB-xZMD8F6y8dcZQdznSmpk3E9ZKoakkBRQ@mail.gmail.com \
    --to=hslester96@gmail.com \
    --cc=Adham.Abozaeid@microchip.com \
    --cc=Ajay.Kathat@microchip.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).