2022-03-06 09:39:11

by Martin Kaiser

[permalink] [raw]
Subject: [PATCH 0/6] staging: r8188eu: some rx cleanups

Here's another set with simple cleanups in the code for receiving frames.

Martin Kaiser (6):
staging: r8188eu: remove unnecessary initializations
staging: r8188eu: remove three unused receive defines
staging: r8188eu: remove unused function prototype
staging: r8188eu: make rtl8188e_process_phy_info static
staging: r8188eu: remove some unused local ieee80211 macros
staging: r8188eu: remove local BIT macro

drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 6 +---
.../staging/r8188eu/include/rtl8188e_recv.h | 6 ----
drivers/staging/r8188eu/include/wifi.h | 34 +------------------
3 files changed, 2 insertions(+), 44 deletions(-)

--
2.30.2


2022-03-06 10:39:27

by Martin Kaiser

[permalink] [raw]
Subject: [PATCH 3/6] staging: r8188eu: remove unused function prototype

Remove the prototype for rtl8188eu_recv_hdl. This function does not exist
in the r8188eu driver.

Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/staging/r8188eu/include/rtl8188e_recv.h | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/staging/r8188eu/include/rtl8188e_recv.h b/drivers/staging/r8188eu/include/rtl8188e_recv.h
index 09adffd756de..8d06815d0374 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_recv.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_recv.h
@@ -35,7 +35,6 @@ enum rx_packet_type {

s32 rtl8188eu_init_recv_priv(struct adapter *padapter);
void rtl8188eu_free_recv_priv(struct adapter * padapter);
-void rtl8188eu_recv_hdl(struct adapter * padapter, struct recv_buf *precvbuf);
void rtl8188eu_recv_tasklet(unsigned long priv);
void rtl8188e_process_phy_info(struct adapter * padapter, void *prframe);
void update_recvframe_phyinfo_88e(struct recv_frame *fra, struct phy_stat *phy);
--
2.30.2

2022-03-07 02:45:19

by Martin Kaiser

[permalink] [raw]
Subject: [PATCH 2/6] staging: r8188eu: remove three unused receive defines

Remove three unused defines from rtl8188e_recv.h.

Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/staging/r8188eu/include/rtl8188e_recv.h | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/staging/r8188eu/include/rtl8188e_recv.h b/drivers/staging/r8188eu/include/rtl8188e_recv.h
index a2320af11216..09adffd756de 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_recv.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_recv.h
@@ -6,10 +6,6 @@

#define TX_RPT1_PKT_LEN 8

-#define RECV_BLK_SZ 512
-#define RECV_BLK_CNT 16
-#define RECV_BLK_TH RECV_BLK_CNT
-
#define NR_PREALLOC_RECV_SKB (8)

#define NR_RECVBUFF (4)
--
2.30.2

2022-03-07 03:39:37

by Martin Kaiser

[permalink] [raw]
Subject: [PATCH 4/6] staging: r8188eu: make rtl8188e_process_phy_info static

rtl8188e_process_phy_info is used only in rtl8188e_rxdesc.c. Make the
function static and remove its prototype from rtl8188e_recv.h.

Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 2 +-
drivers/staging/r8188eu/include/rtl8188e_recv.h | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c b/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c
index 387af789797d..9bf7a9248026 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c
@@ -45,7 +45,7 @@ static void process_link_qual(struct adapter *padapter, struct recv_frame *prfra
signal_stat->avg_val = signal_stat->total_val / signal_stat->total_num;
}

-void rtl8188e_process_phy_info(struct adapter *padapter, void *prframe)
+static void rtl8188e_process_phy_info(struct adapter *padapter, void *prframe)
{
struct recv_frame *precvframe = (struct recv_frame *)prframe;

diff --git a/drivers/staging/r8188eu/include/rtl8188e_recv.h b/drivers/staging/r8188eu/include/rtl8188e_recv.h
index 8d06815d0374..b752c5c06309 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_recv.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_recv.h
@@ -36,7 +36,6 @@ enum rx_packet_type {
s32 rtl8188eu_init_recv_priv(struct adapter *padapter);
void rtl8188eu_free_recv_priv(struct adapter * padapter);
void rtl8188eu_recv_tasklet(unsigned long priv);
-void rtl8188e_process_phy_info(struct adapter * padapter, void *prframe);
void update_recvframe_phyinfo_88e(struct recv_frame *fra, struct phy_stat *phy);
void update_recvframe_attrib_88e(struct recv_frame *fra, struct recv_stat *stat);

--
2.30.2

2022-03-15 10:45:56

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 0/6] staging: r8188eu: some rx cleanups

On Sat, Mar 05, 2022 at 07:53:45PM +0100, Martin Kaiser wrote:
> Here's another set with simple cleanups in the code for receiving frames.
>
> Martin Kaiser (6):
> staging: r8188eu: remove unnecessary initializations
> staging: r8188eu: remove three unused receive defines
> staging: r8188eu: remove unused function prototype
> staging: r8188eu: make rtl8188e_process_phy_info static
> staging: r8188eu: remove some unused local ieee80211 macros
> staging: r8188eu: remove local BIT macro
>
> drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 6 +---
> .../staging/r8188eu/include/rtl8188e_recv.h | 6 ----
> drivers/staging/r8188eu/include/wifi.h | 34 +------------------
> 3 files changed, 2 insertions(+), 44 deletions(-)
>
> --
> 2.30.2
>
>

This series breaks the build:

drivers/staging/r8188eu/core/rtw_wlan_util.c: In function ‘update_IOT_info’:
drivers/staging/r8188eu/core/rtw_wlan_util.c:1279:42: error: conversion from ‘long unsigned int’ to ‘u32’ {aka ‘unsigned int’} changes value from ‘18446744073709551611’ to ‘4294967291’ [-Werror=overflow]
1279 | Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), false);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/r8188eu/core/rtw_wlan_util.c:1285:42: error: conversion from ‘long unsigned int’ to ‘u32’ {aka ‘unsigned int’} changes value from ‘18446744073709551611’ to ‘4294967291’ [-Werror=overflow]
1285 | Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), false);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

