* [PATCH 1/6] staging: rtl8188eu: Replace x==NULL by !x
2017-02-17 6:20 [PATCH 0/6] Fix multiple checkpatch issues Gargi Sharma
@ 2017-02-17 6:20 ` Gargi Sharma
2017-02-17 6:20 ` [PATCH 2/6] staging: rtl8188eu: Fix block comments warning Gargi Sharma
` (4 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Gargi Sharma @ 2017-02-17 6:20 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh, Gargi Sharma
Replace x==NULL by !x, to fix the checkpatch issue
comparsion with NULL could be written as !x.
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_mlme.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index a719289..a98a550 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -56,7 +56,7 @@ int rtw_init_mlme_priv(struct adapter *padapter)
pbuf = vzalloc(MAX_BSS_CNT * (sizeof(struct wlan_network)));
- if (pbuf == NULL) {
+ if (!pbuf) {
res = _FAIL;
goto exit;
}
@@ -148,7 +148,7 @@ static void _rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *
u32 lifetime = SCANQUEUE_LIFETIME;
struct __queue *free_queue = &(pmlmepriv->free_bss_pool);
- if (pnetwork == NULL)
+ if (!pnetwork)
return;
if (pnetwork->fixed)
@@ -172,7 +172,7 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *
{
struct __queue *free_queue = &(pmlmepriv->free_bss_pool);
- if (pnetwork == NULL)
+ if (!pnetwork)
return;
if (pnetwork->fixed)
return;
@@ -347,7 +347,7 @@ struct wlan_network *rtw_get_oldest_wlan_network(struct __queue *scanned_queue)
pwlan = container_of(plist, struct wlan_network, list);
if (!pwlan->fixed) {
- if (oldest == NULL || time_after(oldest->last_scanned, pwlan->last_scanned))
+ if (!oldest || time_after(oldest->last_scanned, pwlan->last_scanned))
oldest = pwlan;
}
}
@@ -458,7 +458,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
pnetwork = rtw_alloc_network(pmlmepriv); /* will update scan_time */
- if (pnetwork == NULL) {
+ if (!pnetwork) {
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("\n\n\nsomething wrong here\n\n\n"));
goto exit;
}
@@ -527,7 +527,7 @@ static int rtw_is_desired_network(struct adapter *adapter, struct wlan_network *
privacy = pnetwork->network.Privacy;
if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS)) {
- if (rtw_get_wps_ie(pnetwork->network.IEs+_FIXED_IE_LENGTH_, pnetwork->network.IELength-_FIXED_IE_LENGTH_, NULL, &wps_ielen) != NULL)
+ if (!rtw_get_wps_ie(pnetwork->network.IEs+_FIXED_IE_LENGTH_, pnetwork->network.IELength-_FIXED_IE_LENGTH_, NULL, &wps_ielen))
return true;
else
return false;
@@ -877,7 +877,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str
struct sta_priv *pstapriv = &padapter->stapriv;
psta = rtw_get_stainfo(pstapriv, pnetwork->network.MacAddress);
- if (psta == NULL)
+ if (!psta)
psta = rtw_alloc_stainfo(pstapriv, pnetwork->network.MacAddress);
if (psta) { /* update ptarget_sta */
@@ -1075,7 +1075,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
/* s3. find ptarget_sta & update ptarget_sta after update cur_network only for station mode */
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) {
ptarget_sta = rtw_joinbss_update_stainfo(adapter, pnetwork);
- if (ptarget_sta == NULL) {
+ if (!ptarget_sta) {
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Can't update stainfo when joinbss_event callback\n"));
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
goto ignore_joinbss_callback;
@@ -1145,7 +1145,7 @@ static u8 search_max_mac_id(struct adapter *padapter)
#if defined(CONFIG_88EU_AP_MODE)
if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
for (aid = (pstapriv->max_num_sta); aid > 0; aid--) {
- if (pstapriv->sta_aid[aid-1] != NULL)
+ if (!pstapriv->sta_aid[aid-1])
break;
}
mac_id = aid + 1;
@@ -1166,7 +1166,7 @@ void rtw_stassoc_hw_rpt(struct adapter *adapter, struct sta_info *psta)
u16 media_status;
u8 macid;
- if (psta == NULL)
+ if (!psta)
return;
macid = search_max_mac_id(adapter);
@@ -1198,13 +1198,13 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
#endif
/* for AD-HOC mode */
psta = rtw_get_stainfo(&adapter->stapriv, pstassoc->macaddr);
- if (psta != NULL) {
+ if (!psta) {
/* the sta have been in sta_info_queue => do nothing */
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Error: rtw_stassoc_event_callback: sta has been in sta_hash_queue\n"));
return; /* between drv has received this event before and fw have not yet to set key to CAM_ENTRY) */
}
psta = rtw_alloc_stainfo(&adapter->stapriv, pstassoc->macaddr);
- if (psta == NULL) {
+ if (!psta) {
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Can't alloc sta_info when rtw_stassoc_event_callback\n"));
return;
}
@@ -1521,7 +1521,7 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
pmlmepriv->pscanned = pmlmepriv->pscanned->next;
rtw_check_join_candidate(pmlmepriv, &candidate, pnetwork);
}
- if (candidate == NULL) {
+ if (!candidate) {
DBG_88E("%s: return _FAIL(candidate==NULL)\n", __func__);
ret = _FAIL;
goto exit;
@@ -2072,7 +2072,7 @@ void rtw_issue_addbareq_cmd(struct adapter *padapter, struct xmit_frame *pxmitfr
else
psta = rtw_get_stainfo(&padapter->stapriv, pattrib->ra);
- if (psta == NULL)
+ if (!psta)
return;
phtpriv = &psta->htpriv;
@@ -2104,7 +2104,7 @@ void _rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
struct wlan_network *pnetwork;
- if (tgt_network != NULL)
+ if (!tgt_network)
pnetwork = tgt_network;
else
pnetwork = &pmlmepriv->cur_network;
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 2/6] staging: rtl8188eu: Fix block comments warning
2017-02-17 6:20 [PATCH 0/6] Fix multiple checkpatch issues Gargi Sharma
2017-02-17 6:20 ` [PATCH 1/6] staging: rtl8188eu: Replace x==NULL by !x Gargi Sharma
@ 2017-02-17 6:20 ` Gargi Sharma
2017-02-17 6:33 ` [Outreachy kernel] " Vaishali Thakkar
2017-02-17 6:20 ` [PATCH 3/6] staging: rtl8188eu: Put constant on right side of comparison Gargi Sharma
` (3 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Gargi Sharma @ 2017-02-17 6:20 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh, Gargi Sharma
Align * on each line and move final */ to a new line, to
conform to the kernel coding style for block comments.
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_mlme.c | 61 ++++++++++++++++---------------
1 file changed, 31 insertions(+), 30 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index a98a550..0215b65 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -181,10 +181,10 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *
}
/*
- return the wlan_network with the matching addr
-
- Shall be calle under atomic context... to avoid possible racing condition...
-*/
+ * return the wlan_network with the matching addr
+ *
+ * Shall be called under atomic context... to avoid possible racing condition...
+ */
struct wlan_network *rtw_find_network(struct __queue *scanned_queue, u8 *addr)
{
struct list_head *phead, *plist;
@@ -408,8 +408,8 @@ static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex
}
/*
-Caller must hold pmlmepriv->lock first.
-*/
+ * Caller must hold pmlmepriv->lock first.
+ */
void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *target)
{
struct list_head *plist, *phead;
@@ -434,7 +434,8 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
plist = plist->next;
}
/* If we didn't find a match, then get a new network slot to initialize
- * with this beacon's information */
+ * with this beacon's information
+ */
if (phead == plist) {
if (list_empty(&(pmlmepriv->free_bss_pool.queue))) {
/* If there are no more slots, expire the oldest */
@@ -726,8 +727,8 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv)
}
/*
-*rtw_free_assoc_resources: the caller has to lock pmlmepriv->lock
-*/
+ * rtw_free_assoc_resources: the caller has to lock pmlmepriv->lock
+ */
void rtw_free_assoc_resources(struct adapter *adapter)
{
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
@@ -738,8 +739,8 @@ void rtw_free_assoc_resources(struct adapter *adapter)
}
/*
-*rtw_free_assoc_resources_locked: the caller has to lock pmlmepriv->lock
-*/
+ * rtw_free_assoc_resources_locked: the caller has to lock pmlmepriv->lock
+ */
void rtw_free_assoc_resources_locked(struct adapter *adapter)
{
struct wlan_network *pwlan = NULL;
@@ -789,8 +790,8 @@ void rtw_free_assoc_resources_locked(struct adapter *adapter)
}
/*
-*rtw_indicate_connect: the caller has to lock pmlmepriv->lock
-*/
+ * rtw_indicate_connect: the caller has to lock pmlmepriv->lock
+ */
void rtw_indicate_connect(struct adapter *padapter)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@@ -815,8 +816,8 @@ void rtw_indicate_connect(struct adapter *padapter)
}
/*
-*rtw_indicate_disconnect: the caller has to lock pmlmepriv->lock
-*/
+ * rtw_indicate_disconnect: the caller has to lock pmlmepriv->lock
+ */
void rtw_indicate_disconnect(struct adapter *padapter)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@@ -1338,9 +1339,9 @@ void rtw_cpwm_event_callback(struct adapter *padapter, u8 *pbuf)
}
/*
-* _rtw_join_timeout_handler - Timeout/faliure handler for CMD JoinBss
-* @adapter: pointer to struct adapter structure
-*/
+ * _rtw_join_timeout_handler - Timeout/faliure handler for CMD JoinBss
+ * @adapter: pointer to struct adapter structure
+ */
void _rtw_join_timeout_handler (unsigned long data)
{
struct adapter *adapter = (struct adapter *)data;
@@ -1380,9 +1381,9 @@ void _rtw_join_timeout_handler (unsigned long data)
}
/*
-* rtw_scan_timeout_handler - Timeout/Faliure handler for CMD SiteSurvey
-* @adapter: pointer to struct adapter structure
-*/
+ * rtw_scan_timeout_handler - Timeout/Faliure handler for CMD SiteSurvey
+ * @adapter: pointer to struct adapter structure
+ */
void rtw_scan_timeout_handler (unsigned long data)
{
struct adapter *adapter = (struct adapter *)data;
@@ -1437,10 +1438,10 @@ void rtw_dynamic_check_timer_handlder(unsigned long data)
#define RTW_SCAN_RESULT_EXPIRE 2000
/*
-* Select a new join candidate from the original @param candidate and @param competitor
-* @return true: candidate is updated
-* @return false: candidate is not updated
-*/
+ * Select a new join candidate from the original @param candidate and @param competitor
+ * @return true: candidate is updated
+ * @return false: candidate is not updated
+ */
static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
, struct wlan_network **candidate, struct wlan_network *competitor)
{
@@ -1491,11 +1492,11 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
}
/*
-Calling context:
-The caller of the sub-routine will be in critical section...
-The caller must hold the following spinlock
-pmlmepriv->lock
-*/
+ * Calling context:
+ * The caller of the sub-routine will be in critical section...
+ * The caller must hold the following spinlock
+ * pmlmepriv->lock
+ */
int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
{
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [Outreachy kernel] [PATCH 2/6] staging: rtl8188eu: Fix block comments warning
2017-02-17 6:20 ` [PATCH 2/6] staging: rtl8188eu: Fix block comments warning Gargi Sharma
@ 2017-02-17 6:33 ` Vaishali Thakkar
2017-02-17 6:35 ` Julia Lawall
0 siblings, 1 reply; 11+ messages in thread
From: Vaishali Thakkar @ 2017-02-17 6:33 UTC (permalink / raw)
To: Gargi Sharma; +Cc: outreachy-kernel, Greg KH
On Fri, Feb 17, 2017 at 11:50 AM, Gargi Sharma <gs051095@gmail.com> wrote:
> Align * on each line and move final */ to a new line, to
> conform to the kernel coding style for block comments.
Typo there: s/conform/confirm
> Signed-off-by: Gargi Sharma <gs051095@gmail.com>
> ---
> drivers/staging/rtl8188eu/core/rtw_mlme.c | 61 ++++++++++++++++---------------
> 1 file changed, 31 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
> index a98a550..0215b65 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
> @@ -181,10 +181,10 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *
> }
>
> /*
> - return the wlan_network with the matching addr
> -
> - Shall be calle under atomic context... to avoid possible racing condition...
> -*/
> + * return the wlan_network with the matching addr
> + *
> + * Shall be called under atomic context... to avoid possible racing condition...
> + */
> struct wlan_network *rtw_find_network(struct __queue *scanned_queue, u8 *addr)
> {
> struct list_head *phead, *plist;
> @@ -408,8 +408,8 @@ static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex
> }
>
> /*
> -Caller must hold pmlmepriv->lock first.
> -*/
> + * Caller must hold pmlmepriv->lock first.
> + */
> void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *target)
> {
> struct list_head *plist, *phead;
> @@ -434,7 +434,8 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
> plist = plist->next;
> }
> /* If we didn't find a match, then get a new network slot to initialize
> - * with this beacon's information */
> + * with this beacon's information
> + */
> if (phead == plist) {
> if (list_empty(&(pmlmepriv->free_bss_pool.queue))) {
> /* If there are no more slots, expire the oldest */
> @@ -726,8 +727,8 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv)
> }
>
> /*
> -*rtw_free_assoc_resources: the caller has to lock pmlmepriv->lock
> -*/
> + * rtw_free_assoc_resources: the caller has to lock pmlmepriv->lock
> + */
> void rtw_free_assoc_resources(struct adapter *adapter)
> {
> struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
> @@ -738,8 +739,8 @@ void rtw_free_assoc_resources(struct adapter *adapter)
> }
>
> /*
> -*rtw_free_assoc_resources_locked: the caller has to lock pmlmepriv->lock
> -*/
> + * rtw_free_assoc_resources_locked: the caller has to lock pmlmepriv->lock
> + */
> void rtw_free_assoc_resources_locked(struct adapter *adapter)
> {
> struct wlan_network *pwlan = NULL;
> @@ -789,8 +790,8 @@ void rtw_free_assoc_resources_locked(struct adapter *adapter)
> }
>
> /*
> -*rtw_indicate_connect: the caller has to lock pmlmepriv->lock
> -*/
> + * rtw_indicate_connect: the caller has to lock pmlmepriv->lock
> + */
> void rtw_indicate_connect(struct adapter *padapter)
> {
> struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
> @@ -815,8 +816,8 @@ void rtw_indicate_connect(struct adapter *padapter)
> }
>
> /*
> -*rtw_indicate_disconnect: the caller has to lock pmlmepriv->lock
> -*/
> + * rtw_indicate_disconnect: the caller has to lock pmlmepriv->lock
> + */
> void rtw_indicate_disconnect(struct adapter *padapter)
> {
> struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
> @@ -1338,9 +1339,9 @@ void rtw_cpwm_event_callback(struct adapter *padapter, u8 *pbuf)
> }
>
> /*
> -* _rtw_join_timeout_handler - Timeout/faliure handler for CMD JoinBss
> -* @adapter: pointer to struct adapter structure
> -*/
> + * _rtw_join_timeout_handler - Timeout/faliure handler for CMD JoinBss
> + * @adapter: pointer to struct adapter structure
> + */
> void _rtw_join_timeout_handler (unsigned long data)
> {
> struct adapter *adapter = (struct adapter *)data;
> @@ -1380,9 +1381,9 @@ void _rtw_join_timeout_handler (unsigned long data)
> }
>
> /*
> -* rtw_scan_timeout_handler - Timeout/Faliure handler for CMD SiteSurvey
> -* @adapter: pointer to struct adapter structure
> -*/
> + * rtw_scan_timeout_handler - Timeout/Faliure handler for CMD SiteSurvey
> + * @adapter: pointer to struct adapter structure
> + */
> void rtw_scan_timeout_handler (unsigned long data)
> {
> struct adapter *adapter = (struct adapter *)data;
> @@ -1437,10 +1438,10 @@ void rtw_dynamic_check_timer_handlder(unsigned long data)
> #define RTW_SCAN_RESULT_EXPIRE 2000
>
> /*
> -* Select a new join candidate from the original @param candidate and @param competitor
> -* @return true: candidate is updated
> -* @return false: candidate is not updated
> -*/
> + * Select a new join candidate from the original @param candidate and @param competitor
> + * @return true: candidate is updated
> + * @return false: candidate is not updated
> + */
> static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
> , struct wlan_network **candidate, struct wlan_network *competitor)
> {
> @@ -1491,11 +1492,11 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
> }
>
> /*
> -Calling context:
> -The caller of the sub-routine will be in critical section...
> -The caller must hold the following spinlock
> -pmlmepriv->lock
> -*/
> + * Calling context:
> + * The caller of the sub-routine will be in critical section...
> + * The caller must hold the following spinlock
> + * pmlmepriv->lock
> + */
>
> int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
> {
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/14a9e39afeca192713f279577e381c908f98e5ba.1487312015.git.gs051095%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
--
Vaishali
http://vaishalithakkar.in/
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [Outreachy kernel] [PATCH 2/6] staging: rtl8188eu: Fix block comments warning
2017-02-17 6:33 ` [Outreachy kernel] " Vaishali Thakkar
@ 2017-02-17 6:35 ` Julia Lawall
2017-02-17 6:42 ` Vaishali Thakkar
0 siblings, 1 reply; 11+ messages in thread
From: Julia Lawall @ 2017-02-17 6:35 UTC (permalink / raw)
To: Vaishali Thakkar; +Cc: Gargi Sharma, outreachy-kernel, Greg KH
On Fri, 17 Feb 2017, Vaishali Thakkar wrote:
> On Fri, Feb 17, 2017 at 11:50 AM, Gargi Sharma <gs051095@gmail.com> wrote:
> > Align * on each line and move final */ to a new line, to
> > conform to the kernel coding style for block comments.
>
> Typo there: s/conform/confirm
Conform is correct.
julia
>
> > Signed-off-by: Gargi Sharma <gs051095@gmail.com>
> > ---
> > drivers/staging/rtl8188eu/core/rtw_mlme.c | 61 ++++++++++++++++---------------
> > 1 file changed, 31 insertions(+), 30 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
> > index a98a550..0215b65 100644
> > --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
> > +++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
> > @@ -181,10 +181,10 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *
> > }
> >
> > /*
> > - return the wlan_network with the matching addr
> > -
> > - Shall be calle under atomic context... to avoid possible racing condition...
> > -*/
> > + * return the wlan_network with the matching addr
> > + *
> > + * Shall be called under atomic context... to avoid possible racing condition...
> > + */
> > struct wlan_network *rtw_find_network(struct __queue *scanned_queue, u8 *addr)
> > {
> > struct list_head *phead, *plist;
> > @@ -408,8 +408,8 @@ static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex
> > }
> >
> > /*
> > -Caller must hold pmlmepriv->lock first.
> > -*/
> > + * Caller must hold pmlmepriv->lock first.
> > + */
> > void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *target)
> > {
> > struct list_head *plist, *phead;
> > @@ -434,7 +434,8 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
> > plist = plist->next;
> > }
> > /* If we didn't find a match, then get a new network slot to initialize
> > - * with this beacon's information */
> > + * with this beacon's information
> > + */
> > if (phead == plist) {
> > if (list_empty(&(pmlmepriv->free_bss_pool.queue))) {
> > /* If there are no more slots, expire the oldest */
> > @@ -726,8 +727,8 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv)
> > }
> >
> > /*
> > -*rtw_free_assoc_resources: the caller has to lock pmlmepriv->lock
> > -*/
> > + * rtw_free_assoc_resources: the caller has to lock pmlmepriv->lock
> > + */
> > void rtw_free_assoc_resources(struct adapter *adapter)
> > {
> > struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
> > @@ -738,8 +739,8 @@ void rtw_free_assoc_resources(struct adapter *adapter)
> > }
> >
> > /*
> > -*rtw_free_assoc_resources_locked: the caller has to lock pmlmepriv->lock
> > -*/
> > + * rtw_free_assoc_resources_locked: the caller has to lock pmlmepriv->lock
> > + */
> > void rtw_free_assoc_resources_locked(struct adapter *adapter)
> > {
> > struct wlan_network *pwlan = NULL;
> > @@ -789,8 +790,8 @@ void rtw_free_assoc_resources_locked(struct adapter *adapter)
> > }
> >
> > /*
> > -*rtw_indicate_connect: the caller has to lock pmlmepriv->lock
> > -*/
> > + * rtw_indicate_connect: the caller has to lock pmlmepriv->lock
> > + */
> > void rtw_indicate_connect(struct adapter *padapter)
> > {
> > struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
> > @@ -815,8 +816,8 @@ void rtw_indicate_connect(struct adapter *padapter)
> > }
> >
> > /*
> > -*rtw_indicate_disconnect: the caller has to lock pmlmepriv->lock
> > -*/
> > + * rtw_indicate_disconnect: the caller has to lock pmlmepriv->lock
> > + */
> > void rtw_indicate_disconnect(struct adapter *padapter)
> > {
> > struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
> > @@ -1338,9 +1339,9 @@ void rtw_cpwm_event_callback(struct adapter *padapter, u8 *pbuf)
> > }
> >
> > /*
> > -* _rtw_join_timeout_handler - Timeout/faliure handler for CMD JoinBss
> > -* @adapter: pointer to struct adapter structure
> > -*/
> > + * _rtw_join_timeout_handler - Timeout/faliure handler for CMD JoinBss
> > + * @adapter: pointer to struct adapter structure
> > + */
> > void _rtw_join_timeout_handler (unsigned long data)
> > {
> > struct adapter *adapter = (struct adapter *)data;
> > @@ -1380,9 +1381,9 @@ void _rtw_join_timeout_handler (unsigned long data)
> > }
> >
> > /*
> > -* rtw_scan_timeout_handler - Timeout/Faliure handler for CMD SiteSurvey
> > -* @adapter: pointer to struct adapter structure
> > -*/
> > + * rtw_scan_timeout_handler - Timeout/Faliure handler for CMD SiteSurvey
> > + * @adapter: pointer to struct adapter structure
> > + */
> > void rtw_scan_timeout_handler (unsigned long data)
> > {
> > struct adapter *adapter = (struct adapter *)data;
> > @@ -1437,10 +1438,10 @@ void rtw_dynamic_check_timer_handlder(unsigned long data)
> > #define RTW_SCAN_RESULT_EXPIRE 2000
> >
> > /*
> > -* Select a new join candidate from the original @param candidate and @param competitor
> > -* @return true: candidate is updated
> > -* @return false: candidate is not updated
> > -*/
> > + * Select a new join candidate from the original @param candidate and @param competitor
> > + * @return true: candidate is updated
> > + * @return false: candidate is not updated
> > + */
> > static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
> > , struct wlan_network **candidate, struct wlan_network *competitor)
> > {
> > @@ -1491,11 +1492,11 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
> > }
> >
> > /*
> > -Calling context:
> > -The caller of the sub-routine will be in critical section...
> > -The caller must hold the following spinlock
> > -pmlmepriv->lock
> > -*/
> > + * Calling context:
> > + * The caller of the sub-routine will be in critical section...
> > + * The caller must hold the following spinlock
> > + * pmlmepriv->lock
> > + */
> >
> > int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
> > {
> > --
> > 2.7.4
> >
> > --
> > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/14a9e39afeca192713f279577e381c908f98e5ba.1487312015.git.gs051095%40gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Vaishali
> http://vaishalithakkar.in/
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAK-LDbLb%3D1rss2n7kzpGaTdtyJFrh56ay4WmD7vsJO67sewMwQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [Outreachy kernel] [PATCH 2/6] staging: rtl8188eu: Fix block comments warning
2017-02-17 6:35 ` Julia Lawall
@ 2017-02-17 6:42 ` Vaishali Thakkar
0 siblings, 0 replies; 11+ messages in thread
From: Vaishali Thakkar @ 2017-02-17 6:42 UTC (permalink / raw)
To: Julia Lawall; +Cc: Gargi Sharma, outreachy-kernel, Greg KH
On Fri, Feb 17, 2017 at 12:05 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
> On Fri, 17 Feb 2017, Vaishali Thakkar wrote:
>
>> On Fri, Feb 17, 2017 at 11:50 AM, Gargi Sharma <gs051095@gmail.com> wrote:
>> > Align * on each line and move final */ to a new line, to
>> > conform to the kernel coding style for block comments.
>>
>> Typo there: s/conform/confirm
>
> Conform is correct.
Oops! My bad! :)
> julia
>
>>
>> > Signed-off-by: Gargi Sharma <gs051095@gmail.com>
>> > ---
>> > drivers/staging/rtl8188eu/core/rtw_mlme.c | 61 ++++++++++++++++---------------
>> > 1 file changed, 31 insertions(+), 30 deletions(-)
>> >
>> > diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
>> > index a98a550..0215b65 100644
>> > --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
>> > +++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
>> > @@ -181,10 +181,10 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *
>> > }
>> >
>> > /*
>> > - return the wlan_network with the matching addr
>> > -
>> > - Shall be calle under atomic context... to avoid possible racing condition...
>> > -*/
>> > + * return the wlan_network with the matching addr
>> > + *
>> > + * Shall be called under atomic context... to avoid possible racing condition...
>> > + */
>> > struct wlan_network *rtw_find_network(struct __queue *scanned_queue, u8 *addr)
>> > {
>> > struct list_head *phead, *plist;
>> > @@ -408,8 +408,8 @@ static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex
>> > }
>> >
>> > /*
>> > -Caller must hold pmlmepriv->lock first.
>> > -*/
>> > + * Caller must hold pmlmepriv->lock first.
>> > + */
>> > void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *target)
>> > {
>> > struct list_head *plist, *phead;
>> > @@ -434,7 +434,8 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
>> > plist = plist->next;
>> > }
>> > /* If we didn't find a match, then get a new network slot to initialize
>> > - * with this beacon's information */
>> > + * with this beacon's information
>> > + */
>> > if (phead == plist) {
>> > if (list_empty(&(pmlmepriv->free_bss_pool.queue))) {
>> > /* If there are no more slots, expire the oldest */
>> > @@ -726,8 +727,8 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv)
>> > }
>> >
>> > /*
>> > -*rtw_free_assoc_resources: the caller has to lock pmlmepriv->lock
>> > -*/
>> > + * rtw_free_assoc_resources: the caller has to lock pmlmepriv->lock
>> > + */
>> > void rtw_free_assoc_resources(struct adapter *adapter)
>> > {
>> > struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
>> > @@ -738,8 +739,8 @@ void rtw_free_assoc_resources(struct adapter *adapter)
>> > }
>> >
>> > /*
>> > -*rtw_free_assoc_resources_locked: the caller has to lock pmlmepriv->lock
>> > -*/
>> > + * rtw_free_assoc_resources_locked: the caller has to lock pmlmepriv->lock
>> > + */
>> > void rtw_free_assoc_resources_locked(struct adapter *adapter)
>> > {
>> > struct wlan_network *pwlan = NULL;
>> > @@ -789,8 +790,8 @@ void rtw_free_assoc_resources_locked(struct adapter *adapter)
>> > }
>> >
>> > /*
>> > -*rtw_indicate_connect: the caller has to lock pmlmepriv->lock
>> > -*/
>> > + * rtw_indicate_connect: the caller has to lock pmlmepriv->lock
>> > + */
>> > void rtw_indicate_connect(struct adapter *padapter)
>> > {
>> > struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
>> > @@ -815,8 +816,8 @@ void rtw_indicate_connect(struct adapter *padapter)
>> > }
>> >
>> > /*
>> > -*rtw_indicate_disconnect: the caller has to lock pmlmepriv->lock
>> > -*/
>> > + * rtw_indicate_disconnect: the caller has to lock pmlmepriv->lock
>> > + */
>> > void rtw_indicate_disconnect(struct adapter *padapter)
>> > {
>> > struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
>> > @@ -1338,9 +1339,9 @@ void rtw_cpwm_event_callback(struct adapter *padapter, u8 *pbuf)
>> > }
>> >
>> > /*
>> > -* _rtw_join_timeout_handler - Timeout/faliure handler for CMD JoinBss
>> > -* @adapter: pointer to struct adapter structure
>> > -*/
>> > + * _rtw_join_timeout_handler - Timeout/faliure handler for CMD JoinBss
>> > + * @adapter: pointer to struct adapter structure
>> > + */
>> > void _rtw_join_timeout_handler (unsigned long data)
>> > {
>> > struct adapter *adapter = (struct adapter *)data;
>> > @@ -1380,9 +1381,9 @@ void _rtw_join_timeout_handler (unsigned long data)
>> > }
>> >
>> > /*
>> > -* rtw_scan_timeout_handler - Timeout/Faliure handler for CMD SiteSurvey
>> > -* @adapter: pointer to struct adapter structure
>> > -*/
>> > + * rtw_scan_timeout_handler - Timeout/Faliure handler for CMD SiteSurvey
>> > + * @adapter: pointer to struct adapter structure
>> > + */
>> > void rtw_scan_timeout_handler (unsigned long data)
>> > {
>> > struct adapter *adapter = (struct adapter *)data;
>> > @@ -1437,10 +1438,10 @@ void rtw_dynamic_check_timer_handlder(unsigned long data)
>> > #define RTW_SCAN_RESULT_EXPIRE 2000
>> >
>> > /*
>> > -* Select a new join candidate from the original @param candidate and @param competitor
>> > -* @return true: candidate is updated
>> > -* @return false: candidate is not updated
>> > -*/
>> > + * Select a new join candidate from the original @param candidate and @param competitor
>> > + * @return true: candidate is updated
>> > + * @return false: candidate is not updated
>> > + */
>> > static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
>> > , struct wlan_network **candidate, struct wlan_network *competitor)
>> > {
>> > @@ -1491,11 +1492,11 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
>> > }
>> >
>> > /*
>> > -Calling context:
>> > -The caller of the sub-routine will be in critical section...
>> > -The caller must hold the following spinlock
>> > -pmlmepriv->lock
>> > -*/
>> > + * Calling context:
>> > + * The caller of the sub-routine will be in critical section...
>> > + * The caller must hold the following spinlock
>> > + * pmlmepriv->lock
>> > + */
>> >
>> > int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
>> > {
>> > --
>> > 2.7.4
>> >
>> > --
>> > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
>> > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
>> > To post to this group, send email to outreachy-kernel@googlegroups.com.
>> > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/14a9e39afeca192713f279577e381c908f98e5ba.1487312015.git.gs051095%40gmail.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Vaishali
>> http://vaishalithakkar.in/
>>
>> --
>> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
>> To post to this group, send email to outreachy-kernel@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAK-LDbLb%3D1rss2n7kzpGaTdtyJFrh56ay4WmD7vsJO67sewMwQ%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
--
Vaishali
http://vaishalithakkar.in/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/6] staging: rtl8188eu: Put constant on right side of comparison
2017-02-17 6:20 [PATCH 0/6] Fix multiple checkpatch issues Gargi Sharma
2017-02-17 6:20 ` [PATCH 1/6] staging: rtl8188eu: Replace x==NULL by !x Gargi Sharma
2017-02-17 6:20 ` [PATCH 2/6] staging: rtl8188eu: Fix block comments warning Gargi Sharma
@ 2017-02-17 6:20 ` Gargi Sharma
2017-02-17 6:20 ` [PATCH 4/6] staging: rtl8188eu: Remove unnecessary blank lines Gargi Sharma
` (2 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Gargi Sharma @ 2017-02-17 6:20 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh, Gargi Sharma
Constants should be on the right side of comparisons.
Issue found by checkpatch.pl script.
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_mlme.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 0215b65..8bdb539 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -664,7 +664,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
pmlmepriv->to_join = false;
s_ret = rtw_select_and_join_from_scanned_queue(pmlmepriv);
- if (_SUCCESS == s_ret) {
+ if (s_ret == _SUCCESS) {
mod_timer(&pmlmepriv->assoc_timer,
jiffies + msecs_to_jiffies(MAX_JOIN_TIMEOUT));
} else if (s_ret == 2) { /* there is no need to wait for join */
@@ -674,7 +674,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
DBG_88E("try_to_join, but select scanning queue fail, to_roaming:%d\n", pmlmepriv->to_roaming);
if (pmlmepriv->to_roaming != 0) {
if (--pmlmepriv->to_roaming == 0 ||
- _SUCCESS != rtw_sitesurvey_cmd(adapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)) {
+ rtw_sitesurvey_cmd(adapter, &pmlmepriv->assoc_ssid, 1, NULL, 0) != _SUCCESS) {
pmlmepriv->to_roaming = 0;
rtw_free_assoc_resources(adapter);
rtw_indicate_disconnect(adapter);
@@ -1362,7 +1362,7 @@ void _rtw_join_timeout_handler (unsigned long data)
if (pmlmepriv->to_roaming != 0) { /* try another , */
DBG_88E("%s try another roaming\n", __func__);
do_join_r = rtw_do_join(adapter);
- if (_SUCCESS != do_join_r) {
+ if (do_join_r != _SUCCESS) {
DBG_88E("%s roaming do_join return %d\n", __func__, do_join_r);
continue;
}
@@ -1548,8 +1548,8 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
rtw_hal_get_def_var(adapter, HAL_DEF_CURRENT_ANTENNA, &(cur_ant));
DBG_88E("#### Opt_Ant_(%s), cur_Ant(%s)\n",
- (2 == candidate->network.PhyInfo.Optimum_antenna) ? "A" : "B",
- (2 == cur_ant) ? "A" : "B"
+ (candidate->network.PhyInfo.Optimum_antenna == 2) ? "A" : "B",
+ (cur_ant == 2) ? "A" : "B"
);
}
@@ -2082,7 +2082,7 @@ void rtw_issue_addbareq_cmd(struct adapter *padapter, struct xmit_frame *pxmitfr
issued = (phtpriv->agg_enable_bitmap>>priority)&0x1;
issued |= (phtpriv->candidate_tid_bitmap>>priority)&0x1;
- if (0 == issued) {
+ if (issued == 0) {
DBG_88E("rtw_issue_addbareq_cmd, p=%d\n", priority);
psta->htpriv.candidate_tid_bitmap |= BIT((u8)priority);
rtw_addbareq_cmd(padapter, (u8)priority, pattrib->ra);
@@ -2110,7 +2110,7 @@ void _rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
else
pnetwork = &pmlmepriv->cur_network;
- if (0 < pmlmepriv->to_roaming) {
+ if (pmlmepriv->to_roaming > 0) {
DBG_88E("roaming from %s(%pM length:%d\n",
pnetwork->network.Ssid.Ssid, pnetwork->network.MacAddress,
pnetwork->network.Ssid.SsidLength);
@@ -2120,13 +2120,13 @@ void _rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
while (1) {
do_join_r = rtw_do_join(padapter);
- if (_SUCCESS == do_join_r) {
+ if (do_join_r == _SUCCESS) {
break;
} else {
DBG_88E("roaming do_join return %d\n", do_join_r);
pmlmepriv->to_roaming--;
- if (0 < pmlmepriv->to_roaming) {
+ if (pmlmepriv->to_roaming > 0) {
continue;
} else {
DBG_88E("%s(%d) -to roaming fail, indicate_disconnect\n", __func__, __LINE__);
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 4/6] staging: rtl8188eu: Remove unnecessary blank lines
2017-02-17 6:20 [PATCH 0/6] Fix multiple checkpatch issues Gargi Sharma
` (2 preceding siblings ...)
2017-02-17 6:20 ` [PATCH 3/6] staging: rtl8188eu: Put constant on right side of comparison Gargi Sharma
@ 2017-02-17 6:20 ` Gargi Sharma
2017-02-17 6:20 ` [PATCH 5/6] staging: rtl8188eu: Remove multiple " Gargi Sharma
2017-02-17 6:20 ` [PATCH 6/6] staging: rtl8188eu: Add a blank line Gargi Sharma
5 siblings, 0 replies; 11+ messages in thread
From: Gargi Sharma @ 2017-02-17 6:20 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh, Gargi Sharma
Remove unnecessary blank lines to fix the checkpatch issue,
blank lines are not required before '}'.
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 8bdb539..289e809 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -392,7 +392,6 @@ void update_network(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src,
dst->PhyInfo.SignalStrength = ss_final;
dst->PhyInfo.SignalQuality = sq_final;
dst->Rssi = rssi_final;
-
}
static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex *pnetwork)
@@ -494,7 +493,6 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
exit:
spin_unlock_bh(&queue->lock);
-
}
static void rtw_add_network(struct adapter *adapter,
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 5/6] staging: rtl8188eu: Remove multiple blank lines
2017-02-17 6:20 [PATCH 0/6] Fix multiple checkpatch issues Gargi Sharma
` (3 preceding siblings ...)
2017-02-17 6:20 ` [PATCH 4/6] staging: rtl8188eu: Remove unnecessary blank lines Gargi Sharma
@ 2017-02-17 6:20 ` Gargi Sharma
2017-02-17 6:20 ` [PATCH 6/6] staging: rtl8188eu: Add a blank line Gargi Sharma
5 siblings, 0 replies; 11+ messages in thread
From: Gargi Sharma @ 2017-02-17 6:20 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh, Gargi Sharma
Remove blank lines to fix the checkpatch issue,
don't use multiple blank lines.
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_mlme.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 289e809..6316a27 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -322,7 +322,6 @@ int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst)
memcpy((u8 *)&le_scap, rtw_get_capability_from_ie(src->IEs), 2);
memcpy((u8 *)&le_dcap, rtw_get_capability_from_ie(dst->IEs), 2);
-
s_cap = le16_to_cpu(le_scap);
d_cap = le16_to_cpu(le_dcap);
@@ -547,7 +546,6 @@ static int rtw_is_desired_network(struct adapter *adapter, struct wlan_network *
bselected = false;
}
-
return bselected;
}
@@ -557,7 +555,6 @@ void rtw_atimdone_event_callback(struct adapter *adapter, u8 *pbuf)
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("receive atimdone_evet\n"));
}
-
void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
{
u32 len;
@@ -824,7 +821,6 @@ void rtw_indicate_disconnect(struct adapter *padapter)
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING | WIFI_UNDER_WPS);
-
if (pmlmepriv->to_roaming > 0)
_clr_fwstate_(pmlmepriv, _FW_LINKED);
@@ -958,7 +954,6 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net
cur_network->aid = pnetwork->join_res;
-
rtw_set_signal_stat_timer(&padapter->recvpriv);
padapter->recvpriv.signal_strength = ptarget_wlan->network.PhyInfo.SignalStrength;
padapter->recvpriv.signal_qual = ptarget_wlan->network.PhyInfo.SignalQuality;
@@ -1010,7 +1005,6 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
rtw_get_encrypt_decrypt_from_registrypriv(adapter);
-
if (pmlmepriv->assoc_ssid.SsidLength == 0)
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("@@@@@ joinbss event call back for Any SSid\n"));
else
@@ -1070,7 +1064,6 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
goto ignore_joinbss_callback;
}
-
/* s3. find ptarget_sta & update ptarget_sta after update cur_network only for station mode */
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) {
ptarget_sta = rtw_joinbss_update_stainfo(adapter, pnetwork);
@@ -1351,7 +1344,6 @@ void _rtw_join_timeout_handler (unsigned long data)
if (adapter->bDriverStopped || adapter->bSurpriseRemoved)
return;
-
spin_lock_bh(&pmlmepriv->lock);
if (pmlmepriv->to_roaming > 0) { /* join timeout caused by roaming */
@@ -1447,7 +1439,6 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
unsigned long since_scan;
struct adapter *adapter = container_of(pmlmepriv, struct adapter, mlmepriv);
-
/* check bssid, if needed */
if (pmlmepriv->assoc_by_bssid) {
if (memcmp(competitor->network.MacAddress, pmlmepriv->assoc_bssid, ETH_ALEN))
@@ -1530,7 +1521,6 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
candidate->network.Configuration.DSConfig);
}
-
/* check for situation of _FW_LINKED */
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
DBG_88E("%s: _FW_LINKED while ask_for_joinbss!!!\n", __func__);
@@ -1928,7 +1918,6 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
struct ht_priv *phtpriv = &pmlmepriv->htpriv;
u32 rx_packet_offset, max_recvbuf_sz;
-
phtpriv->ht_option = false;
p = rtw_get_ie(in_ie+12, _HT_CAPABILITY_IE_, &ielen, in_len-12);
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 6/6] staging: rtl8188eu: Add a blank line
2017-02-17 6:20 [PATCH 0/6] Fix multiple checkpatch issues Gargi Sharma
` (4 preceding siblings ...)
2017-02-17 6:20 ` [PATCH 5/6] staging: rtl8188eu: Remove multiple " Gargi Sharma
@ 2017-02-17 6:20 ` Gargi Sharma
5 siblings, 0 replies; 11+ messages in thread
From: Gargi Sharma @ 2017-02-17 6:20 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh, Gargi Sharma
Add a blank line after function declaration to fix the
checkpatch issue Please use a blank line after
function/struct/union/enum declarations.
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_mlme.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 6316a27..82ee022 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -2085,6 +2085,7 @@ void rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
_rtw_roaming(padapter, tgt_network);
spin_unlock_bh(&pmlmepriv->lock);
}
+
void _rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread