* [PATCH 0/2] staging: r8188eu: two simple cleanups
@ 2022-11-01 19:14 Michael Straube
2022-11-01 19:14 ` [PATCH 1/2] staging: r8188eu: remove extern from function prototypes Michael Straube
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Michael Straube @ 2022-11-01 19:14 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube
This series contains two simple cleanup patches.
Tested on x86_64 with Inter-Tech DMG-02.
Michael Straube (2):
staging: r8188eu: remove extern from function prototypes
staging: r8188eu: convert rtw_free_stainfo() to void
drivers/staging/r8188eu/core/rtw_sta_mgt.c | 8 ++------
.../staging/r8188eu/include/osdep_service.h | 2 +-
drivers/staging/r8188eu/include/rtw_mlme_ext.h | 4 ++--
drivers/staging/r8188eu/include/sta_info.h | 18 +++++++++---------
4 files changed, 14 insertions(+), 18 deletions(-)
--
2.38.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] staging: r8188eu: remove extern from function prototypes
2022-11-01 19:14 [PATCH 0/2] staging: r8188eu: two simple cleanups Michael Straube
@ 2022-11-01 19:14 ` Michael Straube
2022-11-01 19:14 ` [PATCH 2/2] staging: r8188eu: convert rtw_free_stainfo() to void Michael Straube
2022-11-01 23:26 ` [PATCH 0/2] staging: r8188eu: two simple cleanups Philipp Hortmann
2 siblings, 0 replies; 8+ messages in thread
From: Michael Straube @ 2022-11-01 19:14 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube
Declaring function prototypes extern is redundant and triggers
checkpatch warnings. Remove all extern from function prototypes.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
.../staging/r8188eu/include/osdep_service.h | 2 +-
drivers/staging/r8188eu/include/rtw_mlme_ext.h | 4 ++--
drivers/staging/r8188eu/include/sta_info.h | 18 +++++++++---------
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/staging/r8188eu/include/osdep_service.h
index ec2631455f08..f8ed04f32cae 100644
--- a/drivers/staging/r8188eu/include/osdep_service.h
+++ b/drivers/staging/r8188eu/include/osdep_service.h
@@ -66,7 +66,7 @@ static inline int rtw_netif_queue_stopped(struct net_device *pnetdev)
netif_tx_queue_stopped(netdev_get_tx_queue(pnetdev, 3));
}
-extern int RTW_STATUS_CODE(int error_code);
+int RTW_STATUS_CODE(int error_code);
void *rtw_malloc2d(int h, int w, int size);
diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
index ce5b57e23e53..e234a3b9af6f 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
@@ -388,7 +388,7 @@ struct mlme_ext_priv {
void init_mlme_ext_priv(struct adapter *adapter);
int init_hw_mlme_ext(struct adapter *padapter);
void free_mlme_ext_priv (struct mlme_ext_priv *pmlmeext);
-extern struct xmit_frame *alloc_mgtxmitframe(struct xmit_priv *pxmitpriv);
+struct xmit_frame *alloc_mgtxmitframe(struct xmit_priv *pxmitpriv);
unsigned char networktype_to_raid(unsigned char network_type);
u8 judge_network_type(struct adapter *padapter, unsigned char *rate, int len);
@@ -483,7 +483,7 @@ void report_add_sta_event(struct adapter *padapter, unsigned char *addr,
int cam_idx);
void beacon_timing_control(struct adapter *padapter);
-extern u8 set_tx_beacon_cmd(struct adapter *padapter);
+u8 set_tx_beacon_cmd(struct adapter *padapter);
unsigned int setup_beacon_frame(struct adapter *padapter,
unsigned char *beacon_frame);
void update_mgnt_tx_rate(struct adapter *padapter, u8 rate);
diff --git a/drivers/staging/r8188eu/include/sta_info.h b/drivers/staging/r8188eu/include/sta_info.h
index f76e086b5701..55ea5edc2914 100644
--- a/drivers/staging/r8188eu/include/sta_info.h
+++ b/drivers/staging/r8188eu/include/sta_info.h
@@ -295,19 +295,19 @@ static inline u32 wifi_mac_hash(u8 *mac)
return x;
}
-extern int _rtw_init_sta_priv(struct sta_priv *pstapriv);
-extern void _rtw_free_sta_priv(struct sta_priv *pstapriv);
+int _rtw_init_sta_priv(struct sta_priv *pstapriv);
+void _rtw_free_sta_priv(struct sta_priv *pstapriv);
#define stainfo_offset_valid(offset) (offset < NUM_STA && offset >= 0)
int rtw_stainfo_offset(struct sta_priv *stapriv, struct sta_info *sta);
struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int off);
-extern struct sta_info *rtw_alloc_stainfo(struct sta_priv *stapriv, u8 *hwaddr);
-extern u32 rtw_free_stainfo(struct adapter *adapt, struct sta_info *psta);
-extern void rtw_free_all_stainfo(struct adapter *adapt);
-extern struct sta_info *rtw_get_stainfo(struct sta_priv *stapriv, u8 *hwaddr);
-extern u32 rtw_init_bcmc_stainfo(struct adapter *adapt);
-extern struct sta_info *rtw_get_bcmc_stainfo(struct adapter *padapter);
-extern u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr);
+struct sta_info *rtw_alloc_stainfo(struct sta_priv *stapriv, u8 *hwaddr);
+u32 rtw_free_stainfo(struct adapter *adapt, struct sta_info *psta);
+void rtw_free_all_stainfo(struct adapter *adapt);
+struct sta_info *rtw_get_stainfo(struct sta_priv *stapriv, u8 *hwaddr);
+u32 rtw_init_bcmc_stainfo(struct adapter *adapt);
+struct sta_info *rtw_get_bcmc_stainfo(struct adapter *padapter);
+u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr);
#endif /* _STA_INFO_H_ */
--
2.38.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] staging: r8188eu: convert rtw_free_stainfo() to void
2022-11-01 19:14 [PATCH 0/2] staging: r8188eu: two simple cleanups Michael Straube
2022-11-01 19:14 ` [PATCH 1/2] staging: r8188eu: remove extern from function prototypes Michael Straube
@ 2022-11-01 19:14 ` Michael Straube
2022-11-01 23:26 ` [PATCH 0/2] staging: r8188eu: two simple cleanups Philipp Hortmann
2 siblings, 0 replies; 8+ messages in thread
From: Michael Straube @ 2022-11-01 19:14 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube
The function rtw_free_stainfo() returns always _SUCCESS and none of
its callers uses the return value. We can safely make the function
void. Yet another tiny step towards getting rid of _FAIL / _SUCCESS.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/core/rtw_sta_mgt.c | 8 ++------
drivers/staging/r8188eu/include/sta_info.h | 2 +-
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_sta_mgt.c b/drivers/staging/r8188eu/core/rtw_sta_mgt.c
index 51324e708697..b4aee8623099 100644
--- a/drivers/staging/r8188eu/core/rtw_sta_mgt.c
+++ b/drivers/staging/r8188eu/core/rtw_sta_mgt.c
@@ -242,7 +242,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
}
/* using pstapriv->sta_hash_lock to protect */
-u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
+void rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
{
int i;
struct __queue *pfree_sta_queue;
@@ -252,7 +252,7 @@ u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
struct sta_priv *pstapriv = &padapter->stapriv;
if (!psta)
- goto exit;
+ return;
pfree_sta_queue = &pstapriv->free_sta_queue;
@@ -356,10 +356,6 @@ u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
spin_lock_bh(&pfree_sta_queue->lock);
list_add_tail(&psta->list, get_list_head(pfree_sta_queue));
spin_unlock_bh(&pfree_sta_queue->lock);
-
-exit:
-
- return _SUCCESS;
}
/* free all stainfo which in sta_hash[all] */
diff --git a/drivers/staging/r8188eu/include/sta_info.h b/drivers/staging/r8188eu/include/sta_info.h
index 55ea5edc2914..e42f4b4c6e24 100644
--- a/drivers/staging/r8188eu/include/sta_info.h
+++ b/drivers/staging/r8188eu/include/sta_info.h
@@ -303,7 +303,7 @@ int rtw_stainfo_offset(struct sta_priv *stapriv, struct sta_info *sta);
struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int off);
struct sta_info *rtw_alloc_stainfo(struct sta_priv *stapriv, u8 *hwaddr);
-u32 rtw_free_stainfo(struct adapter *adapt, struct sta_info *psta);
+void rtw_free_stainfo(struct adapter *adapt, struct sta_info *psta);
void rtw_free_all_stainfo(struct adapter *adapt);
struct sta_info *rtw_get_stainfo(struct sta_priv *stapriv, u8 *hwaddr);
u32 rtw_init_bcmc_stainfo(struct adapter *adapt);
--
2.38.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] staging: r8188eu: two simple cleanups
2022-11-01 19:14 [PATCH 0/2] staging: r8188eu: two simple cleanups Michael Straube
2022-11-01 19:14 ` [PATCH 1/2] staging: r8188eu: remove extern from function prototypes Michael Straube
2022-11-01 19:14 ` [PATCH 2/2] staging: r8188eu: convert rtw_free_stainfo() to void Michael Straube
@ 2022-11-01 23:26 ` Philipp Hortmann
2 siblings, 0 replies; 8+ messages in thread
From: Philipp Hortmann @ 2022-11-01 23:26 UTC (permalink / raw)
To: Michael Straube, gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel
On 11/1/22 20:14, Michael Straube wrote:
> This series contains two simple cleanup patches.
> Tested on x86_64 with Inter-Tech DMG-02.
>
> Michael Straube (2):
> staging: r8188eu: remove extern from function prototypes
> staging: r8188eu: convert rtw_free_stainfo() to void
>
> drivers/staging/r8188eu/core/rtw_sta_mgt.c | 8 ++------
> .../staging/r8188eu/include/osdep_service.h | 2 +-
> drivers/staging/r8188eu/include/rtw_mlme_ext.h | 4 ++--
> drivers/staging/r8188eu/include/sta_info.h | 18 +++++++++---------
> 4 files changed, 14 insertions(+), 18 deletions(-)
>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] staging: r8188eu: two simple cleanups
2023-03-07 8:50 Michael Straube
2023-03-07 19:11 ` Philipp Hortmann
@ 2023-03-09 9:09 ` Greg KH
1 sibling, 0 replies; 8+ messages in thread
From: Greg KH @ 2023-03-09 9:09 UTC (permalink / raw)
To: Michael Straube; +Cc: Larry.Finger, phil, linux-staging, linux-kernel
On Tue, Mar 07, 2023 at 09:50:01AM +0100, Michael Straube wrote:
> This series contains two simple cleanups.
>
> Tested on x86_64 with Inter-Tech DMG-02.
>
> Michael Straube (2):
> staging: r8188eu: busetkipkey is boolean
> staging: r8188eu: bgrpkey_handshake is set but never used
>
> drivers/staging/r8188eu/core/rtw_mlme.c | 1 -
> drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
> drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
> drivers/staging/r8188eu/include/rtw_security.h | 1 -
> 4 files changed, 2 insertions(+), 4 deletions(-)
>
> --
> 2.39.2
>
>
Sorry, but I've now deleted this driver, so these patches do not apply.
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] staging: r8188eu: two simple cleanups
2023-03-07 8:50 Michael Straube
@ 2023-03-07 19:11 ` Philipp Hortmann
2023-03-09 9:09 ` Greg KH
1 sibling, 0 replies; 8+ messages in thread
From: Philipp Hortmann @ 2023-03-07 19:11 UTC (permalink / raw)
To: Michael Straube, gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel
On 3/7/23 09:50, Michael Straube wrote:
> This series contains two simple cleanups.
>
> Tested on x86_64 with Inter-Tech DMG-02.
>
> Michael Straube (2):
> staging: r8188eu: busetkipkey is boolean
> staging: r8188eu: bgrpkey_handshake is set but never used
>
> drivers/staging/r8188eu/core/rtw_mlme.c | 1 -
> drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
> drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
> drivers/staging/r8188eu/include/rtw_security.h | 1 -
> 4 files changed, 2 insertions(+), 4 deletions(-)
>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/2] staging: r8188eu: two simple cleanups
@ 2023-03-07 8:50 Michael Straube
2023-03-07 19:11 ` Philipp Hortmann
2023-03-09 9:09 ` Greg KH
0 siblings, 2 replies; 8+ messages in thread
From: Michael Straube @ 2023-03-07 8:50 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube
This series contains two simple cleanups.
Tested on x86_64 with Inter-Tech DMG-02.
Michael Straube (2):
staging: r8188eu: busetkipkey is boolean
staging: r8188eu: bgrpkey_handshake is set but never used
drivers/staging/r8188eu/core/rtw_mlme.c | 1 -
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/core/rtw_xmit.c | 2 +-
drivers/staging/r8188eu/include/rtw_security.h | 1 -
4 files changed, 2 insertions(+), 4 deletions(-)
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/2] staging: r8188eu: two simple cleanups
@ 2022-02-09 7:36 Michael Straube
0 siblings, 0 replies; 8+ messages in thread
From: Michael Straube @ 2022-02-09 7:36 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube
This set removes an unused enum and unused constants from the enum
hw_variables.
Michael Straube (2):
staging: r8188eu: remove unused enum
staging: r8188eu: clean up enum hw_variables
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 8 --------
drivers/staging/r8188eu/include/hal_intf.h | 17 -----------------
2 files changed, 25 deletions(-)
--
2.35.1
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-03-09 9:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-01 19:14 [PATCH 0/2] staging: r8188eu: two simple cleanups Michael Straube
2022-11-01 19:14 ` [PATCH 1/2] staging: r8188eu: remove extern from function prototypes Michael Straube
2022-11-01 19:14 ` [PATCH 2/2] staging: r8188eu: convert rtw_free_stainfo() to void Michael Straube
2022-11-01 23:26 ` [PATCH 0/2] staging: r8188eu: two simple cleanups Philipp Hortmann
-- strict thread matches above, loose matches on Subject: below --
2023-03-07 8:50 Michael Straube
2023-03-07 19:11 ` Philipp Hortmann
2023-03-09 9:09 ` Greg KH
2022-02-09 7:36 Michael Straube
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).