I'm going to drop it from my queue now.

thanks,

greg k-h

2022-03-16 11:11:28

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 0/6] staging: r8188eu: some rx cleanups

On Tue, Mar 15, 2022 at 09:55:28PM +0100, Martin Kaiser wrote:
> Thus wrote Greg Kroah-Hartman ([email protected]):
>
> > On Sat, Mar 05, 2022 at 07:53:45PM +0100, Martin Kaiser wrote:
> > > Here's another set with simple cleanups in the code for receiving frames.
>
> > > Martin Kaiser (6):
> > > staging: r8188eu: remove unnecessary initializations
> > > staging: r8188eu: remove three unused receive defines
> > > staging: r8188eu: remove unused function prototype
> > > staging: r8188eu: make rtl8188e_process_phy_info static
> > > staging: r8188eu: remove some unused local ieee80211 macros
> > > staging: r8188eu: remove local BIT macro
>
> > > drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 6 +---
> > > .../staging/r8188eu/include/rtl8188e_recv.h | 6 ----
> > > drivers/staging/r8188eu/include/wifi.h | 34 +------------------
> > > 3 files changed, 2 insertions(+), 44 deletions(-)
>
> > > --
> > > 2.30.2
>
>
>
> > This series breaks the build:
>
> on x86_64 - and I tested only on arm32 :-(
>
> > drivers/staging/r8188eu/core/rtw_wlan_util.c: In function ‘update_IOT_info’:
> > drivers/staging/r8188eu/core/rtw_wlan_util.c:1279:42: error: conversion from ‘long unsigned int’ to ‘u32’ {aka ‘unsigned int’} changes value from ‘18446744073709551611’ to ‘4294967291’ [-Werror=overflow]
> > 1279 | Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), false);
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> > drivers/staging/r8188eu/core/rtw_wlan_util.c:1285:42: error: conversion from ‘long unsigned int’ to ‘u32’ {aka ‘unsigned int’} changes value from ‘18446744073709551611’ to ‘4294967291’ [-Werror=overflow]
> > 1285 | Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), false);
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> > cc1: all warnings being treated as errors
>
> > I'm going to drop it from my queue now.
>
> The driver's BIT(x) macro was 1 << (x), the "global" one uses 1UL << (x).
> DYNAMIC_BB_DYNAMIC_TXPWR needs a cast to u32. I've just sent v2.

There shouldn't need to be a cast when using the BIT macro, so be
careful...

2022-03-16 15:53:02

by Martin Kaiser

[permalink] [raw]
Subject: Re: [PATCH 0/6] staging: r8188eu: some rx cleanups

Thus wrote Greg Kroah-Hartman ([email protected]):

> On Sat, Mar 05, 2022 at 07:53:45PM +0100, Martin Kaiser wrote:
> > Here's another set with simple cleanups in the code for receiving frames.

> > Martin Kaiser (6):
> > staging: r8188eu: remove unnecessary initializations
> > staging: r8188eu: remove three unused receive defines
> > staging: r8188eu: remove unused function prototype
> > staging: r8188eu: make rtl8188e_process_phy_info static
> > staging: r8188eu: remove some unused local ieee80211 macros
> > staging: r8188eu: remove local BIT macro

> > drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c | 6 +---
> > .../staging/r8188eu/include/rtl8188e_recv.h | 6 ----
> > drivers/staging/r8188eu/include/wifi.h | 34 +------------------
> > 3 files changed, 2 insertions(+), 44 deletions(-)

> > --
> > 2.30.2



> This series breaks the build:

on x86_64 - and I tested only on arm32 :-(

> drivers/staging/r8188eu/core/rtw_wlan_util.c: In function ‘update_IOT_info’:
> drivers/staging/r8188eu/core/rtw_wlan_util.c:1279:42: error: conversion from ‘long unsigned int’ to ‘u32’ {aka ‘unsigned int’} changes value from ‘18446744073709551611’ to ‘4294967291’ [-Werror=overflow]
> 1279 | Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), false);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/staging/r8188eu/core/rtw_wlan_util.c:1285:42: error: conversion from ‘long unsigned int’ to ‘u32’ {aka ‘unsigned int’} changes value from ‘18446744073709551611’ to ‘4294967291’ [-Werror=overflow]
> 1285 | Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), false);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors

> I'm going to drop it from my queue now.

The driver's BIT(x) macro was 1 << (x), the "global" one uses 1UL << (x).
DYNAMIC_BB_DYNAMIC_TXPWR needs a cast to u32. I've just sent v2.

Thanks,
Martin