From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C216AC43603 for ; Fri, 20 Dec 2019 17:45:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 97566206CB for ; Fri, 20 Dec 2019 17:45:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sbiLKIjo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727432AbfLTRpA (ORCPT ); Fri, 20 Dec 2019 12:45:00 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:54356 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727388AbfLTRpA (ORCPT ); Fri, 20 Dec 2019 12:45:00 -0500 Received: by mail-wm1-f66.google.com with SMTP id b19so9757960wmj.4 for ; Fri, 20 Dec 2019 09:44:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Vb72jc4spAcABwLaDNL79fswtIsTkbWjFqxfZ/KoMkQ=; b=sbiLKIjoBcIPp6lfdCUskCN7rdWS5ztUieDzd5hGCa43P6jDxZRKu/2VB4JjQp9fVv 5ipiNrhR2ruTMTgIxzvyVQjCpK8kngCih3h1WZcvdZUxmdYoVwdWLuLg8jW2PMdM6MfW bERjEraoO7LAhdGBDaogKaO0v3ftBxYc1j9Rn+yeAnMdM/Tq9YIskDox2i40bI9O5n8J yt6NPD2X3le9L6KopHwuS5nKvGoHjZnnmSMunaQ9w+HSSewc9RhkJMDyIucnLCYY+YzL +bSwUY9/fXkbpP6U0T+YO6mSB9o10qjqDWqepqez56HVJu4vATttHZfXxP7/khnVcJ/T Mjrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Vb72jc4spAcABwLaDNL79fswtIsTkbWjFqxfZ/KoMkQ=; b=QfECuAa4+mAGecz4AItLbyOSzQWHh5SoOtIeilE9M6J9BCI5nCyydf3LOdRySYN6NR 4tHfU9Um03ridUL5eDOzkUOYGOZRAiqU0ohTNW+Sk3HhXW9NoOhQsDU8BGPla+sB8jcL oGroMGrURfRH/ur/eFelc5s26nLZ1f1HjH3WoV2eO0QlmGDsAA5mjfg3mdcXkK32TZ3s EqUijs5PxJoXMH2MjTGayisbfKLlFRQ1M9Zl6m9wxEe4Mv5OsZ8Z4BP7YF5dNWenCW4J H5y1ABy1pd/54KXfIzXHTdgXGZljbXJZdgboma6FfBqhb7EfU5HppJWrmKWKYo55Vxti 3zjg== X-Gm-Message-State: APjAAAXYCd/TRYVIEm9Iuwgsa9h1WXi5PPBoapJ+vLkHzjfRlaQVsjhN +YDn3XsiUvL96m/sWafbFZI= X-Google-Smtp-Source: APXvYqxrHraXo73B9lFeIY5XoWKQTek2jE0WVcL0zSjObjZUUXEqjBNuXikx/k4BRqrNKhXKKYAEyw== X-Received: by 2002:a1c:1f51:: with SMTP id f78mr16881907wmf.60.1576863897866; Fri, 20 Dec 2019 09:44:57 -0800 (PST) Received: from localhost.localdomain (dslb-092-073-054-252.092.073.pools.vodafone-ip.de. [92.73.54.252]) by smtp.gmail.com with ESMTPSA id b68sm10715536wme.6.2019.12.20.09.44.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 09:44:57 -0800 (PST) From: Michael Straube To: gregkh@linuxfoundation.org Cc: Larry.Finger@lwfinger.net, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH] staging: rtl8188eu: use break to exit while loop Date: Fri, 20 Dec 2019 18:44:13 +0100 Message-Id: <20191220174413.13913-1-straube.linux@gmail.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The variable bContinual in Efuse_PgPacketRead() is only used to break out of a while loop. Remove the variable and use break instead. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_efuse.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index d9b0f9e6235c..0b86ae8338d9 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -402,7 +402,6 @@ static u16 Efuse_GetCurrentSize(struct adapter *pAdapter) int Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data) { u8 ReadState = PG_STATE_HEADER; - int bContinual = true; int bDataEmpty = true; u8 efuse_data, word_cnts = 0; u16 efuse_addr = 0; @@ -422,7 +421,7 @@ int Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data) /* Efuse has been pre-programmed dummy 5Bytes at the end of Efuse by CP. */ /* Skip dummy parts to prevent unexpected data read from Efuse. */ /* By pass right now. 2009.02.19. */ - while (bContinual && AVAILABLE_EFUSE_ADDR(efuse_addr)) { + while (AVAILABLE_EFUSE_ADDR(efuse_addr)) { /* Header Read ------------- */ if (ReadState & PG_STATE_HEADER) { if (efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data) && (efuse_data != 0xFF)) { @@ -464,7 +463,7 @@ int Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data) ReadState = PG_STATE_HEADER; } } else { - bContinual = false; + break; } } else if (ReadState & PG_STATE_DATA) { /* Data section Read ------------- */ -- 2.24.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A9D6C2D0D2 for ; Fri, 20 Dec 2019 17:45:02 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 61ABF206CB for ; Fri, 20 Dec 2019 17:45:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sbiLKIjo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 61ABF206CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 34B102043F; Fri, 20 Dec 2019 17:45:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XsFIgmp-rhw0; Fri, 20 Dec 2019 17:45:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 662832049D; Fri, 20 Dec 2019 17:45:01 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 88D0E1BF2B6 for ; Fri, 20 Dec 2019 17:45:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 6EF2B888E2 for ; Fri, 20 Dec 2019 17:45:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XNrOrDaKJs2L for ; Fri, 20 Dec 2019 17:44:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by hemlock.osuosl.org (Postfix) with ESMTPS id 771EC888DB for ; Fri, 20 Dec 2019 17:44:59 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id d73so9782849wmd.1 for ; Fri, 20 Dec 2019 09:44:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Vb72jc4spAcABwLaDNL79fswtIsTkbWjFqxfZ/KoMkQ=; b=sbiLKIjoBcIPp6lfdCUskCN7rdWS5ztUieDzd5hGCa43P6jDxZRKu/2VB4JjQp9fVv 5ipiNrhR2ruTMTgIxzvyVQjCpK8kngCih3h1WZcvdZUxmdYoVwdWLuLg8jW2PMdM6MfW bERjEraoO7LAhdGBDaogKaO0v3ftBxYc1j9Rn+yeAnMdM/Tq9YIskDox2i40bI9O5n8J yt6NPD2X3le9L6KopHwuS5nKvGoHjZnnmSMunaQ9w+HSSewc9RhkJMDyIucnLCYY+YzL +bSwUY9/fXkbpP6U0T+YO6mSB9o10qjqDWqepqez56HVJu4vATttHZfXxP7/khnVcJ/T Mjrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Vb72jc4spAcABwLaDNL79fswtIsTkbWjFqxfZ/KoMkQ=; b=Pr54ApRXsn2y31rB5aOlIyGcVI/3eYydAJy0UQ5bLUuNAPTMXbz13kklxD+zr16hJ8 PblZ/Wz4BTHu5DXTYJK+EMYy4bQ7agITGKU+PsvozxEpNdzo7G/iuFFtRi0p3C4mpbf6 EJShu7jKvTQw6kxNO+SXx/YH+q1TEafm8BIhr1pSTgQ2+w3R56bJjTG+E0qGGymNXuQ2 jMRxvvQLvzEJpKUIQOuV8WULHl5ulnu5npKRJsbXQUYvvmOd7bNURS9iiAMHS5uDZy5J /gm2MPKexI/CRKpAueFNo3fdycithJo0xTKn8bAGrXGUNIJPVEZkxYXn5/cGb1IWAVh4 GIVw== X-Gm-Message-State: APjAAAWTBYh1GUlopJ6aVztZTC3fXfdH5whz1HZTUXf2suvwhriraU6r OCC3GZtqSDmjuIGon3c4k2Q= X-Google-Smtp-Source: APXvYqxrHraXo73B9lFeIY5XoWKQTek2jE0WVcL0zSjObjZUUXEqjBNuXikx/k4BRqrNKhXKKYAEyw== X-Received: by 2002:a1c:1f51:: with SMTP id f78mr16881907wmf.60.1576863897866; Fri, 20 Dec 2019 09:44:57 -0800 (PST) Received: from localhost.localdomain (dslb-092-073-054-252.092.073.pools.vodafone-ip.de. [92.73.54.252]) by smtp.gmail.com with ESMTPSA id b68sm10715536wme.6.2019.12.20.09.44.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 09:44:57 -0800 (PST) From: Michael Straube To: gregkh@linuxfoundation.org Subject: [PATCH] staging: rtl8188eu: use break to exit while loop Date: Fri, 20 Dec 2019 18:44:13 +0100 Message-Id: <20191220174413.13913-1-straube.linux@gmail.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Larry.Finger@lwfinger.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" The variable bContinual in Efuse_PgPacketRead() is only used to break out of a while loop. Remove the variable and use break instead. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_efuse.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index d9b0f9e6235c..0b86ae8338d9 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -402,7 +402,6 @@ static u16 Efuse_GetCurrentSize(struct adapter *pAdapter) int Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data) { u8 ReadState = PG_STATE_HEADER; - int bContinual = true; int bDataEmpty = true; u8 efuse_data, word_cnts = 0; u16 efuse_addr = 0; @@ -422,7 +421,7 @@ int Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data) /* Efuse has been pre-programmed dummy 5Bytes at the end of Efuse by CP. */ /* Skip dummy parts to prevent unexpected data read from Efuse. */ /* By pass right now. 2009.02.19. */ - while (bContinual && AVAILABLE_EFUSE_ADDR(efuse_addr)) { + while (AVAILABLE_EFUSE_ADDR(efuse_addr)) { /* Header Read ------------- */ if (ReadState & PG_STATE_HEADER) { if (efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data) && (efuse_data != 0xFF)) { @@ -464,7 +463,7 @@ int Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data) ReadState = PG_STATE_HEADER; } } else { - bContinual = false; + break; } } else if (ReadState & PG_STATE_DATA) { /* Data section Read ------------- */ -- 2.24.0 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel