[1/2] staging: rtl8192e: Remove empty Array Rtl8192PciEPHY_REGArray
Commit Message
Remove empty array Rtl8192PciEPHY_REGArray and the code where it is used
because it is dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 5 +----
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h | 2 --
drivers/staging/rtl8192e/rtl8192e/table.c | 2 --
drivers/staging/rtl8192e/rtl8192e/table.h | 2 --
4 files changed, 1 insertion(+), 10 deletions(-)
Comments
On Sat, Mar 04, 2023 at 08:13:22PM +0100, Philipp Hortmann wrote:
> Remove empty array Rtl8192PciEPHY_REGArray and the code where it is used
> because it is dead code.
>
> Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
> ---
> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 5 +----
> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h | 2 --
> drivers/staging/rtl8192e/rtl8192e/table.c | 2 --
> drivers/staging/rtl8192e/rtl8192e/table.h | 2 --
What are these table.[ch] files? I don't seem to have them.
regards,
dan carpenter
On 3/6/23 10:25, Dan Carpenter wrote:
> On Sat, Mar 04, 2023 at 08:13:22PM +0100, Philipp Hortmann wrote:
>> Remove empty array Rtl8192PciEPHY_REGArray and the code where it is used
>> because it is dead code.
>>
>> Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
>> ---
>> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 5 +----
>> drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h | 2 --
>> drivers/staging/rtl8192e/rtl8192e/table.c | 2 --
>> drivers/staging/rtl8192e/rtl8192e/table.h | 2 --
>
> What are these table.[ch] files? I don't seem to have them.
>
> regards,
> dan carpenter
>
Hi Dan,
thanks for the review. Here some answers to your questions:
With patch: "[PATCH] staging: rtl8192e: Change filename r8192E_hwimg.x
to table.x" I changed the filename of r8192E_hwimg.c to table.c and
r8192E_hwimg.h to table.h to adapt filenames from
drivers/net/wireless/realtek/rtlwifi rtl8192ee and rtl8192se. Task is
from TODO file.
Thanks for your support.
Bye Philipp
@@ -334,10 +334,7 @@ static void _rtl92e_phy_config_bb(struct net_device *dev, u8 ConfigType)
AGCTAB_ArrayLen = AGCTAB_ArrayLength;
Rtl819XAGCTAB_Array_Table = Rtl819XAGCTAB_Array;
- if (priv->rf_type == RF_2T4R) {
- PHY_REGArrayLen = PHY_REGArrayLength;
- Rtl819XPHY_REGArray_Table = Rtl819XPHY_REGArray;
- } else if (priv->rf_type == RF_1T2R) {
+ if (priv->rf_type == RF_1T2R) {
PHY_REGArrayLen = PHY_REG_1T2RArrayLength;
Rtl819XPHY_REGArray_Table = Rtl819XPHY_REG_1T2RArray;
}
@@ -16,7 +16,6 @@
#define MACPHY_Array_PGLength MACPHY_Array_PGLengthPciE
#define RadioC_ArrayLength RadioC_ArrayLengthPciE
#define RadioD_ArrayLength RadioD_ArrayLengthPciE
-#define PHY_REGArrayLength PHY_REGArrayLengthPciE
#define PHY_REG_1T2RArrayLength PHY_REG_1T2RArrayLengthPciE
#define Rtl819XMACPHY_Array_PG Rtl8192PciEMACPHY_Array_PG
@@ -26,7 +25,6 @@
#define Rtl819XRadioC_Array Rtl8192PciERadioC_Array
#define Rtl819XRadioD_Array Rtl8192PciERadioD_Array
#define Rtl819XAGCTAB_Array Rtl8192PciEAGCTAB_Array
-#define Rtl819XPHY_REGArray Rtl8192PciEPHY_REGArray
#define Rtl819XPHY_REG_1T2RArray Rtl8192PciEPHY_REG_1T2RArray
extern u32 rtl819XAGCTAB_Array[];
@@ -6,8 +6,6 @@
*/
#include "table.h"
-u32 Rtl8192PciEPHY_REGArray[PHY_REGArrayLengthPciE] = {0x0,};
-
u32 Rtl8192PciEPHY_REG_1T2RArray[PHY_REG_1T2RArrayLengthPciE] = {
0x800, 0x00000000,
0x804, 0x00000001,
@@ -11,8 +11,6 @@
#include <linux/types.h>
-#define PHY_REGArrayLengthPciE 1
-extern u32 Rtl8192PciEPHY_REGArray[PHY_REGArrayLengthPciE];
#define PHY_REG_1T2RArrayLengthPciE 296
extern u32 Rtl8192PciEPHY_REG_1T2RArray[PHY_REG_1T2RArrayLengthPciE];
#define RadioA_ArrayLengthPciE 246