Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756770AbbDOVIs (ORCPT ); Wed, 15 Apr 2015 17:08:48 -0400 Received: from mail-la0-f41.google.com ([209.85.215.41]:33896 "EHLO mail-la0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754572AbbDOVIl (ORCPT ); Wed, 15 Apr 2015 17:08:41 -0400 Message-ID: <552ED354.7000004@gmail.com> Date: Wed, 15 Apr 2015 23:08:36 +0200 From: Mateusz Kulikowski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Dan Carpenter CC: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 10/21] staging: rtl8192e: replace memcpy() -> ether_addr_copy_unaligned() References: <1428961664-4241-1-git-send-email-mateusz.kulikowski@gmail.com> <1428961664-4241-11-git-send-email-mateusz.kulikowski@gmail.com> <20150414080011.GD10964@mwanda> In-Reply-To: <20150414080011.GD10964@mwanda> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1279 Lines: 27 On 14.04.2015 10:00, Dan Carpenter wrote: > BAReq->addr1 is part of struct rtllib_hdr_2addr. It's 4 bytes into > the struct so it's fine. You're right - should I explicitly add __aligned() in such places or just leave comment in that case (for future commiters)? > I sort of like the ether_addr_copy_unaligned() macro because it would > let us silence some checkpatch false positives because otherwise people > will eventually introduce bugs like a dripping roof leak will eventually > destroy a building. But it should be in the main kernel header with a > name like that. And also this is misleading that we are using it for > data which is aligned. Is it ok if I do following steps for v3: - Align eth addresses that can be aligned (at least one structure - rtllib_rxb can't be aligned) - Apply eth_addr_copy where possible - Discuss and try to submit ether_addr_copy_unaligned on netdev list - If they reject the change - rename macro to something less confusing (rtllib_something) Regards and thanks for reviews, Mateusz -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/