public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Martin Kaiser <martin@kaiser.cx>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>,
	Michael Straube <straube.linux@gmail.com>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Martin Kaiser <martin@kaiser.cx>
Subject: [PATCH 05/15] staging: r8188eu: rtl8188e_EfuseGetCurrentSize is now unused
Date: Sat, 13 Nov 2021 19:55:08 +0100	[thread overview]
Message-ID: <20211113185518.23941-6-martin@kaiser.cx> (raw)
In-Reply-To: <20211113185518.23941-1-martin@kaiser.cx>

After we removed efuse write support, rtl8188e_EfuseGetCurrentSize is no
longer needed. Remove this function and its internal helpers.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 .../staging/r8188eu/hal/rtl8188e_hal_init.c   | 62 -------------------
 drivers/staging/r8188eu/include/hal_intf.h    |  1 -
 2 files changed, 63 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index d658f3f5df32..8205f6237520 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -903,68 +903,6 @@ void rtl8188e_EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 type, void *
 	Hal_EFUSEGetEfuseDefinition88E(pAdapter, type, pOut);
 }
 
-static u16 hal_EfuseGetCurrentSize_8188e(struct adapter *pAdapter, bool bPseudoTest)
-{
-	int	bContinual = true;
-	u16	efuse_addr = 0;
-	u8 hworden = 0;
-	u8 efuse_data, word_cnts = 0;
-
-	if (bPseudoTest)
-		efuse_addr = (u16)(fakeEfuseUsedBytes);
-	else
-		GetHwReg8188EU(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&efuse_addr);
-
-	while (bContinual &&
-	       efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data, bPseudoTest) &&
-	       AVAILABLE_EFUSE_ADDR(efuse_addr)) {
-		if (efuse_data != 0xFF) {
-			if ((efuse_data & 0x1F) == 0x0F) {		/* extended header */
-				efuse_addr++;
-				efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data, bPseudoTest);
-				if ((efuse_data & 0x0F) == 0x0F) {
-					efuse_addr++;
-					continue;
-				} else {
-					hworden = efuse_data & 0x0F;
-				}
-			} else {
-				hworden =  efuse_data & 0x0F;
-			}
-			word_cnts = Efuse_CalculateWordCnts(hworden);
-			/* read next header */
-			efuse_addr = efuse_addr + (word_cnts * 2) + 1;
-		} else {
-			bContinual = false;
-		}
-	}
-
-	if (bPseudoTest)
-		fakeEfuseUsedBytes = efuse_addr;
-	else
-		SetHwReg8188EU(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&efuse_addr);
-
-	return efuse_addr;
-}
-
-static u16 Hal_EfuseGetCurrentSize_Pseudo(struct adapter *pAdapter, bool bPseudoTest)
-{
-	u16	ret = 0;
-
-	ret = hal_EfuseGetCurrentSize_8188e(pAdapter, bPseudoTest);
-	return ret;
-}
-
-u16 rtl8188e_EfuseGetCurrentSize(struct adapter *pAdapter, u8 efuseType, bool bPseudoTest)
-{
-	u16	ret = 0;
-
-	if (bPseudoTest)
-		ret = Hal_EfuseGetCurrentSize_Pseudo(pAdapter, bPseudoTest);
-	else
-		ret = hal_EfuseGetCurrentSize_8188e(pAdapter, bPseudoTest);
-	return ret;
-}
 
 static int hal_EfusePgPacketRead_8188e(struct adapter *pAdapter, u8 offset, u8 *data, bool bPseudoTest)
 {
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index de9744d065da..01e256f3e268 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -123,7 +123,6 @@ void rtl8188e_free_hal_data(struct adapter *padapter);
 void rtl8188e_EfusePowerSwitch(struct adapter *pAdapter, u8 PwrState);
 void rtl8188e_ReadEFuse(struct adapter *Adapter, u16 _offset, u16 _size_byte, u8 *pbuf);
 void rtl8188e_EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 type, void *pOut);
-u16 rtl8188e_EfuseGetCurrentSize(struct adapter *pAdapter, u8 efuseType, bool bPseudoTest);
 int rtl8188e_Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data, bool bPseudoTest);
 
 void hal_notch_filter_8188e(struct adapter *adapter, bool enable);
-- 
2.20.1


  parent reply	other threads:[~2021-11-13 18:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-13 18:55 [PATCH 00/15] staging: r8188eu: more efuse cleanup Martin Kaiser
2021-11-13 18:55 ` [PATCH 01/15] staging: r8188eu: remove efuse type from definition functions Martin Kaiser
2021-11-13 18:55 ` [PATCH 02/15] staging: r8188eu: remove efuse type from read functions Martin Kaiser
2021-11-13 18:55 ` [PATCH 03/15] staging: r8188eu: remove test code for efuse shadow map Martin Kaiser
2021-11-15 11:27   ` Dan Carpenter
2021-11-15 13:50     ` Martin Kaiser
2021-11-15 15:43       ` Dan Carpenter
2021-11-13 18:55 ` [PATCH 04/15] staging: r8188eu: merge small adapter info helpers Martin Kaiser
2021-11-13 18:55 ` Martin Kaiser [this message]
2021-11-13 18:55 ` [PATCH 06/15] staging: r8188eu: rtl8188e_Efuse_PgPacketRead is now unused Martin Kaiser
2021-11-13 18:55 ` [PATCH 07/15] staging: r8188eu: merge Efuse_ReadAllMap into EFUSE_ShadowMapUpdate Martin Kaiser
2021-11-13 18:55 ` [PATCH 08/15] staging: r8188eu: use efuse map length define directly Martin Kaiser
2021-11-13 18:55 ` [PATCH 09/15] staging: r8188eu: rtl8188e_EFUSE_GetEfuseDefinition is unused Martin Kaiser
2021-11-13 18:55 ` [PATCH 10/15] staging: r8188eu: remove defines for efuse type Martin Kaiser
2021-11-13 18:55 ` [PATCH 11/15] staging: r8188eu: efuse_OneByteRead is unused Martin Kaiser
2021-11-13 18:55 ` [PATCH 12/15] staging: r8188eu: efuse_OneByteWrite " Martin Kaiser
2021-11-13 18:55 ` [PATCH 13/15] staging: r8188eu: remove bt efuse definitions Martin Kaiser
2021-11-13 18:55 ` [PATCH 14/15] staging: r8188eu: remove fake efuse variables Martin Kaiser
2021-11-13 18:55 ` [PATCH 15/15] staging: r8188eu: remove the efuse_hal structure Martin Kaiser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211113185518.23941-6-martin@kaiser.cx \
    --to=martin@kaiser.cx \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=phil@philpotter.co.uk \
    --cc=straube.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox