2022-11-06 04:24:38

by Jacob Bai

[permalink] [raw]
Subject: [PATCH 0/3] staging: rtl8192e: trivial code cleanup patches

Rename few variables and source files to make it align with other
rtlwifi drivers.
The patches are required to be applied in sequence.

Changes in v3:
1.Patch 3: use ARRAY_SIZE() to replace macros, feedback from
[email protected]

Changes in v2:
1. Patch 2: modify r8192E_firmware.c to include table.h instead of
r8192E_hwimg.h.

Jacob Bai (3):
staging: rtl8192e: rename tables in r8192e_hwimg.c
staging: rtl8192e: rename r8192E_hwimg.c/h to table.c/h
staging: rtl8192e: replace macro defines with ARRAY_SIZE

drivers/staging/rtl8192e/rtl8192e/Makefile | 2 +-
.../rtl8192e/rtl8192e/r8192E_firmware.c | 2 +-
.../staging/rtl8192e/rtl8192e/r8192E_hwimg.h | 33 ------------
.../staging/rtl8192e/rtl8192e/r8192E_phy.c | 54 +++++++++----------
.../staging/rtl8192e/rtl8192e/r8192E_phy.h | 20 -------
.../rtl8192e/{r8192E_hwimg.c => table.c} | 34 +++++++-----
drivers/staging/rtl8192e/rtl8192e/table.h | 33 ++++++++++++
7 files changed, 84 insertions(+), 94 deletions(-)
delete mode 100644 drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h
rename drivers/staging/rtl8192e/rtl8192e/{r8192E_hwimg.c => table.c} (91%)
create mode 100644 drivers/staging/rtl8192e/rtl8192e/table.h

--
2.34.1



2022-11-06 04:25:00

by Jacob Bai

[permalink] [raw]
Subject: [PATCH 2/3] staging: rtl8192e: rename r8192E_hwimg.c/h to table.c/h

Same as other rtlwifi drivers, use table.c/h.

Signed-off-by: Jacob Bai <[email protected]>
---
drivers/staging/rtl8192e/rtl8192e/Makefile | 2 +-
drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c | 2 +-
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 2 +-
drivers/staging/rtl8192e/rtl8192e/{r8192E_hwimg.c => table.c} | 2 +-
drivers/staging/rtl8192e/rtl8192e/{r8192E_hwimg.h => table.h} | 4 ++--
5 files changed, 6 insertions(+), 6 deletions(-)
rename drivers/staging/rtl8192e/rtl8192e/{r8192E_hwimg.c => table.c} (99%)
rename drivers/staging/rtl8192e/rtl8192e/{r8192E_hwimg.h => table.h} (94%)

diff --git a/drivers/staging/rtl8192e/rtl8192e/Makefile b/drivers/staging/rtl8192e/rtl8192e/Makefile
index 75e6ec510555..334d92efd4ba 100644
--- a/drivers/staging/rtl8192e/rtl8192e/Makefile
+++ b/drivers/staging/rtl8192e/rtl8192e/Makefile
@@ -4,7 +4,7 @@ r8192e_pci-objs := \
r8192E_phy.o \
r8192E_firmware.o \
r8192E_cmdpkt.o \
- r8192E_hwimg.o \
+ table.o \
r8190P_rtl8256.o \
rtl_cam.o \
rtl_core.o \
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c
index 789d288d7503..45819f2f2a37 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c
@@ -6,7 +6,7 @@
*/
#include "rtl_core.h"
#include "r8192E_hw.h"
-#include "r8192E_hwimg.h"
+#include "table.h"
#include "r8192E_firmware.h"
#include "r8192E_cmdpkt.h"
#include <linux/firmware.h>
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index 58da2dab55bd..eabb4187d907 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -12,7 +12,7 @@
#include "r8192E_phy.h"
#include "rtl_dm.h"

-#include "r8192E_hwimg.h"
+#include "table.h"

static u32 RF_CHANNEL_TABLE_ZEBRA[] = {
0,
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c b/drivers/staging/rtl8192e/rtl8192e/table.c
similarity index 99%
rename from drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c
rename to drivers/staging/rtl8192e/rtl8192e/table.c
index 8920283f340e..2e75f40db874 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c
+++ b/drivers/staging/rtl8192e/rtl8192e/table.c
@@ -4,7 +4,7 @@
*
* Contact Information: wlanfae <[email protected]>
*/
-#include "r8192E_hwimg.h"
+#include "table.h"

u32 RTL8192E_PHY_REG_ARRAY[RTL8192E_PHY_REG_ARRAY_LEN] = {0x0,};

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h b/drivers/staging/rtl8192e/rtl8192e/table.h
similarity index 94%
rename from drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h
rename to drivers/staging/rtl8192e/rtl8192e/table.h
index a436c089a779..a80176c47127 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h
+++ b/drivers/staging/rtl8192e/rtl8192e/table.h
@@ -4,8 +4,8 @@
*
* Contact Information: wlanfae <[email protected]>
*/
-#ifndef __INC_HAL8192PciE_FW_IMG_H
-#define __INC_HAL8192PciE_FW_IMG_H
+#ifndef __RTL8192E_TABLE__H_
+#define __RTL8192E_TABLE__H_

/*Created on 2008/11/18, 3: 7*/

--
2.34.1


2022-11-06 08:40:28

by Philipp Hortmann

[permalink] [raw]
Subject: Re: [PATCH 0/3] staging: rtl8192e: trivial code cleanup patches

On 11/6/22 04:13, Jacob Bai wrote:
> Rename few variables and source files to make it align with other
> rtlwifi drivers.
> The patches are required to be applied in sequence.
>
> Changes in v3:
> 1.Patch 3: use ARRAY_SIZE() to replace macros, feedback from
> [email protected]
>
> Changes in v2:
> 1. Patch 2: modify r8192E_firmware.c to include table.h instead of
> r8192E_hwimg.h.
>
> Jacob Bai (3):
> staging: rtl8192e: rename tables in r8192e_hwimg.c
> staging: rtl8192e: rename r8192E_hwimg.c/h to table.c/h
> staging: rtl8192e: replace macro defines with ARRAY_SIZE
>
> drivers/staging/rtl8192e/rtl8192e/Makefile | 2 +-
> .../rtl8192e/rtl8192e/r8192E_firmware.c | 2 +-
> .../staging/rtl8192e/rtl8192e/r8192E_hwimg.h | 33 ------------
> .../staging/rtl8192e/rtl8192e/r8192E_phy.c | 54 +++++++++----------
> .../staging/rtl8192e/rtl8192e/r8192E_phy.h | 20 -------
> .../rtl8192e/{r8192E_hwimg.c => table.c} | 34 +++++++-----
> drivers/staging/rtl8192e/rtl8192e/table.h | 33 ++++++++++++
> 7 files changed, 84 insertions(+), 94 deletions(-)
> delete mode 100644 drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h
> rename drivers/staging/rtl8192e/rtl8192e/{r8192E_hwimg.c => table.c} (91%)
> create mode 100644 drivers/staging/rtl8192e/rtl8192e/table.h
>

The v3 is missing in the subject.

Tested-by: Philipp Hortmann <[email protected]>

Bye Philipp