Commit e4432160 authored by Madhumitha Prabakaran's avatar Madhumitha Prabakaran Committed by Greg Kroah-Hartman

Staging: rtl8723bs: Change return type and type of local variable

rtw_startbss_cmd can return the result of calling rtw_enqueue_cmd, which
can return the result of calling _rtw_enqueue_cmd, but they all have
different return types (u8, u32, and sint, respectively).

As all of these functions return error codes, change all the return types
to int, in preparation for converting these functions to use standard
kernel error codes.

Also, remove extern from the function declaration to maintain Linux kernel
coding style.

Issue suggested by Coccinelle.
Signed-off-by: default avatarMadhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 19c74ea5
...@@ -256,7 +256,7 @@ ISR/Call-Back functions can't call this sub-function. ...@@ -256,7 +256,7 @@ ISR/Call-Back functions can't call this sub-function.
*/ */
sint _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj) int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
{ {
_irqL irqL; _irqL irqL;
...@@ -331,7 +331,7 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj) ...@@ -331,7 +331,7 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj) int rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
{ {
int res = _FAIL; int res = _FAIL;
struct adapter *padapter = pcmdpriv->padapter; struct adapter *padapter = pcmdpriv->padapter;
...@@ -719,12 +719,12 @@ u8 rtw_createbss_cmd(struct adapter *padapter) ...@@ -719,12 +719,12 @@ u8 rtw_createbss_cmd(struct adapter *padapter)
return res; return res;
} }
u8 rtw_startbss_cmd(struct adapter *padapter, int flags) int rtw_startbss_cmd(struct adapter *padapter, int flags)
{ {
struct cmd_obj *pcmd; struct cmd_obj *pcmd;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
struct submit_ctx sctx; struct submit_ctx sctx;
u8 res = _SUCCESS; int res = _SUCCESS;
if (flags & RTW_CMDF_DIRECTLY) { if (flags & RTW_CMDF_DIRECTLY) {
/* no need to enqueue, do the cmd hdl directly and free cmd parameter */ /* no need to enqueue, do the cmd hdl directly and free cmd parameter */
......
...@@ -12,7 +12,7 @@ int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv); ...@@ -12,7 +12,7 @@ int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv);
int rtw_init_evt_priv(struct evt_priv *pevtpriv); int rtw_init_evt_priv(struct evt_priv *pevtpriv);
extern void _rtw_free_evt_priv (struct evt_priv *pevtpriv); extern void _rtw_free_evt_priv (struct evt_priv *pevtpriv);
extern void _rtw_free_cmd_priv (struct cmd_priv *pcmdpriv); extern void _rtw_free_cmd_priv (struct cmd_priv *pcmdpriv);
extern sint _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj); int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj);
extern struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue); extern struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue);
#endif #endif
...@@ -122,7 +122,7 @@ struct P2P_PS_CTWPeriod_t { ...@@ -122,7 +122,7 @@ struct P2P_PS_CTWPeriod_t {
u8 CTWPeriod; /* TU */ u8 CTWPeriod; /* TU */
}; };
extern u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *obj); int rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *obj);
extern struct cmd_obj *rtw_dequeue_cmd(struct cmd_priv *pcmdpriv); extern struct cmd_obj *rtw_dequeue_cmd(struct cmd_priv *pcmdpriv);
extern void rtw_free_cmd_obj(struct cmd_obj *pcmd); extern void rtw_free_cmd_obj(struct cmd_obj *pcmd);
...@@ -827,7 +827,7 @@ struct RunInThread_param ...@@ -827,7 +827,7 @@ struct RunInThread_param
u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid, int ssid_num, struct rtw_ieee80211_channel *ch, int ch_num); u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid, int ssid_num, struct rtw_ieee80211_channel *ch, int ch_num);
extern u8 rtw_createbss_cmd(struct adapter *padapter); extern u8 rtw_createbss_cmd(struct adapter *padapter);
u8 rtw_startbss_cmd(struct adapter *padapter, int flags); int rtw_startbss_cmd(struct adapter *padapter, int flags);
struct sta_info; struct sta_info;
extern u8 rtw_setstakey_cmd(struct adapter *padapter, struct sta_info *sta, u8 unicast_key, bool enqueue); extern u8 rtw_setstakey_cmd(struct adapter *padapter, struct sta_info *sta, u8 unicast_key, bool enqueue);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment