]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
staging: rtl8723bs: Remove #if 1 in function hal_EfuseGetCurrentSize_BT
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Sun, 3 Nov 2024 08:14:24 +0000 (09:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Nov 2024 23:55:49 +0000 (00:55 +0100)
Remove #if 1 in function hal_EfuseGetCurrentSize_BT to shorten code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/9259ce43226333a4ab4ba400bbfcaa2eead3f5d1.1730619982.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c

index 2659999404a3f0b6dd69562250d9932b851c0b80..49b6507f991c1f1600a185342a1af568c70fb680 100644 (file)
@@ -1028,7 +1028,6 @@ static u16 hal_EfuseGetCurrentSize_BT(struct adapter *padapter, u8 bPseudoTest)
                /*  only when bank is switched we have to reset the efuse_addr. */
                if (bank != startBank)
                        efuse_addr = 0;
-#if 1
 
                while (AVAILABLE_EFUSE_ADDR(efuse_addr)) {
                        if (efuse_OneByteRead(padapter, efuse_addr,
@@ -1057,33 +1056,6 @@ static u16 hal_EfuseGetCurrentSize_BT(struct adapter *padapter, u8 bPseudoTest)
                        /* read next header */
                        efuse_addr += (word_cnts*2)+1;
                }
-#else
-       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;
-               }
-#endif
-
 
                /*  Check if we need to check next bank efuse */
                if (efuse_addr < retU2)