Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8081848ybi; Tue, 23 Jul 2019 02:32:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIsdDjb00sVKK91zaj/fR0dTCc2S2VWqOfYCofDPnITM9XroNvSmhPte6UTiRNk+RB+1Bn X-Received: by 2002:a17:90a:eb08:: with SMTP id j8mr45315759pjz.72.1563874337335; Tue, 23 Jul 2019 02:32:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563874337; cv=none; d=google.com; s=arc-20160816; b=W9xOGKdL3fY4YLzfJ0p2vicU01QIv7wdTip4HX5o2DKvTWaKBiABCGv9kx0swFkatM 3P5gaqAiNeUx377qdP+iQ5bMVcXJk4IrwCYCan5ebk5hDOHaA1ZirzuvTFPuO5cgnhWp muB+klrZ+ljo/m2xlRWJUWVbSA5I1bSjFkFpOoalS+ybRNaSr7JM+xxX2n++qW0imU6o gtibYO9nl4Wh5rK6hGrjBG69bMXm+NYFZh2fsXb34til0VxGGIhjR2kGgYPoyTyrEkxM syket95Dn0ZpFyfG0sw5rL1ED52rTL1Ac0ZvHWJhHm/+T/jdhBuOREFwEbR59XBIxH+F ilbw== 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:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=AeV7t9AOFqV0url9L32rw+j4xq02ueQFkL5ERM493hA=; b=x5/VB9jXDzGEwn5E4husqy1A9XtFw9Fu55V4za48gtGhzCKi97o2zmLwmO/Y81g88Q FlaCU8NYMhcgou/4eyPi46PIwAr4P9Hr7kwu44daxOfLAhTJfigCNvHf+Ng4ECIvQp3f opGlKFVRSSf2+AvnQzlt7TvucXvtdVKJvB0Bj/mGsDxbnmujpvli6lfYLeOoubuqGq+r 0cSNIohSK0Tb7ouFkDrRHRcbKSGknSVmmSsN4uSsp/2NCGxWAfiQqTIzL8vN6nE3FRHa SXb2KhD8qprMrc/0T4cv1FQ5ukVGACjxh6pxsMp0J4pyK6NmiKBjicK7cAzJmVuB6Yh5 d3sw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s7si14270444plp.66.2019.07.23.02.32.01; Tue, 23 Jul 2019 02:32:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731478AbfGWDnw (ORCPT + 99 others); Mon, 22 Jul 2019 23:43:52 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:53582 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730677AbfGWDnw (ORCPT ); Mon, 22 Jul 2019 23:43:52 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 599CC15310D30; Mon, 22 Jul 2019 20:43:51 -0700 (PDT) Date: Mon, 22 Jul 2019 20:43:48 -0700 (PDT) Message-Id: <20190722.204348.1777955613668064779.davem@davemloft.net> To: hslester96@gmail.com Cc: woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, steve.glendinning@shawell.net, linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: usb: Merge cpu_to_le32s + memcpy to put_unaligned_le32 From: David Miller In-Reply-To: References: <20190722074133.17777-1-hslester96@gmail.com> <20190722.182235.195933962601112626.davem@davemloft.net> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 22 Jul 2019 20:43:51 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chuhong Yuan Date: Tue, 23 Jul 2019 10:16:27 +0800 > David Miller 于2019年7月23日周二 上午9:22写道: >> >> From: Chuhong Yuan >> Date: Mon, 22 Jul 2019 15:41:34 +0800 >> >> > Merge the combo uses of cpu_to_le32s and memcpy. >> > Use put_unaligned_le32 instead. >> > This simplifies the code. >> > >> > Signed-off-by: Chuhong Yuan >> >> Isn't the skb->data aligned to 4 bytes in these situations? >> >> If so, we should use the aligned variants. >> >> Thank you. > > I have checked the five changed files. > I find that they all have used get_unaligned_le32 for skb->data > according to my previous applied patches and existing code. > So I think the skb->data is unaligned in these situations. Thank you for checking. Patch applied to net-next.