From nobody Sun May 10 23:27:33 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B89CC433F5 for ; Thu, 21 Apr 2022 09:21:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387564AbiDUJX6 (ORCPT ); Thu, 21 Apr 2022 05:23:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387593AbiDUJXu (ORCPT ); Thu, 21 Apr 2022 05:23:50 -0400 Received: from mail.meizu.com (edge07.meizu.com [112.91.151.210]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B2A524BE5 for ; Thu, 21 Apr 2022 02:20:54 -0700 (PDT) Received: from IT-EXMB-1-125.meizu.com (172.16.1.125) by mz-mail11.meizu.com (172.16.1.15) with Microsoft SMTP Server (TLS) id 14.3.487.0; Thu, 21 Apr 2022 17:20:46 +0800 Received: from meizu.meizu.com (172.16.137.70) by IT-EXMB-1-125.meizu.com (172.16.1.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Thu, 21 Apr 2022 17:20:44 +0800 From: Haowen Bai To: Larry Finger , Phillip Potter , Greg Kroah-Hartman CC: Haowen Bai , , Subject: [PATCH] staging: r8188eu: Drop redundant memset Date: Thu, 21 Apr 2022 17:20:43 +0800 Message-ID: <1650532843-28132-1-git-send-email-baihaowen@meizu.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [172.16.137.70] X-ClientProxiedBy: IT-EXMB-1-126.meizu.com (172.16.1.126) To IT-EXMB-1-125.meizu.com (172.16.1.125) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The region set by the call to memset is immediately overwritten by the subsequent call to memcpy. So we drop redundant memset. Signed-off-by: Haowen Bai --- drivers/staging/r8188eu/os_dep/mlme_linux.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/r8188eu/os_dep/mlme_linux.c b/drivers/staging/= r8188eu/os_dep/mlme_linux.c index 72ad9700130e..899d8e9c3834 100644 --- a/drivers/staging/r8188eu/os_dep/mlme_linux.c +++ b/drivers/staging/r8188eu/os_dep/mlme_linux.c @@ -66,7 +66,6 @@ void rtw_reset_securitypriv(struct adapter *adapter) /* We have to backup the PMK information for WiFi PMK Caching test item= . */ /* Backup the btkip_countermeasure information. */ /* When the countermeasure is trigger, the driver have to disconnect wi= th AP for 60 seconds. */ - memset(&backup_pmkid[0], 0x00, sizeof(struct rt_pmkid_list) * NUM_PMKID_= CACHE); memcpy(&backup_pmkid[0], &adapter->securitypriv.PMKIDList[0], sizeof(str= uct rt_pmkid_list) * NUM_PMKID_CACHE); backup_index =3D adapter->securitypriv.PMKIDIndex; backup_counter =3D adapter->securitypriv.btkip_countermeasure; --=20 2.7.4