linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] staging: r8188eu: convert two functions to void
@ 2022-10-02 14:35 Michael Straube
  2022-10-02 14:35 ` [PATCH 1/2] staging: r8188eu: convert rtw_reset_drv_sw() " Michael Straube
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michael Straube @ 2022-10-02 14:35 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

This series converts two functions return type from u8 to void as
part of getting rid of _FAIL / _SUCCESS.

Tested on x86_64 with Inter-Tech DMG-02.

Michael Straube (2):
  staging: r8188eu: convert rtw_reset_drv_sw() to void
  staging: r8188eu: convert rtw_free_drv_sw() to void

 drivers/staging/r8188eu/include/osdep_intf.h | 4 ++--
 drivers/staging/r8188eu/os_dep/os_intfs.c    | 8 ++------
 2 files changed, 4 insertions(+), 8 deletions(-)

-- 
2.37.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] staging: r8188eu: convert rtw_reset_drv_sw() to void
  2022-10-02 14:35 [PATCH 0/2] staging: r8188eu: convert two functions to void Michael Straube
@ 2022-10-02 14:35 ` Michael Straube
  2022-10-02 14:35 ` [PATCH 2/2] staging: r8188eu: convert rtw_free_drv_sw() " Michael Straube
  2022-10-03 17:04 ` [PATCH 0/2] staging: r8188eu: convert two functions " Philipp Hortmann
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Straube @ 2022-10-02 14:35 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

The function rtw_reset_drv_sw() always returns _SUCCESS. None of its
callers use the return value. Convert the return type of that function
from u8 to void. This is part of getting rid of _FAIL / _SUCCESS.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/include/osdep_intf.h | 2 +-
 drivers/staging/r8188eu/os_dep/os_intfs.c    | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/r8188eu/include/osdep_intf.h b/drivers/staging/r8188eu/include/osdep_intf.h
index 36511c469546..ce8e1bc4a61c 100644
--- a/drivers/staging/r8188eu/include/osdep_intf.h
+++ b/drivers/staging/r8188eu/include/osdep_intf.h
@@ -44,7 +44,7 @@ int netdev_close(struct net_device *pnetdev);
 
 u8 rtw_init_drv_sw(struct adapter *padapter);
 u8 rtw_free_drv_sw(struct adapter *padapter);
-u8 rtw_reset_drv_sw(struct adapter *padapter);
+void rtw_reset_drv_sw(struct adapter *padapter);
 
 u32 rtw_start_drv_threads(struct adapter *padapter);
 void rtw_stop_drv_threads (struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index e43ef7e5ba70..2983e665bd5c 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -433,7 +433,7 @@ static void rtw_init_default_value(struct adapter *padapter)
 	padapter->bShowGetP2PState = 1;
 }
 
