Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754694AbbHPBhq (ORCPT ); Sat, 15 Aug 2015 21:37:46 -0400 Received: from mail-oi0-f43.google.com ([209.85.218.43]:34373 "EHLO mail-oi0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752207AbbHPBfE (ORCPT ); Sat, 15 Aug 2015 21:35:04 -0400 From: =?UTF-8?q?Rapha=C3=ABl=20Beamonte?= To: Greg Kroah-Hartman Cc: =?UTF-8?q?Rapha=C3=ABl=20Beamonte?= , Antoine Schweitzer-Chaput , Cristina Opriceana , Greg Donald , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 19/20] staging: rtl8192u: r8192U_core: fix use ether_addr_copy() over memcpy() code style issue Date: Sat, 15 Aug 2015 21:34:15 -0400 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 982 Lines: 28 Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) Signed-off-by: Raphaƫl Beamonte --- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 0048cff..28074ca 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -3469,7 +3469,7 @@ static int r8192_set_mac_adr(struct net_device *dev, void *mac) down(&priv->wx_sem); - memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN); + ether_addr_copy(dev->dev_addr, addr->sa_data); schedule_work(&priv->reset_wq); up(&priv->wx_sem); -- 2.1.4 -- 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/