Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3528700ybi; Fri, 19 Jul 2019 04:47:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwRArcAY2gY3H+l/vqqkMDD24nUoxbzMnyIXu1iiqvrXKfwc9sUmtXXaNJucwaBO36NX6OP X-Received: by 2002:a63:9c5:: with SMTP id 188mr21627219pgj.2.1563536868559; Fri, 19 Jul 2019 04:47:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563536868; cv=none; d=google.com; s=arc-20160816; b=UtaGmmgQy+IE7C+15KF0TSYBpSCND3PR/UrOVMUR+VfmVXkzYbL1WYbNfCLSX9cXgS 0OJS4+CJV4Epd39ONir30uMWTpq1y9+IGeayYADI68TlgcfWxMhpRrCYq95RnMCjPysn ttdC7/LzKUx0JAylN21kcKwFLApYrP96AYYmIybPBXcYC8zF1Kxhu8pBZk3dQ6QwacMC KMo2sHV9DLawZ0AxNprFKHwjyAR06bI0sBU/FaAJeM5jZ4Mt+kedoP0EhKKww/iRFqZ4 6Mozl3eTisuQAJ2i4GTB3/Tw7Q8jCvSymToo1JgyYakFhM0sU9HD9rYaNlTMkVHgVOOx FDgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=RjARzg5zR4sNqCAhyFcjLu7rxBT3p+rIlkvUc8rVhiQ=; b=THqrimYmejMTzovK2MPHTNwMvDw5FV9rXmN9NXIpvMMM+ltARjml8+xcYSI/m2JTq3 3Cb2SNn22Q87p0zArkOCAE0eLuB5qxI0xaVAjM6Fps8acjVN3JmwwTkZPtZ/mTAjCUEO NIAqJne7YQ0tXw/K+oZwiFPjOPTjwU7trYdjTvpUo4P/SpVEWKRv6uxIi1thDOxAnw0w Me55qA4d1XqF/kBOAljyYhuncT1Jqo9/gUd5dCoHdTyjYIJpOBxLCW7eu6pDaGZlPT3V e1RuWTHRf/28A7srz+RbnlUgwj5TH0hui6MQm/V0lNthuOP8HsIjbN3+fQxEORlOMons 22cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VY1552WQ; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w33si636407pga.431.2019.07.19.04.47.28; Fri, 19 Jul 2019 04:47:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VY1552WQ; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727994AbfGSLqq (ORCPT + 99 others); Fri, 19 Jul 2019 07:46:46 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:33933 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726072AbfGSLqp (ORCPT ); Fri, 19 Jul 2019 07:46:45 -0400 Received: by mail-ed1-f66.google.com with SMTP id s49so34273567edb.1; Fri, 19 Jul 2019 04:46:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=RjARzg5zR4sNqCAhyFcjLu7rxBT3p+rIlkvUc8rVhiQ=; b=VY1552WQZvzoYZD3sBE9lelYE1UUAT8pSls5ltVkFgiiKPvJwyyr/CO1R//xyW5lYd fTZcrayyM/nu1HzDZjL/0MXfoZdJ3H/rcaUM+/jNFaLvURUH4S0NwgaS3Ad/DiofeqY+ aQB36SR+ZQgIq4t4blzSKClgCK6ORqPlKjQPe6rYFVaqPOCZ3sv/wRXxz0BEy9Dm/WuW O4p0f+hcDiooDtPMrDzM3iwfJXpVRYxjDjMgWSly++3KQQBmYvHrAoNg4xwJGhvBfUlj UTiuQfj7I3D+s+bgBUCpz7wQNB+nbhEZZqwHiC1dQEzji06qmcnbJSPNAhbuLOs0w/lB oNow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=RjARzg5zR4sNqCAhyFcjLu7rxBT3p+rIlkvUc8rVhiQ=; b=NhMubGH1t4WjUtMYJQxl9mDoTU8+ItVYHbnQjD+u2CWYi7hiruhFqfVwn50d3a/Xc8 Bip/C090SAfI9Momw6Vex6irAf/Dpq42Yf26yoXXnHxaVPcr5Lx69ZGSNr2oIZkufOtI cqnMTj56GTAm3OIxxHSfbjBgrJdg4PTh5vk6vGsPxpgxU2BsHnklQhTY6PBu76WDSjFK xKo0HWYob4QRR2cGyQi92sdAFGSrAbJDg6IO7P4Af4qcLGJgrEavk3C66pohsjkL51Rf 6cei/P8TgbAgjR7Rh9rQhLhj4znDi9g23PcSVpR60XTsOgGOkI7VtTJFpt5QVNCUlzFh ONVw== X-Gm-Message-State: APjAAAWRwa5Ai5j9WoLhVIYgeXr4MRz5LGmJwZvN5glXBk0BuX2cHv4S k/yaHxZFjHTwUDOvYHP59Q+27hfsi7GT+q4C4KwarXmr X-Received: by 2002:a05:6402:896:: with SMTP id e22mr42009941edy.202.1563536804148; Fri, 19 Jul 2019 04:46:44 -0700 (PDT) MIME-Version: 1.0 References: <20190719081005.4598-1-hslester96@gmail.com> <8c14743d-efe1-3e3a-0419-bde22f848751@microchip.com> In-Reply-To: <8c14743d-efe1-3e3a-0419-bde22f848751@microchip.com> From: Chuhong Yuan Date: Fri, 19 Jul 2019 19:46:32 +0800 Message-ID: Subject: Re: [PATCH] staging: wilc1000: Merge memcpy + le32_to_cpus to get_unaligned_le32 To: Ajay Singh Cc: Adham Abozaeid , Greg Kroah-Hartman , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org =E4=BA=8E2019=E5=B9=B47=E6=9C=8819=E6=97=A5=E5= =91=A8=E4=BA=94 =E4=B8=8B=E5=8D=887:34=E5=86=99=E9=81=93=EF=BC=9A > > 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 > > --- > > 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/driver= s/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 *bu= ff, u32 size) > > s32 freq; > > __le16 fc; > > > > - memcpy(&header, (buff - HOST_HDR_OFFSET), HOST_HDR_OFFSET); > > - le32_to_cpus(&header); > > + header =3D get_unaligned_le32(buff - HOST_HDR_OFFSET); > > pkt_offset =3D 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 prob= lems in the second patch when I sent the first one. Should I merge the two patches and resend? > > Regards, > Ajay