-u8 rtw_reset_drv_sw(struct adapter *padapter)
+void rtw_reset_drv_sw(struct adapter *padapter)
 {
 	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
@@ -455,8 +455,6 @@ u8 rtw_reset_drv_sw(struct adapter *padapter)
 	padapter->mlmeextpriv.sitesurvey_res.state = SCAN_DISABLE;
 
 	rtw_set_signal_stat_timer(&padapter->recvpriv);
-
-	return _SUCCESS;
 }
 
 u8 rtw_init_drv_sw(struct adapter *padapter)
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] staging: r8188eu: convert rtw_free_drv_sw() to void
  2022-10-02 14:35 [PATCH 0/2] staging: r8188eu: convert two functions to void Michael Straube
  2022-10-02 14:35 ` [PATCH 1/2] staging: r8188eu: convert rtw_reset_drv_sw() " Michael Straube
@ 2022-10-02 14:35 ` Michael Straube
  2022-10-03 17:04 ` [PATCH 0/2] staging: r8188eu: convert two functions " Philipp Hortmann
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Straube @ 2022-10-02 14:35 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel, Michael Straube

The function rtw_free_drv_sw() always returns _SUCCESS. None of its
callers use the return value. Convert the return type of that function
from u8 to void. This is part of getting rid of _FAIL / _SUCCESS.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/include/osdep_intf.h | 2 +-
 drivers/staging/r8188eu/os_dep/os_intfs.c    | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/r8188eu/include/osdep_intf.h b/drivers/staging/r8188eu/include/osdep_intf.h
index ce8e1bc4a61c..0f7d74a3ff6d 100644
--- a/drivers/staging/r8188eu/include/osdep_intf.h
+++ b/drivers/staging/r8188eu/include/osdep_intf.h
@@ -43,7 +43,7 @@ int netdev_open(struct net_device *pnetdev);
 int netdev_close(struct net_device *pnetdev);
 
 u8 rtw_init_drv_sw(struct adapter *padapter);
-u8 rtw_free_drv_sw(struct adapter *padapter);
+void rtw_free_drv_sw(struct adapter *padapter);
 void rtw_reset_drv_sw(struct adapter *padapter);
 
 u32 rtw_start_drv_threads(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index 2983e665bd5c..38e324754c8f 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -548,7 +548,7 @@ void rtw_cancel_all_timer(struct adapter *padapter)
 	_cancel_timer_ex(&padapter->recvpriv.signal_stat_timer);
 }
 
-u8 rtw_free_drv_sw(struct adapter *padapter)
+void rtw_free_drv_sw(struct adapter *padapter)
 {
 	/* we can call rtw_p2p_enable here, but: */
 	/*  1. rtw_p2p_enable may have IO operation */
@@ -585,8 +585,6 @@ u8 rtw_free_drv_sw(struct adapter *padapter)
 	/*  clear pbuddystruct adapter to avoid access wrong pointer. */
 	if (padapter->pbuddy_adapter)
 		padapter->pbuddy_adapter->pbuddy_adapter = NULL;
-
-	return _SUCCESS;
 }
 
 void netdev_br_init(struct net_device *netdev)
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] staging: r8188eu: convert two functions to void
  2022-10-02 14:35 [PATCH 0/2] staging: r8188eu: convert two functions to void Michael Straube
  2022-10-02 14:35 ` [PATCH 1/2] staging: r8188eu: convert rtw_reset_drv_sw() " Michael Straube
  2022-10-02 14:35 ` [PATCH 2/2] staging: r8188eu: convert rtw_free_drv_sw() " Michael Straube
@ 2022-10-03 17:04 ` Philipp Hortmann
  2 siblings, 0 replies; 4+ messages in thread
From: Philipp Hortmann @ 2022-10-03 17:04 UTC (permalink / raw)
  To: Michael Straube, gregkh; +Cc: Larry.Finger, phil, linux-staging, linux-kernel

On 10/2/22 16:35, Michael Straube wrote:
> This series converts two functions return type from u8 to void as
> part of getting rid of _FAIL / _SUCCESS.
> 
> Tested on x86_64 with Inter-Tech DMG-02.
> 
> Michael Straube (2):
>    staging: r8188eu: convert rtw_reset_drv_sw() to void
>    staging: r8188eu: convert rtw_free_drv_sw() to void
> 
>   drivers/staging/r8188eu/include/osdep_intf.h | 4 ++--
>   drivers/staging/r8188eu/os_dep/os_intfs.c    | 8 ++------
>   2 files changed, 4 insertions(+), 8 deletions(-)
> 

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-03 17:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-02 14:35 [PATCH 0/2] staging: r8188eu: convert two functions to void Michael Straube
2022-10-02 14:35 ` [PATCH 1/2] staging: r8188eu: convert rtw_reset_drv_sw() " Michael Straube
2022-10-02 14:35 ` [PATCH 2/2] staging: r8188eu: convert rtw_free_drv_sw() " Michael Straube
2022-10-03 17:04 ` [PATCH 0/2] staging: r8188eu: convert two functions " Philipp Hortmann

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).