Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1743990imw; Sat, 9 Jul 2022 10:37:03 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tq6G9rEhvTOTQj79UBvSSRBd9yfRWXwjFiWXGoMyH9LBRyVyc1bBUOvcBj0h0LkzEcphlk X-Received: by 2002:a05:6402:42c3:b0:43a:46f6:ebd2 with SMTP id i3-20020a05640242c300b0043a46f6ebd2mr13070518edc.213.1657388223168; Sat, 09 Jul 2022 10:37:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657388223; cv=none; d=google.com; s=arc-20160816; b=tl7pdBf4sCLoGhGKu8t6xuodduoSSV5XdfSVCFs6Ksb9YKP5wXv8RAF/YCPMH1zK65 AhIsdw2HdJUtSM54bPFp0wkvFMTxhXs/dfuMAoF0x1a071vASGXOaokv5qIoVAVIXTVJ aMWggqWpW1Tor9pICsEtnZNV0QJj+Gs9xWB90gLdGtZ+C+dI17yxFAEru1WpKRWqv0BM w6L6/O3vgABiHqHWVIQVA4spUreVzeP7wT7513bs2ZZYX4lDzUzoKNP9sqOhE54w2upH WkG6wkZ33VpdzrjhnFxO9ISVT5rkRyoJSlmCsP20atsIw4prmaqrBxwIFTIte/CSeNHL aOzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=YCyWpvEys6j5qyvWXAyA6fXE3qrdo0/6Nr7BAYI8vQU=; b=UCyw/7fiC7chr4KwTatwc9/1Xzjf7VlAnYZLe4BtAg0Lft0l6JAVC1Sw8I2inqjJxr 5TjQdJndEKDjAlBcr9GszybsHgcsnEi11TRfJitjjiGb01tOouWyUX24bHi0YkL6C2CN hsK7pQ+oH+Nx09eu/FDbgs895ci8A+wY4Qg5ddxE3GmR7MmkWUnsbNBEF7gGKkYzJI/E WaQV0qHISdTQeAPDjVPvfEnwKM4pHtJZ7iGAsCE185VdKf4hdG0SX6SVIXX+lu3gZIrQ cMT26hXf9sqMXb1aghIX1404287OCKlNnpVdDP/jLrTCIA81Qxa4sy6p+WzPQE93y075 NQ3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 12-20020a508e0c000000b0043a1aeabcc1si2952522edw.542.2022.07.09.10.36.38; Sat, 09 Jul 2022 10:37:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229718AbiGIRKf (ORCPT + 99 others); Sat, 9 Jul 2022 13:10:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229625AbiGIRKW (ORCPT ); Sat, 9 Jul 2022 13:10:22 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 050A2120BA for ; Sat, 9 Jul 2022 10:10:21 -0700 (PDT) Received: from dslb-188-096-144-007.188.096.pools.vodafone-ip.de ([188.96.144.7] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1oADyE-0005n0-5a; Sat, 09 Jul 2022 19:10:18 +0200 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 07/14] staging: r8188eu: use memcpy for fallback mac address Date: Sat, 9 Jul 2022 19:09:53 +0200 Message-Id: <20220709171000.180481-8-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220709171000.180481-1-martin@kaiser.cx> References: <20220709171000.180481-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use memcpy to store the fallback mac address in eeprom->mac_addr. Do not copy byte by byte. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/hal/usb_halinit.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c index 258ab963cf8a..5151cded145b 100644 --- a/drivers/staging/r8188eu/hal/usb_halinit.c +++ b/drivers/staging/r8188eu/hal/usb_halinit.c @@ -912,13 +912,11 @@ unsigned int rtl8188eu_inirp_init(struct adapter *Adapter) static void Hal_EfuseParseMACAddr_8188EU(struct adapter *adapt, u8 *hwinfo, bool AutoLoadFail) { - u16 i; u8 sMacAddr[6] = {0x00, 0xE0, 0x4C, 0x81, 0x88, 0x02}; struct eeprom_priv *eeprom = &adapt->eeprompriv; if (AutoLoadFail) { - for (i = 0; i < 6; i++) - eeprom->mac_addr[i] = sMacAddr[i]; + memcpy(eeprom->mac_addr, sMacAddr, ETH_ALEN); } else { /* Read Permanent MAC address */ memcpy(eeprom->mac_addr, &hwinfo[EEPROM_MAC_ADDR_88EU], ETH_ALEN); -- 2.30.2