Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8058858ybi; Tue, 23 Jul 2019 02:07:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjtxJ91SI/OcOGBtfaoLfEh1Ill4/aPgZwuodCth7yQZuNb95/dA3CB6lVHd41smmbQ0+E X-Received: by 2002:a63:4c17:: with SMTP id z23mr36995716pga.167.1563872858570; Tue, 23 Jul 2019 02:07:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563872858; cv=none; d=google.com; s=arc-20160816; b=WsoeExZGpRZR0uwJRYuv6wEK5V8vqYSK/tk9tY1eF95WogZYxP4PSWWwQQjEYy5yQB VCCNvsmRLlHD+mFDQ41Jr74mGoUkx7Wp1yJiYbK6AZcuR2Iw2xjSvKKvpXLlFV7POM/x llw5h4Gbs0pZ7bgVW0eN0aBclj7SUnOz8qFxREgZolnSshE7LIADXj9EZBgs3+YNbEFY hJ5/t30W7bhGOTjz4KBw5C3TAYb8TGAP0OU0h7a2l4sifV0hmmYsNSu+UgxbrmhO5Ck7 BtuXX4ypqpbZUO3/JgqGVlbjOPcKSpOrt0l6lKaTd/f6GXQMveKcZH5pQsZ2T7X24vny ypxg== 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=0d1KOuIEFnf1KFCnr4djXsFhQxtzBMVUUZ05z+W/5jo=; b=kRyMXqbb2KXbpCxmBHh/UGtUSZ2Cg9wcFeHNJwVbZFtuP14ErAi8cD4auh2I90D2MQ Kj84O8stV7NuIV+SyV22f+7JgRdkmG6OVODK+puckbYIoDlFEgv/Slw1PE9kmsmizwp2 3+RqMsraVvYqDvFz6info8d1bnQw1Rh5DImYXJADU8bhe8cjGM0QjxnAQT7JX2fuqjBj KpKh7+MDmauajaO/Q5F866sHywMyufahFS1/ao8d83VZm8VhnEqxosZOKr9aJUhGADxz jxfcYPDTkaer+duuDfwD1pDe+S+AOfzcmWTSSSrifzMya2rW3f4eAJa9VPImw4Thzbf9 S8Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fMxJbXGS; 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; 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 j18si13558770pjn.42.2019.07.23.02.07.22; Tue, 23 Jul 2019 02:07:38 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fMxJbXGS; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729683AbfGWCQk (ORCPT + 99 others); Mon, 22 Jul 2019 22:16:40 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:42275 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726825AbfGWCQj (ORCPT ); Mon, 22 Jul 2019 22:16:39 -0400 Received: by mail-ed1-f66.google.com with SMTP id v15so42351266eds.9; Mon, 22 Jul 2019 19:16:38 -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=0d1KOuIEFnf1KFCnr4djXsFhQxtzBMVUUZ05z+W/5jo=; b=fMxJbXGSICZlJtOwdqceWfojiNmjnRgT5K43L+Zm5AQhz/7xvxndUvQkWy3Hw5n2yC WnbX36qnW5HcnoafAekJ3rVs/H92XUHH8eM0dkSgfNS/6dEmXtPzRzWjPdAYGpipf/7w eB1zipAXEkUgnnxJtBd5/0X3bOZ4ZC8lnwoIBOiiCLT/ECjy4HA1Aj1T1OH7mfNLp7H0 +kYqY3ojl3sTigxtk8gDlOuLOakd2zsB1ei5dfMJ2nfo4hZGjpTTWHo+a1dX4Pha5HUp WKD1rNoh00njvz9fQVmjM7HWtvUowpkMnQWxrOyqOG/rIZOb24qplrsXB9+WePQTIwFy OOSg== 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=0d1KOuIEFnf1KFCnr4djXsFhQxtzBMVUUZ05z+W/5jo=; b=eo2PDrwwt+I5LsZBipDIJP6LXGhvBSFDC6NtfKNo/h1RAJWW3z3SpIJ+Ih4xfKIbKz eZKdZzO4H3mrCDiiRV2+hYxUno6fymUr76eABPogknf/CgXN4RfYDrQMp+1XY4qLoU65 M4nR5FZxq0ZKgnSFdnY6bTAdGG6FhZP0p6itCWUpZ+TagpcagPu2o96kopkXtd9+Qpgk 2zG5E+rFx5U3gAys9U561b1jGzOfrJ2R7E6Ex2i+2yocr21+Ru3/HNbL3ow1GCBLx6xg 2DYtnimw1aqHOdKYhB5OZsvXRkorvZduzWqzRS8yql2X4ub6L+RWKBLNgD3H5tTVWEJj AAXA== X-Gm-Message-State: APjAAAWcmEEDjjWlWJZ4xE2Z7QyEqnVwEZMySk07SRUZXOh7i8rbCC84 58i0+A7sPjzN1l0jGaE5J1MlWBRnzImOP7CugrO4uFZrvzo= X-Received: by 2002:aa7:ca41:: with SMTP id j1mr64655205edt.149.1563848198072; Mon, 22 Jul 2019 19:16:38 -0700 (PDT) MIME-Version: 1.0 References: <20190722074133.17777-1-hslester96@gmail.com> <20190722.182235.195933962601112626.davem@davemloft.net> In-Reply-To: <20190722.182235.195933962601112626.davem@davemloft.net> From: Chuhong Yuan Date: Tue, 23 Jul 2019 10:16:27 +0800 Message-ID: Subject: Re: [PATCH] net: usb: Merge cpu_to_le32s + memcpy to put_unaligned_le32 To: David Miller Cc: Woojung Huh , Microchip Linux Driver Support , Steve Glendinning , linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org David Miller =E4=BA=8E2019=E5=B9=B47=E6=9C=8823=E6=97= =A5=E5=91=A8=E4=BA=8C =E4=B8=8A=E5=8D=889:22=E5=86=99=E9=81=93=EF=BC=9A > > 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. Usages of get_unaligned_le32: asix_common.c: line 104 and 133 ax88179_178a.c: https://lkml.org/lkml/2019/7/19/652 lan78xx.c: https://lkml.org/lkml/2019/7/19/573 smsc75xx.c: https://lkml.org/lkml/2019/7/19/617 sr9800.c: line 73